Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe

Getting started with ESP8266

By Nikhil Agnihotri February 18, 2022

ESP8266, a System-on-Chip (SoC) manufactured by ESpressif, is the most popular IoT development platform is a complete and self-contained Wi-Fi networking solution. The SoC consists of a Tensilica L106 32-bit microcontroller and a Wi-Fi transceiver. Therefore, the chip can be used to self-host an IoT or embedded application or offload Wi-Fi networking functions to another microcontroller or single-board computer. There are many ESP8266-based development boards. All these boards have the ESP8266 SoC chip at their heart. These development boards can be used as either only a Wi-Fi adaptor or as a single-board microcontroller with Wi-Fi networking capabilities.

ESP8266 Development Board

Example of ESP8266 Development Board

The on-chip microcontroller itself provides 17 GPIO (General Purpose Input/Output) and one 10-bit ADC analog input. The SoC has four PWM interfaces that are software-enabled only. The chip is enabled with one SPI interface, one I2C interface, two UART interfaces, and one IR remote control interface for serial data communication. So, a carefully selected ESP8266 development board has everything that any capable single-board microcontroller must-have. The additional Wi-Fi networking capability allows an ESP8266-based development board to connect with a Wi-Fi network, connect with the internet, host a web server, and implement full-fledged Wi-Fi-enabled IoT applications.

When self-hosting an embedded/IoT application, the SoC requires an external flash to boot it directly. When used as a Wi-Fi adapter, the chip can be connected to a single-board microcontroller or single-board computer using SPI, I2C, or UART.

The ESP8266 SoC is designed for ultra low power technology. It is designed considering applications in wearable electronics, mobile, and the Internet of Things. The chip can operate in three modes – active, sleep, and deep sleep. In deep sleep mode, the chip consumes only 60 uA, and in sleep mode, it consumes less than 1.0 mA and 0.5 mA while staying connected to a Wi-Fi access point. The SoC has a built-in real-time clock and watchdog timer, which remain active in the sleep mode. The built-in RTC can be programmed to wake up the ESP8266 at any required interval or when a specified condition is detected. This way, an ESP8266-based device can be programmed to remain in a low-power standby mode until Wi-Fi is needed.

ESP8266, a low-power WiFi-enabled microcontroller solution, is perfect for designing battery-powered wearable electronics and portable/mobile IoT devices.

ESP8266 features

Some of the most notable features of ESP8266 SoC are as follows.

  • 11 b/g/n
  • Wi-Fi 2.4GHz with WPA/WPA2 security
  • Wi-Fi Direct (P2P station), SoftAP, SoftAP+station
  • Built-in TCP-IP protocol stack
  • Support IPv4, TCP/UDP/HTTP/FTP network protocols
  • Antenna diversity (External, PCB trace, Ceramic chip, IPEX connector)
  • Support STA/AP/STA+AP operation modes
  • GPIO, SDIO 2.0, SPI, I2C, UART, I2S, IR Remote Control, PWM
  • Built-in 10-bit ADC
  • Built-in TR switch, balun, LNA, power amplifier, and matching network
  • Built-in power regulator, PLL, and power management units
  • Support smart link for both Android and iOS devices
  • Configurable via AT instruction set, Cloud Server, Android, and iOS Apps
  • Support Cloud Server Development as well as SDK for custom firmware development
  • Firmware can be upgraded through UART download as well as OTA (via Wi-Fi network)
  • Support WEP/TKIP/AES encryption
  • Integrated low-power 32-bit microcontroller
  • Low power consumption, less than 10uA in deep sleep and void access point
  • Wake up and transmit packets in less than 2 ms
  • Wide operating temperature range -40˚C to 125˚C

ESP8266 modules

There are several ESP8266-based modules. These are either stand-alone modules or complete development boards. The stand-alone modules generally contain only the ESP8266 SoC and the components required to run it. Most stand-alone modules are available as ESP-NN (ESP01 to ESP14) series from the AI-Thinkers vendor. A stand-alone module ESP-WROOM-02 is available from Espressif itself. Other stand-alone modules are available from other vendors like Wireless-tag, Olimex, Smarttime, and Qilianer. The following table lists and compares the available stand-alone ESP8266 modules.

These stand-alone modules serve as only a Wi-Fi adaptor or a Wi-Fi-enabled microcontroller development board. These modules vary in size, pins are broken out, exposed on-chip features, antenna type, and flash memory. A bare-bones ESP8266 SoC requires an external flash memory, reset and program circuitry, chip enabling circuitry, 3.3 voltage regulator power supply, and a USB-to-Serial adapter. All of these required features may be onboard in a module, or some may be required to be provided externally.

The ESP8266-based development boards have all the required circuitry with or without a USB interface for programming. Some popular ESP8266 development boards are available from Adafruit, SparkFun, NodeMCU, and AI Thinkers. The following tables lists notable features of some of these ESP8266 development boards.

ESP8266 development boards can be divided into two categories:

  1. ESP8266 Development boards with USB interface: These development boards have a USB interface for programming. They have all the required circuitry onboard and do not require any external circuit setup. Some examples of such development boards include SparkFun ESP8266 Thing, Adafruit Feather HUZZA, SparkFun Blynk Board, and some of the AI Thinker ESP-NN boards. When such boards are connected to a desktop computer via USB cable, they show up in device manager on Windows PC or in lsusb on a Linux system. They have an onboard 3.3V regulator and can be programmed directly via a USB interface. Such development boards do not require any external circuit for setup and operation. At most, one may need to solder header pins or get the header already soldered.
  2. ESP8266 Development boards without USB interface: These development boards require a USB-to-Serial adaptor for programming. The board may have a 3.3V regulator or may not even have that. Apart from the 3.3V regulator and USB-to-Serial adaptor, the board requires an external circuit to enable the chip and add a reset and programming button.

The USB-to-Serial converter must operate at 3.3V. If the USB-to-Serial adaptor operates at 5V, it will damage the ESP8266 development board. The most popular USB-to-Serial adaptor used with ESP8266 dev boards is FTDI FT232RL, as it can be switched between 5V and 3V3 operation.

To connect USB-to-Serial adapter with ESP8266 dev board, connect ground, RX-pin, TX-pin, and DTR pin (if available) of USB-to-Serial adaptor to ground, TX, RX, and DTR pins of the ESP8266 chip.

If the ESP8266 development board does not have an onboard 3.3V regulator, the 3.3V supply can be provided either through Arduino’s 3.3V out or using LM1117-3.3. The 3.3V output of most of the Arduino boards is not powerful enough to drive an ESP dev board. Therefore, it is best recommended to supply power via LM1117-3.3. LM1117-3.3 must be connected as follow to supply power to an ESP8266 board.

Circuit diagram of LM1117 3.3V voltage regulator for ESP8266 board.

 

Circuit diagram for resetting, enabling, and programming ESP8266.

To enable the ESP8266 chip, connect CH_PD (Chip Enable/Chip Power Down) pin to VCC through a 10K resistor. Disable SD card boot by connecting GPIO15 to ground through a 10K resistor. Select normal boot mode by connecting GPIO0 to VCC through a 10K resistor. To avoid random reset, connect RST pin to VCC through 10K resistor. The GPIO2 must remain not connected. Connect a push button between the RST pin and ground to add a reset button. Connect GPIO0 to ground through the 470Ω resistor to add a program button. The GPIO0 must be pulled low when programming the ESP8266. The chip enables, reset, and programming circuit for ESP8266 development board is shown below.

Programming ESP8266 development boards

Programming ESP8266 development board requires loading firmware to it. There are broadly three methods for programming ESP8266 development boards. There is not one but several ways ESP8266 development board can be programmed.

  1. Using Arduino IDE – Arduino provides a third-party plugin to use Arduino IDE for different CPUs. It uses the Xtensa GCC toolchain, available at Github as esp8266/Arduino. It also provides ESPTool to upload hex files (sketches/application codes) to the ESP8266 SoC. Once the board manager URL is added to the IDE’s preference setting menu and the ESP8266 board is installed through Tools->Boards->Board Manager, the code for the ESP8266 development board can be written, edited, compiled, and uploaded from the Arduino IDE like it is done for the Arduino boards.
  2. Setup the GCC Toolchain and SDK manually: An open-source toolchain for ESP8266 development boards is available on Github. This toolchain can be used to build a custom firmware file for yourself. The toolchain only runs on a Linux host or can be run on other desktop systems using a Linux virtual machine.
  3. Using pre-built custom toolchains: Some pre-built custom toolchains are available that can be directly downloaded as ESP8266 firmware, and then sketches (application codes) can be flashed to ESP8266 for that firmware. Some of the popular toolchain for ESP8266 development boards are as follow –
  • Espressif firmware source
  • Electrodragon’s ESP8266 AT-command firmware
  • Espressif AT command firmware
  • NodeMCU firmware for running LUA scripts on ESP8266
  • MicroPython firmware, for running Python 3 scripts on ESP8266 and several other microcontrollers
  • Moddable SDK for running 2020 standard Javascript on ESP8266, ESP32, and some other microcontrollers
  • ESP8266Basic, a basic interpreter for browser-based development on ESP8266

