The ESP32 is a low-cost micro-controller from Espressif. It was designed for mobile, wearable electronics and Internet-of-Things applications.

Arduino Support

Programming

A toolchain is available to program the ESP32 using the Arduino IDE. It can be installed using the Arduino boards manager, after adding the repository address to the Arduino IDE configuration. Full details for installing the Arduino toolchain for the ESP32 can be found here.

User Interface

You can build user interfaces for your ESP32 projects using MegunoLink. MegunoLink supports connections to the ESP32 using:

With each transport type, you can send data to MegunoLink visualizers including the Time Plot, Table and Interface Panels. Visualizers can also send commands to the sketch running on the ESP32. Our Arduino Library can be used on the ESP32 to send data to visualizers or implement command handlers, filters and simplify timing.

Hardware

There are many boards available featuring the ESP32. Some popular ones include:

  • ESP32 Core Board V2: a basic board with a USB interface and voltage regulator.
  • FireBeetle ESP32: a board with an efficient power supply, socket for 3.7 V lithium battery, battery charger circuit, built-in LED, operating at 240 MHz.
  • ESP32 Thing: SparkFun’s ESP32 Thing includes a LiPo battery charger, an LED and user switch and a 4 MB SPI flash chip. The Thing is one of the few boards that includes a 32.768 kHz crystal for the ESP32’s real-time-clock timer
  • ESP32 Feather Board: AdaFruit’s ESP32 includes a LiPo battery charger and USB serial interface.
  • Arduino MKR WIFI 1010: includes a SAMD21 Coretx-M0+ processor, LiPo charging circuit, an RGB LED and a crypto authentication chip to implement authentication.
  • WeMos TTgo ESP32 WiFi + Bluetooth: ESP32 board that accepts Arduino Uno compatible shields.

Andreas Spiess has produced a helpful comparison video of ESP32 boards suitable for battery powered projects. There is also a summary spreadsheet of more than 25 ESP32 boards.

Peripherals

The ESP32 supports:

  • WiFi connection to 802.11 b/g/n
  • Bluetooth and Bluetooth low-energy 4.2
  • Hall-effect sensor (measures magnetic fields)
  • 10 capacitive touch sensors
  • Ultra-low-power co-processor: an independent processor that can run a program in deep sleep mode to monitor external events, timers or internal sensors

Peripheral Interfaces

You can connect other devices and sensors to the ESP32 using a variety of interfaces including:

  • 4 SPI ports
  • 2 I2S ports for sharing PCM audio data between devices
  • 2 I2C ports
  • 3 UART asynchronous serial ports
  • 1 host SD/eMMC/SDIO port for SD memory cards
  • 1 slave SDIO/SPI port
  • CAN 2.0

Timers

The ESP32 includes 4 general purpose, 64-bit timers. The timers feature:

  • 16 bit clock prescaler
  • 64 bit timer
  • configurable up/down
  • halt and resume of time-base counter
  • auto-reload at alarming
  • software controlled instant-reload
  • level and edge interrupt generation

Power Consumption

The ESP32 supports a variety of operating modes to reduce power consumption. This is a summary; for full details refer to the ESP32 datasheet.

Mode Description Power Consumption
Active (RF working) WiFi transmitting 180–240 mA
WiFi receiving 100 mA
Bluetooth transmitting 130 mA
Bluetooth receiving 900 mA
Modem-sleep 240 MHz dual-core CPU 30–68 mA
120 MHz dual-core CPU 27–44 mA
120 MHz single-core CPU 27–34 mA
80 MHz dual-core CPU 20–31 mA
80 MHz single-core CPU 20–25 mA
Light sleep 0.8 mA
Deep-sleep ULP co-processor 150 μA
ULP sensor-monitored pattern 100 μA @ 1% duty-cycle
RTC timer + RTC memory 10 μA
Hibernation RTC timer only 5 μA
Power off CHIP_PU is low to power off the chip 0.1 μA

Reference Documents

Showing 2 comments

Leave a Comment

Start typing and press Enter to search