Finally, a garage door opener and closer that:
Mounting the Control Box
|To begin with here is the orange box that contains all the electronics mounted on a Genie garage door opener. It uses just two wires connected to the opener's terminals. The line coming off to the left leads to the sensor. The box was printed on a 3D printer and designed in a CAD program on a Windows computer.|
Inside the Control Box
The box contains a Wifi chip and the microcontroller. The microcontroller
is a PIC32 from Microchip. The PC board was layed out using Eagle Software
and sent to be fabricated from an USA fabricator but is general enough to be
The firmware of the microchip was written using the Microchip MBLAB IDE freely
available on their website. Everything was standard.
All web html pages are placed in the microcontroller. There is a handshake method between the Wifi chip and the microcontroller. When the Wifi chip requires an html page the appropriate page is transmitted by Wifi onto the web.
Wifi connectivity to the Wifi access port is an ESP8266 chip shown under the tape. The microcode for the Wifi chip was writen using the Arduino IDE with the standard libraries. The Wifi chip handles all the interface to the Wifi access port and the web server. As previously stated the actual pages are in the microcontroller which serves up the correct page. This allows a large number of pages and a lot of flexibility since files and intelligent communication can be processed by the microcontroller.
For example the garage door activation can be done using a browser. The browser pages ask for a password. The password is encripted and sent out over the internet to the garage door opener. There the password is 16 bit decripted by the microcontroller which is a much easier task for it rather then the ESP8266.
The door open or closed sensor is also done by the microcontroller and explained in the next section.
|For those who want to copy or understand the schematic here it is. It's pretty simple and a lot of explanation is not needed. The ESP8266 and the microcontroller are both 3V so the power has to be reduced from the 5V input to 3V which is done by the regulator. The sensor is 5V, however. The 5V output of the sensor feeds into a 5V tolerant input of the processor which is, by the way, another good reason for using the microcontroller. Other than that the schematic is pretty straight forward.|
The Door Open Sensor
Any garage door opener has to know if the garage door is open or closed. The information is
sent to the web interface or the smart phone app to indicate the door status. Many commercial
garage door openers use a microswitch of one type or another and is attached to the garage
door itself. Often these device use batteries with have to be replaced. This design doesn't
require being attached to the door nor does it contains batteries.
The door status is determined using a proximity sensor. It is hung using a magnet on the travel rod of the garage door. When the door is open the distance to the door is smaller than when it is open. The microcontroller reads the distance and stores the status for when it is needed.
The sensor box was also custom designed and printed on the 3D printer. On the side of the box is glued two magnets and place on the travel rod of the garage door opener. Two magnets are used because it provides better stability and doesn't turn and twist due to the vibration caused when the door opens and closes.