Using transistor to switch leds on/off

Click For Summary

Discussion Overview

The discussion revolves around using a transistor and op-amp circuit to control the operation of an LED based on an audio input signal. Participants explore how to achieve full brightness or complete shutdown of the LED depending on the input voltage level, while also addressing circuit design considerations and component choices.

Discussion Character

  • Technical explanation
  • Exploratory
  • Debate/contested

Main Points Raised

  • One participant describes their circuit setup using an audio source and a 4V LED, seeking advice on increasing the voltage across the LED.
  • Another participant suggests ensuring the BJT is saturating and mentions the need for a current-limiting resistor to protect the LED.
  • There is a discussion about the appropriate design for varying LED intensity based on audio input, with references to RMS voltage and amplifier gain considerations.
  • A participant inquires about using a non-inverting op-amp design with specific resistor values, expressing concerns about the output voltage across the LED.
  • Another reply suggests experimenting with a smaller gain ratio for the op-amp and checking if the LED is functioning properly, while also explaining the meaning of frequency compensation in op-amps.
  • Participants discuss the implications of using different op-amp models, questioning whether the HA11741 would perform similarly to the LM741.

Areas of Agreement / Disagreement

Participants express various approaches and considerations for the circuit design, but no consensus is reached on the optimal configuration or component choices. Multiple competing views on how to achieve the desired LED behavior remain present.

Contextual Notes

Participants mention potential issues such as the need for current-limiting resistors, the importance of BJT saturation, and the effects of different op-amp models, but these aspects remain unresolved in terms of their impact on the circuit's performance.

nyxynyx
Messages
34
Reaction score
0
I'm currently using this circuit, but without the rectifying portion,a audio source from mp3 player instead of a mic, and a 4V LED instead of a bulb. My power source is 12v. However, the voltage across the LED is only around 1-1.5V. How can i increase the voltage across the LED?

Here is what i want to do. I'm trying to have the LED light up only when the input voltage from audio source is above a certain voltage. When the input is above a certain voltage, the LED lights up fully, and when the input drops below that certain voltage, the LED switches off completely. The LED is either at its maximum brightness, or not emitting any light at all. Hopefully, I can replace the LED with another load and have the voltage across the load to be either 12V or 0V, or either 4V or 0V. How can i achieve this?
 

Attachments

  • 03081.png
    03081.png
    3.7 KB · Views: 708
Last edited:
Engineering news on Phys.org
Howdy nyxynyx,

The (idealized) circuit you posted assumes a few things:
1) Microphone transduction (i.e. current generated) is high enough to saturate the BJT
2) (Given 1) The BJT saturation current is sufficient to turn on the lamp (often in the range of a few hundred mA)
3) The BJT responds fast enough to the signal (probably few hundred Hz to few kHz) that the lamp actually turns on.

With that in mind, to get a higher voltage across the LED, you should analyze your circuit to ensure that the BJT is, in fact, saturating. Since a LED has only a very low on resistance (few ohms), you probably need to introduce a current-limiting resistor to accomplish this (as well as to ensure that your LED doesn't go ZAP). I also think your circuit (incidentally, this is what's called a Common Emitter Amplifier) needs some biasing on the base to function properly and give you decent swing.

As to the second portion of your question, how to vary the LED intensity with the input voltage, well, if you're talking DC voltage, that's pretty easy. If you're talking audio (again, stuff between 20 Hz and 22.1 kHz--unless you're a fan of pure tones) I think you'd be dealing with the RMS voltage. Again, you just need to use an appropriate resistor value to limit the current, and design your amplifier gain such that you don't have a lot of saturation (i.e. it doesn't "go to the max" at a low volume).

The above is written assuming a pretty good electronics background, so, if you don't have a few years of EE (or, better yet, EE tech) education behind you, it might be easier to build something called a non-inverting amplifier based off of a op-amp. Or you could build the non-inverting type and use it to sink LED current. Your life is made much simpler because you don't need the negative rail. This would make a terrible audio amplifier, but a great LED indicator. If you cheap out (and you probably can) and just use a "plain-jane" op-amp (e.g. a LM741) with the negative rail connected to ground, you can probably get something to work:

http://hyperphysics.phy-astr.gsu.edu/Hbase/Electronic/opampvar.html

WARNING: If you use the inverting amplifier, make sure to use a large value of R1 (> 1k) Your fancy MP3 player might not survive having lots of current drawn out of it! IIRC, the non-inverting amplifier presents the Op-Amp resistance to your input (which is usually in the range of a few megaohm). Also, whatever configuration you use, don't forget to use a current-limiting resistor for your LED (otherwise, it'll just turn on-off until such time that it burns out). On that note, I take no responsibility for burnt-out audio equipment if you try this without testing!
 
Can i use the non-inverting opamp design with only 0v and +12v? I did try using 500K pot as R_f and 1K resistor as R_i but the output seem to be quite steady at 0.7V across the LED. Did i do something wrong?

I can't find a LM741 so i used a HA11741. Will this make a difference? What does it mean by frequency compensated?
 
As I say, you might be able to make it work with some experimentation ;-)

Best bet, use a smaller gain ratio (right now, it's 501 try 5 or 10 or 50 or something). If it does work, you'd be causing it to saturate pretty quickly (so on-off operation). The second thing is: do you have a current limiting resistor (e.g. 470 ohm) in series with the LED? If so, you might want to check to see if your LED is blown (see if it'll turn on with the 12V supply and the current limiting resistor). If this is still okay, your op-amp might not be able to source enough current to turn on the LED (you need 10 mA or so)--this you can check by hooking up the '+' terminal to 12V, the '-' terminal to GND, hooking up a 1 kohm resistor to the output (and GND) and seeing if you get 12V at the output (meaning that 12 mA are flowing through the 1k resistor)

By 'frequency compensated', it means that there should be no unpleasant surprises in operation within the spec'd frequency range. It acts predictably with no spurious poles or zeros (which would cause the aforementioned 'unpleasant surprise'):
http://www.st-andrews.ac.uk/~www_pa/Scots_Guide/datasheets/Opamps/741.html

I can't find a datasheet for a HA11741, but if it's a general purpose op-amp, it should suffice.
 

Similar threads

  • · Replies 15 ·
Replies
15
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K
Replies
2
Views
3K
  • · Replies 42 ·
2
Replies
42
Views
6K
Replies
18
Views
9K
  • · Replies 27 ·
Replies
27
Views
6K
Replies
4
Views
3K
Replies
2
Views
2K
Replies
21
Views
3K
  • · Replies 21 ·
Replies
21
Views
3K