help with dyno powered triple led with battery pack

itsmee

Newly Enlightened
Joined
Apr 3, 2016
Messages
16
Hi folks,

I have a some questions about dynohubs and batteries that I hope you can help with.

On my 15 mile commute to work on unlit undulating bike paths I average 14mph. Temperature is never below freezing.

I'd like a dynamo powered light setup incorporating a not-too-large battery pack that ensures full light output whenever the hub is spinning too slow to achieve this, while remaining relatively power neutral, beginning and ending each ride at a similar charge level without intervention on my behalf.

To this end I figure I could have three Cree XML2s in series, with a parallel 2000mAh 8.4v (7 x 1.2V) NiCad battery pack, powered from an SP 8 series generator hub.

The XML2 datasheet suggests that they draw 500mA at 2.8v. With the hub supplying roughly 500mA and the battery supplying roughly 2.8V (8.4V/3) per LED, I expect the current draw would be very similar whether running from generator or battery power, thereby preventing the LEDs drawing current from the battery while the hub is supplying full power.

Using the 3xLED series plot on Pilom's power vs speed chart as a guide, I believe my average speed would likely only marginally exceed that required to fully power the LEDs. Factoring in the self-discharge rate and 50-70% charge efficiency of nickel batteries, I would expect negligible overcharging.

http://www.pilom.com/BicycleElectronics/MultiLedCompHub.gif

I don't mind tinkering and trial and error, nor overly care if the battery only survives one winter, however I would prefer to have a better understanding so that I can purchase suitable components.

Essentially I'd really appreciate your clearing up my assumptions and explaining how the generator, battery and LEDs would likely interact in practice, factoring in all the things I've inevitably overlooked and don't understand.

The sort of questions that come to mind:

What would the combined load look like that the hub would see in this configuration? How dependent is it on the battery charge level, impedance, and capacity?

Would an empty battery situation draw most of the current from the generator, leaving little for the lights?

Do the LEDs somehow clamp the operating voltage? Enough to prevent battery damage? Or perhaps all the way down to their combined 500mA Vf of 2.8v, meaning at full power the three LEDs would restrict voltage to 8.4V (3 x 2.8V), thereby leaving no voltage overhead for the 8.4V (7 x 1.2V) battery pack to sufficiently charge?

If the battery pack is unlikely to charge in parallel, how about instead running it in series with the LEDs? Pros? Cons?

I'm led to believe NiCad is most suitable, but might NiMh actually be the preferred battery chemistry in this specific application?

Might a smaller low power hub (e.g. SP 9 series) provide sufficient power (approx. 6w) and be preferred in this application (to help prevent possible battery overcharging)?

I do apologize for the barrage ... without an understanding of electrical theory it's been difficult for me to even frame the questions let alone find the answers in the public domain.

Thanks,

Glenn
 

Steve K

Flashlight Enthusiast
Joined
Jun 10, 2002
Messages
2,786
Location
Peoria, IL
Unless you provide a proposed schematic, I can't comment on how well it might work, etc.

If you ask a general question such as "can a circuit be designed that will charge a battery as well as provide power to the headlight?", then the general answer is yes. However, whether the circuit works well depends on the conditions and your expectations.

I will say that I've designed circuits to take power from the dynamo and regulate the charge of a 5 cell AA nicad battery. Another circuit took power from the battery and regulated the power delivered to the incandescent headlight (this was before the days of high power LEDs). It worked fine on days where I didn't ride much in the dark. The riding in the daytime was sufficient to get the battery up to full charge and allow it to power the headlight during the few stops.

However... in winter, the headlight was on most of the time. The cold weather prevented the batteries from charging well, so they never got fully charged, and there were times when they would be discharged while the bike was stopped.

My solution was to switch to a design that provided a much lower level of light when stopped.. and this was only practical when LEDs were used for the "standlight". Running an incandescent at low power doesn't save much power at all. This allowed me to use a single AA nicad for energy storage and it avoided situations where the nicad fully discharged.

For circuit ideas, you might check out the threads that include the term "standlight", since this is the German term for a dynamo light that stays partially powered when the bike is stopped. My own designs tend to be more complicated and not suited for anyone without electronics experience. There have been discussions of some relatively simple designs, though.
 

itsmee

