top of page

Check if the refrigerator door has been open for too long

Updated: Aug 22, 2020

I have had a fridge that is almost 15 years old now. Works perfectly fine, and is efficient enough. But we always have the problem when we’re about to open the fridge, only to find out it just been a liiiiitle open all along…just a quarter-inch open so that no one could notice it. This happens when we think we shut the fridge, but alas, a small portion of the vessel which had been overloaded was jutting out, preventing the door from closing. 

What happens then? What happens when the refrigerator is open for at least….say half-an hour? If your fridge isn't one of the models that beeps when it's open...you're in for some trouble.


We all know that refrigerators are high-power devices. They have to maintain the temperature inside constantly, and take anywhere from 800 to 1000 Watts of power when its running. That is the equivalent of switching on almost a HUNDRED led light bulbs!!!!. 

But refrigerators aren’t running all the time. They only run for about 6-8 hours a day, when the temperature inside becomes a little warm. 

Now in the event of the refrigerator being open, the cold air will not be contained at all, causing the compressor to keep working for that half an hour. So in just half an hour, there is already a 10% increase in the power consumption for that day. And if this happens quite frequently, at least 2-3 times a week, that 10% could accumulate and make a huge dent in the electricity bill, to which the refrigerator makes a huge contribution to. 


I had noticed the fridge partly open several times in the past, but my only reaction was a deep sigh while cursing under my breath while closing the door.  But over time, as my interest in electronics grew, I understood more and more about microcontrollers like the Arduino. So with just less than a year of experience, I realized all I had to do was to build a very simple circuit to notify me when the fridge door was open for a specified time interval. Now this notification could be in the form of a light or sound that turns on. 


So the main question is – How do we detect if the door is open in a simple and cheap way?

The first thing that came into my mind was…a circuit breaker – the circuit is open when the door is open, and the circuit is closed when the door is closed. How would we do that? We would have to have a conductor stuck in between the door frame and the door itself, without breaking the air seal. It would have to be so thin that its thickness is close to nothing. The best answer to this solution – a thin metal foil. 

Aluminium foil is found in almost any kitchen, it's less than 0.2 mm thick, and it conducts small amounts of current with ease, which makes it the perfect material to use. 

So all we have to do is stick two strips of foil on the door frame, separated by at least an inch or so, and one long strip on the edge fo the door running through its length.






Thus we can see, that when the door closes, the two strips of foil are connected, but when the door is opened, the connection is broken. THAT is what we have to detect – whether the connection is broken or not. If we pass electricity through one foil, we should see if the circuit is broken, or not. 

Now its just a matter of checking if a circuit is closed, or open. Treat this like a circuit with a switch. We have to detect if the switch is open or closed. 


This is exactly like a circuit with a push button, and detects if the button is pressed or not.Using an arduino, we can easily find this out using the digitalRead() function, which returns a 1 if the circuit is closed (detects 5V) and a 0 if the circuit is open (detects 0V). 



Simple circuit, right? Now you might ask ‘Why is there a resistor connecting the pin 7 to ground? This is an example of a pull-down resistor – when the circuit is closed, the pin is connected to 5V, and hence gives a 1. No problem there. BUT when the circuit is open, the pin wouldn’t be connected to anything. It isnt connected to 5V or 0V. This is commonly called a floating pin – such a pin which is not connected to anything would simply return fluctuating values of 0 and 1 continuously(try it!). So, in such a case, the pin would read 0V as it is connected to ground.

So now, we replicate the exact same thing, except that instead of the button, we have the foils in the fridge.

To notify me, I’ve used a simple buzzer, one that you would get in any electronics store. It has positive and negative terminals, and we can sound the buzzer with the Arduino using the tone() function.



So now, all that is left, is the code. This isn’t a very complicated program. Using the digitalRead() function, I use an if-else statement to find out if the fridge door is open, and then I check if 15 seconds have passed(this could be any interval of time). I find this out by using the millis() function, which returns the number of seconds that has passed. And if 15 seconds have passed….BEEP BEEP BEEP BEEP! Using the tone() and delay() function, I sound the buzzer every one second. 


Given below here is the link to the sketch, which would open in the Arduino web Editor:


Could this code be more efficient? Definitely. This is just a bare structure of what the program would look like. You

could also use an Arduino Nano to make the project much smaller. Moreover, you could stick the Arduino board and the breadboard at the back of the fridge, with just the two wires from the foils running through the side of the fridge to make it look better. But these are all for you to explore!



Please feel free to comment! Give your suggestions, feedback and even new ideas!



3 Comments


Muralidhar Somisetty
Muralidhar Somisetty
Nov 08, 2020

Excellent project work! Innovative use of al foil found in home and arguing to make the refrigerator smart.

Like

Shiva S
Shiva S
Aug 28, 2020

Excellent article. Especially loved the challenge of finding something that is a conductor and yet thin enough to preserve the air seal. The floating pin issue was explained nicely too. Learned a lot and hope to see full video blogs in the future!

Like

jaipriya balaji
jaipriya balaji
Aug 23, 2020

Well done, Ashvin! Kudos to you for fuelling your interest in electronics and circuits by building feasible solutions to problems faced by many households.

This interesting project seems to be an easy-to-follow one and will motivate others to try it out.

Good luck with your future projects!

Like
bottom of page