peak power trackers for bike dynamos?

minisystem

Newly Enlightened
Joined
Jul 12, 2011
Messages
96
Performance is much much improved with the use of a mosfet driver in a synchronous topology. Right now, I just scan through the 255 PWM values to find a maximum and, for the most part, am able to extract peak or close to peak power from a current-limited bench top supply. Here is the schematic:

digibuck.png


The mosfet driver takes PWM input from the Arduino and puts out a driver signal of the same PWM for the high side mosfet and an inverted signal for the low side MOSFET. The capacitor C2 is used to bootstrap the gate voltage for the high side MOSFET.

In this schematic, I'm using this MOSFET driver: MCP14628, but after briefly getting everything working I fried it. I also tried this one: LM2726. They seem to operate in very similar manners. In both cases, I can get the buck regulator working and find the peak power PWM setting, but keep frying the high side mosfet. I'm not exactly sure what circumstances are causing this. Maybe a surge on power up? In the case of the MCP14628, I also zap the high side driver output. The LM2726 seems to have survived whatever circumstances fried the high side mosfet. I'm assuming because I'm working with an inductor, there might be some transients that are exceeding the Vds or Vgs of the fets (30 and 20V respectively). I'm not working with anything beyond 7.5V limited @ 200 mA from the power supply.

I've proposed a couple of protection diodes that would have a breakdown voltage of just less than Vgs of the fets (20V). Hopefully that will fix the problem. Any thoughts?
 

Steve K

Flashlight Enthusiast
Joined
Jun 10, 2002
Messages
2,786
Location
Peoria, IL
Good to see that the design continues to progress!

My first instinct is to get a scope and look at the waveforms at the three terminals of the upper mosfet. That should identify any high voltage transients.

My second instinct is to ask what sort of bypass caps are at the V_dyn node. Standard practice would put some small, fast caps from the Q1-drain to ground, as well as a large, slower cap. These would help supply the current when the mosfet switches on, and help absorb energy from the wiring inductance when you shut the mosfet off.

To elaborate a bit... all wires have inductance, and inductance resists change in the current flowing through it. When you try to turn Q1 off, the inductance of the wire from Q1 to the power source will resist. As the mosfet is being turned off, the inductance actually increases the voltage at Q1's drain. In principle, the inductance will generate whatever voltage is needed in order to maintain the voltage. Putting a cap at Q1-drain provides an alternate path for the current. The zener that you propose placing across Q1 should also work.

Another option is to place a snubber network across the mosfet (drain to source). It's usually composed of a resistor in series with a cap. The cap absorbs the inductor's energy, while the resistor provides a place to dissipate the energy. I've only familiar with the idea, but haven't implemented it myself.

That's all I have right now. I look forward to seeing how this turns out. :)

regards,
Steve K.
 

minisystem

Newly Enlightened
Joined
Jul 12, 2011
Messages
96
Thanks for the advice, Steve. That should definitely get me started. The whole time I've been working with the circuit, I've been monitoring the upper and lower gate signals with a scope, but have yet to look at what's going on at the drain of Q1. In each case, the MOSFET fails short between the drain and the source, so it is always on, regardless of gate voltage. Not sure if that is particularly meaningful. Google hasn't helped me much with diagnosing MOSFET failure. It would help to know if the problem is an excess Vgs or an excess Vds. Sounds from what you're saying that excess Vds might actually be the more likely problem.
 

Steve K

Flashlight Enthusiast
Joined
Jun 10, 2002
Messages
2,786
Location
Peoria, IL
I haven't had many mosfets fail, but I think that failing shorted is not that unusual.

International Rectifier used to have some nice app notes on mosfets... i.e. how they work, things to watch out for, etc. Might be worth checking into. My recollection is that they warned about overshoot at the drain when turning it off fast.

Steve
 

Bandgap

Enlightened
Joined
Aug 14, 2002
Messages
284
Location
London
https://lh4.googleusercontent.com/-NNDnSxJPk7M/Tmw9UH7velI/AAAAAAAACkU/eRDNa7kvyuE/digibuck.png[/IMG]

I think the inductance of the dynamo is going to produce huge transients when you open-circuit the mosfet.

AFAIK, you really need a small capacitor (not a large storage capacitor) or even a CL filter across the output of the rectifier from the dynamo so that dynamo inductance flyback energy can go somewhere.

Also, if you are trying to extract maximum power, surely you want to keep the current in the dynamo coming - so a switching topology with continuous input current flow (eg boost or Cuk) would be more suitable.

