Our fridge door sometimes doesn't close completely. To become aware of a not correctly closed door immediately (instead of after a night) I created this open-door-detector. As a side effect you also get a beep-notification when making your choice while the door is open takes too long ;-)
The door open detection is done by a micro switch. It closes on opening the door and thereby provides power to the circuit which contains an Arduino based microcontroller (ATmega328) and a spare piezo speaker.
Note that instead of a complete Arduino board only the Atmega328P is used on a breadboard. See the [clip by Julian Ilett](https://www.youtube.com/watch?v=sNIMCdVOHOM) on how to do this. (But I needed an extra 10 kOhm pullup on the reset pin 1 during data transfer.)
The file "ArduinoToneMelody.ino" contains the program: * On opening the door the LED starts to blink. * After 10, 20 and 30 seconds the program will do 1, 2 and 3 beeps respectively. * After 40, 50 and 60 seconds a siren sound will be repeated once, twice and thrice respectively. * After 70, 80 and 90 seconds a short melody plays. * Then all steps will be repeated.
See the circuit picture for used parts. * The Atmega328P was bought with Arduino bootloader programmed which simplifies getting started. * The piezo-speaker was taken from a broken device. * The microswitch closes when the fridge door opens. So the circuit needs no current while the fridge door is closed. It is soldered onto a piece of veroboard only to provide stability.
OpenSCAD files are included. (Including my own battery-box-design.)