Dynamo driven led light questions

ktronik

Enlightened
Joined
Oct 12, 2003
Messages
779
Location
Australia
Too me its about 'keeping it simple'... with Martin's circuit & a few components, I am up & riding... Its brighter than my HID @ 30km/hr...& i am happy...

I have looked @ all the options & Martin's circuit, was for me, was the best & quickest to make... :twothumbs

Whatever gets you on the bike...that's all that counts.

K
 

Martin

Enlightened
Joined
Apr 5, 2006
Messages
584
Location
Germany
Steve, as you say, best efficiency and maximum power are two different design goals.
With typical load matching where the load has the same impedance as the source, we burn 50% of the energy right away which is a shame if we think about it. But what the heck, the target is to make a real bright dynamo LED light system, not the most efficient one.

The MOSFET bridge that you use helps with low speed performance, virtually eliminating the 0.3 V Vfwd of the rectifier diodes. That's 0.6 V for a bridge rectifier. I did the voltage doubler approach instead, saving me just 0.3 V but doubling the voltage at the same time. I liked that better though this adds complexity as it needs active control. Now if the two concepts could be combined, that would be really cool. I tried to figure out how to do it , built a couple of circuits that didn't work as intended, got a big knot in may brain, eventually I decided that these 0.3V aren't exactly low-hanging fruits and I gave up. Some bright idea would get me started on this again. So any thoughts, please share.
 

John Phillips

Newly Enlightened
Joined
Oct 1, 2005
Messages
19
Location
New Zealand
Martin,

Your site http://www.pilom.com/BicycleElectronics/DynamoCircuits.htm has been a real source of inspiration to me since I discovered it back in May 2005.:thumbsup:
Since then I have been playing with these voltage-doubling and series-capacitor concepts and circuits for a bike lighting system.

One interesting thing about the switched bridge-rectifier/voltage-doubler method of load matching is that the load impedance presented to the dynamo in voltage-doubler mode is half the actual load impedance. Therefore, if an odd number of LEDs is chosen the dynamo will "see" a non-integer number of LEDs' worth of load impedance. For a load of three white LEDs the 1.5 LEDs' worth of load impedance apparent to the dynamo in voltage-doubler mode seems to be a good compromise for low-speed running: somewhere between one LED which lights at a very low speed but the total amount of light is small and two LEDs which provide more total light output but don't illuminate sufficiently until a much higher minimum speed.

Another advantage of this method of load matching is that, as you said, the string of LEDs is left intact, allowing it to be used as a rough shunt-mode voltage regulator for other circuits, like a tail light and a switch-mode DC-DC converter for charging a parking-light super-capacitor.

Some time ago, the first voltage doubler I tried was the "Manual Switching between Voltage Doubler and Bridge Rectifier". This worked well with very low ripple. Next I tried the power stage of the "Automatic Switching between Voltage Doubler and Bridge Rectifier" circuit (still manually switching the gate of the MOSFET), but was immediately disappointed with the large amount of ripple (flicker) that this circuit caused in voltage-doubler mode with an old Miller two-pole bottle dynamo that I was using for experimentation. I realized it would be even worse with a hub dynamo, which you have found too. Aside from the use of a semiconductor switching element, something was quite different about the second circuit to cause so much ripple, but what?:thinking:

Further analysis of the circuit showed that it is not a modified Greinacher voltage doubler as stated in the text, but is actually a half-wave or Villard voltage doubler. This explains the increased ripple in voltage-doubler mode. Of course, it is a full-wave rectifier in bridge-rectifier mode, but the ripple frequency halves when it switches to voltage-doubler mode, whereas the "Manual Switching between Voltage Doubler and Bridge Rectifier" circuit is a full-wave or Greinacher voltage doubler, so the ripple frequency remains the same in both modes.

I appreciate that the half-wave voltage doubler configuration simplified the implementation of a MOSFET switching configuration. Even if half-wave voltage doubling would not produce objectionable flicker with an eight-pole bottle dynamo, the purist in me wanted to find a full-wave semiconductor-switched configuration. The Greinacher voltage doubler intrinsically has very low ripple and is better, especially for a hub dynamo.

One of my attempts at designing an implementation of the full-wave voltage doubler circuit with MOSFET switches resulted in a dual-MOSFET power stage design basically the same as your full-wave voltage doubler power stage presented in the last schematic of Posting 33 in this thread http://candlepowerforums.com/vb/showpost.php?p=2144129&postcount=33 except with only the two capacitors connected between each MOSFET's source and one of the rectifier bridge's AC input terminals. I hadn't thought of your cunning scheme of the two additional capacitors connected to one of the dynamo's AC output terminals in order to tune the bridge-rectifier mode. That's a very clever way to avoid having to use a non-polarized capacitor.

However, one cautionary thing struck me about this configuration with complementary MOSFETs at the ends of the voltage-doubling capacitor string: On analysis it seems to me that when operating in bridge-rectifier mode each capacitor in the voltage-doubling string will be charged via its MOSFET's intrinsic diode to approximately the forward voltage of the LED string. So, the combined voltage of both capacitors in series will be double that. When the MOSFETs are turned on to go from bridge-rectifier to voltage-doubler mode, this voltage will suddenly be connected to the main DC output rails. To prevent a high current spike going through the LEDs the filtering capacitor across the LED string will therefore have to be many orders of magnitude larger in capacitance than the voltage-doubling capacitors or LED damage might result. I haven't yet fully analyzed how much of an issue this current surge is, but I think it warrants consideration.

Because of reservations about this, I came up with an alternative configuration. This simply replaces the manual switch in the "Manual Switching between Voltage Doubler and Bridge Rectifier" circuit, which doesn't suffer from this current-surge problem, with a MOSFET switch. Of course, this switch must handle AC, so this necessitates an AC MOSFET switch, which is effectively two like-polarity MOSFETs in series, back-to-back. However, both main terminals of the switch are then no longer referred to either DC supply rail (they are floating), so applying the correct gate voltages with respect to the source-terminal voltages is complicated.

A simple method I devised to simplify the drive requirements involves using either a photocoupled MOSFET AC switch, e.g. PVG612AS or a pair of discrete series-connected back-to-back N-channel MOSFETs driven by a photovoltaic isolator (PVI), e.g. PVI5050N or PVI5080N. The LED in these packages does require 5-10 mA and the ICs aren't all that cheap, but the advantage is that the MOSFETs can be fully floating and still get a reliable gate drive voltage. This method would also make it easy to directly implement an automatic-control version of the Quadrupler/Doubler/Bridge-Rectifier circuit with no gate-drive hassles. If using discrete MOSFETs, a dual PVI package like the PVI1050N could be used to reduce component count.

I have yet to actually try this AC MOSFET switch version of the full-wave Greinacher voltage doubler, but I hope to shortly.

Cheers,
John.
 

Martin

Enlightened
Joined
Apr 5, 2006
Messages
584
Location
Germany
Further analysis of the circuit showed that it is not a modified Greinacher voltage doubler as stated in the text, but is actually a half-wave or Villard voltage doubler.
Oops, yes. Thanks for the hint. I will correct it on the next upload.

However, one cautionary thing struck me about this configuration with complementary MOSFETs at the ends of the voltage-doubling capacitor string: On analysis it seems to me that when operating in bridge-rectifier mode each capacitor in the voltage-doubling string will be charged via its MOSFET's intrinsic diode to approximately the forward voltage of the LED string. So, the combined voltage of both capacitors in series will be double that. When the MOSFETs are turned on to go from bridge-rectifier to voltage-doubler mode, this voltage will suddenly be connected to the main DC output rails. To prevent a high current spike going through the LEDs the filtering capacitor across the LED string will therefore have to be many orders of magnitude larger in capacitance than the voltage-doubling capacitors or LED damage might result. I haven't yet fully analyzed how much of an issue this current surge is, but I think it warrants consideration.
John, thanks a lot for spending the time to thoroughly analyze the designs and pointing me at this potential issue.
What you mention is indeed an undesirable effect, but it is still manageable. I decided to tolerate it so I can skip isolation of the gates and have a rather simple driver circuit instead.
My component values are 4x 470uF to handle the AC and 2200uF for a smoothing cap. At the time of switching, the surge current from the fully-charged doubler caps (26 V) into the smoothing cap (9V) is a 16 A peak. This is within the capability of the transistors (20A). The LED current sees a peak of 0.6 A and I don't notice a disturbing flash of light. A Cree XR-E withstands a 1.8 A current peak, so it's safe. Had I exceeded the limits, a pair of 0.1 or 0.2R resistors at the source of the MOSFETs would have saved the situation without inducing too much of a loss.
 
