Can opamp directly drive the MOSFETs?

There is a 12 V DC source. I am also generating a 10 V source from it. The output is connected to a battery. This is basically a battery charging and cutoff circuit. The charging part is working fine and from there, I am taking 12 V. The battery voltage range is from 9v to 10.6 V. As soon as it reaches 10 V I would like to cut off the charging with M2. So used an opamp with 10 V as a reference and gave the positive terminal/output to the non-inverting pin. (opamp as comparator) opamp IC I used is LM358. Now whenever the charging is happening the LED D3 should also be on. Once 10 V is reached M2 and M3 should cutoff and M1 should turn on turning LED D4 on.

The Led consumes about 10 mA of current. So I have used a 1.2 kΩ resistor to limit the current.

NMOS- CS3N50B3 (using because already available) Ciss=280 pF, Coss=30 pF, Qg=10 nC

PMOS- FDN304P. Ciss=1312 pF, Coss=240 pF, Qg=20 nC

OPAMP- LM358

This circuit will only be functioning when a charger is connected i.e. a 12 V source is there. When not connected the battery will be used as power bank for other circuitry.

edit::

added D6 and 1 more opamp;

D6 won't let the current flow back but the voltage will be present on the U1(+) right?

Max voltage on U1(+) will be 10.6 volts and on U1(-) will be 10.5. My supply voltage is 12.

In the datasheet it mentions common mode voltage(max) should be (V+)-2 i.e 12 - 2 = 10

And my input signal is 10.6 volts. So does this mean I am over the range and will damage my opamp.

• Basically yes. But it will not switch the load off when full, but instead enter linear regulation. D3 will turn off, and D4 will turn on, but the load won't be disconnected. Instead of the op-amp circuit, you will need a comparator circuit with hysteresis. Commented Nov 28, 2023 at 8:01
• Additionally, the LM358 doesn't work so close to the positive supply I think (TL072 would be a safer bet) and when the 12V supply is not present, the connected battery will fry the IC because current will flow into the non-inverting input. Commented Nov 28, 2023 at 8:11
• @tobalt have made some edits could you help me out
– user351626
Commented Nov 30, 2023 at 7:33