Came to know about new module called ESP8266-201 for IoT experiments , when Heramb MakerLab arranged one session with one of the makers ( Hemant worked in Tieto) on IoT.
It sounds like good Rs. 500 investment for experimenting and learning this new IoT module. I ordered immediately following two items online from one of the vendors on Lamington Road, Mumbai :
- ESP8266 ESP-201 WiFi board with full I/O and PCB antenna : This is actual module which needs to be programmed as a controller along with thing to communicate with internet or home network.
- FT232RL Based High Quality USB to TTL Module : This is module for loading the program into ESP module. It can also provide initial power for ESP module during prototyping phase.
Ref : http://www.evelta.com
For running first program on ESP module, you would need following additional hardware :
- Resistor – 220 ohm
- Jumper wires
By the time I got the modules, I started reading about ESP more. I worked with Raspberry Pi extensively and also developed one IoT prototype for sensing room temperature and sending the data to Dweet.io cloud system. Working with Arduino IDE and ESP specially was little new area to me.
Step 1 : Installing / Updating Arduino IDE to support ESP8266 boards.
– Install Arduino 1.6.5 from the Arduino website.
– Start Arduino and open Preferences window.
– Enter http://arduino.esp8266.com/package_esp8266com_index.json into Additional Board Manager URLs field. You can add multiple URLs, separating them with commas.
– Open Boards Manager from Tools > Board menu and install esp8266 platform (and don’t forget to select your ESP8266 board from Tools > Board menu after installation).
Step 2 : Connecting ESP module with USB to TTL Module
Use following diagram as reference and make connections.
Step 4 : Connect USB to TTL module to Laptop / Computer
Once you make connection, Red LED on ESP shall get light up.
Step 5 : Upload program to ESP module via Arduino IDE
There is sample program already written in example folder. Open that program to update SSID and Password of your WiFi network, so updated program can be uploaded onto ESP module.
Once changes are done, click on upload button on top left hand side. Don’t worry if you are getting errors, recheck the connections and try again.
Once program is uploaded disconnect the GPIO-0 wire and toggle the power of ESP module (You can just remove USB from laptop and plug it again)
Step 6 : Run program on ESP module and verify THING (ESP /module) is getting connected to home WiFi network
I use android app called Fing to check connected devices inside my home network. This app helps to identify IP address on ESP module, which we can use for operating GPIO-2 of ESP Module (To which we have connected LED).
Step 8 : Operate LED via browser on mobile or Laptop (inside Home network)
You can turn ON/OFF LED from your mobile browser or from any device which is inside your home network.
I enjoyed learning about ESP module by making this project, hope you shall enjoy too. There is lot more to learn abut this module and how to utilize this to satisfy your home automation needs. Next thing, I am learning is Souliss Framework for home automation. This framework can be installed on any Arduino and ESP modules. Let us make something out of Souliss next time.
Following blogs and online sources help me a lot in understanding the ESP and its different variants :
(Good to understand the latest ESP module and understand its basic PIN reference)
(This link does not provide instructions for latest module of ESP , but was handy for me to burn the program on ESP using Arduino IDE)
(Helped me to update the Arduino IDE to support programming for ESP board)