
With the popularity of Internet of Things (IoT) devices, there is an uptick demand for low-cost and integrated Wifi module. ESP8266 has created quite a hype amongst hackers and makers recently with the promise of cheap Wifi hardware and upgradable firmware, all in one chip.
In short, ESP8266 is an SoC (System on a Chip) that gives Wifi connection to your project. It is a complete Wifi solution with storage capabilities and powerful processing. If you are savvy enough, you can write your own application/firmware and flash it to the module and that will be all that you need.
There are two ways of using this module:
Serial-to-WiFi: The default mode. You can connect it to other devices (Raspberry Pi, Beaglebone Black, Arduino etc.) over the serial communication (Tx/Rx pins). The firmware ships with this module allow communications using AT commands. Essentially, this module can offloads all the heavy task of Wifi connection from a microcontroller.
Standalone: By using a Serial-to-USB adapter, you can connect this module to a PC and flash your own firmware. Open source firmware like the NodeMCU allows it to run standalone without a microcontroller, running codes with its own processor.
You can utilize the GPIO pins on this module to attach sensors, switches and relays making it a self contained solution.
There are many different ESP8266 modules out there. This one is known as the ESP-01 and comes with PCB antenna and 2x4 pin headers. It is the most basic and cost effective ESP8266 module with only 2 GPIO pins available.
Features:
Pin-out:
ESP8266 is a 3.3V device. 5V will kill it! If you plan to connect to 5V device such as an Arduino, be sure to use a logic level converter.
The wiring follows a typical serial connection. Connect Vcc to 3.3V and GND to ground. URXD to Tx pin and UTXD to Rx pin. In our test, CH_PD need to set to high (pull up to Vcc) in order for it to work.
Additionally, if you want to flash the firmware in the future, you have to pull down the GPIO0 to ground (LOW).
This module requires around 300 mA of current at its peak. If your microcontroller is not able to provide it, you might need an external power supply.
At the moment it takes some tinkering and some amount of guesswork to get this thing to work. Documentations are sparse but there are growing supports from the community. So this module is strictly for hobbyists and those who like to experiment with ESP8266.
Useful links: