Circuit for LED flashlight

Audioguru again

Joined Oct 21, 2019
6,785
The base-emitter is about 0.65V. Then the current in the 100 ohms resistor is 0.65/100= 6.5mA and the heating in the resistor is 0..65V x 6.5mA= 4.2mW which is nothing.

The 6.5mA is shared by each string of series LED then each LED dimly lights with only 2.2mA.
 

Thread Starter

PsySc0rpi0n

Joined Mar 4, 2014
1,777
Yeah, I was doing something wrong in the simulation and that's why I was getting 0.3W on that resistor.
Anyway. I put the circuit on the stripboard but there is an hardware bug. lol. The middle row of LEDs are not lightning up!

Also changed the 30kΩ resistor to a 2k2Ω to get a current in each branch closer to the 20mA I wanted!
Does this resistor plays some important role?
 

Audioguru again

Joined Oct 21, 2019
6,785
Any transistor will have an hFE of at least 100 then for a 60mA output and 10.7V across the resistor its value is 18k ohms max.
Your negative schematic does not have the extremely important 12V supply voltage shown.
 

AnalogKid

Joined Aug 1, 2013
11,204
It was there in post #1, and it's still there in post #30 -

Connecting LEDs, or strings of LEDs, directly in parallel is not a good idea. It isn't always dangerous, but variations in the Vf of the individual LEDs (which varies significantly with temperature and from one manufacturing lot to another) leads to uneven light distribution. IOW, you can wind up with one bright string and one dim string, because the string with the lowest total Vf will hog the available current away from the other strings. The solution is to add a small resistor to each string; not for current limiting, but as ballast, a form of degenerative feedback.

Separate from that -

For a simple constant current circuit with low headroom and stable performance, it is hard to beat an LM317 plus 1 resistor. The internal voltage reference has a tight initial value tolerance and very low temperature coefficient. The TO-220 package can handle 0.3 W easily without a heatsink.

Note: In my experience, C1 can be 0.01 uF (10 nF) or even lower, but it really has to be there.

ak

LM317-Constant-Current.png
 
Last edited:

crutschow

Joined Mar 14, 2008
34,845
the string with the lowest total Vf will hog the available current away from the other strings.
You could always add a small resistor in series with the string(s) that are too bright.
For a simple constant current circuit with low headroom and stable performance, nothing beats an LM317 plus 1 resistor.
It gives good performance, (more than likely needed for an LED flashlight) but doesn't fit my definition of "low headroom".
It has about a 3V minimum dropout, whereas the two-transistor circuit has <1V.
 

bassbindevil

Joined Jan 23, 2014
838
Since before the first humanoids descended from the trees and waved thigh bones at the alien monolith we've been taught that connecting LEDs in parallel is bad, but if you look at the voltage/current curve of any LED, they all behave enough like resistors to share current just fine.
 

Audioguru again

Joined Oct 21, 2019
6,785
The lowest voltage LED in parallel hogs most of the current then quickly burns out. Then they fail in the sequence of their actual forward voltage. The LED with the highest forward voltage brightly burns out last.

My new very cheap Chinese flashlight has 60 LEDs paralleled with the forward voltages all perfectly matched.
 

Attachments

crutschow

Joined Mar 14, 2008
34,845
You are way overthinking this. Put them in series with a 120Ω resistor. For this low power, anything else is silly.
Only if you think it's "silly" to keep the LED current relatively constant with the change in battery voltage as it discharges.
 

Audioguru again

Joined Oct 21, 2019
6,785
Everybody assumes that cheap "Super Heavy Duty" batteries cause a flashlight to quickly dim.

Just a few minutes ago I replaced two AA alkaline batteries in a product made in China. They are both in series therefore used exactly the same current. One tests like new and the other is almost completely dead. Poor quality.
 

Thread Starter

PsySc0rpi0n

Joined Mar 4, 2014
1,777
Well, just as an update.

I connected 3 branches in parallel of 3 series LEDs, using the 2 transistor suggestion made by @someone.
I took a couple of pictures of my shitty project and I couldn't use the 100Ω variable resistor because the ones I have here are too big for this. I still have some space available if I find smaller rpots I can use here. I'm not sure I'm going to use batteries because this is a bit small to use battery holders.

I think for now, I'm going to call it done.

I may even use @AnalogKid suggestion for the UV LEDs light, when I get them, unless there is any major drawback.

Here are some pics.
https://i.ibb.co/tB7Dcg9/20220129-123925.jpg
https://i.ibb.co/jZD6T76/20220129-123849.jpg
https://i.ibb.co/TvSRCT8/20220129-123913.jpg

rpot comparison to the stripe board size!
https://i.ibb.co/TTBGcwk/20220129-124429.jpg
 

Wendy

Joined Mar 24, 2008
23,480
LED's like transistors having approximate Vf drop. Putting them in series is very poor engineering practice. If you can put them in series instead.

LEDs, 555s, Flashers, and Light Chasers

Oops, I should have said, Putting them in parallel is very poor engineering practice. If you can put them in series instead.
 
Last edited:

Thread Starter

PsySc0rpi0n

Joined Mar 4, 2014
1,777
LED's like transistors having approximate Vf drop. Putting them in series is very poor engineering practice. If you can put them in series instead.

LEDs, 555s, Flashers, and Light Chasers
Well, the thing is done. Some says it's ok in series, some says it's ok in parallel. Seems there is no general agreement on this! Anyway, for my usage, I think I'll be fine! This is not supposed to be a flash light to be sold or anything like that!
 

AnalogKid

Joined Aug 1, 2013
11,204
Some says it's ok in series, some says it's ok in parallel. Seems there is no general agreement on this!
Incorrect. There has been general agreement since the 1960's, about three minutes after LEDs started to become generally available at reasonable prices. LED's in direct parallel without some kind of current balancing mechanism are not at all a good design practice. Large companies with in-house design rule books (Raytheon, Marconi, etc.) usually ban this. Beyond the uneven illumination, it has a direct, negative effect on long-term reliability.

ak
 
Top