Pages: [1]   Go Down
Author Topic: More memory to save data  (Read 640 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 34
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

I am using Arduino mega. I am also using  SPI enabled DAC(MCP4921) and ADC(LT1857) along with Arduino.  I am measuring data from 4 sensors at 1000Hz  for 10 secs.  I want to save the data from these sensors without effecting the sampling rate. Using Serial data transfer and Arduino Serial monitor introduces delay in the data acquisition loop.

What are the other ways with which I can store data and look at it once the 10 sec loop is over?
I guess I cannot use flash memory as it does not allow to store floating numbers. I would like to avoid using SPI transfer for saving this data to external RAM as I am already using SPI for ADC and DAC and I dont want to complicate the code.

Is there anything else I could do?
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 631
Posts: 34490
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You can use I2C SRAM
https://www.microchip.com/pagehandler/en-us/products/memory/serialSRAM/home.html
But you are better off using SPI SRAM, as you can access it more quickly. The code is no more complex.
Logged

0
Offline Offline
Edison Member
*
Karma: 67
Posts: 1652
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

See this topic http://forum.arduino.cc/index.php?topic=229485.0.

A  single 23LCV1024 will allow you to save 60,000 16-bit values at the rate you need.  You can add a second part if needed.
Logged

Rapa Nui
Offline Offline
Edison Member
*
Karma: 60
Posts: 2086
Pukao hats cleaning services
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You have to define the data rate you are assuming with your design. You say 4 sensors, floating point, 1000Hz sampling rate and 10seconds. That may leed to 16kB/sec or 50kB/sec based on the format stored.
I personally would go with MRAM (512kBytes per chip, 8pin, SPI) nonvolatile and w/ the above fat16lib's filesystem when talking 10sec recording at the guessed data rates above. For more demanding application you may consider the 8MB ramdisk.
« Last Edit: March 30, 2014, 01:55:09 pm by pito » Logged

0
Offline Offline
Edison Member
*
Karma: 67
Posts: 1652
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I assumed the LT1857 is used for sensors readings.  1000/sec with four 16-bit values.  That is 8 KB/sec so ten seconds is 80 KB?

Why do you want to store floats?

A single 23LCV1024 would provide 15 seconds. Another SPI device is no problem.
« Last Edit: March 30, 2014, 02:41:39 pm by fat16lib » Logged

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

@fat16lib

The ADC can take measurements at even faster rate. I am controlling it to take 4 measurements per 1 ms(1000Hz). It will take 4 readings within 100us and then wait for 1ms to measure the next set of 4. I hope this is what you were asking.

I think I can store the data in 16 bit words also. It is better than using float. Correct?

Logged

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

Looks like I cannot store data in Flash memory in runtime.
I am trying to save the sensor data for 10sec at some location. But no been able to find a solution.

problems:
1) I have about 80kb of data to save. I cannot use flash memory as I cannot save runtime data in flash.
2)I cannot use RAM, less space
3) I cannot use eeprom, less space.

So can you guys please suggest anything else?
Logged

Rapa Nui
Offline Offline
Edison Member
*
Karma: 60
Posts: 2086
Pukao hats cleaning services
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
So can you guys please suggest anything else?
I would recommend you to reread this topic again. Maybe you have to have a look at other topics as well..  smiley-wink
Logged

Pages: [1]   Go Up
Jump to: