Hi there I've been playing with all kinds of circuits to limit the current when charging a flat lead acid battery. I've been able to construct a 'dumb' one with a HEXFET and quad opamp in a lowside configuration thanks to great advice from the power electronics guru Bob Blick himself. I also came up with a nice little high-side circuit driven from a PIC12C508 and a quad opamp. >From an adaptability point of view, I decided to go for the PIC solution. Background : ---------------- Supply is (Vsup) goes to the drain (D) of an IRF530. The source (S) is connected to the positive side of the battery. The gate (G) is pulled low with a 4k7 resistor. To switch G, it is pulled high with a PNP tranny switch by a NPN, which is switched by the PIC. As the current from D to S increases, so does the voltage drop over DS because of the (low) internal channel resistance. Thus the voltage on the positive battery terminal dips slightly (150mV @ 1.5A typical) when it supplies current. By measureing this drop, you can know what the current is. To get this voltage to a more measureable level, you divide Vdrain, as well as Vsource with similar voltage dividers to get the levels down to a volt or two. This difference is then amplified by one opamp in a LM324. The amplified level is compared by two other opamps. The one will indicate 'overcurrent', and the other will indicate 'undercurrent'. These outputs are fed to the PIC. By now all the Bob Blicks of this wolrd will have wondered how the heck I keep the FET switched on hard. I use two pins as a charge pump to supply the gate tranny with a voltage 5V higher than Vsupply. It works well. To limit the current, I use a 4 bit (16 resolution) pulse train with the high time variable from 0 (no current) to 15 full current. If the 'overcurrent' input is high, I decrease the high time. If the 'undercurrent' is high, I increase the high time. Every now and again I invert the two charge pump pins to keep the gate switching supply up. When the current direction reverses, the PIC sees it as a very low load, and swithes the FET on hard. The Challenge : --------------------- To get a gate switching frequency between 20kHz and 30kHz using the 4MHz internal oscillator. This is not trivial and will require a good few assembly tricks. With non-optimal C code I've been able to get around 1.5kHz, but (as you can immagine) the circuit screams like a banshee when you draw a few amps. The FET stays cold even at loads up to 1.5A! I AM NOT INTERESTED IN A BATTERY CHARGER CHIP. It defeats the object of the challenge, and is, above all, 3X the cost. There is also a diode in the return path which is a killer in low voltage operation. I will post the full solution with schematics, source code, and full credits on my web page. -- Friendly Regards Tjaart van der Walt mailto:tjaart@wasp.co.za |--------------------------------------------------| | WASP International | |R&D Engineer : GSM peripheral services development| |--------------------------------------------------| |SMS mailto: tjaart@sms.wasp.co.za (160 chars max)| | http://www.wasp.co.za/~tjaart/index.html | |Voice: +27-(0)11-622-8686 Fax: +27-(0)11-622-8973| | WGS-84 : 26¡10.52'S 28¡06.19'E | |--------------------------------------------------|