For hobbyists, the world of electronics offers interesting microcontroller modules with which you can implement many demanding projects. Microcontrollers that can be programmed simply and easily are of particular interest. Atmel offers a range of 8-bit microcontrollers in which many additional functions are integrated such as program memory, data memory, counters, pulse-width modulated outputs (PWM outputs), analog-digilal converters (AD converters), digital-analog converters (DA Converter), serial interface (RS232), various bus systems (I2C) and much more, so that you can implement your own electronic 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 is available for the necessary minimum control. The input and output pins of the microcontroller can be reached via pin headers. The Arduino Uno is such a popular developer board that can only be operated with a USB connection on a PC.
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 Internet of Thinks (IoT), connected devices are becoming increasingly important. 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 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.
|Microcontroller||Single core||Dual core|
|Register width||32-bit||32 bit|
|Processor type||Xtensa LX106||Xtensa LX6|
|Max frequency||80 ... 160 MHz||160 ... 240 MHz|
|Flash||4 MB||4 MB|
|SRAM||160 KB||520 KB|
|ADC low-noise amplifier||-||Yes|
|DAC (digital-to-analog converter)||-||1|
|WiFi||802.11 b / g / n||802.11 b / g / n|
|Power Consumption (Active)||80 mA||260 mA|
|Operating voltage||2.3 to 3.6V||2.3 to 3.6V|
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-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 have 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