Arduino datalogging accelerometer with µ-SD storage

Thanks to Will Greiman’s Fat16 library for the Arduino, I finally got a useful version of this datalogger working! Here’s the schematic:

Arduino datalogging accelerometer with µ-SD storage schematic
And here’s the code.

The code is highly configurable: it can save raw A/D values or converted values, it allows software-defined gain, it can collect for a set time or until user input, and of course the collection interval is user-defined. It also includes a “DEBUG” mode, in which it tells the serial line everything that’s happening. It can collect multiple data files (up to 100) per card, and will tell you about any errors it encounters.

Arduino datalogging accelerometer with µ-SD storage

All this in a small enough program to fit on an ATMega168! The data collection rate is not as high as I’d like on this 8MHz chip, and the sync() calls to the µSD card cause missed data intervals when the sample period is below 100ms, but for slower data-collection situations it works great. (Does anyone make a 32MHz 3.3V Arduino? That would be nice, here…)

 

For more detail: Arduino datalogging accelerometer with µ-SD storage


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top