diy fridge alarm

Hi all,

I have been authorized to spend time on making a fridge alarm that sounds a siren or similar when the fridge door has been open for a defined period. The easiest would be to have a micro wake up when told that there is light (ambient or internal) and count millis. I would like it to be powered by a small battery and be as compact as possible. What would be the best way to go about for having as long battery life as possible? An LDR connected to an interrupt on a sleeping AVR? How much would the battery drain be when idle (no light). Any ideas for the hardware schematics? This must have been done before?

First you need to find out if the light goes off when you shut the door!
;D ;D ;D

You can do that easier with a simple NE555 powered by fridge light circuit.

Open the door - fridge light goes on, timer gets power and starts to count.
Door too long open - timer triggers buzzer
Close door - fridge light goes out, timer and buzzer lose power and go off.

You can do the same with an Arduino at multiple costs.

Korman

Measure the temperature with, say, a Microchip MCP9803 interfaced to the Arduino. Sound an alarm when the temperature goes above 5C. This would be much safer than interfacing something to the light switch, and would warn of any other problem that caused the temperature to rise, like a faulty thermostat or pump.

Get a pro-mini, run from 3 AA batteries, make simple switch that connects Int0 (Digital 2) to promini gnd when switch makes contact. On interrupt, start counting - if switch not disconnected from gnd after time interval, sound alarm.
Switch can be simple microswitch mounted such that arm is pressed when door is closed, and springs open when door is opened.

Put promini in sleep mode, will draw <1mA, run for months depending on how much current is drawn driving the alarm.