Driving LEDs with a battery pack

Show me how he can set the current to 20 ma by controlling only one variable.

If you can then ohms law is wrong and Kirchoff's law is also wrong and a Nobel prize is yours for the asking.

Lets get an arbitrary voltage and strap it to the LED and see what happens! Lets go the whole hog and tell him to plug the LED straight into the wall socket.

Vexcesssupply = Vbattery - Vf.

The only way he can control the current through the LED is to control Vexcesssupply AND the effective series resistance of the circuit. He controls the Vexcesssupply by selecting a specific battery. A passive resistor works just like any other fixed resistor, a light globe works as a variable resistor and a JFET constant current source is an active variant of a variable resistor.

Show me how he can set the current to 20 ma by controlling only one variable.

Reply to
David Eather
Loading thread data ...

Yes, but in this context there's only two variables under my control. I can't change the properties of the LED.

Reply to
fungus

As I said, I got them off eBay so there's no manufacturer's datasheet.

The advert said something like this (eg. for green): Color: Green Voltage(V): 3.1-3.3 Current(mA): 20 MCD: 13000

I assumed 20mA was 'normal' current, not absolute maximum.

Reply to
fungus

I found a LED datasheet at Digkey (

formatting link
)

The second page of that data sheet has a table headed "Absolute Maximum Ratings" which indicates that the maximum continuous current for that LED is 30 mA.

There is no such thing as a "normal" current for any LED. The manufacturer specifies a maximum, and the user will normally design the circuit to provide somewhat less than maximum, just to be safe.

--
Peter Bennett, VE7CEI  
peterbb4 (at) interchange.ubc.ca  
GPS and NMEA info: http://vancouver-webpages.com/peter
Vancouver Power Squadron: http://vancouver.powersquadron.ca
Reply to
Peter Bennett

formatting link

Reply to
Sjouke Burry

or

Hmm what about a constant current source. You can make one from a JFET and resistor. They sell these as two terminal devices. A

1N5314 will give you 4.7mA. put four in parallel and that's close to 20mA. (They are not giving these away however. mouser's price each is $4.70).

George H.

Reply to
George Herold

If you read my posts in this thread you will see I suggested using a JFET in a similar way to solve the OT's, problem. Applying the description of "constant current source" to this device is however common, also incorrect. If I hook the JFET + resistor or the more sexy 2 terminal integrated device to the LED it will not provide a constant current. No, it just sits there and does nothing. Go ahead, get one of these devices and connect it to an LED - but don't use a voltage source anywhere - the constant current source description is correct only when applied to a voltage source and a variable resistor as the JFET is.

Current through the JFET cause a voltage drop (the source- drain channel is a semiconductor and it has resistance) this voltage drop is applied to the gate junction which cause a depletion region to partly extend across the source-drain channel and partly pinch it off the usable region of the channel. This increases the resistance of the source gain channel and by using ohms law you can see that this increased resistance has the effect of reducing current.

Lots of smart guys might be able to make assumptions and leave bits of information out, but to a newbie that can be disastrous.

Reply to
David Eather

You decide how much current you need. In this case it is *your choice* of LED that makes you say "I need 20 milliamps of current"

You use a resistor to limit the current to 20 milliamp or less. What value do you think it needs to be? The answer is meaningless unless you also specify a voltage and *you have chosen* 3.75 volts or some such figure.

So you have chosen the current and the voltage, which is exactly two of the three variables in ohms law and the necessary condition for a meaningful calculation of the unknown resistance.

You are overly fixated on the voltage drop of the LED. This is solved as I have shown you before by the simple fineness of subtracting that value from the battery voltage before. You have 4 volts, the LED will "stop" or "drop" or "consume" 2 of them and therefore you need a resistor to control the current caused by the remaining unaccounted for 2 volt potential.

The people who have "abbreviated" this have done so because "every body knows" this "general knowledge" - except you don't because you are brand new. They have done you no favours.

Reply to
David Eather

Bullshit.

The

nominal = normal and almost always specified for an LED, as is a maximum current which is an intermittent pulsed current.

Reply to
David Eather

Actually, most LED datasheets mention 3 currents. One is characterization current - the current at which voltage drop and photometric specifications apply. Another is maximum continuous current, and a third is maximum peak current.

Most 3 and 5 mm through-hole visible LEDs have characterization current of 20 mA, maximum continuous current of 30 mA, and maximum peak current of

100 mA (maximum pulse duration 1 microsecond, maximum duty cycle 10%).

