I would like to port our application from it’s current platform, a 68332 based Datalogger/controller (TattleTale8) to an arduino mega, but there are a few things I’m not sure I can do.
My application interfaces with three external instruments(depth, wind, and a water quality suite) via three RS-232 connections and controls the location of the instruments via a bi directional motor. A fourth RS232 port interfaces with a cellular modem so I can dial in and download data files, upload new programs, etc. In the future I may want to add more serial interfaces for more instruments.
One of the instruments provides feedback for controlling the motor so I have to both record and parse the incoming data stream.
A typical sensor run lasts 3 minutes and generates 30k of data. Roughly one 80k line of readings per second from each of two instruments.
My first Arduino worry has to do with RAM. The TT8 has 256K of RAM, and while part of the program goes here, there’s a lot left over. I have to record data from several serial lines simultaneously during a run. I’ve been setting up big buffers (up to 16k) and when everything is done, saving the data in the buffer to a CF card. With an arduino, I will probably have to actively save the data to an SD card as it comes in.
Another functionality I currently have is the ability to count state changes on a pin in the background. I use this to monitor motor rotations (8 state changes/rotation). On the arduino I think I can use an interrupt to do this.
So, while I’m in a sensor run, I’m:
- Monitoring motor rotations
- Monitoring motor amps to make sure it hasn’t stalled
- Recording 80k/ sec from serial one and parsing out several values which I use to control the motor. After being parsed, this data is saved to an SD card.
- Recording a second 80k/second stream of data directly to the SD card.
While I’m not in a sensor run, I’m waiting for someone to dial in, and when they do, providing some simple commands (ren, del, ymodem send/receive, etc.).
One last thing I can do currently is load new programs remotely over the modem.
It looks like the mega has plenty of I/O for an SD card interface, enough serial and any program should be able to fit in 128k. Is the 4k of RAM a deal breaker. Should I be looking at linux based solutions like this:http://www.embeddedarm.com/products/board-detail.php?product=TS-7800
I may be able to switch the cellular dial in to 3G with a TCP/IP interface.