ESP8266: the WIFI module for Arduino


Arduino IDE and with a lot of possibilities. Little by little it was evolving, emerging new versions and editions of the board, as well as kits and complements like the famous shields and modules that extended the basic functionalities of these boards.

One of the complements that made a big step forward in the capabilities was the WiFi module, like the ESP8266, since it allowed the projects that were isolated until now to be connected to a network and thus be able to monitor or manage the project from the Internet anywhere in the planet. That’s why we are going to dedicate this guide to ESP8266, so you can know everything you really need…

A little bit of history


The first company that created this ESP8266 chip was Espressif, a Chinese company located in Shanghai, although other manufacturers are currently developing and producing it. The exact date of its launch was in the summer of 2014, so it is not that old. It started to be marketed at a low price and that, together with its capabilities, soon made it very popular.

The developer community also played an important role in the success, as they started translating and publishing a lot of documentation, creating firmware and other code to be used on ESP8266. That gave the makers all the tools they needed to be able to use the device to its fullest potential.

But you should know, that as it happens with transistors, the nomenclature or numbering has not always been ESP8266, but first appeared some early ESP, then came versions like ESP8285 of 2016 which included a flahsd e 1MB memory integrated, and then would appear the ESP8266 we know today, which seems to have taken a step back because it has no such memory, but you can add other external chips to store programs.

What is it?


The ESP8266 can be integrated into a WiFi that provides a low cost chip with a full TCP/IP stack and a microcontroller. It is powered by 3.3v and has an 80 Mhz Tensilica Xtensa LX106 processor, 64 KB RAM for instructions and 96 KB for data, 16 GPIO pins, dedicated UART pins, and SPI and I2C interface.

The Tensilica CPU can be made faster by overclocking, which some models, but not all, allow. In fact, the clock frequency can be doubled. By the way, a 32-bit RISC type CPU. Also included in the module is a 10-bit ADC converter for the signals.

As a complement, it includes an external QSPI flash memory chip from 512 KB to 4 MB depending on the module, sometimes even up to 16 MB. As for the WiFi connectivity capabilities, it is compatible with the IEEE 802.11 b/g/n standard, in addition to supporting WEP, WPA and WPA2 security.

What is it used for?

App for home automation

The ESP8266, simply put, adds WiFi connectivity capability to our projects. That is, it allows wireless connection to a local network or the Internet. This makes possible a lot of possibilities, like being able to connect or disconnect appliances (using a relay) or other kind of mechanical systems in our home to domotize the house and control it by Internet from our smartphone or any computer connected from anywhere.

It can also be used to control gardening and irrigation systems through the network, to automate industrial systems, to control video surveillance IP cameras, to monitor data from sensor networks distributed in different points, for wired cables, for IoT projects (Internet of Things) and everything you can imagine…

Features of the ESP8266 module:

In order to know more about ESP8266, here are some interesting facts you will need to know about this module.

ESP8266 Datasheet

In previous sections we have described some of the main features of the ESP8266, to get all the technical details in full, you know you can download the famous datasheets that the manufacturers have from their official websites. Some of the extra features detailed in the datasheet are

  • Tensilica Xtensa L106 32-bit RISC 80Mhz CPU
  • 10-bit ADC converter
  • RAM 64 KB i / 96 KB d
  • GPIO 16 pins (you can’t use all of them, besides the GPIO16 is connected to the RTC or Real Time Clock)
  • UART
  • SPI
  • I2C
  • Voltage 3v and 3.6v
  • Intensity 80mA
  • Operating temperature -40 to 125ºC
  • IEEE 802.11 b/g/n WiFi with IPv4 support and TCP/UDP/HTTP/HTTPS/FTP protocols
  • Consumption 0.0005 to 170 mA depending on signal strength
  • Modes: Active mode, Sleep Mode, Deep Sleep – Affects consumption

For more data, download the datasheet:

Unfortunately only are in English, but it is easy to understand all the details if you have technical knowledge.

Module Pinout

Another detail that can be seen in the datasheet is the pinout. How many pins it has and what each one is for. Depending on if it’s only the ESP8266 chip or if it comes in another format or module, the pinout can vary as you can see in the images above.

Integration with Arduino and wifi.h

For programming you have at your disposal a library called wifi.h specifically for you to use the functions included in it when creating the source code with Arduino IDE to program the microcontroller. You can see more information on these two GitHub pages where these projects are hosted: Arduino Wifi.h Library / Wifi.h Espressif Library.

As far as integration with Arduino, it could be done either as a module or as a separate ESP8266 chip. However, it is recommended to use the modules. There are several types, but the best known ones are provided by the well-known manufacturer AI-Thinker:

  • ESP-01: it is one of the first modules that appeared. Its price is usually between 2 and 4 euros. It is a bit old-fashioned and only has two usable GPIOs to control its sensors and actuators. This module has an integrated WiFi antenna, LEDs, the ESP8266 chip and BG25Q80A flash memory.
  • ESP-05: its price is similar to the previous one, and it is quite simple. Its pins can be easily used to work as a WiFi shield for Arduino or to use it in a protoboard, but it does not have any accessible GPIO.
  • ESP-12: although it is quite used, it is perhaps not the most practical of all, especially for beginners. Its price is about 4 euros, and it has 11 accessible GPIO connections, one of them is analogical of 10-bit (1024 possible digital values). But it has a big defect, which you will have to solder, because it has no pins.
  • ESP-201: the price is 6 euros and it is the preferred by the makers and recommended for most users. It also has 11 GPIO ports, although not all of them can be used. In this case it does have pins to fit it on the breadboard or with Arduino without soldering.

You should know that there are more modules, in fact, in the following section we talk about one that has become popular and deserves a special mention.



A very popular module at present is the so-called NodeMCU, with a price similar to ESP-201, i.e. about 6 This is the module that you can see in the main images of this article and that is extremely simple to use, with everything you need already integrated. That is, you can work independently from the beginning, without having to add other extras as in the case of the previous modules.

NodeMCU also includes an ESP8266 chip, a serial/USB adapter, is powered by microUSB, and is based on the features of ESP-12. Several versions of this NodeMCU have appeared, such as the most updated and improved version 1 or 2. But the most interesting is the firmware included, which can be downloaded from and allows programming in languages like Python, BASIC, JavaScript and other less popular languages like LUA. Remember that the firmware is a code, a very low level program that is stored in a memory .

Leave a Comment