peak power trackers for bike dynamos?

Steve K

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

Part of my background is that I've had the pleasure of designing a "peak power tracker" (a.k.a. max power point tracker, or MPPT) for solar panel applications. I was poking around and found this MPPT chip from ST Micro, the SPV1020:
http://www.st.com/internet/analog/product/250769.jsp

The function of a MPPT is to adjust the load applied to a solar panel in order to maximize the power extracted. This is needed because the max voltage and current of the panel will change with the amount of light shining on it and the temperature (and age, etc.)

Naturally... it occurred to me long ago that bike dynamos could use a MPPT too. The problem is that the implementation can be tricky/expensive/bulky. The SPV1020 looks like it might have the potential for application on bike dynamo lights, although I don't know how expensive it would be. The eval board does look a bit bulky.

My own attempt at a limited MPPT simply switches the load between two LEDs and 4 LEDs at a fixed speed.
http://www.flickr.com/photos/kurtsj00/5420960597/in/set-72157621965148305

Has anyone else built a MPPT or other circuit that tries to adjust the load in order to maximize the power extracted from the dynamo as the bike's speed changes or as the load changes? If I recall correctly, Martin's circuit does some adaptation to speed, but don't recall how. Are there other examples? (and I'll mention that my own circuit was an adaptation of a circuit by CPF's own Bandgap).

regards,
Steve K.
 

swhs

Newly Enlightened
Joined
Oct 10, 2007
Messages
113
Location
Netherlands
hi gang,

Has anyone else built a MPPT or other circuit that tries to adjust the load in order to maximize the power extracted from the dynamo as the bike's speed changes or as the load changes? If I recall correctly, Martin's circuit does some adaptation to speed, but don't recall how. Are there other examples? (and I'll mention that my own circuit was an adaptation of a circuit by CPF's own Bandgap).

regards,
Steve K.

Yes.

(1) Busch & Mueller's e-werk is an example of such a device.

(2) I wanted to make a device to extract maximum power from the dynamo myself in december when I got an email from someone who already did it... Actually, I suggested a device with the operating specifics I had in mind to George from Taskled but he wasn't interested.

(3) Martin's circuit is a simple example, simple in that it's not microcontroller based.

(4) You can sort of extract more power for LEDs already simply using a b2flex (the nflex would have been better due to higher voltage limit) as Joe Gross did.

I've got the driver in (2) now and will use it to run a Philips LBL at 0.90A (more than with batteries) but also triple XM-L at 0.90A in the next few days.

Preliminary page with some more information and references:

http://swhs.home.xs4all.nl/fiets/tests/verlichting/dynamo_led_driver/index_en.html
 

Steve K

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

(1) Busch & Mueller's e-werk is an example of such a device.

it's a MPPT? I didn't get that impression when I had checked their web site some while ago.

(2) I wanted to make a device to extract maximum power from the dynamo myself in december when I got an email from someone who already did it... Actually, I suggested a device with the operating specifics I had in mind to George from Taskled but he wasn't interested.
what kept you from building a MPPT?

(3) Martin's circuit is a simple example, simple in that it's not microcontroller based.
Martin's circuit does try to optimize things, but it's not adaptive per se.

(4) You can sort of extract more power for LEDs already simply using a b2flex (the nflex would have been better due to higher voltage limit) as Joe Gross did.
Hooking up a switcher to a dynamo output can increase the power that can be extracted, which is good. The downside is that unless you design the switcher for that application, it's just blind luck. Not that blind luck is a bad thing, but it's not my preference. Joe Gross has done a number of clever circuits, IIRC. I do recall a nice power regulator back in the days of incandescents (ten years ago??). Sort of a Willie Hunt style of regulator, which inspired me to throw together my own pwm power regulator.

I've got the driver in (2) now and will use it to run a Philips LBL at 0.90A (more than with batteries) but also triple XM-L at 0.90A in the next few days.
so you did build a MPPT? How's it working out?

regards,

Steve K.
 

minisystem