Newly Enlightened
Joined
Apr 3, 2016
Messages
16
I'd like to be able to do more, but unfortunately don't even qualify as a novice with electronics and had planned to forego them wherever possible in this design.

The proposed components are simply a hub, bridge rectifier, battery pack and LEDs.

I was hoping with judicious selections these might be optimized for the route and average speed I ride such that there would be near enough no net battery charge level change, as in the discharges and recharges would balance out over the course of the commute.

Very basic, I know, but I'm drawn to the simplicity and know it's within my abilities to construct.
 

Steve K

Flashlight Enthusiast
Joined
Jun 10, 2002
Messages
2,786
Location
Peoria, IL
my first design was to simply rectify the dynamo voltage, feed it into the 5 cell AA battery, and have a switched incandescent headlight connected. It overcharged the battery when you didn't use the headlight much and over-discharged the battery when you did. That was when I designed a circuit to control the battery charging.

Still, if you don't mind killing the battery by simple abuse, you could use a driver circuit between the battery and the LEDs. I don't know anything about the commercially made drivers, but there are other parts of CPF that should be able to provide some guidance.
 

itsmee

Newly Enlightened
Joined
Apr 3, 2016
Messages
16
my first design was to simply rectify the dynamo voltage, feed it into the 5 cell AA battery, and have a switched incandescent headlight connected. It overcharged the battery when you didn't use the headlight much and over-discharged the battery when you did. That was when I designed a circuit to control the battery charging.
I'd love to know why.

Overcharging I can understand.

Over-discharging I cannot. Battery was in parallel with lamp? And with dual power supplies on offer, generator and battery, the lamp drew power from the battery and presented no real load to the generator? What load would the battery present if in series with the lamp?
 

Steve K

Flashlight Enthusiast
Joined
Jun 10, 2002
Messages
2,786
Location
Peoria, IL
I'd love to know why.

Overcharging I can understand.

Over-discharging I cannot. Battery was in parallel with lamp? And with dual power supplies on offer, generator and battery, the lamp drew power from the battery and presented no real load to the generator? What load would the battery present if in series with the lamp?

I'm not sure I'm following all of this... let me break it into chunks and see if I can answer it....

I'm not sure if you are asking if overdischarging can occur, or you are asking how overdischarging can damage the battery.

Overdischarging can occur primarily in the winter (for me) because of three(?) factors:
1. it was almost always dark during my commute, so the light was always on, and the light used all of the dynamo's output.
2. since the dynamo's output was going to the light, it wasn't charging the battery
3. during the few moments when the light was off (mostly during the morning portion of the ride), the battery was cold and had a high internal resistance, making it very difficult to charge.

why is overdischarging a battery bad? Well, it's important to recall that we are talking about a battery made of 5 AA nicad cells. The cells are not perfectly matched (and in my case, were not at all matched, other than being 5 cells from the same manufacturer), so they have slightly different capacities. This means that one cell will discharge before the others. When that happens, the remaining cells still shove current through the discharged cell, effectively reverse charging it. This is a very bad thing for cells, leading to an early death.

There are other, more subtle effects too. If there isn't some method to keep all of the cells are roughly the same state of charge, imbalance will occur and a cell will be discharged too soon. Charging each of the cells individually is a better scheme than charging them in series. After my own experience with the 5 cell battery, I avoided the problem by just using a single AA nicad. I've had them survive over 10 years of regular use. Part of the longevity was due to never fully charging nor fully discharging the AA cell.

Regarding the arrangement where the dynamo and battery are connected in parallel.. the amount of current that the load takes from each depends largely on the amount of internal resistance (or technically, impedance) of each power source.

Regarding the last question... are you proposing that the battery, dynamo, and lamp would all be wired in series? Hard to see how this would be useful. Once the battery voltage matched the dynamo voltage, there would be no current flow and the headlight would go dark.
 

itsmee

Newly Enlightened
Joined
Apr 3, 2016
Messages
16
Thankyou!

I think I'm slowly getting a better grasp.

I'd been thinking about the concept of impedance. My (mis)understanding of NiCd batteries is that they have naturally low internal resistance, which varies as a function of charge level and internal temperature. Whatever the case, from what you've described I'm led to believe that their resistance is still such that at any battery charge level the lamp will hog most of the available power from the generator.

But would incandescents and LEDs not differ in this regard? LEDs would still hog practially all available generator output?

