Saturday, 9 March 2019

sd - What determines the actual power consumption of writing to a microSD card?


I'm currently working a project that will feature writing data to a microSD card. Because my project will be battery powered with a 125mA power regulator, I'm concerned that my write operations will consume too much power.


The microSD standard spec document states that a 25MHz write operation can have a maximum current draw of 100mA. This is somewhat concerning. However, my write operations at most will occur at 12MHz.


So my question, what exactly determines the power consumption of writing to a microSD card? I assume clock speed will effect it, would this relationship be linear? Regardless, assuming I were to write at 25MHz per the spec, is this 100mA simply a limit? Would write operations actually be less than this?


Is power consumption dependent on specific manufacturer implementation? A lot of microSD card datasheets don't list specific power consumption...


I appreciate any help!



Answer




For a past project I had to optimize the power consumption of a battery powered device recording data on a microSD for several days.


Things you need to do or are useful to know.



  1. Measure the power consumption profile of the application, in particular the SDCard.

  2. The SDCard has on internal LDO (Low DropOut regulator) which turns on when you address the card using the CS signal. It remains on during a certain time after you disable the CS signal. That time is pure power loss because you are not doing anything with the SDCard at that time.

  3. The faster you write to the SDCard, the less time it will be on.

  4. SDCards have different performances: read/write speed, read/write/standby current, the delay between the time the LDO turns on and the time that it is ready, the duration that it stays on after the CS signal goes low.

  5. By grouping read/write transactions you will limit the time during which the SDCard is on. By increasing your processor speed while you are writing, you can reduce the access time to your SDCard and therefore the consumption.


What I did:




  • Read specifications from several brands - it turned out that they did not have any helpfull information. The 100mA is a limit that the system hosting the SDCard must be able to provide to ensure that it works with all brands.

  • Buy about 10 different SDCards from different brands (manufacturers) and measure their characteristics: current consumption (read/write/standby), access delay, the time the SDCard remained on after deasserting the CS signal. We did not have to check speed as the microcontroller was well below the speed the SDCards could achieve.

  • Select the SDCard type that had the lowest consumption and "on" duration after CS off. As far as I remember, the avarage consumption ratio between the most efficient SDCard and the worst SDCard is about 3.

  • Limit writes to the SDCard by storing as much data in RAM as possible before writing it to the SDCard in several successive block writes. Only do full block writes and not partial block writes that have to be repeated later.

  • Increase the system clock during the writes to get the highest possible SPI speed, and lower the clock after that to limit microcontroller consumption for the other operations that did not require a high clock speed.

  • With all of that we were able to move from about 6 hours of autonomy to about 3.5 days.


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...