loading

!!!!!!!!! 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.

Step 1: Need to Flash ESP8266

go to

https://github.com/nodemcu

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.setmode(wifi.STATION);

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

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)

--print(payload);

gpio.write(3, gpio.LOW);

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

gpio.write(3, gpio.HIGH);

end )

conn:send("Opening Garage");

end)

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

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

wifi.sta.setip({ip="192.168.1.200",netmask="255.255.255.0",gateway="192.168.1.254"});

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 192.168.1.200

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.

Enjoy!!!

<p>Nice Instructable, do you have a parts list for what is in your schematic?</p>
<p>This is so simple! I love it! </p>
<p>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!</p>

About This Instructable

9,162views

50favorites

License:

More by JKolegraff:ESP8266 Garage Door Opener 
Add instructable to: