Hi everybody
I want to drive a 12V load with an GPIO pin (0V or 3.3V) of a micro-controller.
It has to be the high side as I do not have access to the GND of the load.
Instead of a transistor or and N-Channel MOSFET I wanted to use an optocoppler to drive the gate of the P-Channel MOSFET.
The default state should be ON, i.e. taking the gate to GND which will be done by R12.
If I want to turn OFF the load, the pin of the micro-controller will go to HIGH (3.3V) which should
make the optocoppler connect 4 to 3 and pull-up the gate to VCC (12V). R13 and R11 are here for current limitation.
As you can imagine (otherwise I would not make this post), it does not work and I am sure that I am another victim
of this "negative voltage" theory of the P-Channel MOSFETs.
If anybody could take a look and see what's wrong with this circuit.
Thanks in advance