Philip Pemberton wrote: >>> What I'm getting is a spike of about 10V, >> >> This is when a large load is suddenly removed? > > No, it's a startup spike. When the circuit first gets powered up, Vout > jumps to 10V, then settles down at 5V after a few seconds. Same thing. Startup looks like a large load for long enough for the PWM to get to maximum, which is where it is when Vout finally crosses 5V. At that point the large "load" suddenly goes away. That leaves the PWM at maximum with light load at the regulation threshold. The spike is because it takes many cycles to turn down the PWM to match the new load, then even more time for the output caps to get discharged to the regulation threshold again. Another way of looking at this is that you basically implemented a "I" controller (no P or D term), and are seeing classic integrator windup. This particular case at startup is usually handled by having separate startup code, but you can have this problem anytime you have a large load for a while which suddenly goes away. > PSM (aka PFM) in other words. The exact same algorithm seems to have > been used in Mchip AN216, and looks fairly simple to implement. It is. I'll be teaching a course at Masters this year on using 10Fs for switching power supply control. You can do a lot with very simple logic. I particularly like the 10Fs for this since they have a comparator and absolute voltage reference built in. > Only 60% or so efficient though (and 45% worst case efficiency Huh!!? Where did you find this bit of "wisdom"? I can't think of any theoretical argument for this, plus I've got various implementations of this running quite nicely at much higher efficiencies. At your voltages, the biggest efficiency loss will be the forward drop of the diode. ****************************************************************** Embed Inc, Littleton Massachusetts, (978) 742-9014. #1 PIC consultant in 2004 program year. http://www.embedinc.com/products -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist