User avatar
By RichardS
#43316 User
rayshobby

Description
For this project, I designed an opensource universal garage door opener based on ESP8266 and the Blynk app. The controller uses a distance sensor to detect garage door status, and a relay to trigger garage door button clicks. It supports a builtin web interface implemented using embedded HTMLs and JQuery Mobile. This is used for local access and changing configurations. It also supports remote access through the cloudbased Blynk app. Main
features include logging, history graph, push notifications, and overtheair firmware update.
Using OpenGarage, I can check my garage door status when wherever I am, open or close thedoor remotely, get push notifications, and check the history of past events. This really solved a number of problems I had in the past, such as when I left the house and forgot whether I’ve
closed the garage door, when I locked myself out of the house, or when I needed to let someone into the house while I was away.
I designed the hardware, 3D printable enclosure, and wrote the software (which I’ve made as userfriendly as I can). The project is completely opensourced and shared on github.
For the hardware, I used EagleCAD. The main parts include ESP8266 WiFi chip (I chose the WROOM2
variant), ultrasonic distance sensor, relay, pushbutton, LED, and CH340G USBserial
converter. The pushbutton can be used to manually trigger a door button click, perform factory reset, or used to enter bootloading mode (if one wants to update the firmware through USB instead of OTA update). All of the spare pins have been mapped out on the PCB in case I want to extend the functionality (such as adding additional sensors).
For the enclosure, I used TinkerCad to design the prototype and the final version uses an offtheshelf enclosure with custom cutouts.
For the software, I used the ESP8266 core for Arduino, and wrote an OpenGarage Arduino library. The initial WiFi configuration is done as follows: the controller starts in AP mode, and presents an open WiFi network. Use a phone or computer to connect to the WiFi, complete the configuration, and nce connected to a router the controller reboots into STA mode. All settingsare saved in a config file in the flash memory. In STA mode, the controller handles three servertasks. The first is the main web server, which responds to direct access requests, including
requests for HTML pages, JSON data, relay actions, and configuration change requests. The second is the Blynk task, which allows the controller to communicate with the Blynk cloud server. The third is OTA update task, which allows a new firmware to be updated through the
web. The framework I wrote can be useful for a number of future projects which will all need the same basic functionalities (e.g. WiFi setup, cloud connection, OTA update).

Parts
C1 220uF 220u SMD CAP 3528
C2 0.1u 0.1u SMD CAP 0603
C4 0.1u 0.1u SMD CAP 0603
CH340 CH340G CH340G USB‐Serial SO16
D1 SS14 DIODE‐DO‐214AC DO‐214AC
D2 3.3V Zener DIODE‐MINIMELF MINIMELF
D3 SS14 DIODE‐DO‐214AC DO‐214AC
ESP WROOM02 WROOM02 WROOM
G0 31‐XX RIGHT‐ANGLE TACTILE B3F‐31XX
IC1 1117‐33 LM1117‐33 SOT223
JP1 HC‐SR04 DISTANCE SENSOR 1X04_SONICSENSOR
LED GREEN 3MM_LED LED3MM
OPENER TERMBLOCK M024MM‐X SCREWTERMINAL‐4MM‐2‐X
Q 2N3904 2N3904 NPN TRANS SOT23‐3
R1 10K 10k SMD RES 0603
R2 10K 10k SMD RES 0603
R3 10K 10k SMD RES 0603
R4 1K 1k SMD RES 0603
R5 100K 100k SMD RES 0603
R6 100 100 SMD RES 0603
R9 10K 10k SMD RES 0603
RELAY RELAY HK4100F‐5VDC 5VDC‐RELAY
X 12MHz CSTCE12MHZ SMD SMD RESONATOR
X3 USB‐MICROB USB‐MICROB USB‐MICROB

Links
Homepage
Github
Homepage 2

Video


Images
Attachments
(954.92 KiB) Downloaded 390 times
(1.04 MiB) Downloaded 405 times
og_rayshobby_p6.JPG
og_rayshobby_p5.JPG
og_rayshobby_p4.JPG
og_rayshobby_p3.JPG
og_rayshobby_p2.JPG
og_rayshobby_p1.JPG
User avatar
By RichardS
#43462 Fixed :-)

RichardS