Driving LEDs with a battery pack

Without a scale, both of these look about the same to me. I couldn't make anything out of that except that it looks about like what I'd expect as the voltage at the top of the LED stack with the capacitor in place (__if__ the amplitude were small... on the order of tens of millivolts.)

This is instead the voltage across a 4 ohm resistor (which should also look like the voltage at the top of the LED stack), but the ripple height should be low -- on the order of millivolts, too.

Okay... that's good.

Okay... that's bad. This suggests 1V/4ohm = 250mA variation. Which sounds very bad to me.

Okay. That will take some serious time to charge up, if it is working okay. (1/4 second or more.) I hope it has a high enough voltage spec, too! If not, bad news there.

Sounds like a changing situation. Parts are getting hammered.

Perhaps the better thing to do right now is to replace your LEDs with a resistor! And play it safer until the darned thing is working right.

With 6 LEDs running on say 30mA and call it 21V, you need 21V/30mA or

700 ohms. That's going to burn off over 1/2 watt, too! So make it a 2 watt resistor. (Don't use an 1/8th watt, unless you use a LOT of them paralleled up.) 700 ohms is hard to find, so use something in that area or parallel a few to get close to it. Just keep in mind that power figure! It's a lot.

....

Maybe someone can do somewhat better than me, looking at your pictures. There is a sharp bottom in both pictures. But I don't know if that is located at zero volts, or not. However, I would guess it isn't at zero volts because of the sharp bottom. But there is 250mA variation here (1V peak to peak) you say. So whatever the bottom voltage is, that will tell us the minimum current reached. But we do know there is a ripple in the current of 250mA, which is a lot. It is possible you are hammering your LEDs with a lot more than that, given that the low point doesn't flatten out.