Last edited:

Martin

Enlightened
Joined
Apr 5, 2006
Messages
584
Location
Germany
Gentlemen,
some of you may be waiting for it, here's the dynamo LED driver with automatic switching b/w a full wave rectifier and a voltage doubler mode.
The switching criteria is the dynamo frequency.

Scrap the bottom circuit from post no.33 which was my first idea - it didn't work for a number of small reason. Now this one does:

DualPowerAuto5.jpg


You'll also need the BOM:
DualPowerAuto5-1.gif


I don't have a PCB designed for it, just got it working this afternoon. I'll publish the power vs speed curve in the coming days.
 

Calina

Enlightened
Joined
Jul 26, 2006
Messages
955
Location
Longueuil, Québec
:sigh::sigh:
Gentlemen,
some of you may be waiting for it, here's the dynamo LED driver with automatic switching b/w a full wave rectifier and a voltage doubler mode.
The switching criteria is the dynamo frequency.

quote]


Hi Martin :wave:,

Your circuit is unfortunately too complicated for my limited skills and needs :sigh:.

Nevertheless, I have a question, although I guess that the answer will be NO: If the switching frequency was changed, would this circuit work with a bottle dynamo?
 

Martin

Enlightened
Joined
Apr 5, 2006
Messages
584
Location
Germany
..If the switching frequency was changed, would this circuit work with a bottle dynamo?

The frequency of the bottle is higher, so you also want to reduce the capacitors C1-C4 for maximum benefit. That then should work nicely.
By the way, a similar circuit for bottle dynamos is on my website and I have been running this on my bike for 2 years now. For hub dynamos however it wasn't very good because the flicker was getting too much at low frequency for the reason that John Phillips explained further up this thread. Also the tuning capacitor of the circuit would have become rather monstrous in size when optimized for a hub. For all these reasons I came up with this newer circuit which performs nicer at the cost of added complexity.
 

n4zou

Newly Enlightened
Joined
Sep 4, 2007
Messages
86
Location
Weaver, AL
I just used an LM317 voltage regulator circuit to drive a Mag-Lite 3-watt flashlight. I did not want to build a headlight from scratch considering the low cost of a ready made flashlight with good optics. I really like the Mag-Lite flashlights as they allow you to use the head to control the beam pattern. Here is the circuit I used.
dynamocircuit.jpg
Scrap the above circuit!
I was refilling my water bottles on the MUP that runs through a college campus and a student working on an electrical degree asked about the circuit connected to my bottle dynamo. I explaned the LM-317 circuit for driving my LED flashlight and taillight. He said I dident need the regulator and capacitor, all I needed was 2 NiMH rechargable batteries to regulate both voltage and current for the LED's. He was correct! Here is what he gave me.
dynamo-battery.jpg

I did 30 miles at night and my lights never went out even when pushing my bike up a very steep hill.:twothumbs
 

John Phillips

Newly Enlightened
Joined
Oct 1, 2005
Messages
19
Location
New Zealand
Martin,

I reckon that the problems you mentioned with using your "Circuit For Bottle Dynamos" for hub dynamos could easily be solved by replacing the half-wave voltage doubler power stage with a full-wave voltage doubler version, inserting a simple capacitor-resistor low-pass filter between the LED string's current-sensing resistor and the non-inverting input of the current-sensing op-amp and, if necessary, increasing the main filter capacitor. I'll be trying this configuration soon.

I've always thought the current-sensing version of the circuit is superior to the frequency-sensing version because measuring the frequency is really just using an indirect means to try and determine the current for the switching point. It just an extra function that needs to be calibrated for each type of dynamo. If current is the determining parameter, it's surely better to measure that directly. The voltage drop across the 0.5-Ohm current-sensing resistor is only about 0.25 V and the power dissipated in it is only about 0.125 W. With a low-pass filter at the op-amp's input, the voltage drop could probably be lowered to 100 mV without making the circuit too susceptible to noise. The dissipation in the resistor would then be a mere 50 mW.

