Refrigerator Door Alarm

by adithyapaip in Circuits > Arduino

9506 Views, 28 Favorites, 0 Comments

Refrigerator Door Alarm

Screenshot2 (294) copy.png

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...

Materials Required

IMG_20170727_193859.jpg
IMG_20170727_191559.jpg
IMG_20170727_192103.jpg
VID 20170727 192352
  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

The Logic

lightbulb1.jpg

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!!!!!

Circuit Connection and Code

fridge_circuit_bb_final.jpg
Screenshot (291).png
Screenshot (290).png

Basic software understanding-

Pin2 - This pin is used 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

Soldering

IMG_20170727_231121.jpg
IMG_20170727_235444.jpg
IMG_20170727_235620.jpg
IMG_20170727_235706.jpg
IMG_20170728_002415.jpg
IMG_20170728_002639.jpg
IMG_20170728_002748.jpg

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....

Finishing Touch....And Done

IMG_20170728_225234.jpg
IMG_20170728_225730.jpg
IMG_20170728_225002.jpg
IMG_20170728_225048.jpg

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

Power Calculation

IMG_20170727_200805.jpg

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... .

Installing

IMG_20170728_231429.jpg
IMG_20170728_231508.jpg
IMG_20170728_231550.jpg
IMG_20170728_231635.jpg
IMG_20170728_232321.jpg
IMG_20170729_003507.jpg
Installation of refrigerator door alarm

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 : )