A recent upswing can be observed in the usage of the ESP8266 Wi-Fi enabled system on chip module, and the reasons are many. These will be discussed at length later, but the crux is that the facilities one can avail of with the ESP8266 are unparalleled at its meager $5 cost range – way cheaper than, for example, the Arduino YUN or similar Wi-Fi shields. The usual field of application for ESP8266 as a standalone transceiver is, of course, development projects for the end-point Internet of Things.
Though the mileage may vary on the third-party modules, the features for the core original chip are worth noting:
- 2.4 GHz Wi-Fi with WPA2 support; 802.11 b/g/n
- 16 GPIO (general purpose input-output)
- 10-bit ADC (analog-digital conversion)
- 80Mhz (up to 160Mhz OC) 32-bit RISC CPU with 96 kb data RAM, 64 kb boot ROM, and
- 64kb instruction RAM (with serial peripheral RAM-enabled external flash memory accessibility)
- Inter-integrated circuit serial communication protocol
- IIC sound interfaces with direct memory access
- SPI communication protocol
- Pulse-width modulation (PWM)
- Universal asynchronous receiver – transmitter on dedicated pins, and on some modules, transmit-only UART can be toggled on GPIO2.
Setting up the ESP8266
Out of the box, the standard caveats of ESP chips will apply here too – some ancillary components including but not limited to static memory are to be assembled in order to boot it up. The base for this can be ESP-in series development boards for which there are various options to choose and purchase from. The ESP 12xx series are recommended on the virtue of being the most popular and widely available. ESP8266 will usually come already assembled on such a board – with their own integration of Flash RAM, and sometimes Wi-Fi antennae.
For a basic and easy setup, here are the recommended core and auxiliary components:
- Third-party manufacturers have dished out various modules based on the core ES2866 chipset, and the easiest one to get started with the ESP-01. It has onboard PCB trace antenna, and 2 GPIO pins (a total of 8 pins). Priced at $5 or thereabouts.*
- A removable, ICSP header and USB-enabled Arduino Uno dual inline package ATmega328 AVR microcontroller. It has a 16Mhz resonator and 20 IO pins (6 PWM outputs and 6 analog inputs included). Priced around $25-30. **
- An ABS plastic 400-tie point breadboard with 4 power buses. Priced around $5. Note that other cheaper or larger breadboards can be used too.
- Male/Female Jumper wires priced $2-4.***
A word on the other many ESP2866-based modules:
Later on down the road, you may prefer the current community-favorite ESP-03, with 7 GPIO capabilities, which can be very useful. ESP-07 is even better if you don’t mind the addition of an adapter breakout board. Plus with the SDK released three years back in 2014, you can now develop your own firmware! For more complex projects, you can consider the Olimex custom module, which has 2MB SPI-accessible flash memory instead of the standard 512kB.
Finally, the SparkFun ‘Thing’ comes with in-built support for micro-USB and a lithium polymer battery – so if power-supply has been a particularly tricky hassle for you, this module is the one you are looking out for. It is pretty big, though, so consider getting a larger breadboard for additional implementations on the project.
**Since the SDK is out now, you can circumnavigate the need for a controller altogether if you can program the functions on the ESP itself using the Arduino IDE.
You can alternatively go for a homemade adapter if you are handy with soldering. It mechanically gets a copper-clad PCB, which are generally cheaper. Cut a 4×4 grid with a saw. Thereafter you will need two sets of 4 male header pins and 4 female header pins. Solder the female one on the middle rows, and the male ones on both sides at the other surface of the circuit board, and then connect the corresponding pins together.
With that out of the way, let us get to the building process with the proverbial crack of knuckles.
The first thing you will notice is that the pins are not breadboard-friendly so you will need to put the jumper wires into action. Use the wires connected to the Arduino to the Wi-Fi module.
Note that the ESP – 01 works with only 3.3v and not 5v – even the transmission line. On certain projects, you may require the use of voltage dividers of 1k and 2k resistance.
- Connect the Arduino’s 3v3 output to the red line on a breadboard. If you want to connect other auxiliary mechanisms that use the 5v output, use 5v. Remember to use only one and not both of them.
- The blue line is to be connected to GND.
- The RES pin is also to be connected to the blue line – which, upon connection, turns the
- Arduino into a USB to serial connector.
- Connect the RX pin of the Wi-Fi module to the RXD pin of the Arduino.
- Connect the TX pin of the Wi-Fi module to the TXD pin of the Arduino. (Alternately, for serialization purposes, you can connect the TX pin to the corresponding RX pin of the wifi module.)
- GND pin of the Wi-Fi module is to be put on the blue line.
- Connect the VCC pin on the red line.
- CH_PD on the Wi-Fi module should go to the red line, otherwise, it will not boot up. (You can break out CH_PD to toggle the device’s uptime.)
Start up the Arduino software on your platform, and use the Serial Monitor (keyboard shortcut ctrl+shift+M). Set the carriage return baud rate to 115200, which is the default amount for the AT firmware, and set the line endings to both NL and CR.
If everything is up and running properly, sending AT on the command line should return OK. The first thing you usually want to do right away is checking your firmware version with AT+GMR. If you want to change the baud rate, you can upgrade to a customized AT firmware too – just bring GPIO-0 to GND to bring the baud to the update mode. With AT+CWMODE=3 you can connect to an access point – say, a TCP/UDP software (search with AT+CWLAP).
Since the SDK is available for public usage, the custom firmware available for public usage easily with minimal technical knowledge – thanks to the ability to OTA updates and active communities and online resources, both official and unofficial. This, coupled with the modular nature and the wide variety of third-party manufacturer and vendors that can be chosen from makes it the perfect Wi-Fi chipset for experimentation and DIY projects – and the cheap cost helps too. ESP2866’s flexibility is top-notch. A wide variety of applications includes even connectivity with soil humidity sensors.
Expressif is still a young entrant into the Wi-Fi chipset industry, and cannot rival with the big players like Qualcomm or MediaTek – especially with its cybersecurity limitations. But these are overshadowed by the incredibly low cost and flexible application of the ESP2866 and its variants, which have made it the de facto mainstay for network engineers, testers, and learners as a basic starter chipset with great extension options.