First Arduino project: distance alarm

Amazingly, our refrigerator doesn’t have an alarm for when you accidentally leave the door open.

In the last six months, we’ve left the refrigerator door open overnight three times. Because the light stays on when the door is open, another horrible design decision, the refrigerator thermometer hits 107°F by the time I notice it in the morning.

At yesterday’s inaugural PDX Raspberry Pi and Arduino meetup, I prototyped my solution to the problem: an alarm for accidentally leaving the refrigerator door open.

Using a Parallax Ping Ultrasonic distance sensor, the Arduino board detects its distance to the nearest object in front of it. If there’s nothing within 2 inches for greater than 5 seconds, then the Arduino board uses a piezo buzzer to make some noise. The system resets when an object is placed within 2 inches again.

On a whole, I was surprised how quickly I got up to speed on Arduino. My “Hello World” project, blinking a LED diode, took about 10 minutes to complete. This distance alarm only took 20 minutes beyond that, with a little bit of guidance on what hardware to use and access to tutorials on how to use it.

Up next: figuring out how to miniaturize the entire setup so I can put it in a small housing and deploy to production (aka use it in my home).

Leave a Reply

Your email address will not be published. Required fields are marked *