Which microSD cards to use for low current & low power consumption?

I have been working on a small data logger project, and have noticed that the units use dramatically different amounts of power when I replace a 2gb Sandisk microSD card with the much smaller 128mb cards. So presumably there is a large difference in the current used in the write operation between the old vs new cards. Since making that discovery I have been hunting for low power consumption microsd cards, especially for my 3.3v systems, which sometimes have problems writing to the SD when the adapters are connected directly to the arduino pins. I suspect this is because the promini style Vregs can not deliver enough current for the write procedure.

I keep finding hints that some Twinmos and Toshiba microSD cards have low read/write currents - down around 45mA, but finding vendors and definitive datasheets is harder than I thought. So I am posting this to the playground:

Does anyone know of a good test/review that identifies which microSD cards are best to use where low current & low power consumption is critical?

You will never find a simple answer. The amount of power used depends on how much flash is programmed.

The amount of flash programming depends on the flash controller and your write pattern. Modern cards have very large pages, often some multiple of 16 KB.

When you write a single 512 byte block with a single block write command, the entire flash page must be programmed so the controller must move existing data to a new flash page. Wear leveling algorithms also cause extra data movement.

I could continue on forever but the short answer is SD cards were not designed for Arduino use. The amount of flash programming in the card is much greater than the amount you write.

I have tested many cards and there is not a "best" card for all applications.

You need to do testing with your application.

Another key facror in power usage is card idle current. SD.h has a bug that can prevent cards from sleeping in low power mode.

I wrote the old version of SdFat used in SD.h and it has not been updated since I fixed the bug.

  1. the easiest test is to measure the current, best with a digital storage oscope in order to see the current peaks :slight_smile:
  2. the "old" 128MB cards are usually 2-3x faster, so the "average" current could be smaller
  3. with modern high capacity cards I would design the Vreg for 150mA peak
  4. a good decoupling at Sdcard's Vcc<->Vss (a ceramic multilayer capacitor of 10uF-22uF as a minimum) is a must (to cover the current peaks)..

@ fat16Lib: A big thank you from me for your work on that library! So far I have had low sleep currents with older 128 & 256 mb Sandisk cards.

@pito: I still need to obtain and learn how to use an oscilloscope. Thank you for pointing out that the digital storage feature captures "peaks" as this will be very helpful to me going forward.

But even with all the complexities , some datasheets list much lower peak currents during write operation, far below other cards:
https://www.sparkfun.com/datasheets/Prototyping/microSD_Spec.pdf

My problem stems from the fact that the whole sd card market seems to be a kind of shell game:
http://www.bunniestudios.com/blog/?page_id=1022

So even when I find one of those "low power" data sheets, matching that up to something I can get my hands on is still a challenge. Until I get a peak logging scope, or some other solution (still waiting for my EEVblog µCurrent to arrive) it is hard to assess which cards are suitable for datalogger use, so I was hoping that someone else had already tackled the issue, sort of like this fellow:

only with more detail about peak currents, etc.

You may read the datasheet and then find you card is not even close. This happened to me recently when my SanDisk card turned out to be counterfeit Counterfeit SD Cards. - Storage - Arduino Forum. Your article about fakes is true, I now keeps a collection of fakes where I have been ripped off.

This was from an Amazon seller. If you buy an older smaller card now, the chances are very high the card will be fake. Forget it on ebay it's a coin toss. I don't think many sellers know they are pushing fake cards.

Major manufactures no longer produce standard, 2 GB or less, cards so the market for these is full of fakes.

Most cards are now used in phones and power consumption is becoming a bigger issue. I recently bought about a dozen microSDHC cards Benchmarks for new SanDisk and Samsung MicroSDs - Storage - Arduino Forum. I should test this batch for power use.

Once again, the datasheet won't tell you much for use on Arduino. I recently did tests with cards on SDIO using large multi-block writes on a high end micro. The performance is totally different than on SPI with the same card. I get read/write speeds of 20 MB/sec on SDIO so there can't be much extra flash programming.

Any experience with the old Nokia microSD cards?

eBay seems to have a few authentic looking used ones in the 128mb & 256mb range. Since their brand has fallen on hard times, it seems unlikely that a counterfeiter would deliberately choose to use that label, since its not much of a selling feature...

Any experience with the old Nokia microSD cards?

I have not tested Nokia cards but in that era camera and phone companies slapped there brand on cards made by some other company.

Here a "Canon card" is really a Panasonic card:

Manufacturer ID: 0X1
OEM ID: PA
Product: S016B
Version: 4.5
Serial number: 0X35C4B589
Manufacturing date: 9/2005

Run the SdInfo example, often it will give you a clue about what you really have.

For example:

He did not measure the peak but the average currents upon a write operation - he got 1:10 ratio (provided he did the measurement properly). Interesting..

Looks like pito is correct, old cards use less power.

I did some tests with two cards, an older SanDisk 1 GB SD and a new SanDisk 16 GB high end microSDHC.

new:

Manufacturer ID: 0X3
OEM ID: SD
Product: SE16G
Version: 8.0
Serial number: 0X3752B221
Manufacturing date: 10/2013

cardSize: 15931.54 MB (MB = 1,000,000 bytes)
flashEraseSize: 128 blocks
eraseSingleBlock: true

old:

Manufacturer ID: 0X3
OEM ID: SD
Product: SD01G
Version: 8.0
Serial number: 0XFB5C4F70
Manufacturing date: 12/2006

cardSize: 1015.81 MB (MB = 1,000,000 bytes)
flashEraseSize: 32 blocks
eraseSingleBlock: true

