All packs

Sound

Mini speaker

A small speaker with a real amplifier that plays tunes. One button plays or stops, two change the volume, and a ring of light shows the level.

  • Hard
  • about 80 min
  • ESP32-S3
  • 8 parts
  • 14 wires
  • 109 lines of code

ESP32 packs are built on real parts: the simulator runs Arduino Uno circuits only.

Idea

A buzzer can only click on and off. Here the board calculates the shape of the sound wave, 16,000 points every second, and sends it as numbers to the amplifier. That is how all digital audio works.

What you learn

Digital audio over I2S, making a tone from a sine wave, and volume as a multiplier.

How it works

  1. input

    PLAY button

    QUIETER button

    LOUDER button

  2. decides

    ESP32-S3

  3. output

    Amplifier + speaker

    LED ring

Powered with 5 V through the board's USB-C port.

A reference design. The sketch is compiled with the real ESP32 toolchain, and its pins are checked against the wiring table automatically. It has not yet been built and tested on real parts by us, so wire it on the bench and run the checks before you build it into a case. Real modules vary: follow the labels printed on yours, not their position in the picture.