Im sizing up an interesting Arduino project with a real world application. I want to log 'pulses' from up to 100 pulse emitting utility meters. The pulses are simply volt free closed connection circuits with a duration of around 10ms. For testing purposes I am simulating the pulse using a button. When you press the button it completes the circuit, sets the digital pin to HIGH and you have a pulse. This also increments a counter by 1.
Questions: 1. How can I get 100 Input channels? The arduino mega has 54 IOs so i need a few more! Can the analog inputs be used as input channels as well?
What problems might I come across doing a digitalRead of 100 IOs? (I dont want to miss any pulses!) I understand the Arduino can run through the read loop very quickly and the pulse duration is generous so this may not be a problem.
For each input channel there is a integer variable called ch1Counter, ch2Counter etc up to ch100Counter. If these variables are stored in RAM, then if the arduino powers off then this cumulative value is lost. How do I store these values more permanently?
I should mention that I plan on using 2 devices, one arduino as a pulse counter and one arduino as the actual data logger to store the values for each input channel on an SD card. The data is transmitted from the 'pulse counter' arduino to the logger arduino over Xbee. Which should be simple enough to set up.
Hope its clear what im trying to do here. Its really only a simple data logger but with a lot of IOs and a way of storing values reliably. Then pushing this over Xbee to another arduino. All advice appreciated! :)