State Machine Controls Garage Door Over The Internet

Home automation has been a hot-button topic time and again since the dawn of the personal computer age. These days, thanks to modern communications technology, it’s possible to do some pretty cool stuff. [Brad Harbert] decided to automate his garage door, controlling it over the Internet.

The build relies on a Particle Photon to do the heavy lifting of connecting the door to the Internet. Particle offer a cloud service that makes setting up such a project easy for the first timer, and [Brad] was able to get things working quickly. A relay is used to activate the garage door remote button, as it was desired to leave the main control board of the garage door opener untouched. Reed switches are used to sense the position of the door, and [Brad] coded a state machine to ensure the door’s current state is always known.

It’s a simple project, but [Brad]’s use of state machine techniques and position sensing mean it’s less likely he’ll get home to find his garage open and his possessions missing. If you’re new to programming simple physical devices, you could take a page out of his logbook. Of course we’ve seen similar builds before, like this one from parts from the scrapbin.

11 thoughts on “State Machine Controls Garage Door Over The Internet

  1. I would include some more states –
    Door Jammed
    Door Reseting
    Door Fault

    Jammed can be when it doesen’t open or close within a specified time
    Resetting can be after a Jam in an attempt to re-open and close again in the hope of clearing any obstruction
    Fault can be after a fixed number of resets have been attempted so as not to overheat the motor

  2. I’m always kind of mixed on these projects for garage doors. Security is often never mentioned, or at best is security through obscurity. Most people I know leave there garage to home door unlocked, and have many expensive toys and tools in the garage that would be easy to quickly steal.

    With this project in particular, he used one of the remotes, and then mounted the box right next to the opener button?! It would be easy to wire in a little SSR to ‘push’ the button, or even use a servo+arm if you wanted it to be universal to any opener. Those remotes are dang expensive!

    1. I don’t know about that style in particular but I’ve just replaced a couple if different door remotes for around AU$10 each.

      But I like the idea of a mechanical arm pressing the button ..,
      The can just image something like that done by the shitty robots girl :-)
      (Simone Giertz)

      1. A mechanical arm pressing a button is basically what a relay does. And I don’t know any garage door openers which do not have an input for a wall mounted button switch, or even outside-mounted key switch. So the idea of misusing a remote (perhaps even battery powered) is quite strange to me.

        1. OK, it is not “perhaps even battery powered” it is just battery powered (CR2016). I hate the idea of needing batteries at a place where power is available anyway.
          If I really need the radio connection I would at least include a PSU for the remote.
          Like when I wired a rmote doorbell transmitter into my doorphone/bell unit: I made a small bridge rectifier (with 4 1N4148) to rectify the buzzer voltage to power up the transmitter.

    2. Jake – totally agree on the security point… However living in rural Central Oregon where we leave the front door unlocked most of the time, security was not much of a design requirement for me.

      1. We lock ours because there have been a string of burglaries in our area via people getting in through the garage. Since a lot of people have a ton of junk, they often leave their cars out in the driveway, and then the burglars get the garage door opener from it.

  3. Why is the ‘state machine’ aspect featured so prominently here? What is novel about his approach (or perhaps, what less obvious approaches are being used instead of the common state machine)?

  4. I just used one Reed relay on my implementation and used timing to say whether the door opened or closed. In over 2 years I have one hiccup where the a door was out of sync with the web site. This could have been due to my integration into Homebridge. Since then all has been fine. My implementation used a Raspberry Pi and a web server with a password protected page. (https://github.com/robboz4/My-Garage/wiki)

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.