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!