

The ESP32 is a powerful microcontroller with integrated Wi-Fi and Bluetooth capabilities, making it an excellent choice for Internet of Things (IoT) applications. It features a dual-core processor, low-power consumption, and a wide range of peripherals. The addition of an expansion board enhances its functionality by providing extra GPIO pins, improved power management, and simplified connectivity to sensors, actuators, and other modules.








| Specification | Value |
|---|---|
| Microcontroller | ESP32 Dual-Core Xtensa LX6 |
| Clock Speed | Up to 240 MHz |
| Flash Memory | 4 MB (varies by model) |
| SRAM | 520 KB |
| Wi-Fi Standard | 802.11 b/g/n |
| Bluetooth | v4.2 BR/EDR and BLE |
| Operating Voltage | 3.3V |
| Input Voltage (via USB) | 5V |
| GPIO Pins | Up to 30 (varies with expansion board) |
| ADC Channels | 18 |
| DAC Channels | 2 |
| Communication Interfaces | UART, SPI, I2C, I2S, CAN, PWM |
| Power Consumption (Active) | ~160 mA |
| Power Consumption (Deep Sleep) | ~10 µA |
Below is a typical pinout for the ESP32 with an expansion board. Note that the exact pin configuration may vary depending on the specific expansion board model.
| Pin Name | Pin Number | Description |
|---|---|---|
| VIN | 1 | Input voltage (5V from USB or external power) |
| GND | 2 | Ground |
| 3V3 | 3 | 3.3V output for powering external components |
| EN | 4 | Enable pin (active high) |
| GPIO0 | 5 | General-purpose I/O, boot mode selection |
| GPIO2 | 6 | General-purpose I/O |
| GPIO4 | 7 | General-purpose I/O |
| GPIO5 | 8 | General-purpose I/O |
| GPIO12 | 9 | General-purpose I/O |
| GPIO13 | 10 | General-purpose I/O |
| GPIO14 | 11 | General-purpose I/O |
| GPIO15 | 12 | General-purpose I/O |
| TXD0 | 13 | UART0 Transmit |
| RXD0 | 14 | UART0 Receive |
| SDA | 15 | I2C Data Line |
| SCL | 16 | I2C Clock Line |
Powering the ESP32:
Programming the ESP32:
Connecting Sensors and Modules:
Wi-Fi and Bluetooth Setup:
WiFi library. BluetoothSerial library for serial communication.Below is an example of using the ESP32 to read a temperature sensor and send data over Wi-Fi:
#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 network
// 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: Read a sensor value (replace with actual sensor code)
int sensorValue = analogRead(34); // Read from GPIO34 (ADC1 channel 6)
Serial.print("Sensor Value: ");
Serial.println(sensorValue);
delay(1000); // Wait for 1 second before reading again
}
ESP32 Not Connecting to Wi-Fi:
Upload Fails or Timeout Errors:
Unstable Operation or Random Resets:
GPIO Pin Not Working:
Q: Can I use 5V sensors with the ESP32?
A: The ESP32 operates at 3.3V logic. Use a level shifter to interface with 5V sensors.
Q: How do I reset the ESP32?
A: Press the RESET button on the expansion board or power cycle the device.
Q: Can I use the ESP32 with a battery?
A: Yes, you can power the ESP32 using a LiPo battery connected to the VIN and GND pins. Ensure the battery voltage is within the acceptable range.
Q: How do I enable deep sleep mode?
A: Use the esp_deep_sleep_start() function in your code to put the ESP32 into deep sleep mode.
This concludes the documentation for the ESP32 with Expansion Board.