P-channel MOSFET high side switch

Hello folks,
I'm a bit confused: I designed a circuit following this topic directions, built my circuit on 3 different boards, for only the 1st worked. After investigating, I realised I accidentally used a N-channel mosfet on the working board. The gate is driven by an ATMega.
I realised that my try/error way to write my program led me to set the pin HIGH to turn ON the switch and LOW for turning it OFF, as for a P-channel would require. But apart from that, how comes a P-channel works on a N-channel circuit? And more importantly, why the N-channel isn't working after I changed my code?

The P-Channel Mosfet I want to use is a AO3401, and the P-Channel which ended up on the working board is a AO3400.
Here's the design:
circuit
LED_PWR_SIG goes to the ATMega, LED_PWR_VCC feeds to 3 sk6812 LEDs.
I wish to use a high side switch because I noticed it is more power efficient.

Please, feel free to let me know where I should look at to figure out this issue.
Many thanks

What N channel circuit?

Um, normally no. If the source is connected to Vcc, zero volts will turn on the FET.

Oops, I flipped the letters. I will edit the post.

Again, wrong. 3400 is an N channel FET.

Please don't edit the post. Add a correction in a new post. If you flip an "N" it's still an "N" :slight_smile:

If you substituted an N channel for a P channel in the circuit you've shown, it can't possibly work because the gate bias will never become positive.

Ok, I un-edited, hope I didn't add a new mistake :exploding_head:
So, to make it simpler, what is working for me is a mosfet markt A09T on the above schematic.

Then it's a P channel MOSFET. Did you have some other question?

Do you mean the marking is misleading?

I'm telling you an N channel FET can not possibly work in the circuit you showed. Draw your own conclusions, or else provide a lot more details.

In addition to the gate bias difference, an N channel FET would keep the load powered all the time, through the substrate diode.

If you have doubts about components and their markings, please post images.

Just measured it, and it is powered all the time :confused: So... Is it really a P channel? As it drives neopixels, which I turn black just before turning its power off, i explains why I didn't notice the mistake.
Now, I still don't understand why the other P-Channel mosfet aren't working. They are marked A19T (which I'm sure are P channel MOSFET for testing them on a component tester)

I've no doubt on my reading, if anything I have doubts on my ability to not miswrite N for P :stuck_out_tongue:

....through the substrate diode. It's in the diagram you posted.

What "other" mosfets? You need to be more specific in all your posts. Don't force people to rummage through your posts to find the target of your comments. Also, please post as much detail as you can.

Do you have AO3401's or not?

The P-Channel Mosfet I want to use is a AO3401 , and the N-Channel which ended up by mistake on the "working" board is a AO3400. Now I understand why the N-channel makes it look like it works: it's because of the substrate diode keep the load powered all the time, as you explained.

But the remaining question is why the AO3401 P-Channel mosfet aren't working on my circuit. This circuit:
circuit

Those mosfets are marked A19T, here's the picture of the tester screen that makes me believe they are indeed P-channel:

Assuming that the logic signal driving it is good, the circuit you posted should work. So it's likely that your actual circuit does not follow the schematic.

Again, you have only said they "don't work", so what is actually going on with them?

A19T are definitely the same as AO3401 P Channel MOSFETs

1 Like

circuit

The standard is to have Vcc at the top of a schematic.

1 Like

I started out in telecom - often they didn't do that so I got used to "reading upside down". :slight_smile:

:upside_down_face:

Oh, that’s much better !

:nerd_face:

You're right, sorry for not being more specific.
On the boards with the A19T mosfets, when I disconnect the neopixels (which are the load on the mosfet) the circuit works as expected, apart from the neopixels not being lit (as they are disconnected). I mean it works, because there is a buzzer on an other part of the circuit which beeps at the end of the setup(), and on other times in the program.
If I re-connect the neopixels and power up the circuit, I do not hear the beeps anymore. So I suspect something prevents the uC to run the setup() function.