led control transistor - Page 1
Forum section: electronics / beginners

author: yalect
author_rank: Regular Contributor
timestamp: October 01, 2019, 09:55:10 am
content: Hi,I would like to ask you that I found this two circuit, I want to determine which are better and safty for current and load and transistor workingthank you

author: Zero999
author_rank: Super Contributor
timestamp: October 01, 2019, 10:12:19 am
content: I Goolged the part number for the LED and it requires something to limit the current.https://www.mouser.co.uk/ProductDetail/Lite-On/LTL-307EE?qs=Yz4wJs0d%252BpgyXm%2FpkMp2pg==Neither of those circuits will limit the current to the LED. The first one is a common emitter amplifier. The hFEof a transistor isn't a tightly controlled parameter. It can vary from device to device of the same type and has a positive temperature coefficient. The second one is an emitter follower, which outputs a constant voltage, less the base-emitter voltage of the transistor.If the power supply voltage doesn't vary much, just use a resistor. Some power can be saved by connecting the LEDs in strings of two in series.R = (V-VF)/(I)Were V is the supply voltage.VFis the forward voltage.IFis the forward current, in amps.ExampleV = 6VVF= 2VIF= 10mA = 0.01A.R = (6-2)/0.01 = 4/0.01 = 400R, so use 390R or 430R, the two nearest standard E24 values.

