Electrical – Switching power to a sensor

microcontrollermosfetswitches

I want to control the power supply of a sensor with a microcontroller, so I can turn it off when it isn't being used. My goal is to minimize power consumption on a battery-powered device.

Both the microcontroller and sensor are running on 3.3 V.

Can I use a single MOSFET directly driven by the controller? Or is there a better method?

atmega328p micro controller and GY 61 accelerometer sensor are used.

Best Answer

Probably- one method would be to use a P-channel MOSFET as a high-side switch to control the 'sensor' power. You might have to add a pull-down or otherwise ensure that the output of the 'sensor' was close to 0V with no power- if it is allowed to float around the MCU power consumption might increase.

There are many inexpensive logic-level MOSFETs that will work fine from -3.3V gate voltage with guaranteed very low Rds(on) and reasonable guaranteed leakage.

schematic

simulate this circuit – Schematic created using CircuitLab

You may have to ensure that the 'sensor' supply has some series impedance or that the MOSFET does not switch too rapidly if the 'sensor' has large bypass capacitance- otherwise it could glitch the MCU power when it turns on and cause problems.

Related Topic