19
\$\begingroup\$

We are building a low-power data logger based upon the ATmega328P, in order to make use of the Arduino boot loader and IDE, etc. Ideally power consumption should be less than 0.3mA @ 3.3V to get around 4 months life on a single AA battery. Sensor data will stored at a maximum of 76 bytes/sec for the 4 months, giving around 750 MiB of data. Therefore we have the need for a large memory device, that is still low-power.

From what I can tell, the only practical solution to store this much data is to use an SD card. However SD cards seem to use a little more power than we can afford, 0.2mA idle current for the cards we have now, and more when they are writing.

So some questions:

  • Is a high-side switch the only practical way of controlling power consumption of the SD card?
  • Are the any caveats we should be aware of when switching power to the card? For example, is wear-levelling a process that will be performed after a block write, or can it happen at any time.
  • Are there any other alternatives we should consider?
\$\endgroup\$
2
  • 1
    \$\begingroup\$ solarduino.net/?p=58 is an article that might be of some interest to you \$\endgroup\$
    – vicatcu
    Aug 4, 2012 at 15:13
  • \$\begingroup\$ Consider adding external RAM like 23LC1024. Then you can buffer more and keep the SD card shut down. Microchip also makes a battery-backed version, if the idea of data sitting around in volatile memory bothers you. \$\endgroup\$
    – markrages
    Oct 15, 2012 at 19:01

4 Answers 4

19
\$\begingroup\$

If you're budgeting 0.3 mA average every µA counts. Not so much of a problem for the microcontroller, but the SD card will consume tens of mAs. You want to have it switched on as little as possible. But the ATmega328P has only 2 kB of RAM, so that means your sample buffer will be full in less than half a minute, and then it's time to write to the SD card. Two times a minute.

I would consider a TI MSP430 instead of the AVR. It's still the lowest power commonly available controller. It will save you the µA you'll need when writing to the SD card. The MSP430F5418A also has 16 kB RAM, so that you have to power on the SD card only once every three and a half minute.

You can run the MSP430 on its low frequency oscillator, and switch to the high frequency DCO (Digitally Controlled Oscillator) for writing to the SD card, so that this takes as little time as possible.

For powering the SD card I would indeed use a high-side switch. The BSS215P is a suitable logic-level P-MOSFET.

edit
If you don't mind a BGA package a NAND Flash device may be an alternative to the SD card. This one can operate in MMC or SPI mode. It consumes less than an SD card, but still consumes 200 µA in standby, so you'll still want to shut it off with the high-side FET. Be sure to make the I/Os to the chip low before switching off power. That goes for the SD card as well.

\$\endgroup\$
3
  • \$\begingroup\$ Thanks for the info. Unfortunately, current we are limited to MCUs with Arduino boot loaders available, but are considering the Atmega644PA due to the increased RAM. The MCU will be woken up by an RTC interrupt to perform the measurements and be in power down at other times. Are there alternatives to the SD card? Your suggestion to get a MCU with lots of RAM for a large buffer is a good one that I didn't think of. :) \$\endgroup\$ Aug 4, 2012 at 7:25
  • \$\begingroup\$ @stevenvh What characteristics of the BSS215P MOSFET make it suitable for this application? \$\endgroup\$ Apr 12, 2015 at 0:45
  • \$\begingroup\$ An AVR may even be able to supply an SD card from a GPIO pin (20mA should be possible). \$\endgroup\$
    – JimmyB
    Oct 25, 2016 at 21:17
19
\$\begingroup\$

(Answering my own post with useful information)

I have performed some experiments with a limited set of SD cards to check their power consumption. They seem to vary widely between manufacturers and within types, some cards consume 10 times more sleep power than others.

There are two results below. The first is a the estimated current consumption when sleeping, and the second is the average current consumption for approximately 1 sector write every 5 second for my board.

Card                     Sleep (mA)         Cyclic write (mA)   Number of cards tested

Sandisk 4GB Class 4      0.34-0.95 (0.69)   0.64-1.25 (1.05)    5
Verbatim 4GB Class 4     0.06-0.12 (0.09)   0.12-0.17 (0.16)    6
Kingston 4GB Class 4     1.34-1.34 (1.34)   1.47-1.47 (1.47)    1
Lexar 4GB Class 4        0.09-0.09 (0.09)   0.11-0.12 (0.12)    2

Lexar 8GB Class 6        0.06-0.09 (0.08)   0.09-0.12 (0.10)    4 (best so far)

Toshiba 16GB Class 10    0.12-0.12 (0.12)   0.18-0.18 (0.18)    1

I haven't included peak current because it seems not a reliable measurement with my multimeter. Probably because the card is only written to for a few ms. But I noticed that all the cards gave around a 5 - 6mA peak measurement (smoothed) whereas the Lexar gave 2 - 3mA (smoothed). Note, the real max current is an order of magnitude greater than this, but is does indicate the Lexar card has low write current as well as sleep.

Current winner

Lexar 8GB Class 6

I will update this list as more tests are done. (Last update: 2014-08-14)

\$\endgroup\$
3
  • \$\begingroup\$ You'll want a uCurrent (eevblog.com/projects/ucurrent) for your experiments. Hooked up to an oscilloscope, it can give you a good insight in power consumption over time during various sequences in your program. \$\endgroup\$
    – RJR
    Mar 6, 2016 at 4:11
  • \$\begingroup\$ would be great if you have any updated data \$\endgroup\$
    – rfii
    May 7, 2022 at 15:32
  • 1
    \$\begingroup\$ @rfii Unfortunately I haven't worked on this for years \$\endgroup\$ May 9, 2022 at 3:12
2
\$\begingroup\$

Nice tests. Check out our low power datalogger tutorial using Arduino Pro Mini and SD cards: http://www.osbss.com/tutorials/temperature-relative-humidity/

It probably contains exactly what you need (RTC interrupt wakes it up, close to one year battery life, etc.) Our "mainstream" power consumption is around 0.195mA @ 3.3V, and this can go down to 0.11mA or much lower, if you use other boards or the bare ATmega328P chip itself.

Just like @stevenvh said, you'll need a transistor to control power to the SD card reader when the processor is in sleep mode.

\$\endgroup\$
0
\$\begingroup\$

The lowest sleep currents I've seen for SD cards are around 0.05 mA for old sandisk 256Mb, and like the OSBSS folks I rarely get my data logger builds below 0.1 mA because typical SD cards seem to draw about 0.07 mA. Still, when you reach that territory you should easily be able to get 3-4 months out of a AA if your boot regulator is efficient enough.

Be sure to check that you are pulling up the un-used connections on your SD card adapter, or the sleep currents can be much higher. Also explore the low power library from Rocket Screem, as this lets you enter different 328P sleep modes easily.

As for switching: the fellow who wrote the SD libraries for the arduino warns against de-powering the SD cards over at the Arduino playground, so I have not pursued that approach. I'd be curious to hear how it worked out for the OSBSS guys(?)

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.