Pages: [1]   Go Down
Author Topic: Need URGENT help!  (Read 1315 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.html
We 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!!!


* image.jpg (2696.7 KB, 2592x1936 - viewed 29 times.)
Logged

SE USA
Offline Offline
Faraday Member
**
Karma: 41
Posts: 3783
@ssh0le
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

how much data we talking about here
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 Offline
Newbie
*
Karma: 3
Posts: 39
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Ethan,
sounds like a cool project smiley
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 Offline
Faraday Member
**
Karma: 66
Posts: 2574
Now, More Than Ever
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

http://arduino.cc/en/Reference/EEPROM
Logged

"Hello, I must be going..."
"You gotta fight -- for your right -- to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 Offline
Brattain Member
*****
Karma: 309
Posts: 26495
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 502
Posts: 19080
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

This can be handy:

http://playground.arduino.cc/Code/EEPROMWriteAnything

You 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 Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 Offline
Brattain Member
*****
Karma: 634
Posts: 34551
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 223
Posts: 13878
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
Code:

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

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Pages: [1]   Go Up
Jump to: