DIY Projects

Build a Touchless ESP32 Theremin With Capacitive Touch Sensing

Build a Touchless ESP32 Theremin With Capacitive Touch Sensing

Few instruments let you make music without laying a finger on them. The theremin, invented by Léon Theremin around 1920, does exactly that, and that quirk makes it a sharp teaching tool: it turns an invisible quantity, the distance between your hand and an antenna, into a note you can hear bend in real time. Maker [ericCycles] rebuilt this century-old idea on a single ESP32, and the result is cheap enough to sit on a school lab bench.

What the build does

Move one hand toward the pitch antenna and the note climbs; move the other toward the volume antenna and the sound swells or fades. There is almost no supporting circuitry, which is the whole point. A classic theremin needs tuned oscillators and coils; this version hands nearly every job to the microcontroller. The original notes live on the Hackaday write-up if you want to follow the build step by step.

How it works

The ESP32 carries ten capacitive touch channels (labeled T0 through T9), and the build repurposes two of them as proximity sensors instead of buttons. As your hand nears an antenna wired to a touch pin, the measured capacitance shifts, and the firmware maps that reading to pitch and volume. The chip then synthesizes a waveform and pushes it out through one of its two built-in 8-bit DAC pins (GPIO25 and GPIO26) to an external amplifier or powered speaker. Running at up to 240 MHz on 3.3V logic, the ESP32 has plenty of headroom to generate the audio and poll the sensors inside the same loop.

Build it yourself

You need an ESP32 dev board, two lengths of stiff wire or copper tape for the antennas, and a small speaker or amp. Solder or clip each antenna to a touch-capable GPIO, wire a DAC pin to your amplifier input, and share a common ground. Start on a breadboard so you can shift the antennas around, because hand range depends heavily on antenna length and how close your body sits to the board. One gotcha: touch readings drift with humidity and nearby metal, so add a short calibration step at boot that samples the no-hand baseline. From there, tweak the pitch mapping until the range feels playable and you can slide cleanly between notes.

Frequently Asked Questions

How does the ESP32 sense your hands without touching it?

It reuses two of its ten capacitive touch channels as proximity sensors. As your hand nears an antenna wired to a touch pin, the measured capacitance changes, and the firmware maps that value to pitch or volume.

What parts do I need to build this theremin?

An ESP32 dev board, two stiff wires or strips of copper tape for the antennas, and a small speaker or amplifier. The audio comes straight from the ESP32‘s built-in 8-bit DAC pin, so no extra sound module is required.

What will I learn if I build this?

You’ll get hands-on with capacitive sensing, reading analog-style values from GPIO, mapping sensor data to sound, and driving the ESP32‘s DAC. It’s a compact intro to how microcontrollers turn the physical world into signals, which carries straight over to thesis and capstone sensor projects.

This article was inspired by reporting from Hackaday. Find the parts and modules to build it at Circuitrocks.

// written by Ann Arandia

Ann Arandia covers community projects and maker events for the Circuitrocks blog. She writes about local workshops, kid-friendly electronics, and the Philippine maker scene — the people, the meet-ups, the projects that come out of them.