I ran the new dataLogger example in the 20140806 version of SdFat GitHub - greiman/SdFat: Arduino FAT16/FAT32 exFAT Library.

I used a Teensy 3.1 so there would be no level shifters or regulators.

First I put a 4.7 ohm resistor in the ground line and looked at the voltage on a scope. See the three attached traces. The scale is 100 mv/div so with the 4.7 ohm resistor, the scale is about 21 ma/div.

There are two views of the new trace, the full trace at 2 ms/div and a magnified portion at 500 us/div. Notice that the current stays higher, about 10 ma for about 6 extra ms.

If you look at the two 500 us/div traces, the write current in the trace is higher for the new card.

Edit: I added a third version of the new trace at 2 usec/div for fun.

I also put a handheld DMM in the 3.3V line to check idle current. I found that the cards went through at least two states. The new card immediately drops to about 500 uamp then sleeps at about 70 uamp . The old card immediately drops to about 200 uamp and sleeps at 60 uamp.

The dataLogger example is a current hog since it calls sync() after every data point. That will cause at least two reads and two writes for each data point. If you remove the sync calls after each point, the power use will drop a huge amount.

The newer (larger) cards are smaller fab technology, maybe ~65nm, the older (smaller) ones are larger fab process.
There is a specific size with typical CMOS technology (something like 150-180nm) where:

150nm - the dynamic currents (capacitive one) are higher, static leakage currents are lower,
<150nm - the dynamic currents (capacitive one) are lower, static leakage currents are higher.

I would estimate

I_tot = I_dyn + I_leak = Nfreqp + N*q,

where N is number of transistors, freq is freq, and p and q are some "constants".

Moreover, the new one have got much more transistors on the chip there, so the leakage currents are much higher.

And, the newer cards may spend much more time with wear leveling (larger blocks, etc.)..

I want to emphasize again how important the data logging program is in terms of power use.

The above traces are for the dataLogger example. Each record has the ASCII values of four analog pins in CSV format and records are logged at 5 Hz. Sync is called after each record so the above trace is repeated five times per second. Each SD access involves reading the current data block, updating the data block, writing the data block, reading the directory entry, updating the directory entry, and writing it back to the SD.

I removed the sync() call and ran the example again. Now access to the SD will only happen when the 512 byte cache block is full.

The size of a record is about 20 bytes so now the SD card is accessed about once every five seconds, not five times per second. Most accesses only involve a single block write.

I estimate the method with sync uses over 50 times as much power. You could call sync every few seconds and save lots of power but still prevent loss of all but a few seconds of data.

Here is a trace of a write to the old card with no sync. Note how much shorter the SD access is.

The card draws about 20 ma for 1.5 ms once every 5000 ms. The average current will be close to the sleep current.

Even the example with sync() only draws high current for about 4 ms every 200 ms so the average is not over a milliamp.

I recently used some micro-SD for logging in some Arduino-based, solar-powered monitoring stations.
I don't recall where, but I found an online comparison someone did with a half-dozen specific micro-SD cards, and the winner, by far, in terms of energy use was a Lexar 8GB SDHC Card.
I think it was a different tester than the linked post above.
Amazingly, its power use was about 25%-30% of the other entries. Got a bunch on Amazon and they have worked flawlessly for about a year now.
I'm assuming this was "Write" current that was referenced, but I don't recall.
I keep meaning to set myself up to comparison test Sd cards, but it's not a priority so hasn't happened yet.

I have no affiliation with Lexar or any other SD producer; just needed lowest-possible energy use for a remote station.

fat16lib:
I want to emphasize again how important the data logging program is in terms of power use.

The above traces are for the dataLogger example. Each record has the ASCII values of four analog pins in CSV format and records are logged at 5 Hz. Sync is called after each record so the above trace is repeated five times per second. Each SD access involves reading the current data block, updating the data block, writing the data block, reading the directory entry, updating the directory entry, and writing it back to the SD.

I removed the sync() call and ran the example again. Now access to the SD will only happen when the 512 byte cache block is full.

The size of a record is about 20 bytes so now the SD card is accessed about once every five seconds, not five times per second. Most accesses only involve a single block write.

I estimate the method with sync uses over 50 times as much power. You could call sync every few seconds and save lots of power but still prevent loss of all but a few seconds of data.

Here is a trace of a write to the old card with no sync. Note how much shorter the SD access is.

The card draws about 20 ma for 1.5 ms once every 5000 ms. The average current will be close to the sleep current.

Even the example with sync() only draws high current for about 4 ms every 200 ms so the average is not over a milliamp.

Hi, I think that I dont completely understand your graphs.

I am working with EmonTX hardware and I want to incluide a Micro SD to log data. EmonTX has a feature to be powered by the AC NET that is being monitored but getting NO more than 20-30mA from that.

I haven't an oscilloscope, so I can check this on my own.

My question is about this: could you think that putting a XX uF capacitor will be enought to avoid the Micro SD write cycle power peak??? Also, how do I have to put, and how may ohms to charge the capacitor again an slow speed?

Until now I have:

  1. Arduino standalone chip (ATMEGA328 or more) : 5 - 8 mA,
  2. RTC with 2 mA (but i have to cut off the led that it has, so probably will be less than 1 mA),
  3. Nokia 5110 display 0.2 mA (with light 7mA but I will probably not use it)

so I have to "waste" in Micro SD card about 10 - 15 mA more

Does anybody try this? Or try to avoid micro sd peaks with capacitors ?

Regards,