Matt Made It Work

Personal project

ESP32 Signal Generator

A handheld ESP32 tone generator for testing audio circuits. One knob lets me change the signal while I watch the oscilloscope.

Project log

The two sides of the tone generator

On the front there’s a knob and a little display, both on a board I reused from MeatReader, my BBQ thermometer. From this side, you’d hardly know there was an ESP32 behind them.

The controls before I sealed the generator in epoxy. The rotary encoder sits beside the display.

Turn it over and you can follow the wiring from the development board to the RCA jack. The ESP32’s analog output has a DC offset. I wired a capacitor in series with the jack so the changing part of the signal reaches the filter under test and the DC stays on the generator side.

Jumper wires cross the ESP32 on the back of the board. The output components are soldered at the RCA jack.

I wanted a bass tone ready as soon as I plugged it in, so it starts at 30 Hz. That’s in the middle of the work I built it for, even though the higher ranges go all the way up to 20 kHz.

Three waveforms, one knob

When I’m testing the filter, I want to watch what happens on the scope while I turn the frequency down. A knob makes that easy. I had an encoder and a little display from an earlier build, so they became the front of this generator.

A side view before I sealed the generator in epoxy. The knob sits above the board, with the output jack on the left.

Turning the knob changes the frequency. Pressing it lets me choose smaller steps when I want a closer look, or larger ones when I’m moving around. Two presses change the waveform, and holding it down moves to another frequency range.

There’s a little timing detail behind those clicks. The firmware waits 300 milliseconds before deciding a press was a single click. That gives me time to press again for a different waveform without accidentally changing the step size too.

Each range also remembers where I left it until I turn the power off. If I wander up into the higher frequencies, I can come back to the bass range and pick up the tone I was testing.