Monday, January 2, 2012

Dynamo digital buck converter: progress report

Inspired by this thread at CPF, I built a prototype of a digital buck converter using the Arduino development platform.  The point of it is to extract more power out of a hub dynamo without adding extra LEDs in series.  To rehash: modern hub dynamos typically saturate at about 500-600 mA and their voltage is primarily determined by the load, so the easiest way to passively get more power of them is to add more LEDs in series.  Each LED gets the same current in the series circuit, while Vf of the whole series circuit goes up by the forward voltage of each additional LED. White LEDs typically have forward voltages of about 3V, and most hub dynamos easily put out 6V at low speeds, making this a viable arrangement.  Even 3 series LEDs with a Vf of 9V can produce a lot of light at low speeds, although the minimum speed that reaches Vf will, of course, be higher than with fewer LEDs.  However, I'm primarily interested in single LED designs for retrofitting into vintage lamp housings.  With proper heat sinking some white power LEDs can take well over 1A.  In order to extract more current out of the hub we need a buck converter that converts the higher voltage available from the dynamo at higher speeds into more current for the LEDs.  This is done by switching the buck converter with pulse widths below 100% duty cycle.  Here's the schematic:

Schematic for Arduino-controlled digital buck converter for hub dynamo
This is a synchronous buck converter that uses two switches rather than a single switch and diode.  This increases efficiency by reducing switching losses (ie. the voltage drop across the diode).  MCP14628 is a MOSFET driver specifically designed for digitally controlled SMPSs;  when UGATE is high, LGATE is low and there's a buil charge pump to drive the high side FET.  The PWM signal comes from the Arduino.   This circuit worked fine with a bench top power supply, taking a higher voltage input and converting it to a higher current at Vf of the series LEDs.  However, when I connected it to a dynamo Q1 kept getting fried.  This was probably due to Vdyn (rectified DC dynamo input) spiking when the load is disconnected while Q1 is off, exceeding Q1's maximum Vgs.   I added D3 to  take care of this (Vgs(max) of these FETs is 30V).  Despite this, I still would occasionally fry Q1.  C3 and D2 were added to protect the high side FET from getting zapped by exceeding its Vgs, this time perhaps due to parasitic inductance of the long wires in my messy breadboarded prototype.  C3 and D2 seem to work and during normal operation Q1 doesn't get fried anymore. However, when the load is disconnected or I mistakingly set the duty cycle to 0% in the software, Q1 gets toasted.  I asked for help here, and am starting to get some answers.  Making C3 larger might be a good start.  It is situations like this one where my complete lack of electrical engineering training becomes a bit of a barrier to progress...

The ZXCT1009 is a high side current monitor that is used as feedback for the PWM signal.

Here's what it looks like on the breadboard:

Buck converter spaghetti!

Pretty messy, which is certainly reducing efficiency.  Once it's tidily committed to a PCB I hope the efficiency will go up a bit and there won't be as many issues with parasitic inductance.  I'd also like to double the switching frequency from 32 KHz to 64 KHz so I can use a smaller inductor.

Here's how my buck converter performs with 2 series LEDs with a Vf of about 5V powered by a Sanyo H27 dynamo:

Current versus speed of a dynamo powered buck converter at different duty cycles. Switching frequency is 32 KHz

The advantage of dropping the duty cycle appears just over 20 km/h, although it is quite modest.  Above 30 km/h I think the converter is getting a worthwhile amount of extra power, roughly 200 mA (1W or about 40% more).  Efficiency is roughly 80%.  I need to test other duty cycles and perhaps go below 50%.  Thus far it seems like there's not much peak power tracking to be done.  A simple implementation would be to leave the duty cycle at 100% below 20 km/h and then drop it to 50% above that.  The H27 saturates at around 500 mA, whereas other hub dynamos saturate at slightly higher currents. Perhaps they also have better low speed performance and if they can generate a higher output voltage at lower speed then there might be more of an advantage to using a buck converter.

There is another microcontroller-based dynamo LED driver out there.  Its performance seems to be considerably better than mine;  it produces surprising amounts of power at low speeds, whereas mine can only begin to harvest more power out of the hub just before it saturates.  To be fair, because of my specific application, I am measuring current into two series LEDs rather than total power output, so this is a bit of an apples to oranges comparison. However, there is no denying that this converter seems to perform better at speeds below 30 km/h. I naively speculate that its switching topology is something other than buck, but really I have no idea how it's done or how complicated or expensive the implementation is.

I'm not entirely sure if the complication of a buck converter is worth the effort.  Human perception of brightness is commonly described as logarithmic, meaning that a linear increase in actual luminous flux does not result in a correspondingly linear increase in the perceived brightness.  I've not really found this put very succinctly on the Internet, so this might be an oversimplification (and hopefully not entirely incorrect).

Whether or not this whole exercise is mostly academic remains to be determined...

4 comments:

Anonymous said...

regarding the death of Q1: what is the voltage rating of Q1, and why is it so low? I've seen 100v out of my SON, so I'd recommend a 100v mosfet, with perhaps a 90v zener for D3.

regards,
Steve K.

minisystem said...

Good point Steve. Vgs max of the switching FETs is 20V and Vds max is 30V. I can't remember exactly why I picked them. I think I selected them based on the lowest available Rds(on). Regardless, a more robust FET would certainly help, but I still wonder why my Zener and TVS diodes aren't doing a better job of protecting the FETs.

I should also point out that instead of the MCP14628 I'm suing the LM2726 FET driver. When Q1 was getting fried the MCP14628 would aslo get zapped. The LM2726 doesn't seem to mind when Q1 blows.

minisystem said...

I'm not actually suing the LM2726. Why would I? It's performing entirely within its specifications. Litigation would be completely uncalled for.

Anonymous said...

I haven't tried litigation when my circuits fail, but maybe it's worth a shot...?
..back to reality..
Be aware that a TVS is not the same as a zener. It's there for transient protection and a 19v TVS may have quite a bit more voltage across it when the current is significant. The 28v 5W zener should keep the voltage better regulated than a TVS, but does the datasheet say that it will be 28v at 0.5A? Besides, maybe you're blowing it up because you've exceeded Vgs? Might have to check the gate driver data sheet to see what it says.
I'd be tempted to go with 50v mosfets.

Steve K.