Even if they do, why is their insufficient power from the generator to concurrently run light and charge the battery? I understand battery charging requires some voltage overhead, probably above 7V for your nominal 6V battery, but am struggling to understand why this 7V would not be achieved from a modern (75% efficient) generator at normal riding speed. If 6V is achieved at 10mph, surely not much greater speed than this would be required to charge the battery? I presume the lamp has no way of clamping the generator's voltage output below 7V?

Would you expect to have the same experience with a balanced battery pack, modern generator, and LEDs, riding at 14mph average speed?

The series thing also has me stumped. Could you explain in layman's terms why no current would flow in a series configuration? Battery provides electrical potential, yes? So electrons should flow?

This has thrown me, it's the opposite of what I was expecting. I'd envisaged only running the generator during the dark and only having to contend with battery over-charging due to the hub generating power in excess of what the lights consume and the battery required. The power numbers described in my original post all seemed to point to this.
 

Steve K

Flashlight Enthusiast
Joined
Jun 10, 2002
Messages
2,786
Location
Peoria, IL
you may want to only pose one question at a time, just for simplicity.

for the case of a battery wired in parallel with the light.. the dynamo is designed to produce roughly 500mA when shorted out. The 3 watt load is designed to be basically 12 ohms and draw 500mA. As such, there's really no extra current for charging the battery when the headlight is on.

Now, that is a simplification. Take EE101 and you'll get the basics of doing nodal analysis so you can figure out the voltages and currents in a circuit composed of a voltage source and a variety of passive elements. There's no reason to think that this stuff should be comprehended by anyone without BSEE or MSEE on their business card. .. or at least on a diploma.

You can get a brief glimpse of such a circuit analysis here...
https://en.wikipedia.org/wiki/Kirchhoff's_circuit_laws

As far as power delivered by the dynamo, it is dependent on the load characteristics. If you control the characteristics properly, you can get quite a bit more than 3 watts. If you mess it up, you may not get anywhere close to 3 watts. Limiting the output voltage of the dynamo to 6 or 7 volts ensures that you will only get 3 watts or so.
 

itsmee

Newly Enlightened
Joined
Apr 3, 2016
Messages
16
Thanks for your time Steve.

Sorry about the overload of questions ... one leads to another, and another.

From what little I can comprehend it would seem that I was wrong in imagining that an incompletely charged battery would take the form of a load that sums with the lighting load, resulting in greater dynamo output than with a lighting load alone.

If so, I don't suppose there's a relatively simple circuit to modify the load characteristics of a light and battery in parallel for greater dynamo output, or to divert a minimal amount of dynamo power from the light to the battery.

Something like a voltage doubler circuit might be within my capabilities if that would help.
 

Steve K

Flashlight Enthusiast
Joined
Jun 10, 2002
Messages
2,786
Location
Peoria, IL
There's not a simple way to do it. There would need to be a way to run the headlight at a lower power than what the dynamo can supply into the battery. Up to a point, you can do this with a suitable regulator between the battery and light, but you still need to consider the difficulty of charging a battery in cold weather (if that affects you).

One indication of the challenge of such an arrangement is the fact that no one sells something like this.

My solution was to reduce how much light I expected when stopped. This reduced the size of the battery and reduced how much power I had to steal from the headlight to charge it.

FWIW, if you want to get a brief tutorial on circuit analysis, Dave Jones has done a couple of videos on it. See EEVBlog #819 and #820. https://www.eevblog.com/fundamentals/
 

itsmee

Newly Enlightened
Joined
Apr 3, 2016
Messages
16
Yeah, I can see why you went that route. I'd do the same under different circumstances, but I do happen to live in a mild climate, and would like the option of using the dynamo wheel on my touring bike for charging torch and phone batteries on multi-day rides.

I've been thinking about how to achieve roughly what I want using off the shelf parts and come up with a list and a sort of hybrid logic/circuit diagram. Should be well under $100, not including dynamo hub.

Parts list
----------------
- 2x twin XML bike light units, drivers removed, optics replaced
- 1x constant current driver
- 3x SPDT (center off) toggle switches
- 3x 18650 Li-ion batteries
- 1x 12V buck regulator
- 1x 5V buck regulator
- 1x usb stick style in-line volt/current meter
- bridge rectifier

The diagram shows all three switches is center-off position.

