Documentation
Onboarding
Getting Started
Power & Battery
Hardware & Components
Build & Assembly
Radio & RF Design
Frequencies & Regulations
Firmware & Software
USB & Connectivity
GPS & Navigation
Morse & Communication
Modes & Operation
Field Operations & Rescue
Building Effectively
Build Variants
Project & Reference
Docs Hardware & Components Audio Alert System

Audio Alert System

Edit on GitHub

DAC1 output stage, tone mapping per signal class, Morse click stream and volume control

Audio Alert System

Overview

Audio is generated on the ESP32 native DAC1 (GPIO 25) with an LEDC PWM carrier, giving much cleaner output than the PWM-only approach used on the v4.0 ESP32-C3 board. The same output drives the Morse click stream in BEACON mode and the metal-detector style pitch sweep in SEARCH mode.

Output Stage

ParameterValueNotes
Output pinGPIO 25Native DAC1 (DAC_CHANNEL_1)
PWM carrier frequency40,000 HzLEDC channel 0, above hearing range
PWM resolution8-bit0-255 duty cycle
Default volume180~70%, range 0-255
Silence mid-rail parkingdacWrite(128)1.65 V, eliminates click transients
Series resistor100 ohmR2
AC-coupling capacitor10 uFC3, blocks DC bias from headphones
Compatible headphones16-600 ohmStandard 3.5mm wired
Connector3.5mm TRRSTip=audio, Ring1=Tip (mono), Sleeve=GND

Signal path: GPIO 25 (DAC1) -> 100 ohm series R -> 10 uF AC-coupling cap -> 3.5mm jack TIP

Note

The DAC is parked at mid-rail (128) during silence instead of being driven to 0. This removes the audible DC-click transient you would otherwise hear through headphones at every tone boundary.

Tone Frequencies

ConditionFrequencyPattern
No signal (RSSI below threshold)-Silence (DAC parked at 1.65 V)
Weak signal (threshold to -80 dBm)440 HzRising-pitch start
Medium signal (-80 to -60 dBm)~880 HzHigher pitch
Strong signal (-60 dBm or higher)up to 2200 HzContinuous
Pitch mapping440-2200 HzLinear interpolation with RSSI
Morse TX (BEACON mode)600 HzClick stream, synchronized with TX
EMERGENCY mode1760 HzContinuous tone

The SEARCH audio works like a metal detector: as the RSSI rises the pitch climbs continuously, letting a rescuer home in on the strongest signal by ear without looking at the display.

Volume Control

  • Range: 0-255, default 180 (~70%).
  • Live adjustment: SW_UP / SW_DN when VOL is the selected target, step +-10 per press.
  • Persistence: hold SW_SEL for at least 1 second to save the current volume and WPM to NVS.
  • Master enable: aen NVS key toggles the whole audio subsystem.
KeyTypeDefaultMeaning
avoluint8180DAC volume (0-255)
aenbooltrueMaster audio enable
potenboolfalseAllow SW_UP/DN volume adjust

Troubleshooting

SymptomLikely causeFix
No audio at allWrong pin or aen disabledVerify GPIO 25 wiring and the NVS toggle
Quiet or distorted outputMissing AC-coupling capCheck C3 (10 uF) orientation and value
Click at tone boundariesDAC not parking at 128Confirm firmware calls audioDacSilence()
Headphones buzzGround loop via USBDisconnect USB and run from battery only