Software Serial Esp8266 Projects

Posted in: admin06/12/17Coments are closed

Programming an ITEAD Sonoff Wireless Smart Switch ESP8. I purchased some of these wireless smart switches from ITEAD, but didnt like that you had to use their app and cloud server to use them. They use an ESP8. I wanted to see if I could re program it to load my own firmware. You can also pick up a similar module from Banggood. The WeMos D1 is a ESP8266 WiFi based board that uses the Arduino layout with a operating voltage of 3. V. As the documentation of this board online can be a. Software Serial Esp8266 Projects Ota' title='Software Serial Esp8266 Projects Ota' />NOTE Someone asked me if I have the original firmware dump for the for this device, unfortunately I do not. If you flash your own firmware onto this device, you do so at your own risk. UPDATE 2. 01. 6 0. There is a related post, on how to upgrade the flash from 1. MB to 4. MBThis is what you get in the box And opening up the case, you find two sets of unsoldered pins, the horizontal ones is used for a 4. Mhz RF module, which I did not purchase. The vertical one brings out the RX and TX pins of the ESP8. V, GND and a GPIO pin. I soldered on two pin headers, but the top vertical is not required to re program it. Then, you can hook it up to a USB to serial adapter. In this orientation, the bottom pin is pin 1, and the connections are made as follows Sonoff J1. Wire. USB To Serial. VCC 3. V3. Orange. V3. 2 E RXGreen. TXD3 E TXYellow. RXD4 GNDBlack. GND5 GPIO1. Not Connected. Not Connected. To place an ESP8. GPIO0 must be LOW during power up. The schematic shows that GPIO0 is pulled HIGH with a resistor and that the switch S1 is connected between GND and the same resistor. So by holding in the tactile switch that is used to turn the lamp onoff before powering on the device, you can place the ESP8. The steps to program the device. Disconnect the AC power, power it only from the USB to Serial for safety. Hook up the USB to Serial as shown above. Hold down the switch. While holding down the switch, plug the USB to Serial into your PCLet go of the switch. Use the Arduino IDE to select the correct USB port and upload your program. ESP8. 26. 6 pin usage. ESP8. 26. 6 Pin. Function. GPIOConnected to. Software Serial Esp8266 Projects Arduino' title='Software Serial Esp8266 Projects Arduino' />MTMSGPIOGPIO1. J1 Pin 5. MTDIGPIOGPIO1. Relay HIGH to turn on1. MTCKGPIOGPIO1. 3LED LOW to turn on1. In the table above and the two tables which follow, Active pins include the GPIO and ADC pins with which you can attach external devices to the ESP8266 MCU. GPIO0. Flash. GPIO0. Tactile switch LOW when switch is pressed2. RDXUART RXDGPIO3. J1 Pin 2. 26 TXDUART TXDGPIO1. J1 Pin 3. You can use the table above to determine which GPIOs to use when creating your own program to read the switch and to turn the relay onoff. GPIO1. 4 is available on the J1 pin header, and you can also use the other GPIOs in the table above although theyre a bit more tricky to use. Ive also managed to get the analog input pin to work required some fine soldering, which Ill detail in another post. ESP8. 26. 6 Web Server with Arduino IDEIf you want to learn more about the ESP8. Getting Started Guide for the ESP8. Wi. Fi Module.  In this project youll create a standalone web server with an ESP8. LEDs. If you like the ESP and you want to do more projects you can read my e. Book Home Automation Using ESP8. Lets get startedFirst, watch the video demonstration below. Where to buy Click here to see the ESP 0. You can use the preceding links or go directly to Maker. Advisor. comtools to find all the parts for your projects at the best price Schematics 3. V FTDI ProgrammerThe schematics to upload code to your ESP8. You only need to establish a serial communication between your FTDI programmer and your ESP8. Uploading your ESP8. Having the ESP8. 26. Arduino IDE installed How to Install the ESP8. Board in Arduino IDE. Go to Tools and select Generic ESP8. Module. Copy the sketch below to your Arduino IDE. Replace the SSID and password with your own credentials. After modifying my sketch upload it to your ESP8. If you cant upload code to your ESP8. ESP8. 26. 6 IP Address. Open the Arduino serial monitor at a baud rate of 1. Connect GPIO 0 of your ESP8. VCC and reset your board. After a few seconds your IP address should appear. In my case its 1. Final Circuit. Now follow the schematics below to create your web server to control two LEDs. Demonstration. For the final demonstration open any browser from a device that is connected to the same router that your ESP is. Then type the IP address and click Enter Now when you press the buttons in your web server you can control both sockets. Do you have any questions Leave a comment down below Thanks for reading. If you like this post probably you might like my next ones, so please support me by subscribing my blog and my Facebook Page. Du Toan G8 2010. P. S. If you got stuck during this tutorial make sure you read ESP8. Troubleshooting GuideRecommended Resources. Build Io. T projects and home automation gadgets with the ESP8. Wi Fi module. Learn how to build a automation system using open source hardware and software from scratch.