A step-down transformer-coupled boost (which would be a type of flyback topology moving the flyback action away from the dynamo's own inductance - and could use an auto transformer inductor) would step-down the dynamo voltage, keep the input current flowing, and allow the effective impedance of the load to be varied by a control loop.

- over to you Steve-mppt-control-loop-K

Steve B
 
Last edited:

minisystem

Newly Enlightened
Joined
Jul 12, 2011
Messages
96
I think the inductance of the dynamo is going to produce huge transients when you open-circuit the mosfet.

AFAIK, you really need a small capacitor (not a large storage capacitor) or even a CL filter across the output of the rectifier from the dynamo so that dynamo inductance flyback energy can go somewhere.

Good point. My bench top supply is not a very good model for dynamo behaviour! Presumably the capacitor value needs to be carefully considered, taking into account the switching frequency (31.25 kHz in my prototype) and the rate of voltage increase from the dynamo when it goes open circuit. I was thinking of using a zener diode to clamp the open circuit voltage to some reasonable value that the mosfet driver can handle (somewhere between 30-40V)

Also, if you are trying to extract maximum power, surely you want to keep the current in the dynamo coming - so a switching topology with continuous input current flow (eg boost or Cuk) would be more suitable.

A step-down transformer-coupled boost (which would be a type of flyback topology moving the flyback action away from the dynamo's own inductance - and could use an auto transformer inductor) would step-down the dynamo voltage, keep the input current flowing, and allow the effective impedance of the load to be varied by a control loop.

- over to you Steve-mppt-control-loop-K

here, I will have to defer to your greater wisdom. I picked a buck topology based on my readings about solar MPPT circuits. A buck converter seemed like the most straightforward way to convert a higher voltage at a fixed current into a lower voltage at a higher current. In my case I want to get maximum power up to a certain speed but then I need to be able to limit that power so that the current doesn't exceed the LED max current rating.

If I understand what you're saying, the efficiency of this configuration will be limited by the fact that during the off cycle of the high side mosfet, the power from the dynamo will need to be dissipated rather than fed back in?
 

Steve K

Flashlight Enthusiast
Joined
Jun 10, 2002
Messages
2,786
Location
Peoria, IL
I think the inductance of the dynamo is going to produce huge transients when you open-circuit the mosfet.

a very good point!

AFAIK, you really need a small capacitor (not a large storage capacitor) or even a CL filter across the output of the rectifier from the dynamo so that dynamo inductance flyback energy can go somewhere.

<insert head scratching smilie here>
A filter cap at the output of the rectifier, which is also the input to the switcher, makes sense. I'm not as sure about a CL. Maybe a CLC type of pi filter? It seems essential to have a cap at the input of the switcher, at least if it is a buck.
Running some quick numbers... using the equation I = C x dv/dt, where dt is the period of the switching regulator (about 33us), I is the 0.5A output of the dynamo, and dv is the change in the cap's voltage. With dv set equal to 10v, I get C = 1.7uF, which isn't very large. Bump it up a little more and you can keep the ripple from the switching well under 10v. Ought to be enough to avoid killing the mosfets.

Also, if you are trying to extract maximum power, surely you want to keep the current in the dynamo coming - so a switching topology with continuous input current flow (eg boost or Cuk) would be more suitable.

A step-down transformer-coupled boost (which would be a type of flyback topology moving the flyback action away from the dynamo's own inductance - and could use an auto transformer inductor) would step-down the dynamo voltage, keep the input current flowing, and allow the effective impedance of the load to be varied by a control loop.

- over to you Steve-mppt-control-loop-K

Steve B

At this point, my guess is that a simple input filter cap is sufficient to allow the inductor current to flow continuously. Since the proper matched load for the dynamo is actually a cap, you may actually get more power from the dynamo with a large cap...??

My knowledge of the more sophisticated switcher topologies is limited, as is my ability to wind custom inductors or transformers, so I tend to favor simple bucks. :)
It would be interesting to see what could be done along this line, though. Might be a good exercise for someone with access to Spice, or someone with access to some cores and magnet wire.

cheers,
Steve "more enthusiasm than spare time" K.
 

Bandgap

Enlightened
Joined
Aug 14, 2002
Messages
284
Location
London
Maybe a CLC type of pi filter? ......With dv set equal to 10v, I get C = 1.7uF, which isn't very large. Bump it up a little more and you can keep the ripple from the switching well under 10v. Ought to be enough to avoid killing the mosfets.

I agree wise Mr K, and about sticking to a buck converter as well.

A CLC - maybe even with half the L in each rail - will keep the switching waveform off the long wires to the dynamo.
I stand to be corrected here as Steve K knows a lot more about EMC that I do.

1µF plus the inductance of the dynamo might just lead to a bit of resonace at the front end - Maybe?.

Steve more-enthusiasm-than-spare-time-in-London
 
Last edited:

minisystem

Newly Enlightened
Joined
Jul 12, 2011
Messages
96
Thanks Steve(s). Will definitely do some careful testing before connecting the dynamo to this and giving it a whirl.

In the meantime, I've collected some data and plotted current against duty cycle for various input voltages limited at 200 mA. The spikes that define each maximum are most likely due to the bench top supply overshooting its current limit (as it switches from constant voltage to constant current there is a latency where the current briefly goes over its limit). My bet is that the true maximum is at the shoulders of each of those spikes. Next step is to set and hold the maximum and scan around it a bit. My computer scientist brother-in-law coded up a peak power tracker algorithm that seems to be working but still needs some optimization.

buckdatadutycycle.png


Efficiency seems surprisingly good, considering the layout is a mess. 8V @ 200 mA from the power supply can drive 2 LEDS with a Vf of 4.1V @ about 330 mA, which is around 85%

I'll be back with the need for more advice once I start frying things with the dynamo!

Jeff "more-enthusiasm-and-spare-time-than-knowledge" in Toronto.
 

Steve K

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

The data seems to be correct... i.e. with 8v @ 200mA at the input, then at 50% duty cycle, you should be getting a bit under 400mA at the output when the load has a Vf of 4.1v. Also, the current at 100% duty cycle will be the current limit of the power supply. Naturally, there are losses in any switching power supply, so the power at the input will exceed the power at the output.

Since your mosfets are living long enough to obtain this data, I assume that there was a circuit mod since last time?

Steve K.
 

mgio

Newly Enlightened
Joined
Sep 23, 2011
Messages
2
I recently installed a Shimano dynamo on my bike and I just discovered this thread. The first circuit I plan on building is going to be a fairly simple mosfet-based active rectifier follow by a SEPIC power supply, probably using a LM3478 as the controller. The output is going to be 5V @100-500ma for charging an iphone (USB).

I've only done minimal experimentation on the dynamo so far but I realized rather quickly that the reactance of the dynamo is a big issue when drawing a lot of current. There definitely is a sweet spot when it comes to ideal load to getting power out of it efficiently. I'm not sure what kind of load my SEPIC converter is going to appear as to the dynamo. I think the idea of modifying the duty cycle on the converter to get the optimal efficiency is a great one. Unfortunately, the iphone is fussy and wants a constant voltage and I'd either have to charge a battery that charges the iphone, or dynamically adjust the data pins to tell the iphone to draw less current and slow dynamo speeds (it appears it is switchable for 100ma, 500ma, 1a, and perhaps 250ma).

The other issue is when there is no load (when nothing is plugged into the USB bus or the phone is fully charged) the voltage out the dynamo can get rather high. I plan on using a pair of zeners to clamp it at 40 volts. I'd like to avoid the power loss of doing that but perhaps I am worried for no reason and it practice it will not be that bad. I'm assuming these issues are all old news to everyone here (I'm new).

My ultimate goal is to make a much more efficient power regulator by somehow making a resonant power supply. Since the dynamo is basically an inductor of a known size, I'd imagine the most efficient power regulator would use that inductor as part of the circuit. I have a lot to learn about resonant switchers, and switch mode power supplies in general in the meantime. I'm not sure if it is even possible with an inductive power source where the voltage and frequency is so variable.
 

Steve K

Flashlight Enthusiast
Joined
Jun 10, 2002
Messages
2,786
Location
Peoria, IL
Sounds like some fun project ideas!

The issue of voltage regulation is not unusual. When I designed a peak power tracker many years ago, it was just part of the control circuitry for the power converters. There was also a voltage limit mode and a current limit mode. If neither the voltage nor current limit had been reached, then it was just operating in peak power tracking mode. If either of the two limits had been reached, then the duty cycle of the buck converters would be reduced to stay at that limit.

The issue of the high dynamo voltage under no load has its challenges. There's certainly no point in dissipating a few watts of heat just to clamp the voltage and protect the regulator. Ideally, the regulator would have a mosfet rated for the dynamo's max open circuit voltage.

One alternative would be to build a high voltage cutoff circuit, which would add a series mosfet upstream of the regulator. It would be designed to turn the mosfet off if the incoming voltage exceeded 40v. The downside is that you'd have to figure out some circuitry to turn it back on when there was a demand for enough power to pull the voltage down to a safe level. Seems a bit messy.

A simple solution would be to add some load, such as driving the headlight at low power. It's still adding load to the dynamo, but at least you are getting some benefit from it.

It's probably worthwhile to see what the dynamo's output is with no load and at high speed. Cheap bottle dynamos can barely produce 35v under this condition (at least the ones I checked). The Schmidt SON28 has produced 100v at about 50mph in my tests. My guess is that the Shimano would produce something between these two extremes.

It would be interesting to see what could be done to really make the dynamo part of the switcher itself. This is a challenge partly because the dynamo frequencies are so low and the variation in speed is so large. Any reactive components designed for those frequencies would be quite large, and might eliminate any advantage to this approach. It would be fun to play with, though! :)

Steve K.
 

mgio

Newly Enlightened
Joined
Sep 23, 2011
Messages
2
Thanks for the advice Steve K. The more that I think about it, the more I think a resonant converter won't work so well because of the low frequency output from the dynamo. I might do some experimentation on it just for fun but I don't think it will result in an efficient converter.

As for the dynamo voltage, I've done some tests measure the output of my dynamo with no load (just hooking the scope up to the dynamo directly) and my results are consistent with what you said. I get about 25v peak voltage at 9mph. At higher speeds it can easily go above 40v. There will always be at least a little current flowing through the regulator and some losses from the mosfets in the rectifier so in practice it should be a little bit lower although I don't know how much yet.

My first design was going to use low-voltage-drop schottky diodes (180mv) in the rectifier that can handle up to 40v. My current design, using mosfets, can also handle up to 40v which seems typical for the max Vds for mosfets. I can probably find some mosfets that can handle up to 60v and still have a low enough Rds and Vgs threshold. That might be good enough. The only other option is to rectify with conventional diodes that can handle 50v+. The losses from the voltage drop in those diodes would be unacceptable, though.

The other downside to high voltage from the dynamo is that the regulator must be able to deal with a wider range of inputs. The wider the range, the less efficient the regulator design seems to be. Furthermore, most of the converter controller ICs I've seen have a maximum input of 40v so having a rectifier that can deal with higher voltages won't really help. If I build my own converter.

I considered the idea of using a mosfet on the dynamo output as a switch to shut it off when it is not needed, but like you said, it is kind of messy and I would likely need a microcontroller.

My latest ideal circuit would use an active recitifier (using 4 mosfets, plus 1 mosfet configured as a low-voltage-drop diode to block back current from flowing back into the rectifier) but I'd use a microncontroller to switch the rectifier mosfets instead of the lazy approach of tying them to the opposite lines. This way I could vary the duty cycle of the switches directly and use it to modulate the power extracted from the dynamo. The output would feed directly into the converter circuit. Basically I would combine the active rectifier with the switcher for the converter.

I'd also probably use the dynamo to charge a single cell li-poly battery and then use the battery to power a USB line (which then could be used to power a phone, lights, gps, etc). This would have two advantages. First, the phone complains every time the current gets too low (when you slow down or stop) to charge it. The battery would make it so I could keep the current and voltage constant. Second, the battery allows us to run a microcontroller without having to figure out how to bootstrap the regulator circuit when the dynamo first starts up.

I'm not sure of the exact configuration to use it in yet though. (I need to get some software I can use to draw a circuit diagram, any recommendations?).

One possibility is:
Regulate the output of the dynamo to 5v, and use that to power the USB line and the battery charger (use the MAX1551/1555 or something similar). Use another regulator to take the battery output and boost it to 5V to also power the USB. I don't like the fact that I need two regulators (one that takes 3-40v and converts to 5v and one that takes 3.0-4.3 from the battery and boosts to 5v) plus a battery charger. Also if the charger can't charge the battery and allow it to be used at the same time then we would have to add a mosfet to switch the charger battery output off when it's being charged.

Reusing the first regulator from the dynamo to generate 5v from the battery probably isn't an option as the regualators that accept 3-40v are fairly ineffiecient in the 3-4 volt range.

Perhaps a better solution is to forgo the battery charger and use the dynamo output to power a regulator that also is a battery charger (since it's all controlled by a microcontroller I can have it output the appropriate current for charging the battery). I would still need one more regulator to boost the 3.0-4.2v from the battery to 5v from the USB but at least I'd eliminate the inefficiencies in having a separate battery charger.


Sorry for the long-winded post, and I don't mean to hijack this thread. I've very curious to see how minisystems circuit comes out and I wish I could offer him some advice but I really have no clue why his mosfets are dying.
 

Bandgap

Enlightened
Joined
Aug 14, 2002
Messages
284
Location
London
I'd also probably use the dynamo to charge a single cell li-poly battery and then use the battery to power a USB line (which then could be used to power a phone, lights, gps, etc).

Steve K has in the past pointed out that you cannot charge Li-ion and possibly Li-poly below 0degreesC, So you really have to qualify this kind of charge with temperature sensing to be safe. Li cells can catch fire if abused.

Steve-in-sunny-London
 

Steve K

Flashlight Enthusiast
Joined
Jun 10, 2002
Messages
2,786
Location
Peoria, IL
Battery manufacturers usually have very good info on their website describing how to charge their products, the do's and don'ts, etc. Lithiums usually don't permit charging when cold or hot, and are rather particular about charging voltages and currents. NiMH's are more tolerant, but have limits on trickle charging. Nicads are the most tolerant of the three types, but store less energy per volume, and still perform poorer in cold temperatures. My preference for standlights has been to use a AA nicad cell, since I often commute in temperatures down to 0F.

If you charge something like a cell phone using the internal charge controller, I assume that it just wouldn't charge the phone if the temperature is outside of the acceptable limits. I'd be careful about charging a lithium cell itself, unless using a very reliable charger that monitors the battery temperature.

Steve K., in not-so-sunny Peoria (at least I didn't get rained on during my 73 mile ride)
 

Steve K

Flashlight Enthusiast
Joined
Jun 10, 2002
Messages
2,786
Location
Peoria, IL
I'm not sure of the exact configuration to use it in yet though. (I need to get some software I can use to draw a circuit diagram, any recommendations?).

I've been using ExpressPCB's schematic for my home projects. Nothing fancy, but it seems to work, and can be used when using their software for circuit board layout. This is one I did for my dynamo powered LED light.

regards,
Steve K.
 

minisystem

Newly Enlightened
Joined
Jul 12, 2011
Messages
96
mgio said:
I'm not sure of the exact configuration to use it in yet though. (I need to get some software I can use to draw a circuit diagram, any recommendations?).

I've found ExpressPCB to be very reasonable and easy to use schematic drawing software, although I don't think you can export a netlist for use in other PCB software (a problem if you want to use a PCB maker other than ExpressPCB). I think I prefer EagleCAD, although the learning curve is steeper, which can be frustrating when all you want to do is quickly lay down a schematic.
 

minisystem

Newly Enlightened
Joined
Jul 12, 2011
Messages
96
Sorry for the long-winded post, and I don't mean to hijack this thread. I've very curious to see how minisystems circuit comes out and I wish I could offer him some advice but I really have no clue why his mosfets are dying.

No worries! For the record, Steve K's suggestion of putting an input capacitor seems to have stopped toasting my mosfets (heck, even the application note for the driver chip had an input cap...). The circuit itself seems to be performing very well from a bench top power supply, although this could all change when I connect a dynamo. Right now, experimenting with various hill climbing/MPPT algorithms to find the maximum power and track it with changing speed, which is turning out to be quite tricky with current as the only feedback. Tricky for me, at least. :p
 

minisystem

Newly Enlightened
Joined
Jul 12, 2011
Messages
96
This is an interesting read: http://www.mikrocontroller.net/attachment/14850/BikeLight.pdf

From the Abstract:

This paper discusses the power management of an electronic light- and tachometer system for
bicycles. The system uses a conventional hub dynamo as energy source. An accumulator battery is
charged via a microprocessor controlled AC-DC converter. We develop a circuit model of the hub
dynamo. In order to maximize the output power load matching is performed. A simulation analysis as
well as measuring results show that the presented solution is more efficient than classical power
supply arrangements and offers the basis for new features. We develop a suitable AC-DC converter
topology and show its practical performance.
 

Steve K

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

Interesting article. Switching a cap in series with the dynamo might be worthwhile in some cases. It might just take the addition of a mosfet to short out the cap.

The idea of getting rid of the bridge rectifier by using two separate switching converters seems misguided. It would be much easier to just use a mosfet bridge with a single switching converter.

Good to see someone doing some work on the idea, though. Being able to charge batteries while driving a regular headlight to full brightness would be a nice marketing advantage for a headlight manufacturer.... or just getting twice as much light from a headlight.

Steve K.
 
Top