Go Down

Topic: Compiling an SD/MMC and fat16 library (Read 5 times) previous topic - next topic



So i had a walk in the outside about 2 hours. The old battery finished after 15mins, i added a fresh 9V block and the data was appended as it should. There were much less errors in the checksums as the first time. I think the 3.3V regulator was the right decision to add to the circuit. The leds blink much more the same tact. To be on the safe side i would say add a low drop regulator, maybe another card takes more current so you would need it anyways. And it´s only the cost of 0.75?.

I also made some measurement:

I measured with an 1R in series with the arduino and got
150mA at work. (140mA-175mA) at logging after init sequence, depending on write frequency (has to be analysed why sometimes more to write)
180mA at init sequence

25mA Arduino alone
78mA   " & MAX232
80mA   "  "  & LED stuff
140mA " " " without card

so the nice thing is, that sd-card writing is not current hungry! Gps is.
But you should have a big buffer, would be interesting to  see with a good measurent equipment how the card behaves. I think there may be really short big peaks of current.  An sd-card has a minimum maxWrite frequency of 25MHz per datasheet. Too short for me to see.

But when i look at it with my scope when i put the card into the slot without gps, i see that the card has it´s own logic. ca. every second it makes pulses about 50mA, so it may try to communicate or whatever.

That may not be super correct measured, but the whole measurement should be proportional right.
Same 1R, same fresh 4R25 6V battery.

That´s it about the electrical stuff. Hope that helps anyone.


Good stuff, strohhalm.   :)  I'm hoping to implement a similar datalogger solution for a GPS and OBD2 (in-car diagnostics and stats).  It'll be a while before I can get my head around what you've done, but this looks like a great start.  


Mar 21, 2008, 01:50 am Last Edit: Mar 21, 2008, 01:55 am by Nuno Reason: 1

I'm sorry...I'm ok with the software part but I cannot understand where did you connected P_B0 ... P_B3 on the Arduino board.
Can you please explain this part a little better?

Thank you, Nuno

Nevermind...just found  :-[


Hi Nuno

I was embarrassed with it like you when i first saw it. but next moment  I thought it could be the port number of Atmega168 chip

As you know, the Port B0 ~ PortB4  are pin no. 14~17. try it  :)

Strohhalm~ please give us the real answer ~


And I thank you all guys above for all of your efforts. It'll be very helpful to my project

Thank you very much~



If a standard FAT library is too heavyweight for your application and you don't fancy raw card reading & writing here's a halfway-house solution that I've written:


I'm very happy to help with enhancements or explanations.


Go Up