Go Down

Topic: Garage Door : is it open or closed? (Read 8272 times) previous topic - next topic


I am very new to Arduino but very old to programming. I am very much a software guy and it is the hardware, electronics, aspect of each project that is going to require me seeking out handholding wherever possible...

I may be leaping high... but as part of my first project I want to be able to test if my garage door is currently open or closed. Later I'll go for the ability to open and close it. But for now just the verification part will do.

I have Arduino Unos and I have an Arduino Ethernet PoE and I have an Arduino WiFi shield. The long-term goal will be to use the Ethernet PoE version as I already have Ethernet cabling in the garage and PoE switches.

My question is therefore as regards the physical aspect: what would you recommend as the physical system to verify if the garage door is currently open or closed? What sort of sensor would I attach?

It's a rollup garage door which is already motorised with a big manual push button inside, a couple of radio-based remote controls and a horizontal reader near the floor which tests if there is an object inside the doorway (ie a car) and which deactivates the opening/closing.

I would like to be able to test both situations: open and closed. I assume that's going to require 2 separate sensors: one towards the bottom to detect closed and one up top to detect open. What should I be sensing however? A physical connection? Light coming in or going out (would not work well at night)? Infrared passage?

I assume I will then need to run a wire from each sensor to my Arduino box which I will be, eventually, setting up just next to the manual push button...

Any ideas and suggestions or any scenarios that some of you have already done would be greatly appreciated.

If I'm just biting off way too much before even learning how to chew you can let me know that as well.


I'd go with the same approach as your fridge..... microswitches positioned cunningly to be activated by some part of the door's hardware. This tutorial shows how to wire a switch and read its state... double up for two switches then do what you want logic-wise with the states as determined from time to time.

A switch near the bottom could have states  "fully closed" and "not fully closed", the one near the top would be "fully open" and "not fully open", for example, and a truth table will reveal the significance of the combinations.

73 de ZS6JMB
Dr Perry Cox: "Help me to help you, help me to help you...."
Your answer may already be here: https://forum.arduino.cc/index.php?topic=384198.0


Don't PM me for help as I will ignore it.


Yep, those magnetic reed switches are a good choice.

In your software you will see that there are four possible states for two switch inputs

1. fully closed
2. fully opened
3. moving or stopped between fully open or closed
4. fully closed and fully opened, an illegal state usually the result of a broken wire or bad switch



Lefty's right in the various modes of the door, but I ignored that for my door sensors.  I have two garage doors and wanted to know if they were closed.  Anything other than closed would mean I had to pay attention to them for some reason or other.  My problem was getting three miles away from home and wondering if I closed the doors or not. 

So, I used magnetic reed switches on the doors because they were much easier to position than a micro switch.  The magnets leave about 3/8 of an inch of play room.  If that isn't enough, just get a neodymium magnet and you can get up to an inch of separation.  I ran wires from each of the switches to my arduino and simply sampled them to see if it was closed or not.  Since garage doors have weird requirements for the switches and such, I ran wires from a couple of cheap relay boards to the actual switches that control the doors.  A two second closure on the relays worked the doors just fine. 

I didn't use ethernet to communicate, I'm a fan of XBees so I used one of those that transmits to a central concentrator that handles all of my sensors and it presents a web page that tells me if the doors are closed or not and I have buttons on the page that close the door if I want to.  Using the web page, I can close the garage doors from anywhere over my smart phone.

Since the little arduino is doing practically nothing, I have plans to also control other devices in the garage and sample some inputs.  I want things like water heater temperature, level of salt in the water softener, etc., but I haven't gotten to those yet.
Trying to keep my house under control http://www.desert-home.com/


Thank you all for your great ideas!

I am going to first try learning how to read, and react to, buttons. Then I'll find and add a couple of these magnetic reed switches. Funny enough I just received a magnetic switch very similar to that with my reaDIYmate a couple of days ago.

My biggest hurdles with all of this is knowing which wires to use, where to plug them in and I still don't understand how you know what type of resistor to use... but I'm sure I'll get there slowly but surely.

When I was young, a very long time ago, you were either a hardware guy or a software guy in Computer Sciences. I was very much a software guy as there just wasn't a great variety of hardware back then and I lacked the imagination necessary to foresee all of the various possibilities to come 30 years later! I now deeply regret the countless electronics and electrical classes I slept through...

I really like the thinking behind extending the binary open/closed to "nearly open", "nearly closed", "moving between = none of the above" and "error = simultaneously open and closed".

I'm finding this addition of the physical (real) world to my programming creates a whole new approach and I am very much enjoying it!


Draythomp: Your setup is just about precisely what I am looking to implement in the long-term. I'll be using Ethernet (PoE) to both power and communicate with my web server. Once I get to the programming part of sending the messages and responding to those messages on my web server I will feel much more at ease...

PS: The part which scares the 'bejeesus' (remaining SFW) out of me is connecting my Arduino to my garage's actual push button. I am worried about roasting my Arduino. But that's easy to replace. I am really, really worried about damaging the garage's push button as there is only one tiny company left here in France which supports this product!


I am really, really worried about damaging the garage's push button as there is only one tiny company left here in France which supports this product!

Well depending on how pessimistic you feel, you could always buy up all their spares stock  8) just for in case.....
73 de ZS6JMB
Dr Perry Cox: "Help me to help you, help me to help you...."
Your answer may already be here: https://forum.arduino.cc/index.php?topic=384198.0


Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131