Switch 1 (S1) engages either lights or battery/phone charging. The idea would be to manually charge the battery during daylight hours at relatively high riding speeds by supplying the three series-connected cells 500mA at 12V (4V per cell) until current drops below 100mA, at which point power to the battery would be manually switched out.

Switch 2 (S2) selects whether the LEDs draw power direct from the dynamo, or from the battery (after being constant current regulated by a driver)

Switch 3 (S3) selects how many LEDs to run at a time, with options for 1 (low speed), 2 (med speed), or 4 (high speed) LEDs.

I'm considering reducing the number of series LEDs to three to from the dynamo, and reserve the fourth as a dedicated battery powered lamp.

I suppose it's inefficient to step down the dynamo voltage to 12V, and then again to 5V, but I figured it'd be hard to find a 12V buck unit rated for 40V input voltage, let alone a 5V one. Perhaps a power supply with 12 and 5V rails would be better.

Your thoughts?

21ee1pj.png
 

Steve K

Flashlight Enthusiast
Joined
Jun 10, 2002
Messages
2,786
Location
Peoria, IL
I've lost track of the threads, but wasn't there a thread very recently with this sort of general arrangement? It might be good to review that.

My only real concerns are with the portion dealing with the charging and discharging of the battery.

Once concern is specific to the 12V buck converter. If the battery is fully charged and the light is off, the dynamo voltage can rise very high and could potentially damage/destroy the buck converter.

The other concern is that there doesn't appear to be anything to prevent over-discharge of the lithium cells or to avoid imbalance in the cells. I'm not entirely sure if limiting the charging to 4V per cell is sufficient to avoid overcharging or not. It's possible that these concerns might be unwarranted if protected cells are used, but I don't have the experience with lithium cells to say.
I seem to recall a sticky note in the "batteries not included" subforum that has useful info on the safe use of lithium batteries that might be worth reviewing.
 

itsmee

Newly Enlightened
Joined
Apr 3, 2016
Messages
16
Thanks again Steve

I'm glad the diagram was intelligible, I wasn't confident in being able to convey the ideas this way.

I read through all the recent threads that seemed relevant without much luck.

High voltage to the buck converter is a concern. I had a few ideas to deal with it. The one that's sticking in my head is a permanent (non-switched) tail light in parallel. Ideally minimal current would be robbed from the head light, so I was considering something along the lines of a bunch of 5mm red LEDs in series behind a 20mA dynamic resistor such as the DynaOhm (http://www.luxdrive.com/content/4006_DynaOhm.pdf).

Assuming that would work tolerably well, I still can't figure out whether the tail light circuit should have its own separate bridge rectifier. I came across arguments for and against, but couldn't assess their merits.

I've also now read a good deal about lithium batteries. From what I gather:
- charging a cell at 4V will get it to 80% capacity
- a 500mA charge rate is acceptable
- they're near enough fully charged when charging current drops below 50mA
- at 3V they're spent
- cells in series tend to self-balance during rest periods

So I think the volt/ammeter will tell me all I need to know. Plus, I think protected cells are supposed to cut out around 2.5V to prevent over-discharge.
 

Steve K

Flashlight Enthusiast
Joined
Jun 10, 2002
Messages
2,786
Location
Peoria, IL
to avoid killing your 12V buck converter, you'll need to know the max input voltage the converter is rated for.

You'll also want to have some idea of whether the dynamo is a threat to the converter.
I can say that at 20mph or so, the SON dynamo is capable of producing 25V rms, which will have a peak voltage close to 35V. Rectifying and filtering the voltage won't change this if there is no load (i.e. the light is off and the battery is charged).

At that point, you suggestion to add a load in order to reduce the dynamo output voltage is reasonable. The harder part is setting a fixed current for the load.

An alternative would be to just use a shunt voltage regulator to generate the 12V for the battery charging. I've put one of these together for a 6V nicad battery..

5242793132_37bc5ea054_z_d.jpg


Some resistor values would need to be modified to have it regulate at 12V instead of 6V. You might want to modify it to use the headlight as the place where it dumps the extra power instead of the power resistor shown in the schematic.
 

itsmee

Newly Enlightened
Joined
Apr 3, 2016
Messages
16
Thanks Steve. Definitely things I needed to know.

I've now read about shunt regulators, and spent umpteen more hours reading about conceivable ways to protect a buck converter from high dynamo voltages.

Ease of implementation and flexibility are important, and I'm still not comfortable with even reading circuit diagrams, let alone building from them. Mainly for these reasons I'm still leaning toward a switching (non-linear) buck converter. There's models with configurable output voltage and up to 60V maximum input. This provides the flexibility to alter the number of battery cells, which I've already decided to do.

The issue of over-voltage regulation remains, and is the one I've pondered hardest. There seems to be no way of determining the required parallel load to hold voltage below 60V, and I'm too pressed for time to experiment.

The next best options seem to revolve around zener diodes, either back to back, with or without resistor, or shunting to a transistor.

I was unable to find any implementations of what I'm about to propose, and it seems perhaps too simple to work, but if possible I'd like to use a reverse biased zener diode to shunt to the LED headlight. This part can be seen in the revised diagram, wired across two positions of a SP4T rotary switch (which directs power to either 2 LEDs, 4 LEDs, OR the buck converter).

If generated voltage reaches the zener voltage I presume power would flow to the LEDs. How much exactly, I'm struggling to understand. In any case I presume the voltage would level out around 39V, with the amount passed to the LEDs varying with speed.

Should this achieve what I'm after? Not necessarily in the way I think it should, but achieve it nonetheless? Determining the required zener diode power rating is another thing I'm at a loss with.

I hope it would work, since it keeps the circuit more manageable - only need to hook up some LEDs, switches, batteries, and pre-built buck converters.

2ce4uw5.png
 

Steve K

Flashlight Enthusiast
Joined
Jun 10, 2002
Messages
2,786
Location
Peoria, IL
the basic idea of using the LEDs as a shunt regulator is valid, although I'd suggest some tweaks....

I suspect that there's not much point in using the zener diode.. a regular diode would likely be as good. The downside is that more current will flow into the LEDs if you use a plain diode. The upside is that the power is being dissipated in the LEDs, which already have good heatsinking. The zener diode, on the other hand, might get rather warm. If you use a zener, be sure to get one rated for 3 watts or so.

Other comment: The change to the 8V battery and charger is going to mean that you'll probably get more power delivered to the battery (mostly), but I don't think that the 350mA regulator will be able to drive 3 LEDs. The forward voltage is roughly 3V per LED, so three LEDs will require 9V to be fully turned on.

I'm also not sure that the 350mA regulator will be happy if you just disconnect the load from the output. I would recommend removing the power from the regulator's input instead. You might also need a diode in series with the regulator's output to keep current from flowing into it when it is unpowered.

I've sketched out a version of the schematic with these changes (mostly) incorporated...

26419320931_94a4eef889_z_d.jpg
 

itsmee

Newly Enlightened
Joined
Apr 3, 2016
Messages
16
Thanks again, in a big way.

A schematic I can actually follow, in full!

The errors in my diagram were a legacy of an earlier iteration involving a three position switch after the 350mA regulator that would feed either one or two LEDs. I was a bit hasty in redrawing it with a two position switch. I did mean to have the switch in front of the 350mA regulator, and have it feeding two LEDs rather than three.

I'm all for using a regular diode, particularly since the local parts store doesn't stock the required zener.

Your schematic's clear, but I still redrew mine with your changes incorporated (for my own benefit because it's easier for me to visualize the wiring).

Do you think a low voltage drop (0.3V) type diode would be preferred between the 350mA regulator and LEDs? I figure XML LEDs at 350mA would draw approximately 2.8V each, and a regular diode would add another 0.7V for 6.3V total. From the 7.2V battery supply, this leaves only 0.9V overhead for the buck regulator to work with.

n3b2u9.png
 

Steve K

Flashlight Enthusiast
Joined
Jun 10, 2002
Messages
2,786
Location
Peoria, IL
Do you think a low voltage drop (0.3V) type diode would be preferred between the 350mA regulator and LEDs? I figure XML LEDs at 350mA would draw approximately 2.8V each, and a regular diode would add another 0.7V for 6.3V total. From the 7.2V battery supply, this leaves only 0.9V overhead for the buck regulator to work with.

a schottky diode between the 350mA current regulator and the LEDs would be fine. IIRC, you were going to use one somewhere else (in front of the filter cap for the 8V buck?), so you should be able to use the same type with the 350mA current regulator.
 
Top