One Bit, One Pin

Hackaday's smallest internet radio pairs an ESP32-C3 board with a small DAC board, and the post wonders whether the DAC could go: "the ESP has a built-in DAC that's not intended for audio but can be used". The ESP32-C3 doesn't have one. It can still make sound with a single pin, though, by sending a fast stream of ones and zeros through a resistor and capacitor. Here that stream is built and played back.

the pin, 0 or 1the wanted soundafter the RC filter

The modulator is a first-order sigma-delta. At each tick it outputs 1 if the running total of (wanted value minus what it has already put out) is above zero, otherwise 0. "Bits per audio sample" is the oversampling ratio over a 48 kHz audio rate, so 64 means about 3.1 million pin changes a second. The filter is one resistor and one capacitor. "Raw bits" samples the stream at 48 kHz with no filter at all. It aliases badly, and the hiss is the high-frequency energy the RC filter exists to remove.

The DAC that isn't there

Wikipedia's table of ESP32 variants gives a DAC, "2 × 8-bit", to the original ESP32 and the ESP32-S2 only; every later variant, the C3 included, has "No". Espressif's ESP32-C3 datasheet never uses the word: its analog section lists two 12-bit ADCs and a temperature sensor. It does list PDM among the formats its I2S interface supports, which is the one-pin route shown above. Whether that suits this radio is a question for the Technical Reference Manual, which I have not read.

What stands on what

ItemSource
The radio, the DAC board, the quoted sentenceHackaday, "Is This The Smallest Internet Radio?", 2 October 2026
DAC by variantWikipedia, ESP32, "ESP32 family" table
C3 analog features; I2S formats including PDMEspressif, ESP32-C3 Series Datasheet v2.4, pp. 4 and 47
The modulator, filter and soundsMine, computed in the page's script

← back to the night