Electronic – How to disconnect a component with a microcontroller output

low-powerswitches

I have a circuit that uses a PIC microcontroller and an OpenLog from Sparkfun (a microSD card logging module ). Everything is running at 3.3V.

In order to conserve power when it is not in use, I want to be able to use a signal from the a PIC output pin to completely disconnect the OpenLog from power and ground when it is not in use. Can someone provide some suggestions?

I have tried using a 2N7000 between the OpenLog and ground, but I think that the voltage drop across it is not allowing the OpenLog to get a high enough voltage to turn on.

The reason that I want to disconnect it completely is that there seems to be leakage current via the Rx and/or Tx pins if either the power or ground remain connected.

Do I need a solid state switch or something? I would rather keep things inexpensive. I am a bit of a novice and this seems like it should be simple, but I need help!

Best Answer

Changing the common voltage [GND in this case], can cause errors in interfaces. We can put in a MOSFET to switch the power supply of the chip in this case, instead of switching the ground.

Use a P-type MOSFET to connect between the 3.3V rail and the 3.3V input of the Open Log. An example is the BS250. The Gate of the P-type MOSFET should have a 100K pull up resistor to 3.3V, so that the voltage of the rail "stops" the MOSFET from turning on. Source should be connected to 3.3V, Drain is connected to the Open Log. If you want to turn the OpenLog "ON", have the uController pin that is connected to the Gate of the MOSFET be pulled LOW.