Although the current-sensing version does require the switch-over current threshold to be set, that shouldn't vary much from dynamo to dynamo, provided the appropriate value of tuning capacitance has been chosen.

N.B. If the switch-over point is set at a current level just above the cross-over point of the two modes' speed-current curves, the difference in current between the two modes provides a little hysteresis, so no extra hysteresis needs to be added to the circuit (as it is drawn).

Cheers,

John.
 

John Phillips

Newly Enlightened
Joined
Oct 1, 2005
Messages
19
Location
New Zealand
n4zou,

That new circuit will indeed work, but on a long ride during the day with the lights off and the dynamo running there's a risk of seriously overcharging the Ni-MH battery.

John.
 

ktronik

Enlightened
Joined
Oct 12, 2003
Messages
779
Location
Australia
:welcome:

welcome John,

nice to see a fellow kiwi on CPF... me from way down south... :wave:


Best

Ktronik
 

Martin

Enlightened
Joined
Apr 5, 2006
Messages
584
Location
Germany
Martin,
I reckon that the problems you mentioned with using your "Circuit For Bottle Dynamos" for hub dynamos could easily be solved by replacing the half-wave voltage doubler power stage with a full-wave voltage doubler version, inserting a simple capacitor-resistor low-pass filter between the LED string's current-sensing resistor and the non-inverting input of the current-sensing op-amp and, if necessary, increasing the main filter capacitor. I'll be trying this configuration soon.
Correct for the power stage, but the LPF may not be doing what you think it does. See below.

