questions about a solenoid driver circuit

I am driving a solenoid through a MOSFET that is controlled by an Arduino. I saw the attached circuit in a book (it has a motor instead of solenoid but it’s the same idea) and I have some questions. Why is there a buffer between the Arduino I/O pin and the MOSFET gate? Is it for isolation and/or current gain? How does the impedance matching provide isolation? What would be the consequence of not using it? I thought the MOSFET gate already is high impedance, so why is isolation needed? Also why is there a resistor from the gate to +12V if it’s an N channel MOSFET? Lastly, is it really necessary to have a separate power source for the Arduino? I know it’s for noise isolation reasons, but I don’t notice any effect on my circuit when I use same power source for the solenoid and Arduino. I hope that’s not too many questions. :mrgreen:

Based on the MOSFET, the gate voltage to turn on the transistor may need more than the logic level voltage provided by the Micro. The 74HC07 is an open drain buffer. When P0 is on, the gate is shorted to ground through the 74HC07. When P0 is off, the 74HC07 is disconnected, and the 10k resistor pulls the gate to 12V. This is likely over the threshold needed by the IRF511 to turn on the FET.

The HC07 is non inverting, so its output is low when P0 is low.

Isn’t the 74HC07 a unity gain buffer and not a tri-state buffer? So its output would never be high impedance?

The 74HC07 has an open drain output so it can pull it low but requires the external resistor to pull it high.

The data sheet I pulled up (parts from other vendors may vary) shows a clamp diode to Vcc on that open drain output. If you used a part like that here the gate drive to the MOSFET would be limited to a bit above 5V because of this clamping. In that case the open drain buffer buys you nothing.

I’m still confused…

I also don’t like the use of that 74HC07 in this circuit. The output will see +12V and if the part has a clamp diode (this may not be the case for every make of 'hc07) then the MOSFET will never be completely off. A very careful study of the data sheet for the exact version (manufacture) is needed to know if this part will work in this circuit.

Also, a 74HC07 is a hex part so is a waste if only one is needed but a pcb space saver if you need six gates.

I would use either a small signal NPN transistor or logic level N-ch MOSFET instead of the 'hc07.

Thanks for the advice. My final question is whether you really need a separate power supply for the Arduino. I don’t see any visible noise effect when I use the same power supply…

If it works with one PS then all is good.

The one other thing to check is the 5V regulator on the Arduino board. Does it get hot? If not then you’re good, If it does then maybe a lower Voltage to the Arduino board would be better.