This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Problem Driving MOSFET with GPIO Pin

I have a RedBear BLE Nano v2 (nrf52832) connected to 3 AA batteries for power. I also have a Maxbotix (MB1043) ultrasonic sensor attached. I have configured a gpio pin for output and have connected it to an N-Channel MOSFET (RFP30N06LE) to be utilized as a switch. When the GPIO pin is set high, the MOSFET should complete the circuit and turn on the ultrasonic sensor. 

The problem I am having is that the GPIO pin is not causing the MOSFET to complete the circuit. If instead, I supply the MOSFET gate with the battery, it works as expected and turns on the sensor. I measured the voltage and current as exactly the same from the battery as from the GPIO pin. So my question is why is the GPIO pin failing to activate the MOSFET?

Parents Reply Children
  • can't instantly see anything wrong with that, but can't find the specs of the mosfet to check Vgs on. Don't quite see the point of R1, that's just going to bleed current when the GPIO is on, I'd have a small resistor in series with the gate to stop inrush current but not as a voltage divider. Can't  see it wouldn't work though. 

    You said  you  tested by supplying the gate from the battery, did you give it the full 4.5v from the battery or just the 3v (3.3v) you'd actually get from the GPIO? 

    Just another check question, you are setting the GPIO as output and setting it high, not just using the  pull-up (which would then voltage divide with R1). Didn't seem likely but worth asking. 

  • any progress with your project? I suspect the reason is the voltage on drain should be higher than on gate for the mosfet to work (could be wrong though). however, in a similar schematic, but with a separate power supply for the load (with a way higher voltage), it did work just fine! 

  • Multiple issues maybe .. first 4.5 volts is way above the maximum rating for the nRF52832:

    Table 8: Absolute maximum ratings
                                      Min. Max. Unit
    Supply voltages
                     VDD        -0.3   +3.9   V
    I/O pin voltage        VDD ≤3.6 V -0.3 VDD + 0.3 V V
                                     VDD >3.6 V -0.3 3.9 V V

    Second when the FET is off the ultrasonic would backdrive GPIO-D0 if the Nano were changed to a lower VIN of <3.6 volts. A preferable circuit to turn on the Ultrasonic would be a FET in the supply, not the Gnd return, or often simpler just a low-dropout LDO with an Enable. With dual supplies two FETs are normally used if not using an LDO.

Related