Dynamo driven led light questions

dom

Enlightened
Joined
Dec 22, 2006
Messages
749
Location
Australia Geelong
Yes -i was a test dummy for high speed circuit Ktronic made for me -1st one blew after riding around for 1/2hr at 40kmh.
SON & 3 LED
The one i have now has been going great 6 months-powers up bright at 12kmh -no flicker.

Thanks Ktronic and Martin -top job.

Cheers
Dom
 

ktronik

Enlightened
Joined
Oct 12, 2003
Messages
779
Location
Australia
Run these two through Google translate if you don't know any german (I don't). The SRAM appears to definitely be DC output

http://www.radfahren.de/modules.php?name=News&file=article&sid=2933&mode=&order=0&thold=0
http://www.radfahren.de/modules.php...le&sid=2933&imgid=4865&subtopic=120&photonr=3

The Shimano is for sale at :
http://www.roseversand.de/output/controller.aspx?cid=156&detail=10&detail2=13891

The german article seems to indicate that the 3N80 is DC output.

I checked the translation with Martin...

sadly it is LOST in translation...so no DC geny for us...Martin explains:

It's an error in the dictionary: DYNAMO => DIRECT CURRENT GENERATOR
Dynamo usually refers to the thing used on bicycles and doesn't specify AC or DC. Dynamo also means DC generator, but this meaning has become rather uncommon.
The SRAM site ( http://www.sram-imotion.com/ ) says nothing about DC either.

Martin
 

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

If you need a diffrent voltage replace the 330 ohm resistor with a 5K pot. The more resistance the more output voltage. I found it by using a voltmeter and pot then replacing the pot with the fixed resistor by measuring the resistance of the pot after adjusting to get about 3 volt output as I was using a flashlight with 2 1.5 volt batteries. That 3.1 volts DC is the voltage measured without a load. When loaded with the flashlight the regulated voltage is 2.5 volts DC. Thats a little more than when testing fresh batteries with the flashlight as the flashlight will drag down the battery voltage. Here is a photo of the flashlight mounted to the handlebar. Note: the flashlight must be insulated from the frame as the dynamo puts half it's AC voltage on the frame and this will short out the power supply.
mounted.jpg
 

Steve K

Flashlight Enthusiast
Joined
Jun 10, 2002
Messages
2,786
Location
Peoria, IL
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.

If you need a diffrent voltage replace the 330 ohm resistor with a 5K pot. The more resistance the more output voltage. I found it by using a voltmeter and pot then replacing the pot with the fixed resistor by measuring the resistance of the pot after adjusting to get about 3 volt output as I was using a flashlight with 2 1.5 volt batteries. That 3.1 volts DC is the voltage measured without a load. When loaded with the flashlight the regulated voltage is 2.5 volts DC. Thats a little more than when testing fresh batteries with the flashlight as the flashlight will drag down the battery voltage. Here is a photo of the flashlight mounted to the handlebar. Note: the flashlight must be insulated from the frame as the dynamo puts half it's AC voltage on the frame and this will short out the power supply.


Do you know how much current the led in the flashlight draws? If it draws 0.5A, then you can safely eliminate the voltage regulator, since the dynamo is limited to 0.5A (with some small variation).

If the led doesn't draw 0.5A, maybe you can retro-fit a 3W led into it??

Since leds are designed to be operated at a fixed current, instead of a fixed voltage, a voltage regulator isn't the ideal means of driving the led. The voltage of the led can vary enough as a result of temperature and aging to potentially cause problems. Something as simple as inserting a few ohms of resistance between the voltage regulator and the led takes care of most of this, however. Just adjust the regulator for a slightly higher voltage to compensate for the added voltage drop.

A reminder to other CPF folks... don't forget to heatsink the voltage regulator! The LM317 will shut down if it gets too hot, which is good. The bad thing is that when the LM317 shuts down, the dynamo output voltage will increase a lot. If you go fast enough, it could generate enough voltage to kill the LM317 and the led.

good luck with the project.

Steve K.
 

n4zou

Newly Enlightened
Joined
Sep 4, 2007
Messages
86
Location
Weaver, AL
Do you know how much current the led in the flashlight draws? If it draws 0.5A, then you can safely eliminate the voltage regulator, since the dynamo is limited to 0.5A (with some small variation).

If the led doesn't draw 0.5A, maybe you can retro-fit a 3W led into it??

Since leds are designed to be operated at a fixed current, instead of a fixed voltage, a voltage regulator isn't the ideal means of driving the led. The voltage of the led can vary enough as a result of temperature and aging to potentially cause problems. Something as simple as inserting a few ohms of resistance between the voltage regulator and the led takes care of most of this, however. Just adjust the regulator for a slightly higher voltage to compensate for the added voltage drop.

A reminder to other CPF folks... don't forget to heatsink the voltage regulator! The LM317 will shut down if it gets too hot, which is good. The bad thing is that when the LM317 shuts down, the dynamo output voltage will increase a lot. If you go fast enough, it could generate enough voltage to kill the LM317 and the led.

good luck with the project.

Steve K.
Mag-Lite rates there 2 AA 3-watt LED flashlight at 3-watts and compairison with a real 3-watt Luxeon LED as a side by side visual compairson shows the Mag-Lite to produce more apparent light due to the adjustable beam pattern. I've already rode over 50 miles with no problems encountered. I added a taillight to the system today. I had an old blinkie with a blown control so I wired around it as the 5 LED's were still good, it just would not operate from the little control button. Apparently the headlight and taillight together draw less than 500 mA as the Flashlight and taillight start illuminating at walking speed of 3 MPH pushing the bike and at 5 MPH it's producing the same amount of light as would be expected just before the batteries die. At 8 MPH the flashlight is producing the same amount of light as when the flashlight has new batteries. The LM317 voltage will not allow higher voltage no matter how fast the dynamo is spun. It's rated for voltage inputs of 36 VDC so theres no way a bicycle dynamo could ever reach that limit. I checked the tab on the regulator and found it cool even after riding a couple of hours at 15 MPH. I dont have a heatsink on it as the tab is producing enought heatsink area to prevent shutdown. If you look at the circuit you will notice two resistors. If the regulator blows and shorts the resistors will limit both voltage and current shuting down the LED. I know using the LM317 voltage regulator is not a very efficient way of doing this but it's just so simple and easy I just ignore the losses and enjoy the systems operation while riding my bike at night.:twothumbs
prototype.jpg
 

Steve K

Flashlight Enthusiast
Joined
Jun 10, 2002
Messages
2,786
Location
Peoria, IL
Apparently the headlight and taillight together draw less than 500 mA as the Flashlight and taillight start illuminating at walking speed of 3 MPH pushing the bike and at 5 MPH it's producing the same amount of light as would be expected just before the batteries die. At 8 MPH the flashlight is producing the same amount of light as when the flashlight has new batteries. The LM317 voltage will not allow higher voltage no matter how fast the dynamo is spun. It's rated for voltage inputs of 36 VDC so theres no way a bicycle dynamo could ever reach that limit. I checked the tab on the regulator and found it cool even after riding a couple of hours at 15 MPH. I dont have a heatsink on it as the tab is producing enought heatsink area to prevent shutdown. If you look at the circuit you will notice two resistors. If the regulator blows and shorts the resistors will limit both voltage and current shuting down the LED. I know using the LM317 voltage regulator is not a very efficient way of doing this but it's just so simple and easy I just ignore the losses and enjoy the systems operation while riding my bike at night.:twothumbs


The bottle dynamo that you are using is probably not going to produce much current at 36v, so you are probably quite safe. Hub dynamos are a different story.

A 3 watt led does simplify matters quite a bit. You could skip the voltage regulator completely, and just feed the rectified power into the led. No voltage regulation is needed (and for leds, it's not really recommended). The dynamo is current limited to 500mA, and that's what is important to the led.

Thanks for including the pic of the circuit board. You might want to consider insulating the board, so that it doesn't short out to any of the rack mounting hardware. A little electrical tape, maybe?

regards,
Steve K.
 

n4zou

Newly Enlightened
Joined
Sep 4, 2007
Messages
86
Location
Weaver, AL
The bottle dynamo that you are using is probably not going to produce much current at 36v, so you are probably quite safe. Hub dynamos are a different story.

A 3 watt led does simplify matters quite a bit. You could skip the voltage regulator completely, and just feed the rectified power into the led. No voltage regulation is needed (and for leds, it's not really recommended). The dynamo is current limited to 500mA, and that's what is important to the led.

Thanks for including the pic of the circuit board. You might want to consider insulating the board, so that it doesn't short out to any of the rack mounting hardware. A little electrical tape, maybe?

regards,
Steve K.
The board shown is a prototype board from Radio Shack and your correct about shorting it out! I did not want to spend money on a box and connectors before testing the system for several months just to make sure everything was working preperly. BTY I wanted the system to be easy to replicate so everything I used is available at Radio Shack. In a few months I will build another one and and put the completed board in a mold and pour epoxy around it. Considering how few parts are used and how cheap it is to build I would just build a new power supply and chunk the old one even if I could replace just the LM317 or bridge rectifer. Encasing the board in epoxy prevents shorting, weather damage, and it's cheaper than a project box.

I will soon be testing another power supply with rechargable batteries so the head and taillight will continue to illuminate at stops or pushing the bike up very steep hills for at least 15 minutes. Here is a photo of a breadboard power supply undergoing design and test prior to soldering the parts on a prototype board.
designandtest.jpg
 
Last edited:

ktronik

Enlightened
Joined
Oct 12, 2003
Messages
779
Location
Australia
ON the simple cap circuit:

DoublerSymetricalMinimized.jpg


I will be using these up-dated component values:

+ jaycar cat # for people in OZ



#RE6348: 220uf 63v low ESR

FEATURES:

1. Stable, low impedance characteristics
2. High ripple current
3. Low D.C. leakage current
4. Extended life - high reliability withstanding 2,000 to 4,000 hours load life at 105°C
5. 105°C
6. Radial leads on standard pitch

* Impedance: max at 20°C 100kHz

** Ripple current measured at 105°C 100kHz

Size (Dia x Lmm): 10x20

Impedance: 0.060

Ripple Current mA rms: 1220


#ZR1023 1n5822 Schottky 40v / 3A

& 55F super caps as 'smoothing cap'... this will give me a kick as stand light...




Fullwave, 4x220uF, 3 LEDs

Read as Speed V I P
4.0 km/h 7.59 V 2 mA 0.01 W
5.0 km/h 8.12 V 23 mA 0.19 W
7.0 km/h 8.71 V 100 mA 0.87 W
9.0 km/h 9.18 V 180 mA 1.65 W
12.0 km/h 9.63 V 310 mA 2.99 W
15.0 km/h 10.05 V 480 mA 4.82 W
18.0 km/h 10.30 V 660 mA 6.80 W
19.0 km/h 10.36 V 670 mA 6.94 W
20.0 km/h 10.28 V 660 mA 6.78 W
24.0 km/h 10.16 V 600 mA 6.10 W
29.0 km/h 10.09 V 570 mA 5.75 W
35.0 km/h 10.04 V 550 mA 5.52 W
53.0 km/h 10.04 V 530 mA 5.32 W




Doubler, 2x220uF, 3 LEDs
Speed V I P
4.0 km/h 8.30 V 41 mA 0.34 W
5.0 km/h 8.58 V 70 mA 0.60 W
7.0 km/h 8.92 V 120 mA 1.07 W
9.0 km/h 9.30 V 200 mA 1.86 W
12.0 km/h 9.76 V 350 mA 3.42 W
13.0 km/h 9.82 V 390 mA 3.83 W
14.0 km/h 9.74 V 370 mA 3.60 W
16.0 km/h 9.60 V 320 mA 3.07 W
18.0 km/h 9.55 V 300 mA 2.87 W
20.0 km/h 9.51 V 290 mA 2.76 W
23.0 km/h 9.48 V 280 mA 2.65 W
26.0 km/h 9.45 V 280 mA 2.65 W
31.0 km/h 9.43 V 270 mA 2.55 W
54.0 km/h 9.40 V 260 mA 2.44 W



Or for ON-road I use 4 100uf caps...CAT. NO. RE6346


Fullwave, 4x100uF, 3 LEDs
Speed V I P
4.0 km/h 7.69 V 3 mA 0.03 W
5.0 km/h 8.14 V 26 mA 0.21 W
7.0 km/h 8.47 V 50 mA 0.42 W
9.0 km/h 8.79 V 100 mA 0.88 W
12.0 km/h 9.16 V 170 mA 1.56 W
15.0 km/h 9.44 V 250 mA 2.36 W
18.0 km/h 9.75 V 350 mA 3.41 W
21.0 km/h 10.04 V 490 mA 4.92 W
23.0 km/h 10.24 V 610 mA 6.25 W
25.0 km/h 10.42 V 740 mA 7.71 W
26.0 km/h 10.50 V 820 mA 8.61 W
27.0 km/h 10.58 V 900 mA 9.52 W
27.5 km/h 10.62 V 910 mA 9.66 W
28.0 km/h 10.55 V 900 mA 9.50 W
30.0 km/h 10.34 V 740 mA 7.65 W
31.0 km/h 10.33 V 710 mA 7.33 W
37.0 km/h 10.14 V 630 mA 6.39 W
43.0 km/h 10.06 V 600 mA 6.04 W
54.0 km/h 10.00 V 570 mA 5.70 W


Doubler, 2x100uF, 3 LEDs
Speed V I P
4.0 km/h 8.10 V 24 mA 0.19 W
5.0 km/h 8.30 V 42 mA 0.35 W
7.0 km/h 8.57 V 70 mA 0.60 W
9.0 km/h 8.79 V 100 mA 0.88 W
12.0 km/h 9.09 V 170 mA 1.55 W
15.0 km/h 9.49 V 270 mA 2.56 W
18.0 km/h 9.89 V 430 mA 4.25 W
19.0 km/h 9.91 V 470 mA 4.66 W
19.5 km/h 9.93 V 490 mA 4.87 W
20.0 km/h 10.00 V 500 mA 5.00 W
20.4 km/h 9.70 V 400 mA 3.88 W
20.5 km/h 9.68 V 390 mA 3.78 W
21.0 km/h 9.64 V 370 mA 3.57 W
21.7 km/h 9.63 V 360 mA 3.47 W
24.0 km/h 9.57 V 330 mA 3.16 W
28.0 km/h 9.49 V 310 mA 2.94 W
36.0 km/h 9.42 V 290 mA 2.73 W
55.0 km/h 9.37 V 270 mA 2.53 W



if you are really really fast or ebike you could use 47uf for MAX power output, but real peaky curve...

Fullwave, 4x47uF, 3 LEDs
Speed V I P
4.0 km/h 7.60 V 2 mA 0.02 W
5.0 km/h 7.83 V 9 mA 0.07 W
7.0 km/h 8.14 V 29 mA 0.24 W
9.0 km/h 8.44 V 61 mA 0.51 W
12.0 km/h 8.75 V 109 mA 0.95 W
15.0 km/h 9.03 V 160 mA 1.44 W
18.0 km/h 9.20 V 210 mA 1.93 W
21.0 km/h 9.42 V 270 mA 2.54 W
24.0 km/h 9.60 V 330 mA 3.17 W
27.0 km/h 9.81 V 420 mA 4.12 W
30.0 km/h 10.04 V 530 mA 5.32 W
33.0 km/h 10.28 V 680 mA 6.99 W
36.0 km/h 10.52 V 860 mA 9.05 W
37.0 km/h 10.53 V 920 mA 9.69 W
39.0 km/h 10.75 V 1050 mA 11.29 W
40.5 km/h 10.85 V 1150 mA 12.48 W
42.0 km/h 10.24 V 750 mA 7.68 W
44.0 km/h 10.26 V 720 mA 7.39 W
53.0 km/h 10.16 V 640 mA 6.50 W



Doubler, 2x47uF, 3 LEDs
Speed V I P
4.0 km/h 7.91 V 13 mA 0.10 W
5.0 km/h 8.05 V 21 mA 0.17 W
7.0 km/h 8.29 V 42 mA 0.35 W
9.0 km/h 8.47 V 63 mA 0.53 W
12.0 km/h 8.73 V 102 mA 0.89 W
15.0 km/h 8.96 V 140 mA 1.25 W
18.0 km/h 9.19 V 200 mA 1.84 W
21.0 km/h 9.46 V 280 mA 2.65 W
24.0 km/h 9.71 V 380 mA 3.69 W
27.0 km/h 10.00 V 510 mA 5.10 W
29.5 km/h 10.16 V 610 mA 6.20 W
30.0 km/h 9.70 V 380 mA 3.69 W
31.0 km/h 9.65 V 370 mA 3.57 W
32.0 km/h 9.62 V 360 mA 3.46 W
35.0 km/h 9.55 V 330 mA 3.15 W
54.0 km/h 9.40 V 290 mA 2.73 W


Now you can see why we are maknig a auto switcher, so we can ride the sweet spot around all the time...

best

Ktronik
 

tspoon

Newly Enlightened
Joined
Apr 4, 2004
Messages
33
What lind of switching element will you use for this circuit. I considered using Triacs on bipolar 'crossover' capacitors, although they are large in size, and the voltage drop across the triac is a killer too.
FWIW I have some microcontroller code I have written for an ATTiny15 8 pin device which I can freely contribute if you haven't got to that stage yet, which I designed for this purpose, i.e. switching at certain speeds, detected using the rising edge of the hub generators AC waveform. It doesn't have any gui or anything though, but I would be interested in helping design one if it was needed.
 

ktronik

Enlightened
Joined
Oct 12, 2003
Messages
779
Location
Australia
What lind of switching element will you use for this circuit. I considered using Triacs on bipolar 'crossover' capacitors, although they are large in size, and the voltage drop across the triac is a killer too.
FWIW I have some microcontroller code I have written for an ATTiny15 8 pin device which I can freely contribute if you haven't got to that stage yet, which I designed for this purpose, i.e. switching at certain speeds, detected using the rising edge of the hub generators AC waveform. It doesn't have any gui or anything though, but I would be interested in helping design one if it was needed.

WOW right ON!! I am really an 'analoge' type guy... so ending up doing a lot of circuit building... have not really crossed over to coding yet...

but CPF 'Martin' is the guy making the auto switch...I am the tester & put it together guy...

He said that he was using FETS...but your circuit sound really good...I am interested!! please do tell!!

Look I am really pushing the whole dyno thing as batterys suck for 24hr / big Km stuff...I would invest some time to help if I can...

Best

Ktronik
 

tspoon

Newly Enlightened
Joined
Apr 4, 2004
Messages
33
The circuit I (roughly) had in mind was fairly standard, but with 2 approx 50uf bipolar caps in the ac supply line, bridged out by triacs when not wanted, and then a doubler, again enabled/disabled somehow, probably with fets. Unfortunately the triacs have a 1.5 or so volts vf so with two thats about 3v that could better be used making lumens.
No doubt Martin can come up with a pretty good circuit with automatic switching based on your current diagram. If you ever come up with a production model I will definitely be up for one, as I have been a dynamo guy from day one.
The details I had in mind for a microcontroller circuit were based on detecting the rising edge of the dynamo AC waveform, fed in through a high resistance and clamped to no more than 5v with a zener. The supply to the microcontroller is from the same DC supply to the LEDs, again through an appropriate resistance and clamped with a 5v Zener (maybe with a cap/supercap to give 5 seconds of reserve power before shutdown). The controller uses around 3mA from memory. There are 5 I/O pins left and 3 can be used to enable variously the doubler, and two different values of capacitance. (I wanted to use the other 2 for my two rear blinkers, with a varying/alternating flash routine).
Basically the method used is to count how many pulses recieved from the dynamo in 1 second, and then operate the various outputs according to the current speed. My thought was the doubler at low speed (perhaps 0-10kmh), followed by fullwave (10-20k), then by the first (higher) capacitive value(20-30k), then at high speed the low value (30k+). The code as written has a diiferent switch point for falling speed than for rising speed, providing some 'hysteresis' for each different speed range.
Anyway if you're interested I can email that over to either of you and help out any way I can. I should mention now that although I have written the code, I've never gone any further than that, i.e. loading it into a chip and testing it. To program with the atmel controllers you need some type of programming hardware to load the code from your PC to the chip. The programming/compiling software itself is free from atmel, that is the assembly language version. Theres a wide range of different models of microcontroller from atmel, I chose the ATTiny15 because it's stocked by dontronics in Australia.
 

Martin

Enlightened
Joined
Apr 5, 2006
Messages
584
Location
Germany
tspoon, I've played quite a bit with these things so let me comment your concept:
The capacitor value depends a lot on the generator and the frequency where you want to have the resonance. When working with hub dynamos, the frequency is low and bipolar capacitors get really big and expensive. They better be avoided.
Triacs / SCRs are not acceptable because of their voltage drop and drive power requirements. They are great for high voltage and high power applications but in this case, FETs are a lot nicer, virtually no drive power and extremely low on resistance, cheap too. There's no point in considering anything else.
There's one optimum capacitance for the doubler and one for the full wave rectifier, makes no sense to switch the capacitors independently.
The use of a uP is tricky, as its supply voltage rises in an unpredictable manner. A nice reset circuit and good regulation of the uP supply is needed. Costs you quite a few extra components just to have the uP work reliably.
Switching something based on the dynamo frequency (=speed) looks like a good idea, but the problem is you are not sure what the frequency is. This is because right when you switch between doubler and full wave rectifier, the dynamo waveform is badly distorted so that the frequency measurement is messed up and the circuit switches wildly between the two modes, resulting in a dimming of the light within a certain speed range. It needs some pretty intelligent filtering (wide frequency range !) or a big hysteresis (not so nice), or an independent sensor (extra external hardware).
An older circuit of mine did this with the hysteresis approach. The circuit is made for bottle-type dynamos:
DualPowerAutoFreq.jpg


I once considered a different concept that uses a uP:
Measure the LED current (sense resistor) and switch between one and the other rectifier mode. Stop at the mode that yields the highest current. Repeat every 2 seconds.
The drawback is that the circuit regularly tries an inferior mode in order to make sure that it's still using the best possible mode. This will cause some flicker, so not perfect either. Another drawback is that a sense resistor is needed and this drops a little voltage. The good thing is, it determines the optimum crossover point by itself.
If you feel that 2 modes is not enough, don't miss out on my quadrupler-doubler-circuit, basic concept is this:
TriplePowerManu.jpg


I hope to upload a schematic of my hub-dynamo-enabled power stage tomorrow.
Right, here it is:
DualPowerForHubs.jpg

The control part of this circuit is not yet confirmed working, though it looks like it should work.
I put it here at this early stage as it may help with ideas.
So what does it do ? Left side is the power part, switches b/w Greinacher voltage doubler and the full wave rectification. It switches series capacitors, too.
What was initially a single non-polar capacitor is now a network of 4 standard electrolytics, symmetrically arranged. This keeps flicker to a minimum and maintains a rather clean waveform for the control part to work with. The switching elements are two FETs. Their parasitic diodes happen to assure the correct bias of the electrolytics. The FETs require virtually no control power but I had to add 2 bipolars to bring down the 30V gate-gate bias to something lower for the control IC to handle.
The control part uses the well-known LM2907. It looks at the dynamo frequency (= speed) and decides on either doubler or full wave rectifier mode. The input to the 2907 appears rather clean throughout the useful frequency range and in both modes. From a look at the oscilloscope I judge that an independent speed sensor is not needed but this is to be confirmed - call it beta hardware.
Some hysteresis may smooth out the performance, I put components for this, but all component values need to be determined / reviewed yet.
 
Last edited:

tspoon

Newly Enlightened
Joined
Apr 4, 2004
Messages
33
There's one optimum capacitance for the doubler and one for the full wave rectifier, makes no sense to switch the capacitors independently.

The numbers ktronic posted seem to show a difference, with the peak for 4x100uf at around 27.5kmh, and then at some point above 30kmh the 4x47uf setup peaks even higher. That was for fullwave, and the curves for a doubler circuit show that 2x200uf is best at up to 15-17kmh, and after that a 2x100uf until around 21kmh, when the fullwave could kick in.

The use of a uP is tricky, as its supply voltage rises in an unpredictable manner. A nice reset circuit and good regulation of the uP supply is needed.

Maybe a supercap could keep the power supply stable, with the addition of a zener and resistor. It would be easy to configure code for a 5 seconds delay to automatic powerdown from the last input pulse. During powerdown the unit uses 1uA. The wakeup would be triggered by the next rising voltage pulse from the dynamo. The one I programmed for has an internal automatic Power On Reset, as well as Brown Out Detection, and the ability to detect what triggered the last reset. As an 8 pin device they have tried to make it as easy as possible to run with a minimum of external componants, as it also has an internal clock source.

Switching something based on the dynamo frequency (=speed) looks like a good idea, but the problem is you are not sure what the frequency is. This is because right when you switch between doubler and full wave rectifier, the dynamo waveform is badly distorted so that the frequency measurement is messed up and the circuit switches wildly between the two modes, resulting in a dimming of the light within a certain speed range. It needs some pretty intelligent filtering (wide frequency range !) or a big hysteresis (not so nice), or an independent sensor (extra external hardware).

What exactly does the waveform look like at this point. I'm wondering if some of the disturbance is caused by the bottle dynamo slipping as the load abruptly changes. You may not have this problem with a hub generator.
The input to the uC is specced to be 'on' above 0.6v, so as long as the waveform isn't so badly distorted that it dips below 0.3v (the input has internal Schmidt Triggering), there should be no problem with the frequency detection. If there is, it may be possible to 'filter' the problem somewhat in the code. Already in my design 'idea' the decision for switching is made 1 time every second, using the pulse count from the last second. This could become a greater period if a switch has just been made, for instance 2 or 3 seconds.

Finally another way to do it might be instead of having a voltage doubler, might be to switch only 1 LED on at low speeds, then 2, then 3 as speed increases. It would be less convenient wiring back to the circuit for each LED though.
 

ktronik

Enlightened
Joined
Oct 12, 2003
Messages
779
Location
Australia
The numbers ktronic posted seem to show a difference, with the peak for 4x100uf at around 27.5kmh, and then at some point above 30kmh the 4x47uf setup peaks even higher. That was for fullwave, and the curves for a doubler circuit show that 2x200uf is best at up to 15-17kmh, and after that a 2x100uf until around 21kmh, when the fullwave could kick in.


Yes the 47uf cap give a higher peak again( fullwave)..but too peaky really to use...as the bottom end really suffers... but if you are mixing 2 curves... great...

Maybe a supercap could keep the power supply stable, with the addition of a zener and resistor. It would be easy to configure code for a 5 seconds delay to automatic powerdown from the last input pulse. During powerdown the unit uses 1uA. The wakeup would be triggered by the next rising voltage pulse from the dynamo. The one I programmed for has an internal automatic Power On Reset, as well as Brown Out Detection, and the ability to detect what triggered the last reset. As an 8 pin device they have tried to make it as easy as possible to run with a minimum of external componants, as it also has an internal clock source.

Just hooked up another circuit from martin, its great!!!

It uses 4 / 55F supercaps, charged via the dyno & feed back into the LEDs...

it does not rob all the power from the light...but feed the capbattery, (dedicated charging circuit) slowly...& when full give the current back to the main light...

you can set the min cap current (to LEDs) or have it fully open, letting the "linerness" of the cap control the current feed (as I now do)

All good fun...

K


What exactly does the waveform look like at this point. I'm wondering if some of the disturbance is caused by the bottle dynamo slipping as the load abruptly changes. You may not have this problem with a hub generator.
The input to the uC is specced to be 'on' above 0.6v, so as long as the waveform isn't so badly distorted that it dips below 0.3v (the input has internal Schmidt Triggering), there should be no problem with the frequency detection. If there is, it may be possible to 'filter' the problem somewhat in the code. Already in my design 'idea' the decision for switching is made 1 time every second, using the pulse count from the last second. This could become a greater period if a switch has just been made, for instance 2 or 3 seconds.

Finally another way to do it might be instead of having a voltage doubler, might be to switch only 1 LED on at low speeds, then 2, then 3 as speed increases. It would be less convenient wiring back to the circuit for each LED though.
 

Martin

Enlightened
Joined
Apr 5, 2006
Messages
584
Location
Germany
The numbers ktronic posted seem to show a difference, with the peak for 4x100uf at around 27.5kmh, and then at some point above 30kmh the 4x47uf setup peaks even higher. That was for fullwave, and the curves for a doubler circuit show that 2x200uf is best at up to 15-17kmh, and after that a 2x100uf until around 21kmh, when the fullwave could kick in.
The resonances that yield the highest currents are rather sharp and probably differ from one to the other hub generator. I'm a boring guy and hate risks, so I prefer to stick to less peaky responses, gives my designs a higher robustness.
However, if you were to arrange a capacitor ladder in a 1-2-4-8-16 binary ratio (gives you something close to a variable capacitor), if you got this controlled by a uP, if the uP could measure the actual LED current, then you would be able to optimize the resonance in real time so that you are always spot on, compensating for any tolerances. Even nicer if you measure the phase angle b/w current and voltage, then you can rather quickly home in on the resonance.

Maybe a supercap could keep the power supply stable, with the addition of a zener and resistor. It would be easy to configure code for a 5 seconds delay to automatic powerdown from the last input pulse. During powerdown the unit uses 1uA. The wakeup would be triggered by the next rising voltage pulse from the dynamo. The one I programmed for has an internal automatic Power On Reset, as well as Brown Out Detection, and the ability to detect what triggered the last reset. As an 8 pin device they have tried to make it as easy as possible to run with a minimum of external componants, as it also has an internal clock source.
Now this sounds good, so why not move forward in this direction. Once there's a uP in the system, the possibilities are endless.
For a start, I redrew my schematic to let the uP switch between doubler and full wave rectifier:
DualPowerAutouP.jpg

In above circuit, the uP has 2 inputs, one is the dynamo AC (the speed) and one the LED current. The AC is just a general purpose input, the current is an A/D. The uP has two outputs, one is the mode select and one is a shunt switch for the current sense resistor.
This is how it should work:
You start cycling and the AC frequency gradually increases. The doubler mode is selected by default. Upon every change in AC frequency, the uP tries the full wave mode, thereby monitoring the LED current to see if it increases or decreases. If the current has not increased, it goes back to doubler mode immediately until the frequency has changed even more. If the current has increased, the uP stays on doubler mode, remembers the frequency and shunts the sense resistor. From there on, no more current measurement but frequency-based switching only until the bike stops for a longer time so that the uP resets and loses the switching point.
So this would be a self-calibrating setup, no need to hardcode the switching level.

What exactly does the waveform look like at this point. I'm wondering if some of the disturbance is caused by the bottle dynamo slipping as the load abruptly changes. You may not have this problem with a hub generator.
The input to the uC is specced to be 'on' above 0.6v, so as long as the waveform isn't so badly distorted that it dips below 0.3v (the input has internal Schmidt Triggering), there should be no problem with the frequency detection. If there is, it may be possible to 'filter' the problem somewhat in the code. Already in my design 'idea' the decision for switching is made 1 time every second, using the pulse count from the last second. This could become a greater period if a switch has just been made, for instance 2 or 3 seconds.
As frequency increases, the waveform occasionally folds up in the middle while amplitude drops. Then it looks like twice the frequency. When switching between modes occurs, there's fast oscillation of a high level superposed - sometimes. No slippage, in my test setup the bottle dynamo is attached to a motor. All this is a lot better with the hub dynamo and the symmetrical switching I do now. So at this point, I suspect it's not much of an issue. But let's wait until I build the control part and close the loop.
The software filtering is welcome, can do a lot of things that are tough or impossible in hardware.

Finally another way to do it might be instead of having a voltage doubler, might be to switch only 1 LED on at low speeds, then 2, then 3 as speed increases. It would be less convenient wiring back to the circuit for each LED though.
At first glance a nice way to do it, gives you not two but 3 levels and is easily expandable. But it looks funny. And you have to have one smoothing capacitor across each LED, cannot have a common one or the LEDs will be damaged by over current when reducing the number of LEDs in the string. So for 3 LEDs, need 3 transistors. Plus some more to tune the capacitors in series with the dynamo. So far I don't see an elegant, simple way to make it. If you have a schematic, let me have a look.
 

tspoon

Newly Enlightened
Joined
Apr 4, 2004
Messages
33
...Even nicer if you measure the phase angle b/w current and voltage, then you can rather quickly home in on the resonance.

That part hurts my brain...

You start cycling and the AC frequency gradually increases. The doubler mode is selected by default. Upon every change in AC frequency, the uP tries the full wave mode, thereby monitoring the LED current to see if it increases or decreases. If the current has not increased, it goes back to doubler mode immediately until the frequency has changed even more. If the current has increased, the uP stays on doubler mode, remembers the frequency and shunts the sense resistor. From there on, no more current measurement but frequency-based switching only until the bike stops for a longer time so that the uP resets and loses the switching point.
So this would be a self-calibrating setup, no need to hardcode the switching level.
This would be an excellent concept, and could enable this circuit to be used with lots of different models of dynamos, if the capacitor sizes can be altered for the different frequencies expected. The ATTiny15 has 64 bytes of eeprom that could be used to store 2 sets of mA data, Doubler & Full Wave, at 1 kmh intervals up between 6 & 35 kmh for instance. A simple compare could then be used to find the best place. It could also regularly compare during normal running to check that the values are still valid. I need to get coding...

(edit - with some more thought I realised the uC doesn't know the speed, only the input frequency and current, which vary from setup to setup. Back to the first idea I guess)

One last thing about the supercap. I though also, why not have the supercap across the last LED. Then you get a standlight also. Would it be true that the >3v vF of the LED means that it will not discharge the SuperCap too low, leaving around 3v for the uC to sleep on. It also limits the possible highest voltage to the uC at around 3.7v - a cheap voltage range limiter.
 
Last edited:

Steve K

Flashlight Enthusiast
Joined
Jun 10, 2002
Messages
2,786
Location
Peoria, IL
hi guys,

The use of series capacitors to provide the best match of load to source impedance always appealed to my love of theory, but I wonder if there aren't some disadvantages.

For one, the caps tend to be large compared to the other components used. A second concern is the variation with temperature. Naturally, if you aren't out riding in cold weather, then this probably isn't an issue. Personally, I ride throughout the winter, so I'll be riding in temperatures down to 2F or so.

To me, the simplest way to maximize the power delivered from the dynamo is to increase the load impedance as the dynamo speed increases. This could be as easy as switching leds in series. 1 led for very slow speeds, 2 for slow, 3 for moderate, etc.

For a fixed load, a classic way of matching the load to the source is by the use of a switching power supply. For this sort of application, it might be overkill, but it's not any more complicated than switching between rectifier/doublers.

These are just a few thoughts on the issue of getting more power from the dynamo.

Steve K.
 

Martin

Enlightened
Joined
Apr 5, 2006
Messages
584
Location
Germany
hi guys,
The use of series capacitors to provide the best match of load to source impedance always appealed to my love of theory, but I wonder if there aren't some disadvantages.
For one, the caps tend to be large compared to the other components used. A second concern is the variation with temperature. Naturally, if you aren't out riding in cold weather, then this probably isn't an issue. Personally, I ride throughout the winter, so I'll be riding in temperatures down to 2F or so.
Well, my measurements say that you need to pedal harder when you get more energy from the dynamo. There's also a higher mechanical load of the dynamo and more stress to the magnets.
Sure the caps are large at this low frequency but with ktronik's proposal to stuff the circuit into the steering tube, who cares.
For the temperature effects, I suggest you pick a capacitor for a rather flat response, still much better than without and 30% variation wouldn't hurt at all. If however you go for sharp resonances, the above-mentioned self-calibrating setup will work fine.

To me, the simplest way to maximize the power delivered from the dynamo is to increase the load impedance as the dynamo speed increases. This could be as easy as switching leds in series. 1 led for very slow speeds, 2 for slow, 3 for moderate, etc.
Sure works. I instead used switching between voltage doubler and bridge rectifier. This turned out a simpler circuit and left the LED string untouched.
On top of this load matching, the series capacitor boosts the power even further - don't we want the very maximum here at CPF ?

For a fixed load, a classic way of matching the load to the source is by the use of a switching power supply. For this sort of application, it might be overkill, but it's not any more complicated than switching between rectifier/doublers.
Done it, Steve. I am drawing a constant current from the dynamo which is ideal. Look here:
LM2675design.jpg

I was first fascinated by the concept but my measurements revealed that alternative solutions yield a more favorable power curve: More of it at lower speed, limited at higher speed as not to kill the LED(s):
HiPwrDynamoLEDcurves.jpg

So I have abandoned the switchmode supply concept.

(edit - with some more thought I realised the uC doesn't know the speed, only the input frequency and current, which vary from setup to setup. Back to the first idea I guess)
The uP doesn't have to know the speed. It just needs to know and remember the dynamo frequency at which the changeover should occur. The absolute current is not important either, it just needs the info "more" or "less". Of course, the ADC has to cover the full range, but that is no big deal.

One last thing about the supercap. I though also, why not have the supercap across the last LED. Then you get a standlight also. Would it be true that the >3v vF of the LED means that it will not discharge the SuperCap too low, leaving around 3v for the uC to sleep on. It also limits the possible highest voltage to the uC at around 3.7v - a cheap voltage range limiter.
All correct. The issue that I see is the cost of the supercap which actually justifies a complex charge / discharge circuit to use it to the max and not leave a considerable charge in the sump. A much cheaper gold cap would power the uP nicely.
 

Steve K

Flashlight Enthusiast
Joined
Jun 10, 2002
Messages
2,786
Location
Peoria, IL
Well, my measurements say that you need to pedal harder when you get more energy from the dynamo.

absolutely true, but if the goal is to match the load to the power source, then the goal might be to run a normal load with the result that there is less loss at the dynamo, and therefore less drag.

Sure the caps are large at this low frequency but with ktronik's proposal to stuff the circuit into the steering tube, who cares.

true enough. If that sort of packaging works, then use it. I'm just thinking about keeping the circuit as small as possible.


Sure works. I instead used switching between voltage doubler and bridge rectifier. This turned out a simpler circuit and left the LED string untouched.
On top of this load matching, the series capacitor boosts the power even further - don't we want the very maximum here at CPF ?

which maximum? maximum power, or maximum efficiency, or best packaging, or lowest cost, etc.?
This does bring up the point that any designer needs to know what it is that they are trying to optimize.


Done it, Steve. I am drawing a constant current from the dynamo which is ideal. Look here:
http://www.pilom.com/BicycleElectronics/LM2675design.jpg
I was first fascinated by the concept but my measurements revealed that alternative solutions yield a more favorable power curve: More of it at lower speed, limited at higher speed as not to kill the LED(s):
http://www.pilom.com/BicycleElectronics/HiPwrDynamoLEDcurves.jpg
So I have abandoned the switchmode supply concept.

The point of the switching power supply is usually to provide better matching of the load to the power source. As mentioned, this can allow the source to deliver more power to the load, or deliver a given amount of power with less loss.
These sorts of simple switchers are rarely optimized for efficiency, so they aren't the best for this sort of application. They also typically require some headroom, so you'll lose a volt or two.
A home-made buck might be best, but it's not going to be as small. It's definitely a trade-off. I think that if you are using a small microcontroller, you might use it to measure dynamo speed, and then also use it to set the duty cycle of the buck regulator. With the right switching frequency and choice of components, it could be arbitrarily efficient. I used to work with a system of this general sort that was 98% efficient, I believe. It was also very big and heavy.

For my bike, I've put an emphasis on reliability and low speed output, so I've gone with a mosfet full wave rectifier and a Lux V. I'm riding the bike to work all year round, even in temperatures as low as 2 degrees F, so I really don't want the light to fail!

best regards,
Steve K.
 
Top