Single channel contact position logger

Hi
Getting started with Arduino Duemilanove. I am monitoring a set of no-volt contacts on a relay. I can use the 3.3v supply on the board and measure it on analogue pin 3, the contact position to be monitored using serial print to the monitor.

 /*
  Single channel voltage logger
 
  
  connect to 
  analog 3v3
  analog 3

  delay = 100 = approx 10 measurements per sec
  
  
 */

 const int vpin = 3;                   // v measured

 void setup()
 {
   // initialize the serial communications:
   Serial.begin(9600);
 }

 void loop()
 {
   // print the sensor values:
   Serial.print(analogRead(vpin));
   // print a tab between values:
     Serial.println();
   // delay before next reading:
   delay(100);
 }

And it works! So that's a good start. When the contact is made the serial monitor reports 686 (bits?), so that's 3.3/5 x 1024. When the relay contacts are open the the data varies between 129 and 1023, probably measuring a floating voltage? Needs to be pulled down to zero (how?). I now want to convert contacts closed to a 1, contacts open to a zero, measurements to occur every 10 seconds (so delay will be one) over a period of one month = 300kb (?). Can the processor store this amount of data or do I need to store to micro-SD?

Looking at some of the other projects going on it's a bit daunting!

When the relay contacts are open the the data varies between 129 and 1023, probably measuring a floating voltage?

Yes.

Is there a reason you want to use an analog input instead of a digital input? From my understanding of your description, you could connect the relay contacts like a pushbutton...

one month = ~300kb (?). Can the processor store this amount of data

No. By storing eight samples / byte this can be reduced to ~34K which is still too high. Are there long runs of LOW values or long runs of HIGH values? If yes, then run-length encoding my get the storage requirements low enough to fit the EEPROM.

Thanks, I can certainly use the digital input. Given that the sample rate is low, I should be able to instruct the device to take the 1 or zero and store it to a microSD card.

... and that works as well, thanks. The output at pin 13 switches to match input at pin 2, the 10k resistor ties open circuit to zero. So, the next step is to load this onto an SD card.

This is the type of signal that I'm monitoring