Newly Enlightened
Joined
Jul 12, 2011
Messages
96
swhs said:
(2) I wanted to make a device to extract maximum power from the dynamo myself in december when I got an email from someone who already did it... Actually, I suggested a device with the operating specifics I had in mind to George from Taskled but he wasn't interested.

Any updates swhs? Sounds very interesting. I assume this MPPT system you've got your hands on is microcontroller-based. Is there an intention to commercialize it?

I'd be interested in having a go at doing something similar. I have a bit of microcontroller programming experience (well, Arduino-based stuff anyway), but not really sure where to start on the analogue side of things.
 

Steve K

Flashlight Enthusiast
Joined
Jun 10, 2002
Messages
2,786
Location
Peoria, IL
depends on how flexible you want the device to be. If you just want to use it for the dynamo with a fixed load (i.e. two white leds), you could adjust the duty cycle of a buck regulator based on the dynamo frequency. If the load is variable, then it gets more complicated.

The analog stuff doesn't seem all that hard to me... mostly just measuring voltage and current. Figuring out what to do with that info is usually the hard part. :)
At its essense, the general algorithm is to make tiny changes in the current drawn from the power source and then check whether the power delivered increased or decreased. As you get closer to the peak power point, a given change in current will produce a small change in power delivered.

It gets complicated if the controller also has to accomodate a changing load or charge a battery. It is assumed that the power source will be constantly changing its characteristics (Voc or Isc or internal resistance) or there would be no need to track the peak power point.

This would be a fun project to play with, especially since it seems like a little uC could handle the task of acting as the controller and generating the pwm signal for the buck converter's switch transistor.

Steve K.
 

minisystem

Newly Enlightened
Joined
Jul 12, 2011
Messages
96
Ha. Well, missing the fundamentals makes everything extra hard for me. :p

My understanding is that bicycle dynamos are pretty much rigid constant current devices and that increases in power come only by increasing voltage at higher speed. Hence, the only passive way to get more power out of the dynamo is to add more LEDs in series, but each additional LED requires the dynamo voltage to reach Vf for the whole string, reducing low speed performance. If I understand this correctly, this is why your circuit, Steve, shorts out two LEDs at lower speeds.

On the other hand, an MPPT circuit would be able to extract more *current* to power LEDs, essentially turning the extra voltage available at speed into extra current for LEDs. ie. for 2 LEDs in series, pulling ~500 mA at some minimum speed and then increasing that to some maximum at higher speeds (say 700-1000 mA). This is the application I'm particularly interested in. Assumptions would be a fairly inflexible load (the LEDs), and that it not be dynamo frequency dependent (different dynamos with different numbers of poles presumably have different power outputs at different speeds)

For instance, I have 2 LEDs with a combined Vf of 5V. Under load, then, no matter how fast I go, the voltage will be 5V and the current will be 500 mA (for my particular dynamo). Is that right? How can a buck regulator be used to extract extra power from the potential voltage available at higher speeds?

A nudge in the right direction would help. An afternoon of google searching has yet to give me a Eureka! moment. :p
 

Steve K

Flashlight Enthusiast
Joined
Jun 10, 2002
Messages
2,786
Location
Peoria, IL
well... where to start??

MPPT seems to be a topic primarily applied to solar panels. They have an open circuit voltage, Voc, and a short circuit current, Isc, that change depending on conditions (how much light is shining on it, temperature, age, etc.). There is significant internal resistance. If you adjust the load attached to the panel and graph the resulting voltage and current, you'll map out the voltage-current curve (not "voltage minus current", just a graph of voltage vs current). Somewhere along this curve is the spot where you get the most power out of the solar panel.

To move around on the curve, you need to change the load's resistance. One way to do this is change how many leds you have in series. Pretty low tech, which is why I like it. Another way is to use a switching power supply such as buck converter, and adjust the duty cycle of the switch transistor. A low duty cycle (not on very much of the time) will produce an effective high resistance load. A high duty cycle will similarly produce a low resistance load. The output is typically a constant voltage, variable current.

I've thought about taking my speed detector circuit and using it to just switch between two different duty cycles for a buck converter. Pretty low tech, and would avoid the use of extra leds and optics. I'd just need a single led rated for about 8 watts or so. A uC would allow smaller changes in duty cycle.

If you don't want the design specific to one dynamo design, then you'd actually have to determine the change in power as you dither the duty cycle. There are some ways to simplify the calculation of the power... if the load is a constant voltage (as is usually assumed when charging batteries or driving leds), then you can just measure the current delivered to the load and know that it is proportional to the power.

that ought to be enough to get you started. There's plenty of stuff on the web about MPPT's too.

Steve K.
 

xul

Enlightened
Joined
Aug 28, 2011
Messages
336
Location
MD
Isn't the output impedance of the generator/dynamo relatively constant over a range of speeds?

If the genny outputs AC I guess you need the electronic equivalent of a transformer with a variable turns ratio to maintain impedance matching with the load for max power transfer, subject to limitations on the max. output voltage.

Interesting problem.
 
Last edited:

Steve K

Flashlight Enthusiast
Joined
Jun 10, 2002
Messages
2,786
Location
Peoria, IL
The source impedance changes over speed, and is really more inductive than resistance. For the optimal power transfer, the load would be capacitive. For better or worse, it's not easy to adjust the load's capacitance in order to match the dynamo, so a more typical technique is to adjust the equivalent resistance.

I need to figure out where I've got all of the data stashed, but I do have some of the data on the 1st generation SON taken by Nick Ray back in the peak BikeCurrent days. Here's a quick screen capture:

6104886750_0e4d8f5f6c_b_d.jpg


I think a lot of it was posted on this subforum in the past too, so perhaps a search will dredge up something useful.

Steve K.
 

xul

Enlightened
Joined
Aug 28, 2011
Messages
336
Location
MD
Partial reduction of your data, using Excel's scatterplot routine.
freq voltage ohms
10 2.9 10
30 5 10
60 5.6 10
10 3.9 34
30 10.7 34
60 16.2 34

Assuming f is the independent variable, one is a linear function of freq. and the other follows a fractional exponent law.

If you can reduce these data to formulas you have a fair chance of making a workable circuit.
 

xul

Enlightened
Joined
Aug 28, 2011
Messages
336
Location
MD
Having slept on this, all you need is the DC resistance of the dynamo and a few points of the top data matrix to figure out the internal Z of the dynamo.

Another way would be to run a few mA of 60 Hz AC from a wall outlet into the gen. 120K dropping resistor in series with the 120v should do it. Knowing the current flow and resistance the internal inductance of the gen can be calculated. Clamp the rotor if necessary.
 
Last edited:

minisystem

Newly Enlightened
Joined
Jul 12, 2011
Messages
96
well... where to start??



To move around on the curve, you need to change the load's resistance. One way to do this is change how many leds you have in series. Pretty low tech, which is why I like it. Another way is to use a switching power supply such as buck converter, and adjust the duty cycle of the switch transistor. A low duty cycle (not on very much of the time) will produce an effective high resistance load. A high duty cycle will similarly produce a low resistance load. The output is typically a constant voltage, variable current.

Steve K.

