Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

How to Use ESP32-H2 Mini: Examples, Pinouts, and Specs

Image of ESP32-H2 MiniDesign with ESP32-H2 Mini in Cirkit Designer

Introduction

The ESP32-H2 Mini, manufactured by Espressif, is a compact microcontroller designed for Internet of Things (IoT) applications. It integrates Wi-Fi and Bluetooth Low Energy (BLE) capabilities, making it ideal for wireless communication in smart devices. With its low power consumption and high performance, the ESP32-H2 Mini is well-suited for battery-powered devices, home automation, wearable electronics, and industrial IoT systems.

Explore Projects Built with ESP32-H2 Mini

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of ESP32C3 and LoRa-Enabled Environmental Sensing Node: A project utilizing ESP32-H2 Mini in a practical application
ESP32C3 and LoRa-Enabled Environmental Sensing Node

This circuit features an ESP32C3 Supermini microcontroller connected to a LORA_RA02 module and a DHT11 temperature and humidity sensor. The ESP32C3 handles communication with the LORA module via SPI (using GPIO05, GPIO06, GPIO10, and GPIO04 for MISO, MOSI, NSS, and SCK respectively) and GPIO01 and GPIO02 for additional control signals. The DHT11 sensor is interfaced through GPIO03 for data reading, and all components share a common power supply through the 3.3V and GND pins.

Open Project in Cirkit Designer

Common Applications

Technical Specifications

The ESP32-H2 Mini is a powerful microcontroller with the following key specifications:

Parameter Value
Manufacturer Espressif
Part ID H2 Mini
Wireless Connectivity Wi-Fi (802.11 b/g/n), Bluetooth Low Energy (BLE 5.0)
Processor 32-bit RISC-V single-core processor
Operating Frequency Up to 96 MHz
Flash Memory 4 MB (external SPI flash)
RAM 512 KB SRAM
GPIO Pins 18 GPIO pins
Operating Voltage 3.0V to 3.6V
Power Consumption Ultra-low power consumption in deep sleep mode (<10 µA)
Communication Interfaces UART, SPI, I2C, I2S, PWM
ADC Channels 6 ADC channels (12-bit resolution)
Dimensions 18 mm x 25 mm
Operating Temperature Range -40°C to +85°C

Pin Configuration

The ESP32-H2 Mini features a compact pinout. Below is the pin configuration:

Pin Number Pin Name Function
1 GND Ground
2 3V3 Power Supply (3.3V)
3 GPIO0 General Purpose I/O, Boot Mode
4 GPIO1 General Purpose I/O
5 GPIO2 General Purpose I/O
6 GPIO3 General Purpose I/O
7 GPIO4 General Purpose I/O
8 GPIO5 General Purpose I/O
9 GPIO6 General Purpose I/O
10 GPIO7 General Purpose I/O
11 GPIO8 General Purpose I/O
12 GPIO9 General Purpose I/O
13 TXD UART Transmit
14 RXD UART Receive
15 ADC1 Analog Input Channel 1
16 ADC2 Analog Input Channel 2
17 EN Enable Pin
18 RST Reset Pin

Usage Instructions

Using the ESP32-H2 Mini in a Circuit

  1. Power Supply: Connect the 3V3 pin to a 3.3V power source and the GND pin to ground.
  2. Programming: Use the UART pins (TXD and RXD) to upload code to the microcontroller. A USB-to-UART converter may be required.
  3. GPIO Usage: Configure the GPIO pins as input or output in your code. These pins can be used for interfacing with sensors, actuators, and other peripherals.
  4. Wi-Fi and BLE: Use the built-in Wi-Fi and BLE modules for wireless communication. Libraries such as WiFi.h and BLEDevice.h (available in the Arduino IDE) can simplify development.

Important Considerations

Example Code for Arduino UNO Integration

Below is an example of using the ESP32-H2 Mini to connect to a Wi-Fi network and send data to a server:

#include <WiFi.h> // Include the Wi-Fi library

// Replace with your network credentials
const char* ssid = "Your_SSID";
const char* password = "Your_PASSWORD";

void setup() {
  Serial.begin(115200); // Initialize serial communication
  WiFi.begin(ssid, password); // Connect to Wi-Fi

  // Wait for connection
  while (WiFi.status() != WL_CONNECTED) {
    delay(1000);
    Serial.println("Connecting to Wi-Fi...");
  }

  Serial.println("Connected to Wi-Fi!");
}

void loop() {
  // Example: Send a message to the serial monitor
  Serial.println("ESP32-H2 Mini is running...");
  delay(2000); // Wait for 2 seconds
}

Troubleshooting and FAQs

Common Issues

  1. Device Not Connecting to Wi-Fi

    • Ensure the SSID and password are correct.
    • Check if the Wi-Fi network is within range.
    • Verify that the power supply is stable and sufficient.
  2. Microcontroller Not Responding

    • Check the connections to the UART pins.
    • Ensure the GPIO0 pin is held low during programming.
    • Verify that the correct board and port are selected in the Arduino IDE.
  3. High Power Consumption

    • Use deep sleep mode to reduce power consumption.
    • Disconnect unused peripherals to minimize current draw.

FAQs

Q: Can the ESP32-H2 Mini operate on 5V?
A: No, the ESP32-H2 Mini operates at 3.3V. Connecting it to 5V may damage the device.

Q: How do I reset the ESP32-H2 Mini?
A: Use the RST pin to reset the microcontroller. Alternatively, you can power cycle the device.

Q: Is the ESP32-H2 Mini compatible with the Arduino IDE?
A: Yes, the ESP32-H2 Mini can be programmed using the Arduino IDE. Install the ESP32 board package to get started.

Q: Can I use the ESP32-H2 Mini for battery-powered applications?
A: Yes, the ESP32-H2 Mini is optimized for low power consumption, making it suitable for battery-powered devices. Use deep sleep mode to extend battery life.