Dog needs water alarm
For a friend of mine I made this small alarm that goes off then the dog's water bowl is empty. We set the following design goals:
- battery powered
- maintenance free
- rugged sensor
And here we have the result, an ATmega328p running slow at low voltage, draws only a little current, will make the 3 AA cells (well spent recycled from my mouse) last for quite some time. I have clocked the 328 all the way down to 128KHz, and the current draw is as low as 24uA when the supply voltage is 2.4v.
The sensor is made by putting two bolts through the bottom of the bowl and simply test if there is electric conductivity between them.
Most of the time the atmega328 is in some deep sleep mode there only an timer interrupt wakes it up from time to time. Then awake the program tests the probe and if no conductivity, squeeks it's tiny beeper, and then back to sleep.
The beeper is one of those small capacitive ones from postcards. I drive it between two pins in a push pull setup to maximize the output.
After assembly on stripe board it looks like this:
Note. An annoying lesson (re)learned: When running off the internal 128KHz oscillator it's too far away it's calibration to make serial code upload via optiboot possible. I had to program the chip via ISP instead.
Based on feedback received from you my friends I have made completely a new version. New features:
- cheaper parts (I have not done the math in details)
- smaller, with on board battery
- less power usage, as low as 200nA when idling.
- Louder beep!
- Not using a micro controller any longer, nor any software. (boring)