Electronic modules from Espressif

For hobbyists, the world of electronics offers interesting microcontroller modules with which many demanding projects can be implemented. Microcontrollers that can be easily and easily programmed are of particular interest. Atmel offers a range of 8-bit microcontrollers with many additional functions integrated, such as program memory, data memory, counters, pulse-width modulated outputs (PWM outputs), analog-to-digital converters (AD converters), digital-to-analog converters (DA converter), serial interface (RS232), various bus systems (I2C) and much more, so that you can implement your own electronics projects without much additional effort. Such microcontrollers are often offered in connection with developer boards, where the microcontroller is soldered onto a circuit board and a peripheral circuit for the necessary minimum control is available. The input and output pins of the microcontroller can be reached via pin headers. The Arduino Uno is one such popular developer board that runs on a PC with just a USB connection.

Fig: Arduino Uno R3 (original type)

The USB connection is used for supplying operating voltage as well as for programming and debugging programs. In the past, special and expensive programming devices were required to program the microcontrollers. Today most microcontrollers have a built-in bootloader program with which the programming process takes place via a serial data connection. The serial interface is usually equipped with a USB-serial converter on the developer boards, so that you can use a normal USB connection on the PC. The user program is then loaded into the program memory and then executed. The program remains permanently in the program memory until it is overwritten by another and starts automatically when the operating voltage is switched on. With a programming environment such as the Arduino IDE, the developer board can be programmed in the programming language C or C ++ via the USB connection.

Fig: Arduino IDE

The Arduino IDE contains libraries of various developer boards that can be used to select the developer board used. The libraries provide a large number of functions with which the hardware can be addressed via a program and which relieves the programmer of a lot of work because he does not have to worry about the actual hardware control. Even complex processes such as communication via a serial interface or reading out an analog voltage via an AD converter can be carried out with simple commands. In the past, you had to have detailed hardware knowledge and program the respective functions for controlling the hardware yourself. This is largely done by the libraries, making it very easy for the user. The functions can usually also be transferred to other microcontroller chips and developer boards and can be used there in the same way. Many developer boards are constructed in such a way that the IO pins follow a standardized and defined arrangement. This makes it possible to plug additional hardware modules onto the developer boards. You can use it to significantly expand the range of functions of the circuit. Libraries are usually offered for the additional hardware modules, which also simplify the control of the hardware for the programmer.

In the age of the Internet of Things (IoT), the importance of networked devices is increasing. The devices communicate via networks or WiFi and can even be connected to the Internet and exchange their data with remote devices. The simple developer boards with the 8-bit microcontrollers are reaching their performance limits, although some of them can also be made IoT-capable with additional modules.

Espressif is a Chinese company that manufactures low-cost 32-bit microcontroller chips for IoT devices (ESP8266, ESP32). The microcontroller chips have network interfaces to WiFi and Bluetooth. They are also much more powerful than 8-bit microcontrollers and have more additional functions. The chips have a built-in boot loader and have a Real Time Operating System (RTOS) in order to be able to implement network functionality and other time-critical program sequences. In combination with a memory chip, the IoT chips are built into small IoT modules the size of postage stamps, which can be easily integrated into your own circuits. Espressif offers variously equipped IoT modules. The IoT modules are used and programmed in the same way as the Arduino Uno. There are a variety of developer boards for the ESP8266 and ESP32. The Arduino IDE can also be used for programming.

The following table compares the two microcontroller chips ESP8266 and ESP32.

property ESP8266 ESP32
Microcontroller Single core Dual core
Register width 32 bits 32 bits
Processor type Xtensa LX106 Xtensa LX6
operating system RTOS RTOS
Max frequency 80 ... 160 MHz 160 ... 240 MHz
Flash 4 MB 4 MB
SRAM 160 KB 520 KB
GPIO 17 36
 Touch sensors -  10
 ADC channels  1  16
 ADC resolution  10-bit  12-bit
 ADC low-noise amplifier -  Yes
DAC (digital-to-analog converter) - 1
WiFi 802.11 b / g / n 802.11 b / g / n
Bluetooth - Bluetooth, BLE
 CAN 2.0  -  1
 I2C  1  2
 PWM channels  8  16
 Temperature sensor  -  Yes
 Hall sensor  -  Yes
 Power Consumption (Active)  80 mA  260 mA
 Operating voltage  2.3 to 3.6V  2.3 to 3.6V
 data sheet  link  link

Tab .: Comparison of ESP8266 vs. ESP32

Thanks to the dual core processor with a higher clock frequency, the ESP32 is more powerful than the ESP8266, but it also consumes more power. Both IoT chips are built into various IoT modules. The following table lists some modules.

picture Type chip IO ports Power supply particularities
ESP-01 ESP8266 6 3.3V smallest DIL module
ESP-07 ESP8266 14 3.3V Ext. Antenna
ESP-12 ESP8266 14 3.3V fewer IO pins than ESP-12F
ESP-12F ESP8266 20 3.3V more IO pins than ESP-12
ESP32 Wroom ESP32 26 3.3V Dual core, slightly larger than ESP-XX modules

Tab .: ESP modules

The ESP modules are built into a number of developer boards. The developer boards pursue different goals and differ in the built-in additional hardware.

picture Type chip programming interface Power supply particularities
Wemos D1 mini ESP8266 Micro USB 5V USB Many plug-in additional modules available
NodeMCU ESP8266 Micro USB 5V USB Widespread
NodeMCU32 ESP32 Micro USB 5V USB Widespread
NodeMCU32S ESP32 Micro USB 5V USB More IO pins
TTGO OLED ESP32 USB-C 5V USB OLED 64 × 128 pixels
TTGO TFT ESP32 USB-C 5V USB TFT 135 x 240 pixels
Heltec WiFi LoRa 32 ESP32 Micro USB 5V USB, LiPo LoRa (SX1276, 868MHz), OLED 64 × 128 pixels
ESP32-CAM ESP32 Serial, 3.3V TTL 5V 2 MPixel camera, SD card reader

Tab .: ESP developer boards

If you are looking for a good introduction to ESP32 programming, you should take a look at this book: The official ESP32 manual There is a detailed description of how to implement projects with the EPS32 and the Arduino IDE. Starting with simple projects such as “Flashing LED”, all important hardware units are explained bit by bit and put into operation with software examples on a plug-in board.