View Categories

ESP32

 

The ESP32 is a versatile and powerful microcontroller with WiFi and Bluetooth connectivity as well as a range of IO interfaces covering analog and digital inputs and outputs (ADC, PWM) and communication buses via I2C, SPI, UART, CAN and Ethernet. This is powered by a dual-core 240 MHz CPU and 520 KiB of RAM. On the DevKits, flash ranges from 4 to 16 MiB for the storage of the firmware and configuration data. The DevKits can be bought from a range of online retailers such as Amazon and eBay. For a deeper dive into the in- and output pins, refer to RandomNerdTutorial’s page. Learn to setup it up manually below.

Interfaces of the ESP32 DevKit-C #

  • ~20 digital outputs
  • ~24 digital inputs
  • ~6 analog inputs
  • ~16 PWM outputs (WIP)
  • 2 UART interfaces
  • 2 I2C interfaces
  • Micro-USB
  • 5V power input

Firmware for ESP32 Devices #

The mainline ima_esp32 and ima_esp32_dbg firmware variants support this device. Use the Inamata Flasher app to flash the latest version (from 0.11.0) to connect it with the server. Currently only the digital in- and outputs and analog inputs are fully supported. The remaining peripherals have backend support while the frontend support is still being worked on.

Manual Device Setup #

Digital Outputs #

Status: Full support

The digital outputs allows small electrical devices to be controlled and powered. LEDs can be turned on and off to indicate different states and transistors or relays can be commanded to turn larger loads such as motors and lamps on and off. Setting it up only requires creating a digital output peripheral.

Shows the digital output configuration overlay where the pin and data point type can be set and the device be tested.

Digital Inputs #

Status: Full support

The digital input allows digital states to be measured. This is useful for HID elements such as buttons as well as simple sensors such as motion or light barrier sensors. Setting it up only requires creating a digital input peripheral. Here the pin as well as the data point type have to be selected. Setting the pull-up or down state as well as active low is optional.

Shows a configuration overlay for digital in peripherals. Allows a pin and data point type to be set as well as its pull-up/down state and active low.

Analog Inputs #

Status: Full support

The analog inputs allow voltages to be measured on a multiplexed internal ADC. Setting it up only requires creating an analog input peripheral. After selecting a pin and an appropriate data point type, select whether the raw voltage should be measured or mapped to a unit. Mapping to a unit performs a linear conversion along a user-defined range.

Shows an overlay to configure analog in (ADC) peripherals. Allows the measured voltage to be mapped to a unit.

PWM Outputs #

Status: Backend support, frontend WIP

The PWM (Pulse Width Modulation) output allows analog output voltages to be approximated. The output pin is switched on and off at a high frequency with a configurable ratio to approximate a specific voltage when averaged out over time. This is commonly used to set the brightness level on LEDs as well as the power level of certain electrical motors. Setting it up requires creating a PWM output peripheral. Only the pin and data point type have to be set.

An overlay showing the peripheral configuration for PWM outputs. Allows setting the pin and data point type.

UART Interfaces #

Status: Full support

The UART interface allows sending and receiving messages to and from other UART devices. Setting it up requires creating a UART adapter peripheral. Additional devices can then be added on top of this interface, such as the CSE7766 power meter. After selecting the receive pin and transmit pin, choose a protocol preset: Custom or CSE7766. For advanced settings, configure the baud rate (commonly 115,200 or 9,600 bps), data bits (typically 8), parity (none, odd, or even), and stop bits (1 or 2). The ‘Reset to Default’ button restores all advanced settings to their original values.

Shows an overlay to configure UART peripherals. Allows configuring the RX and TX pins as well as the encoding to be used.

I2C Interfaces #

Status: Full support

The I2C interface allows sending and receiving messages to and from other I2C devices. Setting it up requires creating a I2C adapter peripheral. Additional devices can then be added on top of this interface, such as the ADS1115 analog inputs, Atlas Sensor pH, EC and turbidity meters or the BME280 or BH1750 air sensors. Select pins for data signal (SDA) and clock signal (SCL) to configure the I2C adapter.

Shows an overlay to configure I2C interfaces. Allows setting the clock (SCL) and data (SDA) pins.

Further Support #

For further information on the ESP32 DevKit, see the RandomNerdTutorial’s introduction page or ask for help on our support forum.

Powered by BetterDocs

Leave a comment

You must be logged in to post a comment.