# How do I turn off this constant current load circuit with a Arduino gpio?

I need to turn off this constant current circuit with a gpio pin when an event is True. I'm using 6 of these circuits with 3 lm358 op-amps, so turning off the whole chip is not an option. Any ideas?

• Just add another (logic level) MOSFET in series to isolate the route to ground. – Majenko May 30 '20 at 21:39
• Have you tried connecting the op-amp's non-inverting input to ground through a resistor? – Seamus May 31 '20 at 0:19
• @Seamus You'd need to also disconnect the pot or you'd just be changing the adjustment voltage. You could disconnect the 5V from the top of the pot, which would give you 0V on the non-inverting input, which you could also achieve with an inline FET. – Majenko May 31 '20 at 9:30

Switching off the supply is the safest option if the other opamp of 358 is not used:

simulate this circuit – Schematic created using CircuitLab

Another option is to add another IRLZ44N between the R1's lower terminal and the GND.

PS: If you connect the load as shown in the circuit it won't work. Load's positive terminal should be connected to the positive supply rail, and its negative terminal should be connected to the drain of Q1.

Few ways to do it, simplest would be a logic level N-channel mosfet to ground out pin 3 of the op amp, this will reduce that current to between off and almost off (the op amp may have an offset votlage)

Next way would be a say 1M resistor between pin 2 of the op amp and 5V, and fit a N-channel mosfet inline with the sense wire, when you want it off, you switch its gate to ground, otherwise keep it high to keep in on,

• simplest would be a logic level N-channel mosfet to ground out pin 3 of the op amp this will short the supply to the ground when the pot is at max. Next way would be a say 1M resistor between pin 2 of the op amp and 5V, and fit a N-channel mosfet inline with the sense wire and this won't work since the source may be equal to the gate voltage. When you switch the FET off then pin2 will be floating. You cannot know what will happen with a comparator with floating input(s). The current source may be turned on forever. – Rohat Kılıç May 31 '20 at 10:45