Can you read off the voltage at the bottom, there? That will give a little more information. (Assuming things don't change again!)

....

In the meantime, see about getting some toroid cores. Now here I'm out of my water depth. I don't know a good supplier for these and I'm not well versed on materials, generally. Here are a couple of sites that describes the various ferrite materials. (They are numbered.)

formatting link
formatting link

Personally, I'd prefer something called "high volume resistivity" and the highest mu you can get is is probably material #43. The high volume resistivity helps ensure you won't short things out with the core, itself. However, if you are using insulated wire and winding smoothly, I suppose any of the core materials are fine so long as they don't have high losses at the frequencies of interest. (On that score, if they rate losses at frequencies below 1MHz, you probably want to stay away from it.) This limits you to #43, #61, #64, and #67. The lowish permeability of #67 might be a bit restrictive, though. Here's another page that talks a little about the materials and something called AL.

formatting link

The AL value is used for figuring out roughly what kind of inductance you are likely to get with some number of windings. The fuller formula for that is here:

formatting link

A comment about the cores. Here's a page on their sizes:

formatting link

An F-23 is just big enough to wind one layer of perhaps 30 windings using #32 wire and maybe 14 windings of #26 wire. Unless you get something with a large AL figure, you won't get too close to 200-400 uH with a single layer. You can always wind more, of course. Larger cores let you wind more windings on the first layer and the inner hole size is what will limit you on total windings, even if stacked.

Let's say you want to limit yourself to winding no more than 50 turns for primary and secondary, each, and that you want 400uH for each. Reading this again:

formatting link

You can see that you want AL=1E9*L/N^2, if L is in henries. With N=50 and L=400e-6, you get AL=160 (or more.) So you need to find something around that value. Looking back at:

formatting link

You can see that F-23 with #43 material fits the bill. The problem will be winding that many turns on something that small. That means fine wire and stacked windings, probably. But it would be tiny. An F-240 with #61 looks about right. But I bet they will be expensive.

Another possibility is to look at increasing the frequency a bit (reduces the inductance.) With L=200e-6, you only need AL=80 with 50 turns per winding. And so on.

Take a look at: (no recommendation here, I've never used them)

formatting link

Anyway, finding the right core and the right supplier is a process.

Jon

Reply to
Jon Kirwan
Loading thread data ...

OK, here's the schematic:

formatting link

  • With C1 disconnected:

If look at the voltage at point "A" on the 'scope I see this:

formatting link

Peak voltage is about 15V.

If I look at the voltage drop across R2 I see this:

formatting link

R2 is 4 ohms and this waveform goes from 0 to 1V, ie. current is varying between 0mA and 250mA. I don't know the phase difference between the volt and current waveforms but if the volts are high when the current is low then it makes sense.

  • With C1 connected

If I look at point "A" I see a rock-solid 15V, no waveform whatsoever.

If I look at the voltage drop across R2 I see this:

formatting link

- almost identical to when C2 is disconnected.

This makes no sense to me. If the voltage is steady then the current should be steady. If the current is varying then that means the resistance is also varying, is this possible?

Whatever's going on, an average of 100mA with a constant voltage seems like it's going to hurt my LEDs.

Reply to
fungus

Yep, almost identical.

Yep, and even longer to discharge. I can still see a tiny bit of light ten minutes after I switch it off.

It doesn't say how many volts but it's pretty big and seems OK so far (volts are good and it hasn't exploded).

w

Yes it is (or very close).

If volts are constant and current is varying then the only possibility is that resistance is also changing. Makes no sense to me.

Reply to
fungus

The curve on your 4 ohm resistor looks about right if there is no D8 present. So is this without D8 AND without C1?

Jon

Reply to
Jon Kirwan

No, wait, my bad. I just had a careful look at it and the schematic was actually this:

formatting link

If I connect it up properly, like this:

formatting link

Then all seems well. The current across the LEDs is about 13mA according to the multimeter and the voltage drop across R2 confirms this..

So it seems all is well...

Reply to
fungus

I've just been poking around the circuit with the scope ane multimeter and all the measurements make sense now so basically it's finished.

All I need to do is add the extra diode to protect the transistor (I'll get some shottkys) then use a smaller ferrite bead and fiddle with the number of windings on it 'til the current through the LEDs is 20mA.

Reply to
fungus

Wonderful!

Sounds great. I think I'll play with some of the transformers I just wired up, as well. I'm using #61 material for some of them (since I happen to have it.) I also have #73 and #75B. From some curves I have, I think the #73 might be okay. And in any case, the #75B stuff I have only has a 1mm hole in it so I pretty much can't use it, anyway. So I'll go with #61 and #73 and see how it goes.

Jon

Reply to
Jon Kirwan

Yeah, thanks for all the help and patience with a newbie (this is by far the most complex electronics I've ever done).

I was thinking about what's been gained by all this (127 posts to figure out how to light up a LED...?).

The Joule Thief is designed to suck juice out of "dead" batteries, but that's not what I'm trying to do at all. So ... why should we use a Joule Thief instead of a plain old resistor?

a) I did a plot of volts/current to compare a JT with POR, using every combination of new/batteries I could find (I don't have a fancy bench power supply). The results are here:

formatting link

It's obvious that the JT changes the slope of the line in our favour, ie. LED brightness drops off much more slowly as battery voltage drops.

We can design a circuit which has much less risk of overloading the LEDs (the original design of "20mA @ 3.75V" will put about 35mA through the LEDs with fresh batteries with a plain resistor, with a JT the same batteries would only put about 24mA through them - much safer).

b) The JT puts the LEDs in series instead of parallel so it's much easier to deliver the correct current to every LED despite differences due to manufacturing tolerances of the LEDs/resistors.

Reply to
fungus

If I undertand correctly, what you're trying to say is that in the non-saturating case, you can be sure that it will *always* oscillate, because the collector current is maxed out for whatever base current there is, and any fall in base winding voltage at that point must cause a decrease in supportable collector current.

Whereas if the inductor saturates, the remaining base current with zero volts across the base winding might still be enough to support whatever collector current there is at the time.

However, I think it should be possible to make it work in that mode. You just have to arrange things so that the DC base current is less than that required to support the collector current at which the core saturates. Then a flip-over will happen in the same way as it does in the non-saturating case.

The problem is that Ipeak is directly proportional to beta. So if you choose a low estimate of beta, your output current will be far too high, and you risk cooking your LEDs. If you choose a high estimate, the ouput current will be far too low, and you won't get much light.

Like I said, for a one-off project this is okay. But you can't really *design* this circuit to have any kind of predictable performance.

On the other hand, if it's designed to work in saturation mode, it ought to be more predictable. You may have to make some measurements on the first one to find out the saturation point of your core, but having done that, the second one you build should work fairly much the same.

But then there doesn't appear to be anything to ensure that the current flow through the LEDs is smooth. You put a burst of energy into the capacitor... and then there's nothing to stop the LEDs from taking it out again in a big slurp.

--
Greg
Reply to
greg

Yes, but it is not R2 resistance that changes. LEDs are non-linear devices. They don't operate as if they were a fixed value of resistance. When the voltage is above the total Vf of the LEDs, they will conduct current as if they were a relatively low value resistance. When the voltage drops below the total Vf of the LEDs, they will conduct current as if they were a very high value of resistance.

Essentially, an LED acts like a zener diode, and attempts to keep the voltage across itself at Vf by varying the current through itself. So in your circuit, if the voltage from the oscillator attempts to increase above Vf, the LEDs conduct more current, dropping the "extra" voltage in R2.

Your 15V appears flat, but actually has 250 mV ripple on it. If you set your scope to AC input and look at point A with the vertical set at .1 volt per division, you'll see about 2 and 1/2 division ripple.

Well, if I remember correctly what you said in another post, that 100 mA figure is wrong. AIRC you said that supplying the LEDs with a steadfy 20 mA DC gave a brighter glow than you get from the joule thief. That means that the average current has to be lower than 20 mA.

So - something is missing or not quite right.

Ed

Reply to
ehsjr

Yes, but as long as other things are equal, I'd expect a higher permeability core to give you a higher inductance, as long as the core doesn't saturate.

Maybe saturation is the issue, though? That is, although the inductance is higher, the current can't go very high before the core saturates, dropping the inductance to zero.

I'm studying the references you gave me now. They do seem to say fairly explicitly that the energy is stored in the gaps. I'll have to think about that some more.

It can't be as simple as "gap good, iron bad", because then the more gap you have, the more energy you could store, so you'd be best off with no core at all. That doesn't appear to be the case, so there must be some opposing effect at work.

--
Greg
Reply to
greg

That sounds like you follow what I wrote.

That's why I think saturation isn't good.

Yes, you are probably right. And that may provide a little bit of additional margin for operation even in the face of some saturation. But it's probably better to design for no saturation and expect that you've got some margin in case you didn't hit it perfectly.

Actually, this isn't that much of a problem. On first blush, it may seem that way. But the part you aren't including is the iterative process I mentioned, using the datasheet. I go through the equations several times and in doing so the iterative process pretty much always nails where it will hit. The assumed beta (and actual) has somewhat less impact because of that. It's not quite so "open loop" as it seems. And it appears to work reasonably well. (Certainly, though, using a different transistor with a markedly different beta performance will clearly change the Ipeak. It will do that with the equations and it will do that in practice, as well.)

In the case of powering the LEDs with the freewheeling diode and capacitor, though, the nice thing is that the current is steady and much lower so there is more room for error and less worry.

And besides, there is that base resistor. Just test the circuit and adjust the resistor. Or else design for a lower target.

For driving a stack of LEDs, a batch of the same transistor type will all perform fairly close by. Seems to, anyway. I have thousands of PN2222s in a box, so I suppose I could spend my days trying them. But so far, they all behave close enough for this use.

But follow it with an LDO and you could power a micro with it. In fact, I'm going to be testing that out soon.

I see your point here, now. Is the saturation point more predictable here than the variations in a batch of same-designated PN2222As, for example? I've not played around with cores enough to know.

Except they don't. What happens is that the BJT/transformer/resistor pretty much define the Joules per unit time. If you know the power required by your load (and that is NOT hard to estimate well with LEDs) and you know the frequency (also predictable enough even with your reticence about beta), you can size the cap well enough for whatever ripple you can accept. It will just take longer, with larger caps, to get started. And there will be wasted energy sitting on the larger cap when you turn it off, I suppose. The LEDs won't behave as radically as you seem to be suggesting. They don't in my experience, yet, anyway.

Jon

Reply to
Jon Kirwan

It was operator error... :-S

Reply to
fungus

Yes. Higher inductance means "SLOWER." But it doesn't mean more energy per unit time. In fact, the inductance cancels out of the equations in calculating power. The great thing about higher perm is fewer windings. However... they are often wasteful of energy at lower frequencies (for example, #75 ferrite is horribly lossy even down at 1MHz with more than 20 times the loss as #64 ferrite at 1MHz, while #75 has max permeability of 5000 and #64 is only 375.) Also, the lower perm stuff seems to be non-conductive while the higher perm seems to be pretty much a semi-conductor, at least. Still, some of the higher perm stuff is okay, loss-wise. But it seems most of it is intended for RFI shielding, not transformers. But I'm still reading and learning, so there probably are some things I'm missing still.

I think I take your point here. Higher mu means the same B will be reached a earlier, I_peak wise, if keeping the inductance fixed and the magnetic loop length fixed. B = mu*H = mu*N*I/l_m, but L is proportional to N^2 and mu... so I guess B is reached by the square root of the ratio of mu's. A mu=5000 material would saturate with 10 times lower I_peak than with a mu=50 material, assuming L is constant and so is the magnetic loop length (same physical core shape?)

Yes. I had to sit and think about that, too. You mentioned just in the prior paragraph the "dropping the inductance to zero." But that doesn't actually happen. What happens is that it goes down to what amounts to an air/vacuum core. It still has some inductance, but not much. That's because when the core itself saturates, it's done with and over for the core. So if you keep trying to store more energy the field lines expand out into space around the core and use the air/vacuum there to store energy, just like an air core would. So there is still room and that means there is still inductance. Just not much, because all those windings are now just packing energy into the vast regions of air around it once the core is saturated up.

If you look closely at some of the better saturation curves, you will see that there is still a _slight_ slope after saturation. That slight slope is the emerging air core inductance.

I think it is called N. Too many windings are required. Think about the reluctance, which is inversely related to the permeability. High perm materials have low reluctance. Low perm, like air especially, have high reluctance. Net reluctance is affected by inserting an air gap -- in fact, the air gap may so completely dominate things if it is big that the other core material doesn't matter and you might as well be winding an entirely air core from the start and just not bother with the ferrite, powdered iron, etc.

Think of a series resistance circuit where you have some aluminum you can run out some length of and the some carbon of the same diameter to make a combined loop. What is the total resistance? Well, if it is all aluminum and no carbon at all, pretty low. But if you start packing in much of a length of carbon instead of aluminum, it won't take much before the total resistance is pretty much based only on the carbon and the aluminum that is left doesn't really matter, anymore. It's like that.

Unless the gap is VERY small (smaller than I have ever seen), it pretty much takes over. Permeability of the rest of the core doesn't matter anymore and the calculation of inductance depends on the mu for air and the magnetic length of the air gap (no longer the magnetic loop length for the rest of the core.) You really need SMALL air gaps in order to achieve any reasonable value for the resulting L. You wrap the windings around the air gap itself to help contain its fringing into the wild world and you use the otherwise useless core with its high perm material primarily to give the flux a tight narrow conduit around from one end of the air gap to the other end of the air gap, without fringing all over hell and gone. Read chapter 5 from that site.

Jon

Reply to
Jon Kirwan

Yes, I realise that. I really meant it goes down to something very small compared to the pre-saturation inductance.

I've come to much the same conclusion. With very low inductance, the current shoots up to the maximum the transistor can handle in a very short time, so the circuit would have to operate at a very high frequency, and then switching losses would ruin your day.

So it helps to have a moderate amount of inductance to keep the rate of current increase down to something manageable. To get that with an air core, you would have to put on a lot of turns. Using a core with moderate permeability lets you get away with less turns. Its energy storage ability will be lower, but still enough to be useful.

Another analogy I've seen is that it's like trying to make a circuit using bare wires immersed in salt water. Really hard to keep the current from leaking all over the place!

Anyhow, from what I've seen so far, it sounds like for frequencies under 100kHz, either a metal powder ring or a gapped ferrite ring would be best. A solid ferrite ring, such as a bead, doesn't sound so good.

--
Greg
Reply to
greg

I don't doubt that the voltage across the capacitor will be fairly steady, but that doesn't say much about the current through the LEDs, since they have a highly nonlinear voltage-current relationship.

Have you actually observed the current waveform through the LEDs with the capacitor but *without* any resistor in series, or with only a very small one? Putting any resistor in there for the purpose of measuring the current could have quite a noticeable effect on the smoothness.

--
Greg
Reply to
greg

I haven't either, but there was a time in the pre-transistor and early transistor era when pulse-generating circuits involving saturating inductors were used. Apparently at the time it was a relatively inexpensive way of getting accurately-timed pulses, so the core characteristics must have been fairly predictable.

--
Greg
Reply to
greg

I don't doubt you can make a stable stream of pulses but I bet they had a variable resistor to fine-tune the frequency.

Reply to
fungus

The issue here is energy transfer per unit time. You keep thinking in terms of current and voltage separately. Change the viewpoint.

Jon

Reply to
Jon Kirwan

I had been wondering out loud in this thread earlier about using a gapped arrangement. Basically an air core inductor with a ring of material linking the north and south poles, minimizing fringing that usually takes place in an all-air inductor between the poles and allowing the gap itself to be a very controlled magnetic loop length of air. I guess the secondary wound elsewhere would be linked well enough by the ring of material so that flux changes would induce the desired voltage without the kind of usual poorer linking seen in pure air cases.

My ignorance on this subject makes me feel still uncomfortable. In thinking about your above comment more, it seems to me that the effective permeability listed for any particular core (which is a max figure) may also tell us just how much effective air gap there is. If they are very high perm, there cannot be much of an effective air gap, at all. I think this couples well with the idea that high perm materials are also conductive. Low perm materials, though, as well as some comments from the site I referred to you about gaps in ferrites, suggest to me that what makes the difference here is mostly the sum of all those air gaps in the material. They both increase electrical resistance due to their presence, but also increase reluctance. So perhaps the low perm materials work better here than high perm for the reasoning line you are following above.

Still, if the permeability isn't close to 1 (and 20 seems to be the lowest I've seen), then it's NOT dominated by the air gap as it would be in anything gapped. But now I see a problem with that reasoning, too. I'm speaking about permeability. What I'm neglecting is magnetic loop length. There is a relationship between the permeability, of course. But the permeability doesn't tell me the permeance, just one part of that. I need to sit down with a specific core, look over its exact physical dimensions along with its max rated permeability and the AL rating for it, and work out how large of an effective air gap there is from all that. Not just hand wave about it.

If I had to guess beforehand, I'd say that low perm ferrites store energy pretty well, like a well-, and small-, gapped core might while still allowing some decent energy storage. But I also agree, as I wrote on the 9th, that an air gap seems to make good sense.

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.