I would like to count tips of a rain gauge, so that could potentially be a few hundred in a day. I don't really have a number as I haven't built it yet. I am also planning on using the arduino to measure temperature and other weather related things, so I don't necessarily want the arduino only counting pulses.
How would you use the Atmega? Would you use an interrupt pin or do you have another idea?
Thanks.
hey
a few hundred counts a day corresponds to one every fifteen minutes. If you want to do it the hardware way, you just need an RS (sometimes called SR) or similar flip-flop logic gate: 29 cents. Basiciall this is a single-state memory device. Look in the 74HCT line for an appropriate one.
An RS flip-flop has two inputs: "set" ( connect to rain gauge) and "reset" (connect to Arduino.) Tell the Arudino to read the "Q" output and then have the Arduino reset the flip-flop. You only need four pins between the Arudino and the flip flop: +5, GND, and two digital pins to read and reset the flip-flop.
Basically the rain gauge sets the flip-flop state to tripped, and when the Arduino reads it, it resets the state to unflipped.
You can get these gates in tiny tiny sizes too. If you are unsure about how flip-flops work, track down a copy of "getting started in electronics" by Forest M Mims, as it has about a dozen examples of how to do this kind of thing. Radio Sha*k has it in the US.
D