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

How to Use ESP32 - 38 pins: Examples, Pinouts, and Specs

Image of ESP32 - 38 pinsDesign with ESP32 - 38 pins in Cirkit Designer

Introduction

The ESP32 is a versatile and powerful microcontroller with integrated Wi-Fi and Bluetooth capabilities. It is widely used in Internet of Things (IoT) applications, smart home devices, and for prototyping wireless communication projects. The 38-pin variant provides ample GPIO pins for interfacing with a variety of sensors, actuators, and displays.

Explore Projects Built with ESP32 - 38 pins

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 ESP32-Based OLED Display Interface: A project utilizing ESP32 - 38 pins in a practical application
ESP32-Based OLED Display Interface

This circuit features an ESP32 microcontroller connected to an OLED 1.3" display. The ESP32's GPIO pins 21 and 22 are used for I2C communication (SDA and SCL respectively) with the OLED display. The display is powered by the 5V output from the ESP32, and both devices share a common ground.

Open Project in Cirkit Designer
Image of ESP32-Based Environmental Monitoring System with Ultrasonic, GPS, GSM, and Rain Sensor: A project utilizing ESP32 - 38 pins in a practical application
ESP32-Based Environmental Monitoring System with Ultrasonic, GPS, GSM, and Rain Sensor

This circuit features an ESP32 microcontroller connected to multiple sensors and modules for environmental data collection and communication. It includes three HC-SR04 ultrasonic sensors for distance measurement, a rain sensor for detecting precipitation, a GPS NEO 6M module for location tracking, and a GSM SIM900 module for cellular communication. Additionally, there is a piezo buzzer for audio feedback and a push switch for user input, all sharing a common ground with the ESP32.

Open Project in Cirkit Designer
Image of ESP32-Based Wi-Fi Controlled LED System: A project utilizing ESP32 - 38 pins in a practical application
ESP32-Based Wi-Fi Controlled LED System

This circuit features two ESP32 microcontrollers communicating via UART, with one controlling an LED through a resistor. The primary ESP32 (ESP32 38 PINS) handles I2C communication and processes serial input to control the LED, while the secondary ESP32 (pocket esp32-c3) sends periodic data over UART.

Open Project in Cirkit Designer
Image of ESP32-Controlled Security System with Fingerprint Authentication and Servo Lock Mechanism: A project utilizing ESP32 - 38 pins in a practical application
ESP32-Controlled Security System with Fingerprint Authentication and Servo Lock Mechanism

This circuit features an ESP32 microcontroller that interfaces with an OLED display, a servo motor, and a fingerprint scanner. The ESP32 provides power to the OLED and servo, and communicates with the OLED via I2C (SCL and SDA lines) and with the fingerprint scanner via serial communication (TX and RX lines). The servo is controlled by the ESP32 through a PWM signal, enabling the circuit to display information, authenticate users via fingerprints, and perform mechanical actions with the servo.

Open Project in Cirkit Designer

Common Applications and Use Cases

Technical Specifications

Key Technical Details

Pin Configuration and Descriptions

Pin Number Function Description
1-2 GND Ground
3 3V3 3.3V power supply
4-5 EN Chip enable. Active high.
6-7 VP, VN Voltage for the internal Hall sensor
8-9 IO34, IO35 Analog input (no pullup/pulldown)
10-11 IO32, IO33 General purpose IO with DAC
12-13 IO25, IO26 General purpose IO with DAC
14-23 IO14-IO23 General purpose IO
24-25 IO13, IO12 General purpose IO (used for boot mode sel.)
26-27 IO9, IO10 General purpose IO (not exposed in all mods)
28-29 IO11, IO0 General purpose IO (used for boot mode sel.)
30 GND Ground
31 5V 5V power supply
32-33 TX0, RX0 UART0
34-35 IO1, IO3 UART0; IO1 (TX), IO3 (RX)
36-37 IO21, IO19 General purpose IO
38 IO18 General purpose IO

Usage Instructions

How to Use the ESP32 in a Circuit

  1. Powering the ESP32: Connect a 5V power supply to the 5V and GND pins. Alternatively, you can use a 3.3V supply directly to the 3V3 pin.
  2. Programming the ESP32: Use a micro USB cable to connect the ESP32 to your computer. Install the necessary drivers and use the Arduino IDE or ESP-IDF for programming.
  3. Connecting I/O Devices: Interface sensors, actuators, or other peripherals to the GPIO pins. Ensure that the voltage levels are compatible with the ESP32's 3.3V logic.

Important Considerations and Best Practices

Troubleshooting and FAQs

Common Issues

Solutions and Tips for Troubleshooting

Example Code for Arduino UNO

#include <WiFi.h>

// Replace with your network credentials
const char* ssid = "your_SSID";
const char* password = "your_PASSWORD";

void setup() {
  Serial.begin(115200);
  
  // Connect to Wi-Fi
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.println("Connecting to WiFi...");
  }
  Serial.println("Connected to WiFi");
}

void loop() {
  // Your code here
}

Code Comments

Remember to adjust the SSID and password to match your Wi-Fi network's credentials before uploading the code to the ESP32.