This project is a single-endpoint Bluetooth intercom on an ESP32-WROOM-32 DevKit. It is designed to run on the fixed BOM in PROJECT_SPEC.md: stream music (A2DP), handle phone-call audio when HFP support is available in the toolchain, and use a breadboard-first wiring approach before any PCB design.
- Place ESP32, PAM8403 amplifier module, microphone module, and at least 1 speaker on breadboard(s)
- Wire shared power rails and verify no short between 3V3/5V/GND
- Wire ESP32 DAC output (
GPIO25) to PAM8403 analog input - Wire microphone analog output to
GPIO34 - Wire bond-clear tactile button to
GPIO33(active LOW) - Wire dual-color CC LED with one resistor per color channel (
GPIO18red,GPIO19green) - Verify PAM8403 output safety: no speaker terminal to GND, no tied L/R outputs
- Verify LiPo/USB power routing behavior before long tests
- Compile and flash
ESP32-intercom.ino - Confirm boot logs at
115200show no fatal startup errors - Confirm boot log reports output path status (
analog-okor blocked) - Confirm boot log reports HFP toolchain status (
okor blocked)
- Pair from phone Bluetooth settings
- Verify music playback and volume control
- Verify call mode behavior (if HFP supported)
- Verify disconnect/reconnect behavior without reboot
- Run 30-minute music stability test
- Run 15-minute call stability test (or mark blocked with evidence)
- Run at least 20 music<->call handovers
- ESP32-WROOM-32 DevKit LiPo (main controller)
- Electret microphone module with amplifier/AGC
- PAM8403 analog amplifier module
- 1-2 x 8 ohm / 0.5W speakers (start with 1)
- 1 x tactile switch (bond-clear)
- 1 x red/green 3-pin common-cathode LED
- 2 x current-limiting resistors for LED channels (typical: 220 ohm to 1 kohm)
- Breadboard(s) + jumper wires
- Optional: 1 slide switch for power/input experiments
GPIO25-> speaker analog signal output (DAC1) to PAM8403 inputGPIO34<- microphone analog outputGPIO33<- bond-clear button to GND (INPUT_PULLUP in firmware)GPIO18-> LED red channel (through resistor)GPIO19-> LED green channel (through resistor)3V3-> microphone module VCCGND-> common ground for ESP32, mic module, and PAM8403 input ground
- ESP32
GPIO25-> PAM8403INL(orINR) - ESP32
GND-> PAM8403 signalGND - ESP32
GPIO34<- microphone moduleOUT - ESP32
3V3-> microphone moduleVCC - ESP32
GND-> microphone moduleGND - ESP32
GPIO33-> one side of tactile switch - ESP32
GND-> opposite side of tactile switch - ESP32
GPIO18-> resistor -> LED red anode - ESP32
GPIO19-> resistor -> LED green anode - ESP32
GND-> LED common cathode - PAM8403
L+andL--> speaker #1 terminals - Optional second speaker: PAM8403
R+andR--> speaker #2 terminals
- Put ESP32 across the breadboard center gap so each pin row is isolated and accessible.
- Reserve one power rail for
GNDand one for logic power (3V3for mic/logic). - Place microphone module on the breadboard edge. Wire
VCC,GND, andOUTper pinout above. - Place tactile button so it bridges the center gap. Use diagonal continuity pair; wire to
GPIO33andGND. - Place dual-color common-cathode LED. Connect cathode to
GND. Add one resistor per color channel, then wire toGPIO18andGPIO19. - Place PAM8403 module. Connect signal input ground to ESP32 ground and connect ESP32
GPIO25to one analog input channel (INLrecommended). - Connect one speaker to one PAM8403 output pair (
L+/L-). If using two speakers, keep one speaker per channel only. - Power check before enabling audio: confirm no PAM8403 speaker negative terminal (
L-/R-) is tied to system ground. - Connect USB for programming and serial logs. Add LiPo only after confirming board power-path behavior.
- PAM8403 output is BTL/floating. Never connect
L-orR-to GND. - Do not tie left and right outputs together.
- Keep startup volume low; firmware clamps max volume but hardware checks are still required.
- For 8 ohm / 0.5W speakers, avoid sustained high output. Start short and quiet, then increase gradually.
- If VBAT sensing is not wired, low-battery protection remains blocked by design in this BOM-first build.
- Install board package
esp32 by Espressif Systems(2.x series). - Select board profile (
ESP32 Dev Moduleor matching devkit profile). - Open
ESP32-intercom.ino. - Select serial port and upload.
- Open Serial Monitor at
115200.
arduino-cli core update-index
arduino-cli core install esp32:esp32@2.0.17
arduino-cli compile --fqbn esp32:esp32:esp32 .
arduino-cli upload --fqbn esp32:esp32:esp32 -p /dev/ttyUSB0 .- Boot device and monitor serial at
115200. - Confirm startup reaches idle state and device becomes discoverable.
- Confirm logs include HFP status (
okorBLOCKED HFP-TOOLCHAIN). - Confirm logs include audio output path status for PAM8403 analog flow.
- Pair from phone Bluetooth settings.
- Start music playback and verify audible speaker output.
- Change phone volume in steps and confirm monotonic loudness changes.
- Pause/stop music and verify return to silent idle behavior.
- Place/answer a call while connected.
- Verify remote voice is heard on speaker.
- Verify your mic audio reaches the phone peer.
- End call and confirm transition back to music (if music still active) or idle.
- Music soak: run 30 minutes continuously; no crash/reset/stuck state.
- Call soak: run 15 minutes full-duplex (or record blocked status with logs if HFP unavailable).
- Handover run: perform at least 20 music<->call transitions without reboot.
- Disconnect test: force source disconnect in music and call; verify return to idle and reconnect-ready state.
- Reboot reconnect: run 5 reboot attempts and record reconnect success rate.
Use TEST_LOG_TEMPLATE.md for each run and capture:
- Date/time and source phone type
- Wiring/power preflight notes
- Pass/fail against ACC items
- Any blocked status (HFP toolchain or VBAT sensing)
- Wiring is repeatable on breadboard with no safety violations
- Pairing, music, and reconnect behavior verified on hardware
- Call behavior verified or explicitly blocked with evidence
- Long-session tests and handover counts are recorded in test logs
- No unresolved fatal startup/runtime errors in the mixed-use run