3
\$\begingroup\$

let me say that I have a 40 Years+ experience in digital electronics (I worked for Sperry Univac) but my knowledge of basic analog electronics is almost zero, so I beg you pardon for may possibly silly questions! I need to build a tool to discharge a lead-acid battery with a controlled current for a specific time. The project is based on an ESP8266 and a DAC, but this is meaningless while, at he very end, I want to control the current through a voltage. I ordered the components to follow this schematics I found somewhere on the Internet: meaningful part of the schematics

The theory is that the controlling voltage is fed to the non-inverting input, the voltage drop in R1 is compared and the opamp output controls the gate of the mosfet. The supply of the opamp is 0 and +5V from and independent supply, while the battery is connected to the drain of the mosfet. Unfortunately, the mosfet is always ON. So, I tested the OPAmp in this way: 0 +5 as supply, 2.5v at the inverting input and a Pot central pin (spanning from 0 to 5 V) to the non-inverting input. Surprisingly the output of the opamp transitions from ~1.48V to ~4.55V. Almost the same shows (obviously) if I invert the the inputs. My guess was I should have 0-5V (or a bit less), otherwise I cannot figure how that circuit can work. I tested 3 NE5534 but all behave the same, so I assumed I am in fault, not them!

I found in my garbage box a used RC4558 and it too "fails" almost in the same way! Surprisingly, an LM324 works exactly the way I expected: fine, but this totally disoriented me!

While I would like to know why this happens my real and final question is: can an LM324 be used to control the gate of the mosfet? Or, is there an other OPAmp that behaves as I need and is capable to drive the mosfet?

Unfortunately, I don't want to change too many things in this project while I already made most of the hardware and the software!

Tanks in advance!

\$\endgroup\$
4
  • \$\begingroup\$ You can do this but...heatsinking...lots of heatsinking. And you should use a power MOSFET designed for linear operation. \$\endgroup\$
    – DKNguyen
    Sep 30, 2020 at 13:18
  • 3
    \$\begingroup\$ 5534 may not pull its output close enough to V- to turn the MOSFET off. if V- and GND are one and the same, as in your schematic. Either add an -ve supply, or use a rail to rail opamp and keep the 5534 for audio work. \$\endgroup\$
    – user16324
    Sep 30, 2020 at 13:21
  • 3
    \$\begingroup\$ 1) The NE5534 opamp is more suited for audio applications and works best with a symmetric supply of +15 V and -15 V. You're using it at 5 V and 0 V so that NE5534 isn't very happy. Yes an LM324 should work better as it can pull its output much lower than an NE5534 can (under similar circumstances). 2) circuit looks OK 3) do estimate the power disspation in Q2 and R1 and use a heatsink for Q2. \$\endgroup\$ Sep 30, 2020 at 13:23
  • \$\begingroup\$ Pick a large-as-possible value for R1, because it's cheaper to get a good power resistor than a power MOSFET, and it shares the heat dissipation. \$\endgroup\$
    – Whit3rd
    Oct 1, 2020 at 4:52

1 Answer 1

5
\$\begingroup\$

The supply of the opamp is 0 and +5V from and independent supply

The minimum recommended supply rail for the NE5534 is 10 volts and its output will not get any closer to the negative rail than maybe about 2 volts so, given that the op-amp's negative rail is 0 volts in your circuit, the output will not get lower than about 2 volts and, the knock on effect of this is that it will always be turning on the MOSFET to a lesser or greater degree.

To compound the issue, the lowest input voltage that the NE5534 can adequately handle is only guaranteed to be 3 volts above the negative rail (or +3 volts in your circuit).

Surprisingly, an LM324 works exactly the way I expected: fine, but this totally disoriented me!

The LM324 will work with supplies lower or higher than 5 volts and its output can be relied on to swing to within about 50 mV of the negative rail (0 volts in your case). It's inputs are good all the way to the negative rail too.

can an LM324 be used to control the gate of the mosfet? Or, is there an other OPAmp that behaves as I need and is capable to drive the mosfet?

It can be used but bear in mind that the input offset voltage of around 5 mV may give a battery discharge current error of a few percent.

Also, when driving a MOSFET like this, it's usual to turn the op-amp into an integrator so that the excessive capacitance of the MOSFET's gate-source does not cause the circuit to become unstable. However, of all the chips that are available, the LM324 is probably one of the least likely to be problematic in this respect. Having said that, I would still have a 1 kohm resistor from R1 to the -IN pin of the op-amp and, put a 10 nF local feedback capacitor from the op-amp output to -IN (just to be sure and sleep well at night).

\$\endgroup\$
2
  • \$\begingroup\$ -@DKNguyen: yes, my heatsink is huge with a huge fan and, in addition, I have a temp probe and the ESP can decide to turn off everything should 100C (ok??) be reached. -@Brian Drummond and @Bimpelrekkie : I assume the schematics suggested a wrong OPAmp! -@Andy aka: Ok, it's clear the suggested OPAmp is totally wrong! I tested with the LM324, the resistor and the capacitor you suggest and it works fine! The "current error of a few percent" is not a problem while I can compensate it with the ESP after some tests! \$\endgroup\$
    – Resca
    Sep 30, 2020 at 15:15
  • \$\begingroup\$ @Resca if you are done with this specific question you might want to consider this \$\endgroup\$
    – Andy aka
    Sep 30, 2020 at 16:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.