On 16/12/11 07:42, Electron wrote: > Nice (although quite distressing for You ;( ) experience, thanks for > sharing. Just curious..: if the board was in a metal box, with a wire > going from circuit ground to the metal box, would (when the box was > closed with a metal lid) the circuit have behaved well even with the > lamp on? If it was in a grounded tin box (Altoids tin?), it probably would have=20 worked fine... > (sure there are possibly still wires going out and acting like antennas, > but given the very low frequences emitted by the lamp, this should not > pose a problem) It sure screwed up the sense amp! I tweaked a few component values (reduced resistor values in the=20 feedback loop) which has mostly eliminated the effect. Anyway -- this is all part of a battery analyser. I'm basing the charger=20 logic on the Atmel AVR450 appnote (and a similar Microchip appnote whose=20 ID# I can't remember at the moment) but redesigning the switchmode power=20 supply. AVR450 has a bit of a... "reputation". Specifically, the FET=20 gate driver falls over at high frequencies, and usually ends up blowing=20 the drive FET outright, or running it in a linear mode and cooking it. My "V2.0" design is based on a SEPIC converter, a National Semi=20 synchronous gate driver and a pair of FETs. "If it's worth doing, it's=20 worth OVERdoing." Then there's the discharger and relay driver to deal with... Ideally I=20 want some kind of reverse-polarity protection on the relay driver -- if=20 the battery is hooked up backwards, the O/P relay will refuse to switch=20 over. That's a job for later though... mainly because I can't think of a=20 sane way to do it. --=20 Phil. piclist@philpem.me.uk http://www.philpem.me.uk/ --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .