DIY Projects

Which ESP8266 module to choose. Power supply, how to program it in C++ with Arduino IDE, MicroPython, ESP Easy

esp wroom 02u esp8266ex 2018 ipex

The ESP8266 was released in 2014. In just a few years it has gone from a simple WiFi module project for Arduino for a few euros to a full development board. The ESP8266 is a true Arduino Killer.


It has several inputs / outputs (GPIO), a WiFi connection, a power saving mode (Sleep esMode) and can be programmed either using the Arduino IDE or Lua (firmware NodeMCU), in MicroPython. Even better, with the ESP Easy firmware, you do not even need to know how to program to develop your connected objects and connect them to a DIY home automation server!

The models ESP8266EX 2018

The ESP8266 is developed by the Chinese company Espressif. Released in October 2014, the ESP8266 immediately aroused great interest from the community. The project is supported by a large community that you can follow here. This module does not content to offer a Wi-Fi connection to Arduino projects, it has its own inputs / outputs (GPIO) whose number depends on the model. Espressif first developed a very large family of circuits. In 2018, there are only three models of ESP8266 now called ESP8266EX. There are only four versions of the module. The difference between the modules is essentially at the antenna level.

Key features of the ESP8266EX

Module Description SoC Dimensions (mm) Pins Flash (MB)
The ESP-WROOM-02 is the basic module. The WiFi antenna is engraved on the PCB is based on ESP8266EX, measuring as small as 18x20x3 mm. 
Technical documentation
ESP8266EX 18x20x3 18 2
The ESP-WROOM-02D is built around the ESP8266EX. The antenna engraved on the PCB is more efficient
Technical documentation
ESP8266EX 18x20x3.2 18 2
The ESP-WROOM-02U is a more compact version (18 x 14.3 x 3.2 mm). It does not have an antenna. Instead, it has a connector U.FL (IPEX) on which we will connect an external antenna.
Technical documentation
ESP8266EX 18Xx14.3×3.2 18 2
The ESP-WROOM-S2 is a specific model that can work as an SDIO / SPI slave. The SPI bus has been optimized to reach a speed of 8 Mbps
Technical documentation
ESP8266EX 16x23x3 20 2

The old models of ESP8266

Before 2018, there were about 18 versions of the ESP8266, of which the following are the main features. I prefer to leave this part of the article for the record because we always find these modules for sale. Most often, the ESP-12E or ESP-12F modules are still marketed. The ESP-01 is always on sale, but it slowly begins to disappear from the shelves. There is only one page of results on AliExpress.

Warning. The ESP8266 modules operate with a voltage of 3.3 Volts that is dangerous to exceed. Some boards that ship a voltage regulator that protects the ESP8266 module and allows you to use a 5Volt power supply (usually between 3.3 and 6.2 Volts).
Model Photo Certifications Internal Antenna

External Antenna



Pins (GPIO) Datasheet
ESP-01  Not approved FCC and CE PCB engraved


14.3 x 24.8 8
ESP-02  ? No


14.2 x 14.2 8
ESP-03 ? Ceramic


17.3 x 12.1 14
ESP-04 ? ?


14.7 x 12.1 14
ESP-05  ? No


14.2 x 14.2 5
ESP-06 Not approved FCC and CE ?


? 12+GND
ESP-07 Not approved FCC and CE Ceramic


20.0 x 16.0 16
ESP-08 Not approved FCC and CE No


17.0 x 16.0 14
ESP-08 New  ? No


18.0 x 16.0 16
ESP-09 ? No


 10.0 x 10.0 12+GND
ESP-10 ? No


 14.2 x 10.0 5
ESP-11  ? Ceramic


 17.3 x 12.1 8
ESP-12 CE certificate n°BCTC-141212468

FCC certificate n°2ADUIESP-12



 24.0 x 16.0 16
ESP-12-E/Q Probably the same certifications as the ESP-12 PCB


 24.0 x 16.0 22
ESP-13 ? PCB


 ? 18


 24.3 x 16.2 22




 20 x 18 x 3 18 Read
WT8266-S1 CE certificate n°BCTC-150809775

FCC certificate n°2AFOSWT8266



 15.0 x 18.6 18 Read

Find all the models available at this address. Image sources:

Which model of ESP8266EX to choose for your DIY projects in 2018

Espressif has simplified its range and consequently the choice. All four versions ship the same ESP8266EX module. Completed the 4MB or 16MB versions that the Wemos d1 mini Pro has never been able to exploit elsewhere. Now we will have to settle for 2MB. Do not worry, it’s good enough for most applications. The memory of the ESP8266 is not intended to store data, we can always use an SD board reader for that.

At the moment, ESP8266EX-based development boards are still non-existent. There are some modules on AliExpress like this with the mention Special Client Only. It will therefore still wait a few months, the time that manufacturers use their inventory of old models.

If you have the necessary equipment and skills, you can buy the chip directly in a standard QFN32 package.

Which older generation model to choose?

Although Espressif has simplified the entire ESP8266 familly in 2018, the old modules are still on sale. Before 2018, there were many versions of the ESP8266 (about 18). However, among all these models, there are very few that are suitable for use for DIY projects (without tinkering pinning), this is the case of ESP-01 and ESP-05.Which model to choose for your DIY projects

All other models are assembled in the form of a soldering PCB (SMD). You will most often find them already integrated in an Arduino board but there are also 2.54mm pitch adapters for breadboards on which you will be soldering an ESP8266 module (ESP-07, ESP-08 or ESP-12). The most popular model is the ESP-12E (or E/Q).

ESP-01 (obsolete)

The ESP-01 is probably the best known module (and the most sold). This very compact module, no bigger than a 2€ coin (14.3 x 24.8mm), has 512kB of flash memory , an antenna printed on the PCB as well as 2 GPIO pins. This is the module is ideal to add a WiFi connection to an Arduino project for less than €3.

The ESP-01 is not directly usable on a breadboard. Second, it is not CE or FCC certified. I noticed some disturbance of the WiFi of neighboring devices when powering up. It may be due to my equipment.

ESP-05 (obsolete)

Unlike the ESP-01, the ESP-05 does not have a GPIO pin. Very compact (14 x 14 mm). The ESP-05 has 4 pins in pitch of 2.54mm (so compatible with a breadboard) 3.3V, GND, RX and TX. You will also find some models with a 5th pin Reset. It will be perfect to add a WiFi connection to an Arduino project for around €3.25.

Pay attention to the time of purchase because all models sold do not seem to be delivered with the same firmware.

ESP-12E or ESP-12F (replaced by ESP8266EX)

The ESP-12E is an improved version of the ESP-12. The ESP-12E has 11 GPIO pins as well as an analog / digital converter (ADC) with a resolution of 10 bits.

This is the module used by almost all NodeMCU boards. Compact and versatile, it is the ideal board for creating connected objects projects.

To begin, I recommend the WeMos d1 Mini development board. It is fully supported by the Arduino IDE. No need to put the board in Bootloader mode whenever you want to upload the program from the Arduino IDE

How to power an ESP8266 module

Some ESP8266 modules must be powered by 3.3 Volts and no protection exists. Here are several solutions to feed your modules.

Another important point to know. If you have to reinstall the firmware (NodeMCU or ESPEasy for example), the power supply must be able to deliver 300mA during the flashing of the firmware. Some FTDI cables can not deliver sufficient power. In this case, an external power supply will be required.

Solar Powerbank

The ESP8266 is ideal for making connected objects that run on battery power. In sleep mode, the power consumption does not exceed 20 μA (on the new models ESP-WROOM-02 / ESP8266EX at least). It is possible to manufacture its own solar power circuit but there is an even more practical solution, the solar Powerbank. Place the Powerbank in a brightly lit place, ideally in direct sunlight to ensure a full charge during the day.

Some tips to save battery and ensure a continuous operation of your objects:

Read this tutorial to learn how to measure battery voltage using an Arduino or ESP8266.

The complete selection of Solar Powerbank

2xAA batteries holder

ESP is ideal for developing connected object projects. The first solution to power your projects is to use a case for AA batteries. Depending on the number of 1.5V batteries, the voltage delivered by the power supply box will be higher or lower. For example with 4xAA 1.5V batteries, we can supply the module in 6V. Beyond, for example with a box of 6xAA batteries that can deliver 9V, it will be necessary to add a voltage regulator (for example a detailed LD1117V33 below).

The complete selection of 4xAA batteries holder

LiPo 3,7V battery

Some development boards come with a JST connector for LiPo battery. This is for example the case of Olimexino-85S. WeMos offers a LiPo battery shield equipped with a JSH XH2-2.54mm connector that allows to power and charge the battery simultaneously.

Features of the shield battery for Wemos d1 mini

Opt for a battery of at least 850mAh for a connected probe project that publishes on a WiFi server its measurements every hour.

Shield for 18650 battery

Sold less than $2 / $2.3 on AliExpress or eBay, this shield makes it very easy to power your projects of connected objects and even a Raspberry Pi using a LiFePO4 18650 battery. The board is equipped with a circuit allowing to charge the battery (pay attention to polarity) even when operating with a micro-USB connector. It is possible to feed multiple boards simultaneously with 3 output 5V and 3 output 3.3V (solder pins) and a conventional USB connector. Here are the characteristics of the board

Depending on your project and how often you send the data, choose a large capacity battery.

3.3V or 5V breadboard power supply

During the entire development and development phase of your project, it is very practical to use a breadboard with a 5V / 3.3V power supply. There are breadboard power boards for less than €2.

3.3V power supply using LD1117V33 voltage regulator

You can use an old power supply of a smartphone. For this you will need a jack adapter with a screw terminal and a voltage regulator (LD1117V33 for example) to deliver the 3.3 Volts needed for the ESP8266. Be careful not to exceed the recommended supply voltage (technical documentation). Finally, take into account in the design of your projects that the LD1117 heats (a lot). You can also add a 10μF capacitor for a more stable power supply.

How to program an ESP8266 module

USB cable or FTDI module?

The ESP-12 (or ESP-12E) modules are usually equipped with a USB port. A simple micro-usb cable will be enough. Some boards must be programmed using a Serial / USB adapter, called the FTDI module that can be purchased for around €2.50.

Be careful though. Some FTDI cables are not able to deliver the 300mA needed for the upload.

ESP Easy: no programming needed

ESP Easy is a firmware that allows you to program, or rather configure, the ESP module on which it is installed. To learn more, read this introductory article that explains how to install the firmware.

To go further, here are the latest tutorials published on the ESP Easy firmware

Develop in C++ with the Arduino IDE

If you are new to Arduino programming or are new to ESP8266, this is probably the easiest way to get started. The ESP8266Wifi library is now very advanced and greatly simplifies programming. This is an argument that also favors the Arduino IDE. Read this tutorial to get started with the ESP8266 modules and the Arduino IDE (installation of libraries, GPIO, Web Server, Web Client).

Pin correspondence between Arduino and ESP8266 (NodeMCU)

The ESP8266 is programmed exactly like an Arduino, it will just need to look for the matching pins for your board. Here is for example the correspondence of the pins of a Wemos D1 Mini.

In Lua (NodeMCU)

NodeMCU is a firmware that allows you to program ESP8266 modules in a language called Lua. You can consult the open-source project NodeMCU here. There are two versions of NodeMCU:

To program in Lua, the simplest is to use ESPlorer presented (quickly) in this article.

In MicroPython

If you already have some Python knowledge, you can install the MicroPython firmware. It is a Python language port for ESP8266 modules. The syntax is exactly the same. We find all the basic functions of the language as well as functions specific to ESP8266 modules. Management of WiFi, GPIO …

Here is a series of tutorials to start in MicroPython

How to install a firmware ?

It is very simple to change the firmware of an ESP8266. Be aware that the firmware (NodeMCU, ESP Easy) is cleared as soon as you upload from the Arduino IDE. Here are several articles that deal with the subject.

Click to rate this post!
[Total: 3 Average: 5]
Exit mobile version