- Don Klipstein ( snipped-for-privacy@misty.com)

Reply to
Don Klipstein

I'll put it together again with my variable resistor see what happens.

Can a joule thief power multiple LEDs?

How important are the number/neatness/type of wire of the windings on the transformer? (or does it make little difference at 50kHz?)

Reply to
fungus

Did you mean 1us? Two sheets I just saw today listed 100us pulse width, 10% duty.... So a total period of 1ms.

Jon

Reply to
Jon Kirwan

Make sure you wire up the transformer, correctly, too. The base side must _aid_ battery voltage when the transistor is on, not oppose it. If it isn't working at all (or well), try reversing the leads there.

Yes, but don't wire them in parallel. You'd wire them in series. There is a limit, but with no more than 6 (I think you wrote that) the required voltage ... at worst ... is 6*3.3V or 19.8V, which I think is doable. I could play with one here and see, to be sure.

The peak current, by the way, is pretty much set elsewhere in the circuit. What having the LEDs stacked up like that does, is to dramatically reduce the duration of time they are pulsed. The whole things works by winding up to a peak current in the collector winding

-- that is set by the circuit itself and the transistor, not by the LED. However, once the transistor reaches that peak current in the collector winding, it turns off. And when it does, that current goes into the LED (or chain of LEDs.) Assuming that the voltage is low enough that it doesn't "break" the transistor (20V shouldn't, in most cases), the voltage will self-adjust to whatever is needed to drive the LED(s).

However, with higher voltages, the transformer will dump its energy faster. (The time is inversely proportional to the required voltage.) So the pulse is narrowed by stacking the LEDs. This shouldn't change the transistor ON time by much of anything, but it changes its OFF time, and thus, reduces the effective duty cycle. Which may mean you need a higher peak current and thereby a lower base resistor to get it (or more windings in the base circuit part of the transformer.)

Within reason, I think you are fine. You cannot use bare wire, for obvious reasons (shorts itself all over the place.) If you use insulated wire, your spacing will be pretty wide. Better is 'magnet wire' which has just enough insulation and not much more than that.

A similar number of windings is probably a good idea for both windings. I assume that's what you did. But it isn't critical. You can wind more or less on either side and get by, just fine. Too many extra windings (like a multiplying factor of 5 or more) on the winding that attaches to the base and you might get into areas where the transistor base is so reverse biased when the LED gets pulsed that it zeners and injures the transistor. But as you can see, there is a lot of room for error. The main thing is to wire it up so that the base winding _aids_ the battery voltage. If you get it wrong, just wire the other way and see how it goes.

I think 50kHz should be fine for most BJTs. I don't recall the frequency I measured before, but it seems it was in the 10's of kHz, so your question is in the right ballpark. There are also some very fast rise/fall times going on, and probably some minor other effects due to those. But nothing I've needed to get concerned about, that I recall. I think you'll be fine.

Jon

Reply to
Jon Kirwan

OK, checking to see if I brain farted here...

Nichia NSPW500DS: Pulse width

Reply to
Don Klipstein

Other things being equal, a longer pulse width would seem to be a harder spec to hit, wouldn't it? (If I can do an hour's run at an average of 10 MPH, with periodic spurts hitting 14.5 MPH and not going below 9.5 MPH [with a duty cycle at 14.5 MPH being 10%], it would be more impressive if I maintained the 14.5 MPH for 6 minutes straight and 9.5 MPH for the rest of the time than it would if I had to break it up into 120 separate 3-second bursts.)

Jon

Reply to
Jon Kirwan

Let me summarize in my own words. "Your supply is a battery pack, whose voltage varies from 4.6V down to 3.3V over the 'useful' life you've defined for it. You want to use various mixtures of LEDs as 'modules' with it and have that work reasonably well. Your question is about making that work well over the range of your voltage source's useful life. Efficiency would be a valuable option, but not a necessary one."

The basic 'model' of an LED, the one talked about so far, is just a 'voltage.' When someone writes, 3.3V, that implies a lot of other things, too. But you can often get away with just assuming that the LED will somehow automatically find itself using 3.3V if you get the right current level going.

