T ThinkEdge Learn

ESP32 Microcontroller: The One With the Radio Onboard

The ESP32 is a microcontroller, a Wi-Fi radio and a Bluetooth radio on one chip. Understand what that changes in a circuit, then put it to work.

esp32 esp32 microcontroller esp32 vs arduino
Maker Hardware and IoT · Explains the chip through the three traps students actually hit

What is actually inside an ESP32

The ESP32 is one chip containing a processor, a Wi-Fi radio and a Bluetooth radio. The processor is a dual-core Xtensa LX6 running at 240 MHz with about 520 KB of SRAM and up to 4 MB of flash for your program. An Arduino Uno's ATmega328P gives you 16 MHz, 2 KB of SRAM and 32 KB of flash, and no radio at all.

The radio is why people buy it. The Wi-Fi is 2.4 GHz 802.11 b/g/n, so the board joins any ordinary router. The Bluetooth is 4.2 with Low Energy, which is what a phone or a beacon connects to. Both radios share one antenna through a single pin, so board layout and antenna placement matter far more here than on a plain Arduino. There is more silicon behind the pins as well: two DAC channels, touch sensing, an I2S audio interface, and hardware crypto accelerators. That last one matters more than it sounds: encrypting data in hardware takes a fraction of the time and energy of doing it in software, which is exactly what a battery node needs.

Three traps that account for most dead ESP32 boards

The first is voltage. The ESP32 runs at 3.3 V. An Arduino pin sits at 5 V when it is HIGH, so feeding a 5 V signal into an ESP32 pin pushes current through the chip's internal protection diodes until it gets hot and fails. Most beginner board deaths are this, not bad code. Use a level shifter or a 3.3 V supply for anything that talks to the chip.

The second is the analogue input. The ESP32 ADC is non-linear: the same 3.0 V can read differently depending on where it falls on the range, and the error is worst in the middle. Calibrate once by sweeping a known voltage across the input, store the correction in flash, and readings land within a few millivolts. Skip the calibration and a resistive divider can be wrong by a couple of volts. The third is a brownout reset. Drive a motor, a servo or a relay coil from the same 3.3 V rail and the inrush current drags the rail down far enough for the chip's brownout detector to reset it. The program restarts from the top and you lose whatever it was holding. Power the radio and the load from separate rails, join the grounds, and put a bulk capacitor near the board.

Step by step

  1. Flash a blink and confirm the toolchain

    Install the ESP32 board package in the Arduino IDE, or use the Arduino Cloud Editor, and get an LED blinking. That proves the USB driver, the boot loader and the flash all work before you add any complexity.

  2. Measure the rails on your specific board

    Put a multimeter on the 3V3 and 5V pins while the board runs. Cheap clone boards vary, and knowing the real numbers on your board saves hours of debugging later.

  3. Read a sensor over I2C

    A DHT or a BME280 over I2C proves the bus, the pull-up resistors and your wiring. Print the raw value and note what a normal reading looks like in your room.

  4. Calibrate the analogue input

    Sweep a known voltage across the ADC input, record the readings, and build a correction table. It is ten minutes of work that makes every later sensor reading trustworthy.

  5. Publish one reading over Wi-Fi

    Join your access point, then send a single number to a web page or an MQTT broker. One value travelling end to end teaches more than ten sensors sitting on the bench.

  6. Put the board to sleep between readings

    Use deep sleep and a timer wake-up, then measure how long the battery lasts. This is where the ESP32 earns its keep: a node that sleeps can run for months on the same cells.

What you'll need

ItemQtyWhy
ESP32 DevKit board, 30-pin or 38-pin1A USB-C board with the radio already certified and a PCB antenna, so you are not hand-wiring an RF module.
USB-C data cable1Many cheap cables are charge only. A charge-only cable flashes nothing and looks exactly like a broken board.
DHT11 or DHT22 temperature and humidity sensor1Your first networked sensor. It is slow and digital, so it teaches timing and error handling more than signal conditioning.
HLK-PM01 buck converter module1Turns 5 V into a clean 3.3 V rail so you never feed 5 V into a GPIO pin by accident.
18650 cell in a holder with protection1Deep sleep experiments need a supply that can be unplugged without resetting the board, and a protected holder matters with lithium cells.
Resistor assortment, 220 ohm to 10 kohm1 setCurrent limiting for indicator LEDs and pull-up resistors for I2C, both of which you will need within the first hour.

Practise it before you build it

Every step above has a matching circuit in the ThinkEdge Learn simulator. The simulator runs a real Arduino sketch against a modified-nodal-analysis solver, so digitalWrite actually drives the LED on screen and the readings change when you change the wiring — no hardware, no burnt components.

Common questions

Is the ESP32 better than an Arduino Uno?

For anything connected, yes. The Uno has no radio, so an IoT build on it needs an ESP8266 or ESP32 module wired on top, which is exactly what the ESP32 already is. For tight timing work or many 5 V inputs, the Uno's simpler 5 V logic and predictable 16 MHz clock are still easier to reason about. Most classrooms end up using both.

How much does an ESP32 board cost?

A DevKit board runs about $6 to $12 depending on the pin count and connector, and an ESP32-S3 board is slightly more at $8 to $15. Add two sensors and a buck converter and a working networked node is still under $30.

Why does my ESP32 restart when the relay clicks?

It is a voltage dip, not a code bug. The supply cannot deliver the relay coil's inrush current, the 3.3 V rail sags under the brownout threshold, and the chip resets. Power the coil from a separate rail, add a 470 uF electrolytic across the 3.3 V supply close to the board, and join the two grounds. The relay driver project shows the wiring that avoids this.

Related guides

ESP32-S3: What Changed and Why It Matters for Class BuildsThe ESP32-S3 adds a native USB port, Bluetooth 5 and vector instructions to the original ESP32. Here is what changed and what it means for class projects. ESP32 IoT Projects: From a Single Sensor to a Live DashboardFive ESP32 IoT projects that teach sensors, MQTT publishing, deep sleep and reconnection, each staged so the logic runs in a browser simulator first. Raspberry Pi Pico: Why This Microcontroller Is a Teaching BreakthroughThe Raspberry Pi Pico is a 3.3 V microcontroller with programmable I/O and no radios. How its hardware differs from an Arduino Uno, and what to build with it. Mesh Networking: How Nodes Relay Data for Each OtherA mesh network lets nodes relay data for each other. How flooding and hop limits work, what mesh costs in latency, and when a simple star is better. LoRa and LoRaWAN: The Physics of Long Range, Low Power RadioLoRa is the radio, LoRaWAN is the network. Real link budgets, airtimes, the Indian 865 to 867 MHz band and the sensors you can send over it.

Try the full simulator with your class

103 guided circuit projects, 21 lessons and an in-browser Arduino simulator. The first 15 projects are free, no account needed. NCERT Science mapping on 47 projects, with Arabic and English copy in the regional builds.