Go Down

Topic: Powering MicroSD with Digital Pins (Read 1 time) previous topic - next topic


Feb 02, 2012, 12:31 pm Last Edit: Feb 04, 2012, 01:52 am by fireman_sam6986 Reason: 1
Hi all,

Im in the process of building a tracking collar that logs accelerometer data to a microSD. I'm currently working out ways to save power and while I'm happy with the power saving features of the board and accelerometer I am trying to improve on the microSD.

The only info I have found on SD power saving follows....
1.10 Automatic Sleep Mode
A unique feature of the SanDisk MultiMediaCard/RS-MultiMediaCard is automatic entrance and exit from sleep mode. Upon completion of an operation, the card enters the sleep mode to conserve power if no further commands are received in less than five
milliseconds (ms). The host does not have to take any action for this to occur. However, in order to achieve the lowest sleep current, the host needs to shut down its clock to the card.
In most systems, the MultiMediaCard/RS-MultiMediaCard is in sleep mode except when the host is accessing it, thus conserving power.

When the host is ready to access the card in sleep mode, any command issued to it will cause it to exit sleep, and respond.

This is great as the standby power consumption at 3.3V is around 130microAmp. The quote above says this can be lower again by disabling the clock however I am unsure how to achieve this while keeping the SPI bus active for other devices.

Is it possible to power the SD card from a digital pin and simply turn it off (DigitalWrite LOW) when I dont need it? I know the consumption is already quiet low however I might use this concept for other sensors. When I measure the current running to the SD card i get a value of -35milliAmp when the pin is LOW using an Arduino Mini Ultra with a 3.3V circuit. I dont understand where the negative reading comes from?

Also, if I connect the SD directly to a digital pin (driven HIGH) it works fine however I'm unsure what value resistor to use to limit the current. I though it could be calculated from V=IR... where V=3.3volt and current is 20milliAmp therefore R = 165ohm however values from 100ohm to 200ohm result in the card not powering up.

Any help is appreciated....


I've read of some cards needing just over 100ma when starting up, so no a digital pin is not going to source anywhere near that much current.  If you're reading 35ma that already is very near to the pins maximum rated current.  If the cards built in low power mode is not good enough for you I would throw it on a transistor.


That was completely wrong sorry. Using a MOSFET as a switch  as shown at http://www.bristolwatch.com/ele/transistor_drivers.htm about halfway down.

In this case I connect the drain to the SD GND and the source to GND. This works to turn an LED on and off but doesn't seem to work for the microSD.

If i connect the microSD up normally and unplug the GND the device still seems to power up, using about 9milliAmp and giving a different error message compared to disconnecting the device all together.

I guess the MOSFET is doing the same thing, disconnecting the GND. I need to disconnect VCC

Please any suggestion!



Hi all,

Im still trying to make progress on this. I've worked out how to switch off the Vcc and Gnd using transistors but to power down the microSD completely it seems CLK and Data in need to be cut as well.

Is there any way to achieve this? Im using the microSD breakout from sparkfun http://www.sparkfun.com/products/544 and I just want to switch it off when its not in use.



I just want to switch it off when its not in use.

I'm doing this with an I2C RTC.  I2C shutoff code courtesy of Nick Gammon.

pinRTCPOWER is a pin powering the RTC

Code: [Select]
void StartRTC()
  pinMode (pinRTCPOWER, OUTPUT);
  digitalWrite (pinRTCPOWER, HIGH);
  Wire.begin(); // for rtc 

void StopRTC()
  // drop power to rtc
  pinMode (pinRTCPOWER, INPUT); 
  // turn off pull-up
  digitalWrite (pinRTCPOWER, LOW);

  // turn off I2C
  // according to: http://arduino.cc/forum/index.php/topic,89182.0.html
  TWCR &= ~(_BV(TWEN) | _BV(TWIE) | _BV(TWEA));

Hope this helps!
a][+ ascii express, 110/300 novation cat, xmodem

Go Up