Introduction: Refrigerator Door Alarm

About: I love to learn,build and design.....

It was mid-night,I was very thirsty and went to kitchen to get some water...But shockingly i saw fridge door was slightly open due to some obstacle...

I immediately closed the door,but it was too late whole body of the fridge was hot due to continuous running of the fridge..This happened many times and one day fridge broke down and many sensors had to be replaced and some insulation inside fridge were brunt...

This made me to find the solution to this problem..So i built a reliable Door alarm which will give siren when the door is not closed properly.....

This instructable will show you how to make an alarm system that will beep a buzzer if you leave the fridge door open for long time and if you close the door the beep sound will be turned off...

Step 1: Materials Required

  1. Arduino UNO
  2. Buzzer
  3. Reed Switch
  4. Magnet
  5. 9v battery
  6. Pref board(PCB)
  7. 10K ohm resistor
  8. Soldering iron
  9. Double sided tape
  10. Hot glue
  11. Switch

Step 2: The Logic

How does it senses door is opened.Here we use magnetically operated switch called reed switch by bringing a magnet near to the switch the switch gets closed. Once the magnet is pulled away from the switch, the reed switch will go back to its original position open switch....Giving this input to the micro controller that is Arduino we can use for our flexibility....

Here i have used power down mode for arduino uno to save power so i will be explaining about this later steps...

Brain

Here i have use arduino uno you can write the code which suits your need like you want to hear the beep only if the door is open for more than 2 minutes or 1 minute.....

Using a controller minimizes the use of external elements which saves you time and cost!!!!!

Step 3: Circuit Connection and Code

Basic software understanding-

Pin2 - This pin isused as interrupt pin input to come out of the sleep mode

Pin8 - This is just used for checking weather the door is open or not just as temporary pin used for program

Pin11 -This pin is used as output for buzzer

In main loop contains main logic of the program...First we take seconds as a variable and increment we can see the increment in serial monitor...

Then if the door is open then reed switch will be open and pin8 will be pulled down and when it reaches the specified time say 2 minutes then it enters first IF condition

There is while loop which constantly checks weather door is open is its closed pin8 becomes high then arduino uno enters to sleep mode it call enterSleep(); function.

If the door is closed and not opened at all then to save power its better to put arduino to power down mode so the seconds increments and will agree condition and it enters second if condition and put the controller in sleep mode that is power down mode....

Modification

If you want more delay then the if condition threshold can be changed....as required...

And for more loud beep of the buzzer you can modify the analogWrite(11,loudness_number_till_255);.And also tempo the beep...

Full Arduino code is provided below for download

If anyone is interested in doing this project using 8051 i have provided the code below

Step 4: Soldering

I prepared first with header male pins and made shield like thing on Arduino which will be easy to place on the arduino...and to reach the arduino pins firmly push the header pins to equal amount on the either side and solder..

I soldered only the pins which i needed and buzzer is at the bottom of the shield, that's my mistake...

Solder the reed switch and place at the end of the shield and install the sliding switch to power in from the 9V battery or adapter can be used....

Step 5: Finishing Touch....And Done

Hot glue the reed switch to the shield and its done...

Step 6: Power Calculation

First picture is measuring of current consumed normally that is 42.5mA

Which gives power calculation of 5 X 42.5mA=0.2W

Which consumes about 42.5mA X 24(hr) = 1020mAh

So i suggest to make stand alone arduino setup or disconnect leds but there are many components on board which will reduce the efficiency

I didnt find much difference when buzzer beeps in current consumption so that can be ignored....

This project can be done using arduino nano,pro mini for better efficiency...i strongly recommend it... .

Step 7: Installing

I had used strip magnets which are typically used in fridges for adjustment i used some support material....

But at last i used neodymium magnets which was lying around in my workbench....for the activation reed switch...

Any magnets works fine here....Till you hear the reed switch contact sound...

Difficult part here was adjustment of magnets for activation and deactivation of reed switch after much of trial and error i got perfect place to glue the magnet....

Photo credits: My little brother : )

Invention Challenge 2017

Participated in the
Invention Challenge 2017