author: mariush
author_rank: Super Contributor
timestamp: October 01, 2019, 10:53:35 am
content: Both circuits are bad in different ways.In the first example, you may damage your leds because the current on the leds may not be limited in any way (depends on the hFe of the transistor, if it's fully open or not)In the second example, you're gonna damage the transistor because you're not limiting the current going into the base pin.Here's a very good tutorial about npn transistors, that explain how you'd use them as on/off switches. It's best not to use them in the in-between mode, and rely on that to limit the current :If you want to use the transistor to turn leds on and off, the 2nd circuit will work, provided the base current is high enough (calculate the resistor value by following the video above, but pick a current that is low enough but guarantees the transistor will be fully on)Then, add a resistor in series with the leds to limit the current. You have the formula V = I x R so with transistor in circuit, this becomes:Vin - number of leds in series x Forward Voltage - voltage drop on transistor = I x RIf you have a bunch of leds in parallel, you put 1 in the formula, but your current is number of leds x individual currentIf you have a bunch of leds in series, you put number of leds in the formulaThe voltage drop on the transistor is something like 0.4v .. 0.6v, depends on transistor and it's in datasheet (collector-emitter drop) ...forSS8050it's 0.5vSo let's say 5v input, 4 leds in parallel each with 10mA (0.01A) with a 3.2v forward voltage (white led) you'd have5v - 1x3.2v - 0.5v = (4x0.01) x R => R = 1.3 / 0.04 = 32.5 ohm , so you'd use standardR24 valueof 30 ohm, or 33 ohmIf you want 4 leds in series, you'd need at least 4x3.2v + around 1v for safety, or let's say 14v.Then formula becomes14v - 4x3.2 - 0.5 = 0.01 x R => R = 0.7/0.01 = 70 ohms, so you'd probably go with 68 ohm or 75 ohm resistors that are easier to source.For LTL-307EE you have datasheet here:https://www.digikey.com/product-detail/en/lite-on-inc/LTL-307EE/160-1701-ND/140833It says typical forward voltage 2.0v, maximum 2.5v and maximum continuous current 30mAIf you go with the maximum forward voltage, then I'd suggest staying to let's say maximum 25mA of current.How much current you decide on it's up to you, brightness doesn't scale linearly with current. For some applications even 5mA will be plenty.

author: yalect
author_rank: Regular Contributor
timestamp: October 01, 2019, 11:21:32 am
content: thank you for replythe example above with the resistor connected to the base you said, may I will damage my leds but when I measure the combined led resistance I found that is high more then 2M ohm which means very small current of collector.for the example of no resistor in the base of transistor, the collector will adapt the current of the base?thank you

author: mariush
author_rank: Super Contributor
timestamp: October 01, 2019, 11:37:17 am
content: With no resistor on the base of the transistor, you'll damage the transistor (unless you power the circuit from a battery with high internal resistance like a CR2032 battery for example)With a 100kohm resistor, the current and voltage on the base are so low that the transistor doesn't open up.You want a resistor that will cause the transistor to open up fully and work as an on/off switch. You don't want to open it partially and rely on that to limit the current, because hFe (amplification) varies from transistor to transistor (for example could be typical 100x , maximum 300x ... you get a bag of 100 transistors and this hFe will be all over the range on each transistor) and will also vary with temperature of the transistor.So for example, if the transistor is rated for maximum 800mA of collector-emitter current and the minimum hFe is 100, you'd need 800/100 = 8mA on the base to have the transistor open, but you can put some tolerance there and set your base current to something like 10-12 mA... basically making sure the transistor will be fully open.So as an example, with 10mA on base and 5v power supply, you have formula V = IxR so you have 5v - Vbe (~0.7v...1.2v, i'll use 1v) = 0.01A x R => R = 4v/0.01 = 400 ohm ... so I'd choose either 390 ohm or 470 ohm (4v/80mA = 500 so even at 8mA current, 470 ohm is good enough)Watch the video. It explains these things.

author: Zero999
author_rank: Super Contributor
timestamp: October 01, 2019, 02:55:27 pm
content: Quote from: mariush on October 01, 2019, 10:53:35 amThe second circuit will damage the transistor, but that's not the reason why. It's because there's nothing to limit the current through the LEDs, so the transistor will also overheat, along with the LEDs. It's configured as an emitter follower and the base current is self-limiting. If a series resistor is added to the LEDs, that circuit will work without a base resistor and will not damage the transistor.Quote from: mariush on October 01, 2019, 11:37:17 amThat will only happen on the second circuit, with the load on the collector side.

author: yalect
author_rank: Regular Contributor
timestamp: October 01, 2019, 03:18:00 pm
content: so, transistor with leds on the collector as load and appropriate resistor on the base let's say 20Kohm, hFe=>100, Vcc=12v and transistor is rated for maximum 800mA of collector-emitter currentwill work well?

author: mikerj
author_rank: Super Contributor
timestamp: October 01, 2019, 03:58:58 pm
content: Quote from: yalect on October 01, 2019, 11:21:32 amLEDs are diodes, not resistors so measuring resistance with a multimeter only tells you if the diode has gone short circuit or not. Most LEDs need something to limit the current through them to a safe value, at it's simplest this just means using a series resistor of suitable value. Some LEDs have built in current limiting (usualy sold as e.g. 12V LEDs) but yours does not.

author: ledtester
author_rank: Super Contributor
timestamp: October 01, 2019, 04:01:27 pm
content: Quote from: yalect on October 01, 2019, 03:18:00 pmFor just driving 4 red LEDs practically any NPN transistor will work. How many LEDs do you want to control?You'll want resistors in series with your LEDs.THe hFE in the datasheet only applies to certain operating conditions and is only a ballpark figure, so you'll probably will have to determine a suitable base resistor by just trying out different values.If you have 12V to work with you can also configure them in series like this:Code:+12 ---- /\/\/ ---- -|>- -- -|> -- -|>- -- -|>- -- C E ---- GND\ /Bwhere C, E and B are the collector, emitter and base of the transistor. This will result in less power being dissipated by the transistor.

author: MarkF
author_rank: Super Contributor
timestamp: October 01, 2019, 07:42:44 pm
content: There are many configurations you could use.Here are just three off the top of my head:

author: Zero999
author_rank: Super Contributor
timestamp: October 01, 2019, 08:39:27 pm
content: Quote from: yalect on October 01, 2019, 09:55:10 amWhat do you intend to control the transistor with?This sounds like an X & Y problem.What are you trying to do?

author: yalect
author_rank: Regular Contributor
timestamp: October 02, 2019, 08:17:39 am
content: Hi,I remarked that on all this circuits below, the base of the transistor have to be connected to GND with resistorwe can ignore that resistor by increase resistor of the base?thank you

author: Zero999
author_rank: Super Contributor
timestamp: October 02, 2019, 09:21:59 am
content: Quote from: yalect on October 02, 2019, 08:17:39 amIt's generally good practise to connect the base to a definite voltage. In reality, the circuit will probably work, without a resistor between the base and emitter, but it makes it more vulnerable to electromagnetic interference. If the wire to the switch is long, it can pick-up stray electromagnetic fields, which can induce a high enough voltage to turn the transistor on. Adding a resistor to pull the base down to ground, reduce the risk of the transistor turning on, due to tiny currents.

author: Dave
author_rank: Super Contributor
timestamp: October 02, 2019, 09:44:44 pm
content: Quote from: Zero999 on October 02, 2019, 09:21:59 amWhat you're talking about is usually done for FETs. Resistors between base and emitter are there to turn the transistor off quicker, by helping drain the charge from the base once the control voltage is disconnected.You'd need a very large EM disturbance to get the transistor conducting sporadically. Darlington pairs, on the other hand, are a different beast.They can be easily be omitted on circuits like this one.

author: yalect
author_rank: Regular Contributor
timestamp: October 03, 2019, 08:07:08 am
content: Hi,What you're talking about is usually done for FETs. Resistors between base and emitter are there to turn the transistor off quicker, by helping drain the charge from the base once the control voltage is disconnected.thank youyou mean we can ignor that resistor (base and emitter) for large resistor of the base to limite the current.greeting

author: yalect
author_rank: Regular Contributor
timestamp: October 03, 2019, 08:15:31 am
content: Hi,Quote from: yalect on October 03, 2019, 08:07:08 amthank youyou mean we can ignor that resistor (base and emitter) for large resistor of the base to limite the current.greeting

author: mikerj
author_rank: Super Contributor
timestamp: October 03, 2019, 11:55:20 am
content: Quote from: Dave on October 02, 2019, 09:44:44 pmZero's advice is applicable to both FETS and bipolar transistors. On any well designed circuit with a bipolar transistor used for switching there will be a resistor from base to emitter, in fact you can even buy bipolar transistors designed for switching that have both resistors built into the package.

author: Zero999
author_rank: Super Contributor
timestamp: October 03, 2019, 01:06:42 pm
content: Quote from: mikerj on October 03, 2019, 11:55:20 amTo expand further, it depends on what the BJT is driving. Some LEDs can light on their own from stray fields. I have some high efficiency green LEDs which light very dimly when I hold one leg and connect the other to an earthed object, such as a radiator. Add a BJT to the circuit and the LED current will be around 200 times as big, causing it to be much brighter.

author: SteveyG
author_rank: Unknown
timestamp: October 04, 2019, 05:55:58 am
content: What do you want to achieve? Constant current regardless of input voltage, or just current limiting?I did a video many years ago which may help, (video #018, Linear LED Constant Current Driver Circuits)