Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use Adafruit Metro ESP32-S2: Examples, Pinouts, and Specs

Image of Adafruit Metro ESP32-S2
Cirkit Designer LogoDesign with Adafruit Metro ESP32-S2 in Cirkit Designer

Introduction

The Adafruit Metro ESP32-S2 is a versatile and powerful development board that harnesses the capabilities of the ESP32-S2 chip. This board is designed for a wide range of applications, from Internet of Things (IoT) projects to complex wireless communication systems. With built-in Wi-Fi, USB connectivity, and an extensive array of General Purpose Input/Output (GPIO) pins, the Metro ESP32-S2 is a go-to choice for hobbyists and professionals alike.

Explore Projects Built with Adafruit Metro ESP32-S2

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
ESP32-Based Environmental Monitoring System with Motion Detection
Image of pro: A project utilizing Adafruit Metro ESP32-S2 in a practical application
This circuit features an ESP32 microcontroller on a baseboard that interfaces with a PIR sensor for motion detection, a DHT22 sensor for measuring temperature and humidity, and a BH1750 sensor for detecting ambient light levels. The ESP32 is configured to communicate with the BH1750 using I2C protocol, with GPIO22 and GPIO21 serving as the SCL and SDA lines, respectively. Power is supplied to the sensors from the ESP32's voltage output pins, and sensor outputs are connected to designated GPIO pins for data acquisition.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Environmental Monitoring and Alert System with Solar Charging
Image of mark: A project utilizing Adafruit Metro ESP32-S2 in a practical application
This circuit features an ESP32 Devkit V1 microcontroller connected to various sensors and modules for monitoring and communication purposes. It includes an MQ-2 gas sensor and a DHT11 temperature and humidity sensor, both interfaced with the ESP32 for environmental data collection. The circuit is powered by a 12V battery, regulated to 5V by step-down converters, and includes a solar charge controller connected to a solar panel for battery charging, a UPS module for power management, and a SIM900A module for GSM communication. Additionally, there is a WS2812 RGB LED strip for visual feedback and a piezo buzzer for audio alerts, both controlled by the ESP32.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Smart Weather Station with LED Display and Multiple Sensors
Image of Copy of Zegarek (1): A project utilizing Adafruit Metro ESP32-S2 in a practical application
This circuit is a sensor and display system powered by an ESP32 microcontroller. It integrates multiple sensors (BH1750 light sensor, BMP280 pressure sensor, DS3231 RTC, and DS18B20 temperature sensor) and drives a series of MAX7219 8x8 LED matrices for visual output. The ESP32 communicates with the sensors via I2C and controls the LED matrices to display data.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Environmental Monitoring System with NeoPixel Feedback and I2C Sensor Integration
Image of MSES: A project utilizing Adafruit Metro ESP32-S2 in a practical application
This circuit features an ESP32 microcontroller as the central processing unit, interfacing with a variety of sensors and peripherals. It includes an MQ-2 gas sensor, a BH1750 light sensor, multiple Adafruit NeoPixel LED sticks, a DHT22 temperature and humidity sensor, an IR transmitter, and piezo sensors. The ESP32 manages an I2C bus connecting the BH1750 and two LCD displays, controls a stepper motor via a driver module, reads analog signals from the MQ-2 sensor, and drives NeoPixel LEDs and the IR transmitter. The circuit appears to be designed for environmental monitoring and response with visual feedback and actuation capabilities.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with Adafruit Metro ESP32-S2

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 pro: A project utilizing Adafruit Metro ESP32-S2 in a practical application
ESP32-Based Environmental Monitoring System with Motion Detection
This circuit features an ESP32 microcontroller on a baseboard that interfaces with a PIR sensor for motion detection, a DHT22 sensor for measuring temperature and humidity, and a BH1750 sensor for detecting ambient light levels. The ESP32 is configured to communicate with the BH1750 using I2C protocol, with GPIO22 and GPIO21 serving as the SCL and SDA lines, respectively. Power is supplied to the sensors from the ESP32's voltage output pins, and sensor outputs are connected to designated GPIO pins for data acquisition.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of mark: A project utilizing Adafruit Metro ESP32-S2 in a practical application
ESP32-Based Environmental Monitoring and Alert System with Solar Charging
This circuit features an ESP32 Devkit V1 microcontroller connected to various sensors and modules for monitoring and communication purposes. It includes an MQ-2 gas sensor and a DHT11 temperature and humidity sensor, both interfaced with the ESP32 for environmental data collection. The circuit is powered by a 12V battery, regulated to 5V by step-down converters, and includes a solar charge controller connected to a solar panel for battery charging, a UPS module for power management, and a SIM900A module for GSM communication. Additionally, there is a WS2812 RGB LED strip for visual feedback and a piezo buzzer for audio alerts, both controlled by the ESP32.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Copy of Zegarek (1): A project utilizing Adafruit Metro ESP32-S2 in a practical application
ESP32-Based Smart Weather Station with LED Display and Multiple Sensors
This circuit is a sensor and display system powered by an ESP32 microcontroller. It integrates multiple sensors (BH1750 light sensor, BMP280 pressure sensor, DS3231 RTC, and DS18B20 temperature sensor) and drives a series of MAX7219 8x8 LED matrices for visual output. The ESP32 communicates with the sensors via I2C and controls the LED matrices to display data.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of MSES: A project utilizing Adafruit Metro ESP32-S2 in a practical application
ESP32-Based Environmental Monitoring System with NeoPixel Feedback and I2C Sensor Integration
This circuit features an ESP32 microcontroller as the central processing unit, interfacing with a variety of sensors and peripherals. It includes an MQ-2 gas sensor, a BH1750 light sensor, multiple Adafruit NeoPixel LED sticks, a DHT22 temperature and humidity sensor, an IR transmitter, and piezo sensors. The ESP32 manages an I2C bus connecting the BH1750 and two LCD displays, controls a stepper motor via a driver module, reads analog signals from the MQ-2 sensor, and drives NeoPixel LEDs and the IR transmitter. The circuit appears to be designed for environmental monitoring and response with visual feedback and actuation capabilities.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • IoT devices
  • Wireless sensor networks
  • Home automation systems
  • DIY electronics projects
  • Prototyping for embedded systems

