[How-To] Build the ULTIMATE Garage Door Monitor

IT LIVES...Ultimate Garage Door Monitor Two!

I have a much smaller automation system now, mostly Z-Wave lights and Z-Wave Door/Window switches, but I also have an Arduino Mega R3 with an Ethernet 2 Shield installed in a structured cabinet in my garage and use HomeSeer's plugin written by enigmatheatre to get digital inputs and outputs as well as analog inputs into HomeSeer devices. This is a really nicely written plugin and it will support multiple Arduinos as well.

Here is a screen shot of my reduced setup below.

Arduino in Garage.jpg

I used the same brackets for my potentiometer and used a 4K ohm ten turn rotary pot with a rubber stopper as before. I placed the rubber stopper in the end of the upper pipe on the garage door and made a bracket as shown below:

GD Monitor Hardware.jpg

The pot is ten turn and I get a total of 7.5 turns when the garage door goes from full close to full open, so I just made sure those turns are somewhere in the middle of the ten turn capability so the pot will not bottom out against its stops.

I hooked this up to an analog input and used the on-board five volt output as the excitation voltage, then set the plugin to read raw 'bits' from the analog to digital input. I then calibrated the system by measuring distance from the ground vs these bits as shown in the Excel plot below.

Excel Graph.png

Excel will calculate the slope intercept formula from the line automatically as shown in that graph.

So now I have an equation that will convert the bits to inches. I entered this equation into the plugin (really easy as the plugin provides an entry for this), then spot checked the system by stopping the garage door at various intervals and measured the height from the floor vs the inch reading from HomeSeer. The value was within an inch no matter where I stopped!

I wanted a 'percentage of open' instead of the raw inch value. Since my total opening was 83 inches, I just divided the entire equation by 83, then multiplied by 100 to get this percent open value. The exact entry into the plugin's analog input for the equation is now (Value * 0.1226 - 14.404) / 83 * 100, where the "Value" is the bit value from the analog to digital input.

I already had some icons for 0, 25, 50, 75, and 100% values and used those to represent the various ranges of percent values (again, easy to setup with HomeSeer).

GD0.jpg GD25.jpg GD50.jpg GD75.jpg GD100.jpg

I also use HomeSeer mobile and below are some examples of screen shots from my phone showing a couple of values from this system.

Screen Shot Closed.jpg Screen Shot Partially Opened.jpg
 
Last edited:
TonyNo said:
How do you talk to the Arduino?
 
Pic below of my Arduino Mega R3 with Ethernet 2 Shield.
ArduinoMegaR3wEShield.jpg
 
The HomeSeer plugin can communicate with the Ethernet interface.  The plugin is really easy to setup as there are step by step guidelines onto how to include the needed library files in the HomeSeer directory, setup and download the Arduino sketch (including the version of Arduino software needed to do this), plus how to setup one-wire, analog inputs, and digital inputs and outputs.  The plugin also supports an LCD display!  Details on the plugin can be found here.  I also upgraded to the new Beta version and those details can be found here.
 
I also have an older Arduino with an Ethernet Shield that I'm thinking about interfacing with my sprinkler controller.
 
If anyone needs help setting this up with HomeSeer, or needs additional guidelines on how to hookup the potentiometer, calculations, or anything else, please let me know!
 
Practically, nobody needs to know the location of their garage door's distance from the floor within an inch, but if you can do it, why not? :)  Plus this project started as more of a fun guideline into analog inputs.
 
Here are some additional screen shots of the Arduino plugin for HomeSeer that I'm using:  
 
Setup Screen Shot (I'm using one analog input, plus multiple inputs and outputs)
HomeSeer Arduino Plugin Setup Page.jpg  
 
This results in the following 'devices' for HomeSeer:
HomeSeer Arduino Device Listing.jpg
 
A bit off topic, I found this really cool keypad that uses keychain fobs. It isn't weather proof and I have this inside my garage door beside the entry to the laundry room. I use the 'bell' button to arm the system so I have easy one push button arming and easy disarming via the fobs!
 
I have more of a DIY security system now that uses Z-Wave door/window/motion sensors plus input and outputs (including this keypad) from the Arduino, all controlled by HomeSeer.  Yes, this is not a robust system like my Elk that I had when I lived in Las Vegas, but now I'm living in a town of 6,000 people where I believe there are a handful of homes that have some type of security system installed!
 
This original thread is old and the picture links were broken, so I included pictures of the physical setup below. I used a 0-4K ten turn rotary potentiometer.

gda.jpg gdc.jpg


gdd.jpg gde.jpg


gdf.jpg gdg.jpg


gdh.jpg gdi.jpg
 
Last edited:
Here is how you can determine the equation of the graph line to calculate distance from the bit value (or voltage value) of your analog to digital converter (in my case an Arduino). Your graph needs to be a relative straight (linear) line for this methodology (if it isn't a straight line, make sure your pot is rotating throughout the garage door open/close range).

Enter the values in Excel, then highlight those cells (with mouse click upper left cell, then drag mouse to lower right cell, then release the mouse button) The cells should show as highlighted). After the cells are highlighted (or 'selected') go to step one below as shown.


Excel2.jpg



Excel3.jpg



Excel4.jpg
 
Last edited:
Hey BraveSirRobbin! Good to see you are still creating!
You got me thinking about the movable bed I made for my RV...
It is motorized but I always wanted to put position in the myServer control system...
That way graphically myServer (and now our SmartRemote) can display real time position of the bed as it's moving.
Heres some pics so you can see the similarity with your garage door solution.
 

Attachments

  • Bunk3_small.jpg
    Bunk3_small.jpg
    93.9 KB · Views: 7
  • Bunk2_small.jpg
    Bunk2_small.jpg
    87.2 KB · Views: 7
  • Bunk1_small.jpg
    Bunk1_small.jpg
    84 KB · Views: 7
Hi David:

You would have to ensure that the pole rotation is under ten turns so it is compatible with most rotary potentiometers for this to work.

There are other methods. One that caught my eye recently was the implementation of a 'time of flight' laser sensor that was used in this HomeSeer forum project.

Another method would be to use a string potentiometer. I found a cheap one with a range of 39 inches here.
 
Back
Top