ESP8266 Garage Door Opener

!!!!!!!!! Warning it will oscillate if you fallow the other tutorials!!!!!!!!!!!

I tried the transistor and also using the opto-isolator connected to ground but both pull the ESP too close to ground, it shorts out and will keep resetting itself. For the others I tried the PNP transitor, and it pulls to much current and also keeps resetting the ESP.


A simple low cost wireless garage door opener, only a couple parts need to be purchased, and can be expanded to control up to two doors with only a couple lines of code change and another optocoupler added.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Need to Flash ESP8266

go to

and click on nodemcu-flasher and download

fallow the diagram to connect the esp8266 to your usb to serial adapter

This adapter I found(ebay) to be easy to install and was able to find drivers without any problems.

USB 2.0 to TTL UART Module 5pin Serial Converter CP2102 STC Replace FT232

run the program and flash, dont worry about changing anything just open and flash.

Step 2: Now Program the Esp8266

You can use lua uploader, or Esplorer. Both work great and are ready to work with the esp

Dont forget the un-ground the gpio0 pin but keep everything else the same between the esp and the usb to serial

Upload the code below to the esp


--Garage Opener Code

wifi.sta.config ( "2WIRE713" , "0369559266" ); wifi.sta.setip({ip="",netmask="",gateway=""});

gpio.mode(3, gpio.OUTPUT);

gpio.write(3, gpio.HIGH);

-- A simple http server srv=net.createServer(net.TCP); srv:listen(80,function(conn) conn:on("receive",function(conn,payload)


gpio.write(3, gpio.LOW);

tmr.alarm(0, 1000, 0, function()

gpio.write(3, gpio.HIGH);

end )

conn:send("Opening Garage");


conn:on("sent",function(conn) conn:close() end)



The line

wifi.sta.config ( "2WIRE713" , "0369559266" );

this is your current wifi name and password needed to make sure the garage door opener is secure

and the line


this sets up the esp to be a static ip on my network so I dont have to guess what the ip will be

Step 3: Connect and Run

Go ahead and connect you esp with the above diagram and turn on.

make sure your phone is set to connect to your home network automaticaly

go to your web browser on your phone and go to the ip address you assigned it. in the code example it is

save it to your bookmarks once you varified it works and save a shortcut to you phones desktop and every time you click the shortcut it will open the garage.


Be the First to Share


    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    7 Discussions


    1 year ago


    stdin:1: attempt to index global 'conn' (a nil value)

    > end)

    stdin:1: '<eof>' expected near 'end'

    > conn:on("sent",function(conn) conn:close() end)

    stdin:1: attempt to index global 'conn' (a nil value)

    > end)

    stdin:1: '<eof>' expected near 'end'


    2 years ago

    whatd you use for a powersupply for this? one of those mb-102 (i think) powerboard (with 3.3 and 5v out) things or something else?

    1 reply

    Reply 2 years ago

    Just the converter and usbwall charger


    2 years ago

    this is great, i think alot of people overcomplicate some of their projects JUST so they can use something like an arduino etc.

    i cant remember which it was but i was looking at one that really had no reason for a microcontroller at all. it was simply relay logic


    3 years ago

    Nice Instructable, do you have a parts list for what is in your schematic?


    Reply 3 years ago

    Thank you, you are the only person that likes simplicity. If you need any help with anything let me know and I will try my best to help. Simple life, Work smarter not harder!