A slightly better model of an LED is to use: V(I) = V_start + I * R_diode. Sometimes R_diode is small. Sometimes it is big. For the older red LEDs (I'm recollecting something 20 years ago here), V_start would be about 1.55V and R_diode would be about 21 ohms. Assume 20mA and that works out to 1.97V. Call it 2V. Which is a number folks sometimes use for red LED estimates, when 'on.' But the main thing here is that the model now at least provides a varying voltage depending on the current and provides a floor below which you can expect to see zero current (close to it.)

It's by no means a perfect model, but it's decent when the equation is set up nearby where you expect to use the LED. For example, you might use a 5V power supply and a 3.3V green LED and pick out two resistors

-- one designed to provide about 30mA and one designed to provide about 5mA. You don't really know the voltage of the LED, except that it is supposed to be about 3.3V at 20mA, so use that voltage as a broad guess (0th order model) and calculate resistor values of (5-3.3)/30mA or ~56 ohms and (5-3.3)/5mA or ~330 ohms. Precise isn't important -- just convenient values for the resistors that are about in the right place. Then you run them and measure the voltage across the resistor (or LED.) Let's say the voltage across the 56 ohm resistor reads 1.61V and the voltage across the 330 ohm resistor reads

1.9V. Then you can first estimate the slope as ((5-1.61)-(5-1.9)) / (1.61/56-1.9/330) or about R_diode=12.6 ohms. Knowing that, you can now realize that (5-1.9)=V_start+12.6*(1.9/330), or V_start=3.03V. So your model might be simply V(I)=3+12.6*I. You know you can't go much below 3 volts, then.

Of course, do this modeling for a few of them and you'll find different numbers. Let's see how this simple modeling idea applies in the case you mentioned where you appear to want to drive perhaps 6 at a time... in parallel. Let's set up two different models for two supposed green LEDs that are similar, but not exactly the same.

D1: VD1(ID1) = 3.06 + 12.8 * ID1 D2: VD1(ID2) = 2.94 + 12.4 * ID2

Each factor is

Reply to
Jon Kirwan

Vin ---LM317---R---+ | | +---------+ | LED | Gnd ---------------+

Set R to 62.5 ohms. Vin can be anything from Vf + the headroom the LM317 needs - roughly 2.5 volts IIRC - to Vmax for the chip, around 37 volts IIRC. No need to regulate Vin, as long as it is between the min & max values.

You need to re-think that.

It will work fine if fed from a constant current source, which was what he stipulated.

That's just bullshit, having nothing whatever to do with feeding the LED from a constant current source.

That was disproved, above. Any supply voltage feeding the current regulating circuit input will be fine, provided the supply voltage falls within the specified input range of the constant current circuit.

Try it! Hook a variable DC supply up to provide Vin to the circuit drawn above. Measure the current drawn by the LED as you adjust the supply voltage from say + 5 to max. Just don't exceed the limits of the LM317. If you don't have a variable supply, just use two 9V batteries in series for 18V Vin, and just one of them for

9V Vin. You will be able to verify for yourself that the current through the LED is the same.

Ed

Reply to
ehsjr

I have a couple of cheap LED flashlights that just wire the 14 Leds in parallel and power them from 3AAA cells - apparently depending on the internal resistance of the battery to keep the 14 Leds alive . . .

Bob Pease published a constant current circuit for leds that only drops

Reply to
default

Good selection of a simple arrangement that's been discussed a little, here. The LM334 is cheap enough. Better still is that there's an available kit that isn't expensive to buy:

formatting link

What I don't like about it is the idea of wiring up LEDs in parallel. But that may be just fine for the OP's LEDs. Need to experiment with the parts in hand, I suppose.

Jon

Reply to
Jon Kirwan

By the way, I just looked at the general schematic for the LM334 on National's datasheet and with a quick sweep of my arms came up with a design Iset/Ibias of 8, not 16 as they show on page 5. I'm off by a factor of two.

My logic went like this. 1/2 of the I from V+ flows via Q6 to the R rail. 1/4 via Q4 and 1/4 via Q5. Q5's 1/4*I flows via Q1 to the R rail, too. So now up to 3/4*I into the R rail. Q4's 1/4*I passes through two paths. The Ic(Q2)=Ic(Q1)/2... but Ic(Q1)=1/4*I, so that is 1/8*I, leaving the other 1/8*I for Q3's Vbe conduction, which also flows to the R rail. So the R rail gets 7/8*I and the V- picks up

1/8*I. Multiplying through by 8 to get rid of the divisor, I see a factor of 8 for Iset/Ibias... not 16.

Can someone do a quick description about how to arrive at something more like 16? I'm missing a clue (or two.)

Thanks, Jon

Reply to
Jon Kirwan

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.