Mega and Sensor Project

Hey all,

So I am creating a project for school that has to take in temperature, humidity and 6 DOF sensor data. I am planning on using a Mega 2560 and using an integrated shield that has a RTC and an SD module already on it. The temperature and humidity data has to polled at 5Hz and written to the SD card, and the Accelerarion portion of the 6-DOF sensor has to sample at 4Khz. This needs to be written to the SD Card also. I am planning on using the AM2315 temperature and humidity sensor which is a digital sensor and plan on using the MPU-9250 analog sensor to collect the acceleration and gyro data. I am not sure the SD card could possibly write this data this fast and output the data with specific times from the RTC. Do you think the Mega is a good platform for this and could this data be collected and written to the SD card? If it can’t write this fast what should I try to do? I know you can store the data in the RAM and dump every so often but not entirely sure how to go about this? I want to ideally collect the data and write it without losing the ability to sample at the same time. Sorry if this is kind of all over the place, I am pretty new to arduinos and just started my first Arduino class in school. Thanks.

Check that all the bits will work together.
Calculate how many bytes per second you will need to write to the SD card.
Review the documentation for the RTC/SD shield to determine what its write speed is and check it meets your requirement.

You are probably going to be best to have two data files, one for the 5Hz data and one of the 4kHz data.

Do not try to write the sketch all at once. Build it up one step at a time and put plenty of print statements in the code to help you debug. You could start by just proving you can read the RTC. Then write dummy data to the 5Hz file at 5Hz. then write dummy data to the 4kHz file at 4kHz. Then start reading and writing some real data and so on.

Are you completely new to this?
How much time do you have?

It will probably be worth your while starting with the blink-without-delay tutorial.