Electronics > Projects, Designs, and Technical Stuff
High side P-Channel MOSFET with GPIO Pin with default on
Bletru:
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
moffy:
Just a few comments and questions.
1. You say it doesn't work but not how it isn't working.
2. You use an optocoupler, which is used for isolation, then show both grounds connected together?
3. What you show should work if wired correctly.
PCB.Wiz:
--- Quote from: Bletru on July 19, 2024, 08:23:31 pm ---If anybody could take a look and see what's wrong with this circuit.
--- End quote ---
As wired, you are not taking the MOSFET gate to 0V.
You do not need an opto coupler here, you can get the same results with a single SMD package resistor Biased transistor pair NPN+PNP, giving Hi = OFF
moffy:
--- Quote from: PCB.Wiz on July 19, 2024, 10:03:33 pm ---
--- Quote from: Bletru on July 19, 2024, 08:23:31 pm ---If anybody could take a look and see what's wrong with this circuit.
--- End quote ---
As wired, you are not taking the MOSFET gate to 0V.
--- End quote ---
True, my bad.
Benta:
Unless high speed switching is involved, this is a typical task for a photovoltaic optocoupler.
The Vishay VO1263 is one of the best on the market, but look around.
P- or N-channel MOSFET (doesn't matter), the VO1263 and two resistors will do the job.
Doesn't get much simpler.
Navigation
[0] Message Index
[#] Next page
Go to full version