Tuesday 1 August 2017

Controlling Wemos D1 power with N-Channel MOSFET


I am trying to implement something similar to this: https://youtu.be/nbMfb0dIvYc?t=4m27s


Basically, the idea is that the microcontroller (a Wemos D1 Mini in my case) is powered up by an external switch. As soon as it starts up, it sets up a MOSFET so that it can keep its power connection until it finishes whatever job it is set up to do. In the end, it "kills itself" by cutting of the power through the MOSFET.


The problem? The original design uses a P-channel MOSFET. Since I had no P-channels on hand, I tried to implement something using an N-channel MOSFET (IRZL34N). Here is my schematic:


enter image description here



However, no matter what pin I tried to use to control the MOSFET, there is always some residual voltage on the pin. For example, using D8, I'm getting about 2.2V on the pin (and the MOSFET gate) - enough to keep the MOSFET open.


Now according to the Wemos D1 Mini Schematic, that pin only has an external pull-down resistor. So whatever current makes it through does so through the internal ESP8266 circuitry. And I have no idea what the schematic is (and even if I could find it, I would probably not be able to understand it :) ).


Anyway, to make a long story short - is there any way to implement this using low-side switching (with an N-channel)? Or is my time better spent just going out and buying a P-channel MOSFET?


I did find another similar question on the site - but the only solution there is... well... "use a P-channel"! :)


Thank you!




No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...