Waveform Generator Design with ESP32


To keep the bill-of-materials as small as possible, there are two common approaches:
  1. Use the ESP32-S2/S3’s built-in 8-bit DAC channels, plus a simple RC reconstruction filter (and optionally an op-amp buffer).
  2. Add a tiny external SPI DAC (e.g. a 12-bit MCP4921), decoupling caps and a single RC filter (no extra buffer required).
Which would you like to pursue?
  • “Built-in DAC” for the absolute minimum part-count (8-bit resolution)
  • “External DAC” for higher fidelity (12-bit+) with only a handful more parts
external DAC
Here’s a minimal parts list to pair an external 12-bit SPI DAC with your ESP32 for sine/saw/tri/square/multi-sine generation:

Table


RefQtyPartNotes
U11MCP4921-E/SN12-bit SPI DAC, SOIC-8
C11100nF0603VDD decoupling (X7R, 50 V)
C21GRM21BR61H106KE43LVDD bulk decoupling, 10 µF 0805 (X5R, 50 V)
R11RK73H1JTTD1002F10 kΩ 0603, 1% — DAC output filter resistor
C31100nF0603Output filter cap (together with R1)
Next, we need to place the ESP32 itself. Which variant do you prefer?
  • ESP32-S2 or ESP32-S3?
  • Do you want to use a pre-mounted module (e.g. WROOM/WROVER) or the bare QFN chip?
ESP32-S3 module
ESP32-S3 bare chip
ESP32-S2 module
ESP32-S2 bare chip

Schematic of DoverCheck/PS2_Both_Side 5zCC
U1
PS2_Barcode_IN_Clock
QSPI_SD3
QSPI_SCLK
+3V3
PS2_Barcode_IN_Data
QSPI_SD1
QSPI_SD2
PS2_POS_OUT_Data
QSPI_SD0
PS2_POS_OUT_Clock
QSPI_SS
R3
Resistance
27.4 Ω
R1
Resistance
10kΩ

DoverCheck/PS2_Both_Side 5zCC