The ESP8266 is a System on a Chip
The ESP8266 is a System on a Chip
Given its low cost, small size and adaptability with embedded devices, the ESP8266 is now
used extensively across IoT devices. Although it’s now been succeeded by the newer
generation ESP32 microcontroller chip, the ESP8266 is still a popular choice for IoT
developers and manufacturers.
In this article, we’ll explain the main features of ESP8266 modules and development
boards and their application within the world of IoT.
The ESP8266 module enables microcontrollers to connect to 2.4 GHz Wi-Fi, using IEEE 802.11
bgn. It can be used with ESP-AT firmware to provide Wi-Fi connectivity to external host MCUs,
or it can be used as a self-sufficient MCU by running an RTOS-based SDK. The module has a
full TCP/IP stack and provides the ability for data processing, reads and controls of GPIOs.
ESP8266 Specifications
ESP8266 Functions
ESP8266 has many applications when it comes to the IoT. Here are just some of the functions
the chip is used for:
Data Processing: Includes processing basic inputs from analog and digital sensors for far
more complex calculations with an RTOS or Non-OS SDK
P2P Connectivity: Create direct communication between ESPs and other devices
using IoT P2P connectivity
As discussed above, the ESP8266 is just the name of the chip. There are essentially three formats
you can buy this in:
ESP8266 Chip: This is the basic chip manufactured by Espressif, which comes
unshielded and needs to be soldered onto a module. This is unsuitable for most users,
apart from perhaps volume device manufacturers that can factor this into the production
process under the unit cost of a module.
ESP8266 Modules: These are the surface-mountable modules that contain the chip,
which are ready to be mounted onto an MCU, produced by Espressif, Ai-Thinker and
certain other manufacturers. They are usually shielded and pre-approved by the FCC for
use. This means they’re a good option for device manufacturers looking to scale
production.
ESP8266 Development Boards: These are the complete IoT MCU development boards
that have the modules preinstalled. They’re used for developers and manufacturers to
create prototypes during the design stage, before they start production. Development
boards are produced by several different manufacturers and the specifications differ
between models. Some core specifications to be aware of when assessing ESP8266 IoT
development board options include:
GPIO pins
ADC pins
Wi-Fi antennas
LEDs
Shielding*
Flash Memory
*Many international markets require shielded Wi-Fi devices, as Wi-Fi produces considerable
Radio Frequency Interference (RFI), and shielding minimizes this interference. This should,
therefore, be a key consideration for all developers and embedded-device manufacturers.
ESP8266 Peripherals
17 GPIOs
SPI
I2C (implemented on software)
I2S interfaces with DMA
UART
10-bit ADC
One important thing to notice about ESP8266 is that the GPIO number doesn’t match the label
on the board silkscreen. For example, D0 corresponds to GPIO16 and D1 corresponds to GPIO5.
The following table shows the correspondence between the labels on the silkscreen and the GPIO
number as well as what pins are the best to use in your projects, and which ones you need to be
cautious.
One important thing to notice about ESP8266 is that the GPIO number doesn’t match the label
on the board silkscreen. For example, D0 corresponds to GPIO16 and D1 corresponds to GPIO5.
The following table shows the correspondence between the labels on the silkscreen and the GPIO
number as well as what pins are the best to use in your projects, and which ones you need to be
cautious.
The pins highlighted in green are OK to use. The ones highlighted in yellow are OK to use, but
you need to pay attention because they may have unexpected behavior mainly at boot. The pins
highlighted in red are not recommended to use as inputs or outputs.
Labe
GPIO Input Output Notes
l
HIGH at boot
no used to wake
D0 GPIO16 no PWM or I2C support
interrupt up from deep
sleep
often used
D2 GPIO4 OK OK
as SDA (I2C)
connected to
FLASH
D3 GPIO0 pulled up OK button, boot
fails if pulled
LOW
HIGH at boot
connected to
on-board
D4 GPIO2 pulled up OK
LED, boot
fails if pulled
LOW
SPI (CS)
pulled to
D8 GPIO15 OK Boot fails if
GND
pulled HIGH
HIGH at boot
debug output
TX GPIO1 TX pin OK at boot, boot
fails if pulled
LOW
Analog X
A0 ADC0
Input