ESP8266 applications

ESP8266 is a powerful Wi-Fi networking solution with single-board microcontroller features. It is best suited for mobile, wearable, and IoT devices. There are several ESP8266 development boards available, and they can be programmed using different toolchains. Different toolchains allow programming ESP8266 development boards in several programming languages like C, Python, Javascript, LUA scripting, and AT commands. Some of the possible IoT applications using ESP8266 development boards are home automation, mesh network, IP cameras, baby monitors, wearable electronics, industrial wireless control, security ID tags, sensor networks, Wi-Fi location-aware devices, Wi-Fi position system beacon, smart plug, and lights, internet-controlled home appliances, etc.

Design considerations with ESP8266

There are a few factors that must be considered before selecting ESP8266 development boards for WiFi-enabled IoT applications –

  1. ESP8266 operates at 3.3V, even a supply of 5V can kill the SoC. The GPIO of the ESP8266 can only source or sink 12 mA per output pin. So, ESP8266 is suitable only for low-power IoT applications.
  2. The voltage range of ESP8266’s analog to digital converter is only 0~1V. This limits the use of ESP8266 in the field of analog sensing.
  3. The ESP8266 shares the CPU time and system resources with the Wi-Fi transceiver. Therefore, the application code should not have long loops that never complete execution. So, ESP8266 must be used for specified IoT applications.
  4. The PWM and I2C on ESP8266 are emulated in software. There is no dedicated hardware for them.

You may also like:


  • What are the top development boards for AI and ML?

  • What are the top technologies enabling M2M in 2023?

  • What is LoRa and LoRaWAN?

  • What are LoRa gateways and what types are available?

  • What are the different types of EV charging connectors?

  • What is Wireless Electric Vehicle Charging System (WEVCS)?

Filed Under: Applications, Arduino Projects, ESP8266, Featured, IoT applications, Tech Articles
Tagged With: Arduino, esp8266, ESP8266 SoC
 

Next Article

← Previous Article
Next Article →

Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

EE TECH TOOLBOX

“ee
Tech Toolbox: 5G Technology
This Tech Toolbox covers the basics of 5G technology plus a story about how engineers designed and built a prototype DSL router mostly from old cellphone parts. Download this first 5G/wired/wireless communications Tech Toolbox to learn more!

EE Learning Center

EE Learning Center
“engineers
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


RSS EDABOARD.com Discussions

  • IGBTs without negative gate drive
  • High failure rate of LLC converter
  • Broad band impedance matching network for loop antenna using transformer for wireless power transfer
  • Earth leakage circuit with TL071
  • VHF radio

RSS Electro-Tech-Online.com Discussions

  • Pic18f25q10 osccon1 settings swordfish basic
  • turbo jet fan - feedback appreciated.
  • More fun with ws2812 this time XC8 and CLC
  • I Wanna build a robot
  • Pickit 5

Featured – LoRa/LoRaWan Series

  • What is the LoRaWAN network and how does it work?
  • Understanding LoRa architecture: nodes, gateways, and servers
  • Revolutionizing RF: LoRa applications and advantages
  • How to build a LoRa gateway using Raspberry Pi
  • How LoRa enables long-range communication
  • How communication works between two LoRa end-node devices

Recent Articles

  • How IoT network topologies work
  • The top five AI startups to watch in 2025
  • STMicroelectronics unveils SoC based on secure MCU
  • Nexperia’s 48 V ESD diodes support higher data rates with ultra-low capacitance design
  • Taoglas releases Patriot antenna with 18 integrated elements covering 600 to 6000 MHz

EE ENGINEERING TRAINING DAYS

engineering

Submit a Guest Post

submit a guest post
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • Subscribe to our newsletter
  • About Us
  • Contact Us
  • Advertise

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy

Search Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe