Flashing LEDs to music

Thread Starter

mtv22

Joined Jul 4, 2013
5
Hello,

I've been trying to get LEDs to flash to music through the 3.5mm audio jack on my laptop. I want to get this to work so I can go on to splitting the frequency for bass mid and high, but for now I'm struggling to get a simple test circuit to work. I've searched through endless instructables and youtube videos made by people who know even less than I do about circuits to no avail. I'm still kind of a beginner; I've tried to read the articles on here about it but they are way more complicated than I can understand.

So, right now my problem is I can get the LEDs to flash to music with just one transistor (2n3904 ot tip31), but they only hit the max current if the volume on my laptop is considerably high. I plan to split the audio output later so I can listen to music too, so I don't want to have the music on full blast to get a couple of tiny LEDs to light up. To solve this, I tried to connect two transistors in a darlington pair with a pot. I know it's working because the LEDs flash when I touch the base wire, but when I connect the circuit to the audio jack, the LEDs just stay about 70% lit and flicker a very small amount. I guess my question is, why is this happening and is there anyway I can fix this/do it a different way?

http://i803.photobucket.com/albums/yy317/mtv221/circuit.jpg
Here's an image of my circuit with the two transistors
 

Wendy

Joined Mar 24, 2008
23,429
Part of the problem is no resistors on the base. Try adding a 4.7K on the input. Also add a 10μF capacitor.

 

DickCappels

Joined Aug 21, 2008
10,185
Bill, where should be put the capacitor and should the base resistor be in series with the signal?

One one other thing, the audio signal needs to be capable of supplying over 1.2 volts, which is more than some portable music players can put out, or the transistors will probably never turn "on". You can probably get by with a single transistor.
 

Wendy

Joined Mar 24, 2008
23,429
Basically a transistor input looks like a simple diode in the common emitter configuration, a Darlington looks like two diodes. My thought is to eliminate stray currents from the computer interfering with the transistor DC bias, but another thought occurs to me. You may not have enough signal to break over the two diode B-E junctions.

I cover a lot of this territory in my LEDs, 555s, Flashers, and Light Chasers article in chapter 12, labeled "Fire!".

Be right back, drawing.
 

Wendy

Joined Mar 24, 2008
23,429
OK, here it is...



I was being conservative, C1 can probably be eliminated. It is an old trick to make a polarized cap into a non-polarized type.

R3 needs to be as large as you can get, 100KΩ or larger. It is to take the transistor to the threshold of being turned on, without actually turning them on. The audio signal will then do the rest.

Good to hear from you Dick. Playing devil's advocate? I know you know this stuff.
 

Attachments

donpetru

Joined Nov 14, 2008
185
Something simple that works perfectly and is circuit "SIG" used in many audio amplifiers projects that I have designed.
@mtv22, for example, analyzes DW300 project (see sheet 2, SIGNAL circuit). You will find what you need.

Remember the following: the solution presented by me working with audio signals greater than 1V but can be easily adapted to operate with lower signals.
 

Attachments

Thread Starter

mtv22

Joined Jul 4, 2013
5
Wow thank you so much for your help! I used the final schematic Bill posted and it worked very well!! To get the LEDs to flash really brightly I have to have the pot at a spot where the LEDs are always dimly lit with no music playing, but I've been playing around with it and have gotten it in a pretty good spot so the LEDs are barely lit when there's no music and still flash brightly with the music. Thank you so much for your help, time for me to experiment with just a single transistor and possibly higher currents to drive more LEDs.
 

wayneh

Joined Sep 9, 2010
17,498
... time for me to experiment with just a single transistor and possibly higher currents to drive more LEDs.
No offense, but why bother with a single transistor? A darlington is a very good choice here and they can be readily purchased pre-made as if they are a single transistor. Just sayin'
 

Wendy

Joined Mar 24, 2008
23,429
Minimum parts count is always important, to mangle Einstein, Make it as simple as you can, but no simpler.

The OP also specified a very low level signal. A Darlington with a gain of 1000 or more will work well, and can be bought as a single package.
 

tracecom

Joined Apr 16, 2010
3,944
€Hunter;625016 said:
The LM3915 will flash leds to music. Many leds actually.
How do they differentiate frequency? Just varying the intensity of LEDs in response to voltage changes may form the basis for a VU meter, but not a color organ.
 
How do they differentiate frequency? Just varying the intensity of LEDs in response to voltage changes may form the basis for a VU meter, but not a color organ.
You can make an led spectrum analyser based around it. Filter out the frequencies with op amps I guess.

Great IC. You looking to buy?
 

tracecom

Joined Apr 16, 2010
3,944
€Hunter;625030 said:
Band pass filters. Give it a go.
Unless you are just working on your post count, you should spend more time reading the threads and less time dropping one-liners. Fifteen posts by someone who has been a member here less than two hours?
 
Top