I've always thought the current-sensing version of the circuit is superior to the frequency-sensing version because measuring the frequency is really just using an indirect means to try and determine the current for the switching point. It just an extra function that needs to be calibrated for each type of dynamo. If current is the determining parameter, it's surely better to measure that directly.
The point is, when switching b/w the two modes, you affect the current. Unfortunately, the current is the criteria you use to decide which mode you want to be in.
The frequency however is independent (well, except for slipping bottle dynamo and signal distortion but let's say these effects are under control). Bottom line, it's better to look at the current, but it's a lot easier to go by frequency.

The voltage drop across the 0.5-Ohm current-sensing resistor is only about 0.25 V and the power dissipated in it is only about 0.125 W. With a low-pass filter at the op-amp's input, the voltage drop could probably be lowered to 100 mV without making the circuit too susceptible to noise. The dissipation in the resistor would then be a mere 50 mW.
Well, it's another voltage drop and if Kerry runs this in a peaky configuration that yields 1A of LED current at a specific speed, it's more than the forward voltage of a rectifier diode so that it makes sense to shunt the resistor with a diode. Still, it induces the drop of one diode that I'd rather avoid.
The low pass filter is already there, it consists of the 10uF capacitor and the impedance represented by the reference voltage network on the inverting input of the OpAmp. This voltage references to the positive supply rail, a bit uncommon. More on the LPF further down.

Although the current-sensing version does require the switch-over current threshold to be set, that shouldn't vary much from dynamo to dynamo, provided the appropriate value of tuning capacitance has been chosen.

N.B. If the switch-over point is set at a current level just above the cross-over point of the two modes' speed-current curves, the difference in current between the two modes provides a little hysteresis, so no extra hysteresis needs to be added to the circuit (as it is drawn).
At the point where the full wave mode current is higher than the doubler current, the doubler current is not increasing much any more. Go just a little further, add a little effect of temperature (dynamo getting warm = less current), you will not reach the switching point any more. Then, different models of dynamos differ sufficiently for the design not to work any more with some of them. I followed this approach first but learned that it's not reliable.
My next approach was switching a little earlier and using some hysteresis to prevent coming back instantly. It works, but the switching is obvious to the eye as the hysteresis couldn't be too small.
It took me quite a while to find a way out of this dilemma. This is how the circuit works today:
Around the cross-over point, there's rapid changing between the two modes. First it's just a very short time of full-wave rectifier mode, but then its duty cycle increases until its full-wave rectifier mode all the way. There is NO hysteresis in the circuit. There is only ONE low pass filter (before the OpAmp and it intentionally lets the ripple current pass through, eliminates higher frequency oscillation only), the signal path to the MOSFET is not artificially band limited. Setting the cross-over point is not very critical. It's also not completely uncritical, though. If set too high, it will never go to the bridge rectifier mode. So it can't work properly when the tuning capacitance is chosen for a peaky response and there's a valley between the peaks. This is exactly what Kerry wants to do.
I went back to the frequency detection approach because it's overall less critical. It doesn't have such a nice transition b/w the two modes but will reliably switch at a predefined frequency. The user can set this frequency without constraints and independently play with the tuning and smoothing capacitance. It also gets around rapid switching of the MOSFETs and eventually has no sense resistor to drop anything.
 

n4zou

Newly Enlightened
Joined
Sep 4, 2007
Messages
86
Location
Weaver, AL
n4zou,

That new circuit will indeed work, but on a long ride during the day with the lights off and the dynamo running there's a risk of seriously overcharging the Ni-MH battery.

John.
I know that! I'm running a cheap bottle dynamo so I can just disengage it from the wheel when the batteries are fully charged.
Last night I started disengaging the dynamo from the wheel when going up hills, even inclines you would not consider a hill! When I got home from my commute I checked the batteries and found they were at 90%. I remembered having an old solar panel I found in a dumpster with a bad control box. I cut it off and found it would run 5VDC in full sunlight. I hooked it up to the two NiMH batteries and found it would pump 275mA into them (in full sunlight). I left the bike and solar panel in the sun. In 2 hours my batteries were back to 100%. The solar panel in a perfect fit on the front or rear racks. A couple of Velcro straps and connector and the panel will be ready for use.
Hpim0306.jpg

I am going to be adding an LED driver to the circuit. Here is what I found and you can purchase them in single quantities. Just click on the driver circuit which will take you to the page and ordering info. I'll be using 2 NiMH batteries and a real Luxeon star and oval holder and 520 lens instead of the flashlight.
 

John Phillips

Newly Enlightened
Joined
Oct 1, 2005
Messages
19
Location
New Zealand
I remembered having an old solar panel I found in a dumpster with a bad control box. I cut it off and found it would run 5VDC in full sunlight. I hooked it up to the two NiMH batteries and found it would pump 275mA into them (in full sunlight).

Nice find!:thumbsup:
 

n4zou

Newly Enlightened
Joined
Sep 4, 2007
Messages
86
Location
Weaver, AL
I don't have a PCB designed for it, just got it working this afternoon. I'll publish the power vs speed curve in the coming days.

I've designed a few circuit boards and had them made by ExpressPCB. Its sort of expensive if you only get a few made but when you do very large orders the boards can be priced very reasonably. This company provides free design software so that fact alone makes it worth checking out. I figure if there are enough people here and on other forums interested in purchasing a circuit board and kit of parts or pay someone to populate the board for them we could all make complicated circuits much easier and less expensive for us all. Here is the link.

http://www.expresspcb.com/

SShotExpressPCBSCHSml.gif
 
Last edited:

Martin

Enlightened
Joined
Apr 5, 2006
Messages
584
Location
Germany
n4zou: I will start a thread and ask around if there's people interested.
First however I need to make sure that the circuit is flexible enough to accommodate different length of the LED string and both hub and bottle dynamos.
 

n4zou

Newly Enlightened
Joined
Sep 4, 2007
Messages
86
Location
Weaver, AL
n4zou: I will start a thread and ask around if there's people interested.
First however I need to make sure that the circuit is flexible enough to accommodate different length of the LED string and both hub and bottle dynamos.
I would make boards for hub dynamos and entirely different boards for BB and bottle type dynamos. I don't think you will ever get the power required out of BB and bottle dynamos allowing use of LED's that draw more then 500mA. I'm sure the following circuit would be fine for a single LED system with a BB or Bottle dynamo and could be sold as a non dynamo battery only lighting system as well. The bridge rectifier part can be used with a cheap "wall wart" transformer for recharging the batteries.
dynamo-battery-1.jpg

This would be a small and very cheap board. You could get 4 complete boards on a single standard ExpressPCB board and cut them apart before distribution.

Hub dynamos deserve your latest version and a dedicated design separate from the cheap bottle dynamo boards. This would allow using 700mA and higher LEDs, which is never going to be possible with a BB or Bottle dynamo.
 

John Phillips

Newly Enlightened
Joined
Oct 1, 2005
Messages
19
Location
New Zealand
What you mention is indeed an undesirable effect, but it is still manageable. I decided to tolerate it so I can skip isolation of the gates and have a rather simple driver circuit instead.
My component values are 4x 470uF to handle the AC and 2200uF for a smoothing cap. At the time of switching, the surge current from the fully-charged doubler caps (26 V) into the smoothing cap (9V) is a 16 A peak. This is within the capability of the transistors (20A). The LED current sees a peak of 0.6 A and I don't notice a disturbing flash of light. A Cree XR-E withstands a 1.8 A current peak, so it's safe. Had I exceeded the limits, a pair of 0.1 or 0.2R resistors at the source of the MOSFETs would have saved the situation without inducing too much of a loss.

I've since done some maths on this and have come up with the following analysis which, for simplicity, ignores MOSFET on resistances and capacitor equivalent series resistance (ESR). Therefore, the peak LED current is the theoretical worst case possible. The peak current with real components will be less. Referring to Martin's circuit in Posting No. 45 of this thread:

1a. Based on C1 to C4 being a parallel/series network of four 470-uF capacitors having a combined capacitance of 470 uF and collectively being charged to 26 V, the charge is:

Q = CV
= 0.00047 * 26
= 0.012 C (12 mC)

2a. If a 2200-uF filter capacitor (C5) is already charged to 9 V (approximate total forward voltage of three white LEDs in series) the charge in this is:

Q = CV
= 0.0022 * 9
= 0.020 C (20 mC)

3a. Connecting the voltage-doubler capacitor network to C5, the total capacitance is now 2670 uF and the total charge is:

Qt = 0.012 + 0.020
= 0.032 C (32 mC)

so,

V = Qt / C
= 0.032 / 0.00267
= 12 V

and therefore

dV = 12 - 9
= 3 V

The voltage has risen 3 V and this is suddenly dumped across the three white LEDs in series. If the dynamic resistance of each is 0.8 Ohms, their total dynamic resistance is 2.4 Ohms, so the current pulse is:

dI = 3 / 2.4
= 1.25 A

If the LED current is already, say, 0.5 A, the total peak current possible is 1.75 A.

This is still within the absolute maximum pulse current mentioned for Cree XR-E LEDs (1.8 A), so no problems there. Martin, you said that your measured peak LED pulse current was 0.6 A, so I think that would be less because of the real capacitors' ESR and MOSFETs' on resistances reducing that pulse. Was that the magnitude of the current pulse which is then added to the LED's base current or was that the total current? If a 0.6-A current pulse was added to a 0.5-A base current and one was using Luxeon III LEDs, the combined 1.1 A would just exceed their absolute maximum pulse current of 1 A, which might cutting things fine. If, however, the combined peak current is 0.6 A, then no problem.

My personal preference for a value for C5 suited to a hub dynamo would be at least 4700 uF to reduce the current pulse and also reduce flicker.


Doing the calculations for an 8-pole bottle dynamo with C1 & C3 = 100 uF, C2 & C4 = 33 uF and C5 = 2200 uF:

1b. Based on the parallel/series network of capacitors having a combined capacitance of 67 uF and collectively being charged to 26 V, the charge is:

Q = CV
= 0.000067 * 26
= 0.0017 C (1.7 mC)

2b. If a 2200-uF filter capacitor (C5) is already charged to 9 V the charge in this is:

Q = CV
= 0.0022 * 9
= 0.020 C (20 mC)

3c. Connecting the voltage-doubler capacitor network to C5, the total capacitance is now approximately 2270 uF and the total charge is:

Qt = 0.0017 + 0.020
= 0.022 C (22 mC)

so,

V = Qt / C
= 0.022 / 0.00227
= 9.7 V

and therefore

dV = 9.7 - 9
= 0.7 V

The voltage has risen 0.7 V and this is suddenly dumped across the three white LEDs in series, their total dynamic resistance being 2.4 Ohms, so the current pulse is:

dI = 0.7 / 2.4
= 0.29 A

If the LED current is already, say, 0.5 A, the total peak current possible is 0.79 A.

Conclusion:

For an 8-pole bottle dynamo a 2200-uF filter capacitor is easily enough to reduce the theoretical worst possible peak current to a safe level and also entirely remove flicker at the lowest road speed at which the LEDs light in voltage-doubler mode.

Cheers,
John.
 
Top