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\$
7
  • 1
    \$\begingroup\$ Circuits should be described with diagrams and not ambiguous words. \$\endgroup\$
    – Andy aka
    Aug 7, 2018 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\$
    – Drew123
    Aug 7, 2018 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, 2018 at 14:52
  • 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\$ Aug 7, 2018 at 17:00
  • 1
    \$\begingroup\$ The 100uF capacitor in your sketch has the wrong polarity - the negative terminal should be grounded. \$\endgroup\$ Jun 2, 2019 at 16:22

4 Answers 4

1
\$\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\$
3
  • \$\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\$
    – Drew123
    Aug 7, 2018 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\$
    – Drew123
    Aug 7, 2018 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, 2018 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\$
0
\$\begingroup\$

There is no need for the bridge. Without it, the transistor will conduct on the positive half-cycles. This reduces the detection threshold to 0.6 V, much better for lower volume audio. The transistor's base-emitter junction will be reverse-biased during the negative half-cycles, which is fine because many transistors have a reverse voltage spec of around -5 V, way more than the phone output.

Audio frequencies are very high compared to what the eye can perceive as flicker, so the LEDs should look the same without the alter-ate half-cycles that the bridge was providing.

I don't see any LED current limiting. Is is built into the LED strip? What is the LED current requirement?

\$\endgroup\$
1
  • \$\begingroup\$ I imagine he is using those led array tape strips that have internal resistors. \$\endgroup\$ Apr 14, 2021 at 16:26
0
\$\begingroup\$

#1 a transistor is a current control device that proportionally conducts along its load line. This is why they were first called trans-resistors. They require a DC bias for them to conduct. A MOSFET is a current control device that allows or denies a current conduction based on the threshold voltage of the gate. I does not require a bias as the trans-conductive device is always in a state of conduction. If you want the dimming light effect, like the circuit example, but want it staring at a lower detection voltage, you would add a voltage divider across the base circuit, and set the base's voltage just slightly below the condition state of the LEDs. Like so:

schematic

simulate this circuit – Schematic created using CircuitLab

Alternatively, you can set this threshold in the detection circuit, and carry the dc offset over into the stage like this:

schematic

simulate this circuit

Of course if the AC coupling device is a signal transformer, you could modify the circuit with adding the voltage divider at the secondary's center tap, to control the voltage offset.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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