E

ESP32

A cheap, tiny chip with Wi-Fi and Bluetooth built in: the brain inside countless smart-home gadgets, sensors and DIY AI voice assistants.

6 chapters1 tutorialsOfficial site

01 · Introduction

What ESP32 is

ESP32 is a family of small chips made by Espressif, a company in Shanghai. One chip costs a few dollars and already has Wi-Fi and Bluetooth inside.

It is a microcontroller: a tiny computer that runs one program, all the time, from the moment it gets power. It has no screen, no desktop and no app store. You write a program on your laptop, copy it onto the chip (this is called flashing), and the chip runs it.

You rarely buy the bare chip. You buy a development board: a small circuit board with the ESP32, a USB port for power and flashing, and pins for wiring up parts such as a microphone, a speaker, a screen, buttons or sensors.

Three words you will see:

  • Firmware: the program that runs on the chip.
  • Flashing: writing firmware onto the chip over USB.
  • ESP32-S3, ESP32-C3, ...: different models in the family. The S3 is the common choice for voice projects because it has more memory and handles audio well.

02 · When to use it

When you would use one

  • An AI voice assistant you build yourself. A board with a microphone and a speaker records what you say, sends it to a server over Wi-Fi, and plays back the answer. Xiaozhi AI is exactly this.
  • Sensors at home. Temperature, humidity, door open or closed, plant soil moisture, reported over Wi-Fi to something like Home Assistant.
  • Switches and lights. Many smart plugs and bulbs on the market have an ESP32-family chip inside.
  • Learning hardware. It is cheap enough that breaking one does not matter.

It is not a replacement for a Raspberry Pi or a PC. It cannot run a large language model itself. In AI projects the ESP32 does the listening and speaking, and a server or a cloud service does the thinking.

03 · Setup

What you need to get started

  1. A development board. For voice projects pick one that already has a microphone, a speaker and ideally a small screen on board, so there is no wiring. Search for "ESP32-S3 AI voice board" or the board list of the project you want to run.
  2. A USB data cable. Some cheap cables only carry power. If the computer does not see the board, try another cable first.
  3. A way to flash it. Ready-made projects often offer a web flasher: open a page in Chrome or Edge, plug in the board, click a button. No software to install.
  4. Your own code (optional). To write your own firmware, install ESP-IDF (Espressif's official toolkit) or the Arduino IDE with ESP32 support.

The first time you flash, the board may need to be put into download mode: hold the BOOT button, press and release RESET, then release BOOT.

04 · How to use it

Day-to-day use

Once flashed, an ESP32 just runs. Plug it into power and it starts the firmware.

  • Connecting to Wi-Fi. Most projects open a temporary Wi-Fi hotspot the first time. Join it from your phone and type in your home Wi-Fi name and password.
  • Updating. Many projects update over Wi-Fi by themselves (OTA, over-the-air). Otherwise you flash the new version over USB again.
  • Seeing what it is doing. Connect it over USB and open a serial monitor (the web flasher, ESP-IDF and Arduino all have one). The chip prints its log lines there. This is the first place to look when something is wrong.

05 · Pitfalls

Things to watch out for

  • Models are not interchangeable. Firmware built for an ESP32-S3 board will not run on an ESP32-C3. Flash the build made for your exact board.
  • 2.4 GHz Wi-Fi only. Most ESP32 chips cannot see 5 GHz networks. If your router hides the 2.4 GHz band, the board will not connect.
  • Power matters. Speakers and screens draw current. A weak USB port or a long thin cable can cause random restarts.
  • Small memory. A few hundred KB of RAM, sometimes plus a few MB of PSRAM. That is why the AI part runs elsewhere.

06 · Resources

Links

My notes

Sign in to keep private notes on this handbook.Sign in