Micro SD current draw efficiency

For other supported Arduino products from Adafruit: Shields, accessories, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Jim2386
 
Posts: 285
Joined: Fri Nov 14, 2014 11:58 pm

Micro SD current draw efficiency

Post by Jim2386 »

Hello all. I have a very battery small size specific project and I'm trying to squeeze all the juice I can from it.

Is there any difference in power consumption for an sd card write command in the following examples:

1. Take a temperature reading every 1min and write that number to the sd card for a total of 10 min (10 temp samples total)

2. Sample temperature every minute, put each temp into a size 10 array slot (temp[10]) and after 10 minutes, write all 10 samples to the card at once.

Is the current draw by the micro sd board the same or different. Which is a better way to go (if either).

Jim

User avatar
adafruit_support_bill
 
Posts: 88088
Joined: Sat Feb 07, 2009 10:11 am

Re: Micro SD current draw efficiency

Post by adafruit_support_bill »

SD writes are in 512 byte blocks. The most efficient way to write would be to let the block fill up and have the SD library automatically flush it to the SD card. This would also minimize the number of write/erase cycles on the card. Flash memory has a finite lifetime of about 100K writes per block.

The downside is the possible loss of the last buffer full of data if the system is powered down.

User avatar
Jim2386
 
Posts: 285
Joined: Fri Nov 14, 2014 11:58 pm

Re: Micro SD current draw efficiency

Post by Jim2386 »

Thanks Bill!

Follow up. The micro SD card is literally about 1-2mm wider than I can use. Two questions:

1. In the picture attached, does the round gold pad (indicated by the arrow) have any function in the system? Nothing is connected to it.....
2. It doesn't look like it, but is the area in the boxed area non-functional space as well just used for writing the board name?

I need to sand that edge of the board to make it fit.

-Jim
Attachments
ScreenHunter_422 Feb. 03 15.41.jpg
ScreenHunter_422 Feb. 03 15.41.jpg (37.21 KiB) Viewed 276 times

User avatar
adafruit_support_bill
 
Posts: 88088
Joined: Sat Feb 07, 2009 10:11 am

Re: Micro SD current draw efficiency

Post by adafruit_support_bill »

The round gold pad is a 'fiducial' mark to aid in the automated placement of parts before soldering. There is no active circuitry along that edge of the board above the CD pin and R1.

User avatar
Jim2386
 
Posts: 285
Joined: Fri Nov 14, 2014 11:58 pm

Re: Micro SD current draw efficiency

Post by Jim2386 »

Is there a learning blog for how to "let the 512 block fill up"? I'm used to just calling the sd.write command(variable).

Where can I learn about bypassing the flash and writing to the sd buffer?

User avatar
adafruit_support_bill
 
Posts: 88088
Joined: Sat Feb 07, 2009 10:11 am

Re: Micro SD current draw efficiency

Post by adafruit_support_bill »

Just keep writing to the file. It will go into the buffer and automatically get written to the SD when it is full. Then the buffer will start filling up again for the next block.

You do not want to call "flush()" or close the file between writes. This will cause the partially full buffer to be written.
Where can I learn about bypassing the flash and writing to the sd buffer?
The SD is the flash. The buffer is in SRAM. You don't have to do anything special. That is how the library works.

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Arduino products from Adafruit”