Go Down

Topic: SD Card - how to reduce the power consumption? (Read 11 times) previous topic - next topic


So here's my problem, I've built a karting lap timer that uses an IR beam to trigger the lap time each time the kart passes the pits. I have a Micro SD card which I'm writing the lap times to - this works very well however the SD card is pulling around 12mA even after writing the times and after I've closed the file - myFile.close(); I need to get the timer to run for at least 24 hours including running a screen so mA's are crucial. Without the SD card attached the device only uses about 13mA, with it attached its running at 17mA and when begun - sd.begin() - it jumps to 25mA. This is too much for the batteries (4 x AAA, can't use AA's as the space isn't enough). Different cards behave differently as one of my cards jumps to over 40mA when SD.begin()

Also if I remove the card it jumps back to 13mA but on re inserting the card the whole system restarts, not sure why?

Is there a way to switch off the SD card when not required etc either with software (preferred) or with a hardware method?
I've seen that turning off the SCK pin can put SD cards to sleep, is there any way to do this?
I've also seen an N-MOSFET being used on the gnd line to swith the SD card off, anyone got any experience of this?

Or is my code wrong? here's a sample

myfile = SD.open("times.csv", FILE_WRITE);// Open SD Card File
    if (myfile) {// if the file opens ok
      myfile.print("Lap,");//Start line with Lap
      myfile.print(lapcount);//add the lap count to the file
      myfile.print(",");//add a comma for use in excel later
      myfile.println(laptime);//save laptime and start new line
      myfile.close();// close and save the file



An Sdcard may take up to 200mA peak, based on specification (it depends what the card actually does).
You may use p-channel mosfet (high-side switch) to switch the card off/on..


Thanks Pito,
I'm aware that the SD Cards pull upto 200ma during reading and writing and thats ok. The problem I have is that the datatsheet for the SD Card shows a sleep mode which pulls around 250uA.

I need to find a way to put the SD Card to sleep between write events to make use of this small current draw.


Could you describe the details of your hardware.

Most SD cards automatically go to a low power mode when no SPI clock is applied.  I tested two card with a Teensy 3.0.

I used a Teensy 3.0 since I could connect it directly to 3.3V and the Teensy pins.  There are no resistors, level converters, or voltage regulators.

An old full size SanDisk card sleeps at 0.18 ma.

A unique feature of cards in the SanDisk SD Card Product Family is automatic entrance and exit from sleep mode. Upon completion of an operation, cards enter sleep mode to conserve power if no further commands are received in less than 5 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, cards are in sleep mode except when accessed by the host, thus conserving power.
When the host is ready to access a card in sleep mode, any command issued to it will cause it to exit sleep, and respond.

A new Amazon microSD sleeps at 0.13 ma.

I just used the SdFat QuickStart and SdInfo examples.


So, I'm using a stripbaord arduino running at 3.3v (no need for level shifting) with a 16x2 LCD screen and a Sparkfun Micro Sd Card module (Link Below). There also an IR receiver TSOP31238 to receivethe signal from the pit wall. The SD Module is hooked up to pins 10 through 13 with 10 being used for the CS pin. Reading and writing to the sd card isn't a problem it just its standby current.


I'm testing with 2 different SD cards one is sandisk 1gb and the other is sandisk 128mb (quite old), both give different results, the 1gb increases the running current from 13mA to around 25mA (this is will last 24 hours ok) the other runs at 40mA (this is not ok and I need a system that isn't dependant on which type of card I use).

I've seen the quote before about the sandisk automatically sleeping when the clk signal isn't received for 5ms or more but i'm not sure if the arduino ever stops the clk signal? and if this is relevant in SPI mode?

I've also found out that some current is always leaking through the clk and data pins once the SD.Begin() is activated so this maybe a problem with the SD libraries on the Arduino as you can't 'Stop' an SD Card. Because of this its seem its very difficult to add a MOSFET to switch either Vcc or Gnd off when the cards not required ( the sandisk datasheet also states that power must come on to Vcc before power is received on the clk or data signals as this could corrupt the card and without being able to 'stop' the sd card this would happen)

Go Up