Stand alone RS232-logger with SD support and two way communication

Hallo, I have been wandering around here several times because of some nice camera-control Project with Arduino. My problem now is another. I am helping in a Scientific Project where we want to use an airborne (Ballon) setup to measure the liquid water content in fog on several heights to get a liquid water content profile. We already have a sensor (Cloud Droplet Probe by Dropletmeasurement) which works quite fine on 12V. The CDP has to receive a binary file with some hex-commands (not that fancy, just a start char, 2 or 3 depending the mode and the checksum) and answers with a binary string containing the data in hex. It would be nice to split that up into it's values.

The data should be stored on a SD-Card, or maybe even USB stick. Is it possible to run the arduino in such way as Standalone? (I suppose it does, from that what I have seen around)

My thoughts are: Maybe it is possible to connect the Arduino via RS-232 cable with the Probe through the "Serial" library and use the USB port for data storage. That shall mean I need a Arduino mega board with more than one Serial port...wouldn't be a problem I think. Then use the write() command to send the string to the Probe and receive the data on the same channel. After that use the println() function to write the received String to a SD card or USB device on serial2. Bitwise operation is possible? I know exactly which bit is the starting position of each value and its length, so splitting that up would be great.

Sorry for all those writing and questions, but maybe someone has some comments for me. It would be great if you could help me. The working progress and code would be available from me, of course. We already have a microcomputer available, but the documentation is....uhmm, well......not that helpful ;). The Arduino language seems a bit more clear.

It is MUCH easier for the Arduino to store data on an SD card than on a USB stick. The SD card uses the SPI interface so there is no need for a second serial port to use an SD card.

The adafruit Data Logger Shield provides an SD card slot and a Realtime Clock:

You'll need level shifters to convert the RS232 signals to TTL Serial use by the Arduino.

Thanks for your help! I wasn't aware that the serial ports just run on TTL, but I could implement a max 232 to get to RS232. I think I will use the Arduino (mega) and configure two Serial ports for RS232 and use the Probe and maybe a GPS via NMEA later. The adafruit SD shield looks nice, especially for the realtime clock implemented. I was thinking of a DCF77 clock to get the time but the real time clock is nice and I could get the time set by GPS later I suppose.

My current Idea with the mega is: Serial1 is used to send the commands for the Probe via Serial1.write() to the OPC, then wait if any bytes arrived yet. When they arrive, store them in an boolean array. Need to have a look how to get the data bit by bit.... Save this array and a timestamp via Serial.Println() to a textfile. Use the array with a loop to save the bits (bit by bit) as measured data (Ascii) and then save these as Tab separated textfile with the time on the SD.

Later on it would be great (if this is running ...) to use another Serial port as RS232 to take my gps via NMEA and store the Position, Altitude and Time in the measurements Table. The Ballon will be attached to Wire, but some kind of safetystop (electromagnetic valve to open) if the Ballon leaves a defined area (Min Max Lat/Long) is in my mind, too.

Well, my Arduino is ordered and I keep you all informed if it works ;)

Also take a look at the seeed studio stalker v2 - rtc + sd slot + LIPO charge circuit; I use these a lot for remote sensor projects.