LED Control Using ESP8266 WiFi Module- Internet of Things

by bipul kumar gupta in Circuits > Wireless

25235 Views, 15 Favorites, 0 Comments

LED Control Using ESP8266 WiFi Module- Internet of Things

q7.jpg

The ESP8266 is a low-cost Wi-Fi chip with full TCP/IP stack and MCU (microcontroller unit) capability produced by the Shanghai-based Chinese manufacturer, Espressif Systems.

The chip first came to the attention of western makers in August 2014 with the ESP-01 module, made by a third-party manufacturer, Ai-Thinker. This small module allows microcontrollers to connect to a Wi-Fi network and make simple TCP/IP connections using Hayes-style commands. However, at the time there was almost no English-language documentation on the chip and the commands it accepted.The very low price and the fact that there were very few external components on the module which suggested that it could eventually be very inexpensive in volume, attracted many hackers to explore the module, chip, and the software on it, as well as to translate the Chinese documentation.The ESP8285 is an ESP8266 with 1 MiB of built-in flash, allowing for single-chip devices capable of connecting to Wi-Fi.

The Basic Requirements for This Project Is Listed As Follows:-

q10.jpg
q5.jpg
q8.jpg
q9.jpg
q11.png

(1) ESP8266 WiFi Module

(2) Arduino IDE

(3) Breadboard

(4) Jumper Wires

(5) USB-TTL Converter

(6) Power Source (3.3v DC)

(7) Wireless Internet Connection (WiFi)

(8) Web Server (you can use ours)

(9) LED

What Is ESP8266?

q6.jpg
ESP8266 PIN DETAILS.jpg
ESP8266.png

The ESP8266 is a low-cost Wi-Fi chip with full TCP/IP stack and MCU (microcontroller unit) capability produced by the Shanghai-based Chinese manufacturer, Espressif Systems.

The chip first came to the attention of western makers in August 2014 with the ESP-01 module, made by a third-party manufacturer, Ai-Thinker. This small module allows microcontrollers to connect to a Wi-Fi network and make simple TCP/IP connections using Hayes-style commands. However, at the time there was almost no English-language documentation on the chip and the commands it accepted.The very low price and the fact that there were very few external components on the module which suggested that it could eventually be very inexpensive in volume, attracted many hackers to explore the module, chip, and the software on it, as well as to translate the Chinese documentation.The ESP8285 is an ESP8266 with 1 MiB of built-in flash, allowing for single-chip devices capable of connecting to Wi-Fi.

What Is Arduino and IDE?

q12.jpg

Arduino is an open-source electronics platform based on easy-to-use hardware and software. Arduino boards are able to read inputs - light on a sensor, a finger on a button, or a Twitter message - and turn it into an output - activating a motor, turning on an LED, publishing something online. You can tell your board what to do by sending a set of instructions to the microcontroller on the board. To do so you use the Arduino programming language (based on Wiring), and the Arduino Software (IDE), based on Processing.

Why Arduino?
Thanks to its simple and accessible user experience, Arduino has been used in thousands of different projects and applications. The Arduino software is easy-to-use for beginners, yet flexible enough for advanced users. It runs on Mac, Windows, and Linux. Teachers and students use it to build low cost scientific instruments, to prove chemistry and physics principles, or to get started with programming and robotics. Designers and architects build interactive prototypes, musicians and artists use it for installations and to experiment with new musical instruments. Makers, of course, use it to build many of the projects exhibited at the Maker Faire, for example. Arduino is a key tool to learn new things. Anyone - children, hobbyists, artists, programmers - can start tinkering just following the step by step instructions of a kit, or sharing ideas online with other members of the Arduino community.

Download Arduino IDE and Setup Process.

q1.png
q2.png

  • Click on link and https://goo.gl/Cxa9rX download Arduino IDE
  • Install Arduino IDE on your system
  • Open Arduino IDE & Click on tab File > Preferences
  • Now add the following URL in the Additional Board Manager URLs field & click OK.
  • URL :- http://arduino.esp8266.com/stable/package_esp8266...
  • Open the tab Tools > Boards > Board Manager
  • Search for esp8266 & install the esp8266 community packages
  • Now go to Tools > Boards & select Generic ESP8266 Module
  • Open Sketch > Library > Manage Libraries
  • Search for arduino json & install arduino json library by BenoĆ®t Blanchon

Pin Conncetion for ESP8266 to USB-TTL Converter

esp8266-reflash-firmware.jpg
ESP8266 PIN DETAILS.jpg
q4.png

Here are connection details for ESP8266 to USB-TTL Converter

  1. Connect USB-TTL 3.3V to ESP8266 VCC & CH_PD
  2. Connect ESP8266 RX to USB-TTL TX & ESP8266 TX to USB-TTL RX
  3. Connect ESP8266 GND to USB-TTL GND
  4. Connect LED to GPIO 2 & GND
  5. Connect GPIO 0 to GND (ONLY DURING SKETCH UPLOADING)

Code Uploading and Program

Plug the USB-TTL to your System & select the port at Tools > Ports > COMn (Ex-COM4)

Now, edit the details like- WiFi Name, WiFi Password, Domain name, path and compile the sketch & upload to ESP8266.

If you have server then you can use your own by php and json code you can download the source file by the below link, else you can use my uploaded code http://www.bipulgupta.com/IoT/

For any issue you can contact me-

Bipul Kumar Gupta

(https://goo.gl/b6TggT)

http://bipulgupta.com/

https://www.facebook.com/bipulkg