0
\$\begingroup\$

I am controlling an LED strip based on audio input from my phone. I am having some good results, but not exactly what I want, and my ignorance of transistors is holding me back. (I'm a mechanial engineering major rather than electrical.)

I have my phone connected to an amplifier which then outputs an AC audio signal through a bridge rectifier and then that DC signal is sent through an NPN transistor (TIP 121) acting as a switch to control an LED strip. I've got the lights to choreograph to music and it looks great, however, it only works when the volume is very loud. As I increase the volume, the LED strip gets brighter, and as I decrease it, the LED dims.

My first question is why does this happen? I have the strip connected to 6V so shouldn't the input from the amplifier to the transistor only switch on and off the 6V supply?

And if I want the lights to work at low volume (when there is too of low current from the amp to switch the transistor,) can I add a second transistor to act as an amplifier (based on a common collector/emitter follower circuit?) Should that second transistor go before or after the bridge rectifier?

enter image description here

\$\endgroup\$
  • \$\begingroup\$ Circuits should be described with diagrams and not ambiguous words. \$\endgroup\$ – Andy aka Aug 7 '18 at 14:44
  • \$\begingroup\$ Yeah, i know, I tried uploading a png, jpg, and inserting a schematic, but it pops up as an error. You know how to fix this error? \$\endgroup\$ – Andrew Kafoury Aug 7 '18 at 14:47
  • \$\begingroup\$ That's unfortunate. I have also noticed a few glitches today but seemingly unrelated to your problem but maybe not. SE is usually very reliable on uploads. \$\endgroup\$ – Andy aka Aug 7 '18 at 14:52
  • \$\begingroup\$ I've had trouble with images today as well. Error messages seem to come from Imgur. \$\endgroup\$ – JRE Aug 7 '18 at 15:00
  • 1
    \$\begingroup\$ To make audio amplitude modulation be independent of amplitude , some excess gain and feedback to modulate the gain at a slower rate is necessary. Read, audio AGC or Log Amp or enhanced “ light organ” \$\endgroup\$ – Sunnyskyguy EE75 Aug 7 '18 at 17:00
0
\$\begingroup\$

First, an NPN transistor isn't really a switch, it's a current amplifier. If you put no current into the base, it allows no current through the collector. If you put a small current into the base, it allows a larger current though the collector. In digital circuits, it can be used as a switch by setting the base current to zero or quite a bit, and never anything in between. But your circuit may well be operating for some of the time in the "linear" region where the transistor is acting as an amplifier.

Second, it takes about 0.6V to turn on an NPN transistor at all. A silicon diode, as used in a bridge rectifier, also takes 0.6V. And there are two of them in either path through the rectifier. So nothing at all happens until the voltage exceeds about 1.8V. The lower the volume, the less time the voltage will exceed 1.8V.

\$\endgroup\$
  • \$\begingroup\$ Thanks for the info. So what do you suggest? Is there a way to filter the current going into the transistor so it is not in the "linear" region acting as an amplifier rather than a switch? \$\endgroup\$ – Andrew Kafoury Aug 7 '18 at 17:20
  • \$\begingroup\$ ^I suppose I can do some math to make sure it is always in the saturation region, maybe change the resistor value and use a different transistor. Or just have two aux cords, one going straight to the amp/speakers and one going straight to a transistor used as an amplifier to power lights and have both aux cords connected to my phone \$\endgroup\$ – Andrew Kafoury Aug 7 '18 at 19:36
  • \$\begingroup\$ @AndrewKafoury If you need to boost the gain, put the preamplifier before the bridge rectifier. It may then need a decoupling capacitor between the preamplifier and the rectifier, if the DC offset coming out of it is not zero. But to do what you want, you probably need a preamplifier with automatic gain control, so that it will work over a wide range of music volumes. That's not a simple one-transistor circuit. \$\endgroup\$ – Simon B Aug 7 '18 at 22:07
0
\$\begingroup\$

The TIP121 is not a single transistor, instead it is a Darlington with two transistors. Then the bridge rectifier has two diodes in series and the Darlington transistor has two transistors in series. The 100uF capacitor has such a high value that it takes a long time for a continuous loud signal from the amplifier to charge it to about 2.4V when it will begin to light the LED strip. Then it will take a long time for the LED light to fade away.

In my living room I have not just one LED but I have a LED sound loudness meter with 10 LEDs that each lights at a different loudness from a microphone. It has a peak detector circuit that charges a capacitor very quickly when there is a sound then the capacitor holds its charge for 30ms (long enough for our vision to see its brightness) then if there is less loudness the capacitor discharges slower but still fairly quickly.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.