Ideal diode circuit fixing

By: RussellSenior

2013-07-16 01:01:53

At the bi-weekly meeting tonight, as promised, I brought my non-working circuit, and as promised, Paul helped me get it working.  It is a circuit that allows current to flow through a p-channel mosfet ( from a power supply to a 12V sealed lead-acid battery and a load (which draws about 120 mA, normally), but that prevents current from flowing from the battery back into the power supply.  The idea is to use an op-amp to compare the voltages upstream and downstream of the mosfet.  If the upstream has a higher voltage, then current is flowing in the favored direction.  If the upstream is lower than the downstream voltage, then current is flowing in the wrong direction and I want to turn the mosfet off.  The mosfet has a very small resistance, about 20 milliohms.  Paul supplied a better op-amp (LMC6482 CMOS dual rail-to-rail op-amp) than I'd been using (a generic LM741).

ideal diode circuit diagram

I had been having trouble getting the transistor to turn off.  The thing that I *think* fixed it was the introduction of voltage dividers to move the op-amp inputs away from the op-amp power supply rail voltages.  This I accomplished by using 2 10k trimmer pots, adjusted so they were as close to the same relative resistance as possible.  The wiper contact provides ~50% of the input voltage to the op-amp inputs.  The adjustment of the potentiometers is crucial to having the op-amp turn off the mosfet when the current begins to reverse.  Although they are not fine-tuned, they were close enough to observe the mosfet turn on and off.

Thanks also to Scott Dixon who provided a DVM to measure the power supply current.  When the mosfet turns off, the current it was measuring should go to zero, which it did.  Paul also suggested adding a 100 Ohm resister between the op-amp output and the transistor gate.  I added a 10k resistor between the gate and ground (not shown above), just to make sure the gate was discharging when the op-amp went low.

As proof, attached are a couple photos I took of the rig.  Thanks to all that helped out!

Back to archive index