Garage door controller

I am starting to plan how my garage door controller should work.

To drive the motor, I am just going to use the power supply in the stock controller, and just use two relays to change polarity on the wires going to the motor.

For safety the stock controller just monitor the current the motor draw while moving the door up and down. I am planning to just do the same. Something i consider is to also put an atmega on, just to keep an eye on the current draw from the motor, and check end stop status.

So the imp will handle the connection and provide the interface and status to the outside world, and tell the atmega what to do, and the atmega only got the task of making the door move safely and stop at the right times.

The reason I want two devices to take care of this simple task, is so if the imp is for some reason told to do something which could take multiple seconds, the door could be in motion and the imp not be able to stop it again. Splitting it up like that should solve that problem, and an atmega just looping through its code as fast as it can, maybe with interrupts for end stops, might also be a better device for that.

But, anyone else got some ideas or did I overlook something? Better to find problems before the door cuts my car in half. :wink:
here is the link for a great tutorial, dont know if its what you want, but something to start with. I myself going to add more things to it. If you are using imp to send tasks to atmega, isnt the time would be same if not a little slower? Your garage door should be already coming with two sensors, so that if something in between them the door wont close. Are you building it from scratch?

I am going to completely replace the controller in it. I already got something similar to that tutorial, just with a lot more functions. It is build into my weather station which I designed the PCB for too. :slight_smile:

Another security function could be to have 3 relays, one controlled by the imp that will switch one of the wires to the motor on the door, so even if the arduino decides the door should open, it still would not move. For the door to move the imp must pull the relay to close the connection, then send the command to the arduino to move the door. I can then have it time how long it takes to move the door each way, add a bit extra time, then also keep an eye on it if it takes too long to open or close, and stop it if the time is off.

Will probably also add some kind of light barrier to stop the door when closing and something comes in between.

Thats pretty awesome, you going to have a smart garage hehe and you are crazy :slight_smile: to start it from 0, but you’ll get lot of practice and knowledge.

I think in the U.S., it’s the law to have a light barrier AND a reverse when the door is obstructed (it hits something). I use an imp on my existing Chamberlain door opener. It has all the factory original required safety elements. If the imp fails, there is a communication (wifi) problem, or any other imp issue, the door continues to work in the normal, original fashion. Adding limit switches to the physical door on both ends allows me to time it and verify position. Hats-off though for creating an opener from scratch … you’ll learn many things.

FWIW, using the Instructables referenced above, I installed an imp for my two garage doors–I had become very frustrated trying to recall if I had actually closed the darn things after I left the neighborhood (old age - CRS?). The iPhone “app” is very convenient.

A helpful change to that approach was to use wide gap magnetic switches (in lieu of snap action switches) to avoid the whole mechanical detection of door position. The magnetic switches were very inexpensive (via and have proven to be super reliable and easy to install.

A surprise benefit was to allow neighbors to get into our garage when we’re away if packages are delivered. They’re amazed I can open/close the door from hundreds of miles away.

I’m also posting data to GroveStreams to know status and get alerts if either door is open for an extended period of time.

All in all, a very valuable investment of time and less money than the commercial offerings.

@mlseim here in Denmark it depends on the size on them afaik. The one I am moving is a Lindab springloaded so the door itself is not heavy enough to hurt anyone. Bigger doors with light barrier on are usually so big just the weight of them, even with spring support, is large enough to be dangerous. The original controller on my garage door does not even support such sensors, only safety feature it got is the current monitoring to the motor.

My plan is to prepare my new controller for light barrier, and probably more, just to use all the pins on the atmega chip. It will also have the current monitoring on, and will probably reverse the direction it was moving for 1-2 seconds, just like my original controller does.

@hvacspei the open/closed sensor status will be an integrated part of my system, where the imp will deliver their status in a json reply, along with other things.