Offline
Newbie
Karma: 0
Posts: 4
|
 |
« on: April 06, 2013, 01:16:34 pm » |
Hello everyone, My name is Ethan Wise and I am on a team of high schoolers doing the NASA SLI project. http://www.nasa.gov/offices/education/programs/descriptions/Student_Launch_Projects.htmlWe are using an Arduino UNO to controll 3 sensors that we will have running simultaneously during the flight of our rocket. We have came across a problem. We do not know how to have the data from our sensors stored while the Arduino is disconnected from the computer. The sensors are pressure/temperature breakout board, humidity breakout board, and a light sensor. We will need to recover this data to put in a spread sheet after we recover our rocket. I have attached a picture of what we have so far. Please help!!!
|
|
|
|
|
Logged
|
|
|
|
|
SE USA
Offline
Faraday Member
Karma: 33
Posts: 3626
@ssh0le
|
 |
« Reply #1 on: April 06, 2013, 01:46:16 pm » |
how much data we talking about here
|
|
|
|
|
Logged
|
http://arduino.cc/forum/index.php?action=unread;boards=2,3,4,5,67,6,7,8,9,10,11,66,12,13,15,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,86,87,89,1;ALL
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 4
|
 |
« Reply #2 on: April 06, 2013, 02:17:20 pm » |
The rocket will be in flight for a few minutes (under 5) and we want to collect data from all the sensors every second or possibly a few times per second. We have around 24KiB to work with
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 1
Posts: 31
|
 |
« Reply #3 on: April 06, 2013, 03:12:52 pm » |
Hi Ethan, sounds like a cool project  5min x 60sec are 300 records. one record per second shouldn´t be difficult with an SD card, down to 10 records per second (we are talking 512Byte Blocks!) should also be no problem with a good SD card. Below that you may hit SD card writing latencies, ie you could loose some measurements. How critical would this be for your project ? I wonder about the mechanics, ie if the SD card and slot (e.g. in an SD card shield) would need some extra gluing or so. I assume the acceleration of the rocket will be big, if it stays in the air for 5 minutes). Another option would be EEPROM, but I have no experience on that. There are however some posts on this topic in this forum. RAM you probably don´t want to use; just in case the UNO reboots during flight, this may be lost. Best, RObert
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Edison Member
Karma: 23
Posts: 1381
Now, More Than Ever
|
 |
« Reply #4 on: April 06, 2013, 03:16:04 pm » |
|
|
|
|
|
Logged
|
Don't Be Upset By The Results You Didn't Get With The Work You Didn't Do
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 4
|
 |
« Reply #5 on: April 06, 2013, 03:24:53 pm » |
Thanks Robert. We aren't aren't very familiar with Arduino code writing, so the biggest help we need is what to write in to make it store this data. Then we also need to know how to retrieve it.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
UK
Offline
Brattain Member
Karma: 138
Posts: 19067
I don't think you connected the grounds, Dave.
|
 |
« Reply #6 on: April 06, 2013, 04:10:13 pm » |
We aren't aren't very familiar with Arduino code writing, It's C/C++ and there are lots of examples. Have a look at the Playground
|
|
|
|
|
Logged
|
Pete, it's a fool looks for logic in the chambers of the human heart.
|
|
|
|
Global Moderator
Melbourne, Australia
Offline
Shannon Member
Karma: 219
Posts: 13896
Lua rocks!
|
 |
« Reply #7 on: April 06, 2013, 04:38:41 pm » |
This can be handy: http://playground.arduino.cc/Code/EEPROMWriteAnythingYou don't need to take a 2 Mb photo of your screen, you can copy and paste the contents of it, as text. That will speed things up.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 4
|
 |
« Reply #8 on: April 06, 2013, 05:14:09 pm » |
I was posting this from my iPad while the code was on my computer screen, therefore I decided to take a picture rather than restarting my post on my computer. Thanks for the help though.
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 277
Posts: 25566
Solder is electric glue
|
 |
« Reply #9 on: April 06, 2013, 05:33:32 pm » |
Just to be clear, you have 1K of EEPROM and 2K of SRAM, so storing 24K of data is not going to happen without extra hardware, like an SD card shield.
Only when you know what extra hardware you are going to have can we suggest how to code for it.
|
|
|
|
|
Logged
|
|
|
|
|
Netherlands
Offline
Tesla Member
Karma: 91
Posts: 9442
In theory there is no difference between theory and practice, however in practice there are many...
|
 |
« Reply #10 on: April 07, 2013, 12:21:27 pm » |
I would go for EEPROM - http://playground.arduino.cc/Main/LibraryForI2CEEPROM - The most important thing is to write e.g. in the first EEPROM position what the last address used. (note this should be done with a separate sketch) If the Arduino reboots it just can reads where it was left - OK there is always a small room for failure - The essence of the code will be something like: I2C_eeprom ee(0x50);
struct { unsigned ling tim; float tem; float hum; } measure;
int position = 64; // start on the 2nd page of the EEPROM to minimize wear in data-pages void setup() { Serial.begin(115200); // used for testing only Serial.println("Demo flight "); }
void loop() { if (time to sample) // see blink without delay { measure.tim = millis(); measure.tem = readTemperature(); measure.hum = readHumidity(); ee.readBlock(60, (uint8_t*)position, 2); ee.writeBlock(position, (uint8_t*) measure, sizeof(measure) ); position += sizeof(measure); ee.writeBlock(0, (uint8_t*) position, 2); }
a separate sketch can read the EEPROM and dump it to serial
|
|
|
|
|
Logged
|
|
|
|
|
|