I designed a simple circuit that uses an N-channel MOSFET and a optoisolator to switch a 12 V load when 12 V power is applied to the optoisolator’s input.
The main purpose is a car PC that involves replacing the factory LCD in the car’s infotainment unit with a different one that accepts multiple inputs. The new screen and video converter require a little more power than the original so I intend to power the screen from separate 12 V power and use the power supplied to the old screen to switch it on and off.
Yes, that’s fine, but you don’t need the 330Ω resistor on the FET side, since the FET draws no current, and the 10KΩ resistor is a minimal load.
Actually, no, that won’t work.
Your Optocoupler is NPN output, so you need to drive the FET off of the Collector lead, with the Emitter Grounded.
My understanding is that the optoisolator’s emitter is connected to ground through the path from gate to drain and separately through the 10K resistor. In any case, the circuit works as I have it diagrammed. I based it on the example circuit on the Sparkfun product page I ordered it from.
As Cleophus says the circuit works “as is”. Driving the MOSFET from the Optocoupler’s collector would require an extra inversion stage between optocoupler and MOSFET. In my experience, optocouplers are equally often in common-emitter and common-collector output configurations, depending on the need (or not) for signal inversion.
*[I’m not sure that I recall ever seeing an optocoupler with a PNP output. Since they are essentially two-terminal devices on the output side, with an isolated input, one can use them as high-side and low-side switches even when only NPN transistors are present on the die, so a PNP output would provide no advantage.]
[nitpick] Gate to Source, although with a MOSFET the gate-source current is tiny compared to the current through the 10k resistor, which is as it should be.