Introduction: Refrigerator Door Alarm

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

Comments

author
Arun Bhandarkar (author)2017-08-03

very useful projec also helpful too.

author
Hrishik9 (author)2017-08-01

That's a brilliant idea. Keep it up

author
Keerthana Padiyar (author)2017-08-01

Wow! Amazing !!

author
Nagabhushan Kamath (author)2017-07-31

Awesome project n well explained..!! Thanks Adhitya.. will definitely work on that now ?

author
yoh-there (author)2017-07-30

Great project!! May I make a few suggestions please?

1) Reed switches become "sticky" if they are permanently magnetized. I realize it is a very easy to mount and adjust option for this project, but if you can replace it with a microswitch (maybe glued to a supermagnet!) it will never get sticky.

2) I am a sucker when it comes to unneeded power consumption in battery powered projects. My suggestion would be to:

- build this project with an Arduino Mini Pro with the power LED and the LDO removed (sleepmode will then get it down to under 10 uA!!)

- run it on 3 AA or AAA batteries (no losses in the LDO)

- replace the resistor with a 100K one if not more. With some effort you might be able to run it over a year with a set of batteries!

Finally, you might want to consider to make the buzzer sound too when the batteries are low, to avoid relying on it when it's basically dead! Example code is for instance in my Two Axis Star Tracker.

https://www.instructables.com/id/Two-Axis-Star-Tracker/

author
adithyapaip (author)yoh-there2017-07-31

Awesome suggestions and I suggest these for anyone who's building this....Again Thanks for suggestions for quick prototype I had only uno lying around ....nextime I will definetly do some homework...

author
XaviOrin (author)2017-07-29

definitely going to have to build this because of my wife haha. but seriously thank you for the detail wiring diagram. it can't get easier than that and I don't have to be an electrical engineer to understand what goes where!

author
adithyapaip (author)XaviOrin2017-07-30

Glad you liked it please vote if you think its worth....Thanks a lot

author
lensonf1 (author)2017-07-29

Good one bro

author
Nithinrajshetty (author)2017-07-29

Very much detailed explanation. Nice

About This Instructable

1,142views

20favorites

License:

Bio: I love to learn,build and design.....
More by adithyapaip:Refrigerator Door AlarmPiano Staircase Joystick Led Pwm
Add instructable to: