A nightstand noise generator based on M5Stack Atom Echo and integrating with Home Assistant
Atom Echo (C008-C / "Atom Voice") Pin Map#
Speaker + Microphone#
| ESP32 Pin | Component | Function |
|---|---|---|
| G22 | NS4168 amp | I2S DATA |
| G19 | NS4168 amp | I2S BCLK |
| G33 | NS4168 amp | I2S LRCK |
| G23 | SPM1423 mic | PDM CLK |
| G33 | SPM1423 mic | PDM DATA |
Note: G33 is shared between the amp's LRCK and the mic's DATA line — this is why the stock firmware can't record and play simultaneously (confirmed in community docs). Not a problem for our use case (output only), but something to remember if the design ever wants local wake-word.
Human interface#
| ESP32 Pin | Component | Function |
|---|---|---|
| G27 | SK6812 RGB LED | Data |
| G39 | Button | Input (input-only pin) |
GROVE connector (HY2.0-4P)#
| Pin | Color | Signal |
|---|---|---|
| 1 | Black | GND |
| 2 | Red | 5V |
| 3 | Yellow | G26 |
| 4 | White | G32 |
Reserved pins — do not reuse#
From the M5Stack docs (pinmap section):
"G19 / G22 / G23 / G33 have been predefined. Do not reuse these pins; otherwise the Atom Echo may be damaged."
Available for external hardware#
- GROVE: G26, G32 (plus 5V / GND)
- Button G39 is reusable if we want a different button function
Key takeaways for this project#
- I2S output for our external DAC: route to free pins (G26/G32 on GROVE, plus one more — likely borrowed from the side header) rather than the reserved G19/G22/G33. This avoids driving the NS4168 entirely. See disabling-internal-speaker.md.
- NS4168 shutdown: not needed — just don't send it I2S data (software-only solution in ESPHome, no hardware mod).
- Button on G39 is our "start/stop bedtime routine" trigger.
- RGB LED on G27 is a nice status indicator (idle / playing / HA unreachable / etc.)
- GROVE G26/G32 can be used for I2S out to the external DAC, or repurposed for a secondary input.
Sources#
- Atom Echo product docs (M5Stack) — pin map table, reserved-pin warning
- ESP32-PICO-D4 datasheet — for confirming GPIO capabilities (input-only pins, drive strength, etc.)