Refrigerator Door Alarm




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


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


If you want more delay then the if condition threshold can be 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

Be the First to Share


    • Fruit and Veggies Speed Challenge

      Fruit and Veggies Speed Challenge
    • First Time Author Contest

      First Time Author Contest
    • Summer Fun: Student Design Challenge

      Summer Fun: Student Design Challenge



    10 months ago

    The light idea is good but not 100 full proof. Some fridge doors can be almost closed with the light inside off. The reed idea is 100% full proof.
    Also you may want to build this project with a micro controller i.e. ATTINY85 to keep parts count down as well as low power consumption if you write the code to put the micro controller to sleep consumption < than 1uA with 3 double a cells.


    2 years ago

    I didn’t have a chance to read everything about this project but why not just wire in a photoresistor to an Arduino Uno, nano or whatever and write some simple code that senses the light coming on when the door is open which could start a counter and when the count reaches whatever time you want it sounds a buzzer. If the door is closed before the counter reaches whatever time you selected then arduino knows the door is closed because the light goes out (you’ll have to take my word on that) when the door is closed then the counter is set back to zero and waits for the door to open again. Real simple...


    3 years ago

    That's a brilliant idea. Keep it up

    Nagabhushan Kamath
    Nagabhushan Kamath

    4 years ago

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


    4 years ago

    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.


    Reply 4 years ago

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


    4 years ago

    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!


    Reply 4 years ago

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


    4 years ago

    Good one bro


    4 years ago

    Very much detailed explanation. Nice