Technical Specifications

Key Technical Details

  • Microcontroller: ESP32-S2
  • Operating Voltage: 3.3V
  • Input Voltage (recommended): 5V via USB or battery
  • Digital I/O Pins: 21, all of which can do PWM
  • Analog Input Pins: 16
  • Flash Memory: 4 MB
  • SRAM: 320 KB
  • Clock Speed: 240 MHz
  • Wi-Fi: 802.11 b/g/n
  • USB: USB-C for programming and power

Pin Configuration and Descriptions

Pin Number Function Description
1 3V3 3.3V power supply pin
2 GND Ground
3-5 GPIO 1, 2, 3 General Purpose Input/Output
6 TX0 UART transmit
7 RX0 UART receive
8-10 GPIO 4, 5, 6 General Purpose Input/Output
11 SDA I2C data line
12 SCL I2C clock line
13-17 GPIO 7-11 General Purpose Input/Output
18 A0 Analog input channel 0
19-34 A1-A16 Analog input channels 1-16
35 VIN Input voltage for battery or unregulated power

Usage Instructions

How to Use the Component in a Circuit

  1. Powering the Board: Connect the USB-C cable to the board and a power source, or attach a battery to the VIN pin.
  2. Connecting I/O: Utilize the GPIO pins for digital input/output or PWM. Analog pins can be used for reading analog sensors.
  3. Programming: Use the USB-C connection to program the board with the Arduino IDE or other compatible development environments.

Important Considerations and Best Practices

  • Ensure that the input voltage does not exceed the recommended 5V to prevent damage.
  • When using Wi-Fi, take into account power consumption and possible interference with other wireless devices.
  • Use proper decoupling capacitors close to the board's power pins to minimize noise.
  • Avoid drawing more than 12 mA from any GPIO pin.
  • For high-frequency PWM, consult the ESP32-S2 datasheet for optimal configurations.

Troubleshooting and FAQs

Common Issues

  • Board not recognized by computer: Check the USB cable and port, try a different cable or port, and ensure drivers are installed.
  • Wi-Fi connectivity issues: Verify Wi-Fi credentials, check signal strength, and ensure the antenna is not obstructed.
  • Unexpected resets or crashes: This can be due to power supply issues. Make sure the power source is stable and within the specified voltage range.

Solutions and Tips for Troubleshooting

  • Use Serial Monitor: Open the Serial Monitor in the Arduino IDE to check for error messages or debug output.
  • Firmware Update: Ensure the board's firmware is up to date with the latest version.
  • Community Forums: Adafruit has a supportive community forum where you can seek help for more complex issues.

Example Code for Arduino UNO

Below is a simple example of how to blink an LED connected to a GPIO pin on the Adafruit Metro ESP32-S2 using the Arduino IDE.

// Define the LED pin
const int LED_PIN = 13; // Use the onboard LED pin

// Setup function runs once at the start
void setup() {
  // Initialize the LED pin as an output
  pinMode(LED_PIN, OUTPUT);
}

// Loop function runs over and over again forever
void loop() {
  digitalWrite(LED_PIN, HIGH);   // Turn the LED on
  delay(1000);                   // Wait for a second
  digitalWrite(LED_PIN, LOW);    // Turn the LED off
  delay(1000);                   // Wait for a second
}

Remember to select the correct board and port in the Arduino IDE before uploading the code to the Adafruit Metro ESP32-S2.

For more complex applications involving Wi-Fi and IoT, refer to the ESP32-S2 specific libraries and examples provided by Adafruit and the ESP32 community.