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:
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
Just measured it, and it is powered all the time 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
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.
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:
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?
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.