Back to the question of charging batteries with a dynamo: This earlier thread has some detailed info and the circuit that resulted back then is here.
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 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.
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.:twothumbsDo 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.
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 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.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.
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.
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.
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).
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.
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.
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.
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.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.
Now this sounds good, so why not move forward in this direction. Once there's a uP in the system, the possibilities are endless.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.
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.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.
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.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.
...Even nicer if you measure the phase angle b/w current and voltage, then you can rather quickly home in on the resonance.
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...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.
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.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.
Sure works. I instead used switching between voltage doubler and bridge rectifier. This turned out a simpler circuit and left the LED string untouched.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.
Done it, Steve. I am drawing a constant current from the dynamo which is ideal. Look here: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.
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.(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)
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.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.
Well, my measurements say that you need to pedal harder when you get more energy from the dynamo.
Sure the caps are large at this low frequency but with ktronik's proposal to stuff the circuit into the steering tube, who cares.
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 ?
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.