This is where I get confused. In my mind, adding another LED in series allows you to get more power at higher speeds, right? This is because, at higher speeds, the dynamo is capable of generating a high enough voltage to reach Vf of the series LEDs. But if the dynamo saturates at 500 mA, then no matter how many LEDs you connect you're only going to get 500 mA through each one. This allows a higher power output at higher speeds, providing you're going fast enough to reach Vf of your arbitrary number of series LEDs. Adjusting the duty cycle of the switch on a buck converter allows you to effectively vary the resistance of the load, kind of like adding or taking away a series LED. If you just have two LEDs (front and rear, let's say) that can take, say up to 1000 mA, then you want to translate your higher speed into a higher current (to a max of 1000 mA, of course). I can't understand how varying the resistance of the load would result in a change in the current. Won't it always be 500 mA?
 

xul

Enlightened
Joined
Aug 28, 2011
Messages
336
Location
MD
One practical problem. If the gen's inductive reactance at 10 Hz is 2 ohms, you'd need a series capacitor of 7960 uF to extract max power, so prelim. design for the convertor input end is a freq. detector that switches in capacitors of varying values to optimize power transfer. The input R would stay constant.
 
Last edited:

Steve K

Flashlight Enthusiast
Joined
Jun 10, 2002
Messages
2,786
Location
Peoria, IL
This is where I get confused. In my mind, adding another LED in series allows you to get more power at higher speeds, right? This is because, at higher speeds, the dynamo is capable of generating a high enough voltage to reach Vf of the series LEDs. But if the dynamo saturates at 500 mA, then no matter how many LEDs you connect you're only going to get 500 mA through each one. This allows a higher power output at higher speeds, providing you're going fast enough to reach Vf of your arbitrary number of series LEDs. Adjusting the duty cycle of the switch on a buck converter allows you to effectively vary the resistance of the load, kind of like adding or taking away a series LED. If you just have two LEDs (front and rear, let's say) that can take, say up to 1000 mA, then you want to translate your higher speed into a higher current (to a max of 1000 mA, of course). I can't understand how varying the resistance of the load would result in a change in the current. Won't it always be 500 mA?

Adjusting the duty cycle of the buck converter allows you to get more power out of the dynamo. The buck converter lets you transform the power from 12v @ 0.5A (for instance) to 6v @ 1A. The energy gets stored in the buck converter's inductor, and the "magic" happens when you take the energy out of the inductor. Switching power supplies are very handy gadgets!

Steve K.
 

minisystem

Newly Enlightened
Joined
Jul 12, 2011
Messages
96
Adjusting the duty cycle of the buck converter allows you to get more power out of the dynamo. The buck converter lets you transform the power from 12v @ 0.5A (for instance) to 6v @ 1A. The energy gets stored in the buck converter's inductor, and the "magic" happens when you take the energy out of the inductor. Switching power supplies are very handy gadgets!

Steve K.

Kaching! OK, I get it. So you're not merely varying the load resistance, you're using the inductor for energy storage (which is fundamental to the theory of operation of a switching converter - I'm getting there!). A lower duty cycle allows more energy to get stored in the inductor before it switches it to the load (the LEDs), whereas a high duty cycle results in little energy storage, essentially passing on all the dynamo power to the load and effectively limiting the current to 500 mA. So a buck converter that allows external pwm control of switching, a microcontroller and a current monitor in combination with the right code should allow you to extract more power out of the dynamo.

I'm going to think about it some more, start looking for a buck converter with the right features. The variety available is kind of overwhelming.
 

minisystem

Newly Enlightened
Joined
Jul 12, 2011
Messages
96
So, more research has led me into the world of digital switch mode power supplies. Essentially, a discrete buck or boost converter topology where the switching is under PWM control of a microcontroller and the output current is sensed and fed back in to control PWM to reach a desired current. I'm starting to sketch out the ideas for a prototype, but wanted to run it by you wise folks before I start frying things.

First, a proposed schematic:
digibuck.png


I'm going to prototype this using an Arduino, which can generate a PWM signal with a frequency of 31250 Hz. The MOSFET is a P-channel. For the moment I'm thinking of just sticking with an asynchronous configuration. If things look like they might work then I'll replace the diode with a FET to get synchronous rectification. In fact, there is a warning about connecting Arduino outputs directly to the gates of MOSFETs, which suggests that the Gate-Source capacitance can cause problems (see: this link). So, to be safe I'm going to get a MOSFET driver to handle this. There seem to be ICs out there that are specifically for synchronous MOSFET switching of a SMPS.

The current is read using a Zetex 1009 high side current monitor (U1).

So, if I understand this correctly, when PWM is 100%, current flows through the inductor and into the load. As you lower the PWM from 100%, Q1 switches off and the path is now through the diode, which allows the energy stored in the inductor's magnetic field to become a current. By careful component selection and switching control, this should allow the conversion of higher voltages into higher currents for the LEDs.

So far, I've got the current monitor working!

currentmonitor.jpg


Waiting for the MOSFET driver and will then try to get my proposed schematic working.
 

Steve K

Flashlight Enthusiast
Joined
Jun 10, 2002
Messages
2,786
Location
Peoria, IL
I hate to mention this since you've already got a current monitor circuit, but why not just put a sense resistor between the leds and ground? Maybe add an op-amp stage to amplify the signal as needed.

Steve K.
 

minisystem

Newly Enlightened
Joined
Jul 12, 2011
Messages
96
I hate to mention this since you've already got a current monitor circuit, but why not just put a sense resistor between the leds and ground? Maybe add an op-amp stage to amplify the signal as needed.

Steve K.

I thought about that, but I read a couple of application notes espousing the wondrous virtues of high side current monitors over low side sense resistors (of course, I now can't actually remember what those virtues were...). The 1009 is in a SOT23 package and costs about a buck. The R values I've picked scale nicely so 1V = 1A and I can reference to a 1.1V internal reference for the ADC in the Arduino. If I understand your suggestion correctly, I'd be looking at about the same part count (assuming the need for an op-amp). What would the benefit be?

After some more reading, it looks like the Gate-Source capacitance issue can also be solved by putting a low value resistor in series with the PWM signal and the gate. Maybe I'll have a go at this before my MOSFET driver IC gets here.
 

Steve K

Flashlight Enthusiast
Joined
Jun 10, 2002
Messages
2,786
Location
Peoria, IL
I thought about that, but I read a couple of application notes espousing the wondrous virtues of high side current monitors over low side sense resistors (of course, I now can't actually remember what those virtues were...). The 1009 is in a SOT23 package and costs about a buck. The R values I've picked scale nicely so 1V = 1A and I can reference to a 1.1V internal reference for the ADC in the Arduino. If I understand your suggestion correctly, I'd be looking at about the same part count (assuming the need for an op-amp). What would the benefit be?

In general, monitoring on the low side is simpler, since you don't need any circuitry to convert the sensed signal to something referenced to ground. In this case, I'll invoke the "use what you have" rule, not worry about it. :)


After some more reading, it looks like the Gate-Source capacitance issue can also be solved by putting a low value resistor in series with the PWM signal and the gate. Maybe I'll have a go at this before my MOSFET driver IC gets here.

I liked the idea of the gate driver, since uC outputs generally are basic logic outputs without much current drive capability. The goal is usually to change the gate voltage quickly, and this means shoving charge into and out of the gate fast, which in turn requires that the driving circuit be able to deliver sufficient current.

If you add a resistor in series with the gate, that'll just form a low-pass filter at the gate, which will slow down the change of gate voltage. It doesn't seem like it will improve the switching speed at all.

The gate driver should also simplify the gate drive issue of keeping Vgs within the proper range. The typical problem with driving a P channel mosfet is that Vgs is referenced to the input voltage. If the input voltage is pretty large, this can be a concern. Might still be an issue with a dynamo, since the voltage could reach 30v without much trouble.

Steve K.
 

minisystem

Newly Enlightened
Joined
Jul 12, 2011
Messages
96
While waiting for the gate drivers to arrive, I tried out the buck circuit with the µC driving the gate of the P-channel MOSFET. I think it's sort of working:

IMG_20110912_233752.jpg


With the right PWM the two LEDs in series @ 4.1V are getting 0.29A from a power supply that's limited to 0.23A. I've set the power supply @ 8V but it drops to around 5.8-6V under peak power. In theory, it should be possible to convert 8V @ 0.23A to 4V @ 0.46A (say around 0.36A if efficiency is around 80%), right? So, it would seem I have a long way to go with optimization. I guess tweaking component values would be a good place to start. I wonder also if my bench top supply set up as a limited current source isn't a very good model of a hub dynamo saturating and generating higher voltage at speed.
 
Top