In message <25b178740606101531h2d51be1bp5dcde4ef7dad3ad5@mail.gmail.com> "David VanHorn" wrote: > http://www.smpstech.com/chaos000.htm Very interesting. Thanks for that. > PSM isn't a bad way to go for battery charging, even down at 60 Hz. They > don't really care much. The problem I'm having at the moment is that the current regulation is poor at best. I'm picking up ripple and spikes on the current sense line that are very persistent - I stuck a lowpass filter on it (a 100nF over the opamp feedback resistor, then a 1uF), and there was no detectable effect. That wouldn't be a problem if the PIC was reading an average voltage, but it samples the instantaneous voltage in the middle of a 5uS (or so) window. That's fair enough, but if the ADC samples on a peak then the current output plummets. If it samples on a valley, it rockets up to nearly 2A. I could tweak the LPF, but if I make it respond too slowly then it buggers up the transient response. What I'm getting *now* is a situation where the ADC's internal R/C clock generator slips a bit and the ADC ends up sampling on a valley. The PIC kicks the current up and >boom<. It doesn't even realise the average current is a few amps - it still thinks it's locked at 500mA. Then the RC drifts again and the PIC settles back down to about 400mA... :-/ Eventually I want to make this thing do "burp" (reflex) mode charging. That's going to be great fun with an SMPSU - by the time it ramps up, the charge pulse will be over. At the moment I'm sticking to constant-current though (it's easier to get that working for testing, then add reflex mode later). In any case it's midnight now and I'm off to bed... All this SMPSU design, tweaking and black magic is making my head hurt... -- Phil. | Kitsune: Acorn RiscPC SA202 64M+6G VF+UniPod philpem@dsl.pipex.com | Cheetah: Athlon64 3200+ A8VDeluxeV2 1G+180G http://www.philpem.me.uk/ | Tiger: Toshiba SatPro4600 Celeron700 256M+40G -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist