ESP32 S3 fails to communicate with HMMD mmwave sensor changing board wiring

I wanted to build a voice assistant with presence recognition using cheap Chinese components:

  • ESP32 S3 N16R8
  • MAX 98357
  • INMP441
  • HMMD mmWave
    I used a screw terminal breadboard to test the components one by one and a ‘production’ board soldered by me with JST XH connectors to build the final version. I tested successfully all components one by one but when I put all together the HMMD keep failing.
    This is the test code I’m using:
################################################################################
#  Test isolato - Radar LD2420 (HLK-LD2420)
#  Scopo: verificare comunicazione UART prima di integrare nel progetto finale
################################################################################

esphome:
  name: test-radar

esp32:
  board: esp32-s3-devkitc-1
  variant: esp32s3
  flash_size: 16MB
  framework:
    type: esp-idf

# Logging per vedere i byte grezzi sull'UART
logger:
  level: DEBUG
  hardware_uart: UART0
  baud_rate: 115200
  logs:
    uart: DEBUG
    uart.arduino_esp32: DEBUG
    ld2420: DEBUG

ota:
  - platform: esphome
    password: !secret ota_password

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  ap:
    ssid: "Test-Radar-Fallback"
    password: !secret ap_password

captive_portal:

# ------------------------------------------------------------------------------
# UART verso il radar
#   Prova PRIMA con questi pin, se non funziona INVERTI tx_pin/rx_pin
#   Prova anche baud_rate: 256000 se 115200 non funziona
# ------------------------------------------------------------------------------
uart:
  - id: uart_radar
    tx_pin: GPIO08
    rx_pin: GPIO18
    baud_rate: 115200
    rx_buffer_size: 1024
    debug:
      direction: BOTH
      dummy_receiver: false
      after:
        delimiter: "\n"
      sequence:
        - lambda: UARTDebug::log_hex(direction, bytes, ',');

ld2420:
  uart_id: uart_radar

binary_sensor:
  - platform: ld2420
    has_target:
      name: "Presenza Test"
      id: presenza_test

sensor:
  - platform: ld2420
    moving_distance:
      name: "Distanza Target Radar"
      unit_of_measurement: "cm"
      icon: "mdi:radar"

to make the board working I had to switch the GPIO terminals, therefore in the reality TX is connected to GPIO18 and RX to GPIO08. These are the boards I’m using:



I reproduced it too many times and I’m getting mad with it: once I transfer the esp32 to the production board it works if only the 2 connectors of HMMD are plugged, when I connect the JST of other components at a certain point I get this log:

INFO Starting log output from /dev/ttyACM0 with baud rate 115200
[18:35:51.979][D][uart_debug:113]: <<< 00,FD,FC,FB,FA,04,00,FF,00,02,00,04,03,02,01
[18:35:51.989][D][uart_debug:113]: >>> FD,FC,FB,FA,04,00,FF,00,02,00,04,03,02,01
[18:35:51.996][W][ld2420:577]: Command frame too short
[18:35:52.979][D][uart_debug:113]: <<< 00,FF,00,02,00,04,03,02,01
[18:35:52.991][D][uart_debug:113]: >>> FD,FC,FB,FA,04,00,FF,00,02,00,04,03,02,01
[18:35:52.998][W][ld2420:577]: Command frame too short
[18:35:53.986][E][ld2420:222]: Communication failed
[18:35:53.986][E][component:277]: ld2420 was marked as failed
[18:35:53.998][E][component:389]: ld2420 set Error flag: unspecified
[18:35:53.998][C][component:237]: Setup ld2420 took 3005ms
[18:35:53.998][C][wifi:645]: Starting
[18:35:54.045][D][wifi:1303]: Starting scan
[18:35:54.045][C][component:237]: Setup wifi took 60ms
[18:35:54.059][I][app:117]: setup() finished successfully!
[18:35:54.059][W][component:382]: wifi set Warning flag: scanning for networks
[18:35:54.059][D][uart_debug:113]: <<< 00,FF,00,02,00,04,03,02,01
[18:35:54.078][I][app:151]: ESPHome version 2026.6.2 compiled on 2026-09-20 11:08:03 +0200
[18:35:54.090][I][app:158]: ESP32 Chip: ESP32-S3 rev0.2, 2 core(s)
[18:35:54.090][C][logger:223]: Logger:
[18:35:54.090][C][logger:223]:   Max Level: DEBUG
[18:35:54.090][C][logger:223]:   Initial Level: DEBUG
[18:35:54.101][C][logger:230]:   Log Baud Rate: 115200
[18:35:54.101][C][logger:230]:   Hardware UART: UART0
[18:35:54.101][C][logger:239]:   Task Log Buffer Size: 768 bytes
[18:35:54.115][C][logger:245]:   Level for 'ld2420': DEBUG
[18:35:54.115][C][logger:245]:   Level for 'uart': DEBUG
[18:35:54.115][C][logger:245]:   Level for 'uart.arduino_esp32': DEBUG
[18:35:54.130][C][uart.idf:254]: UART Bus 1:
[18:35:54.130][C][uart.idf:152]:   TX Pin: GPIO8
[18:35:54.141][C][uart.idf:152]:   RX Pin: GPIO18
[18:35:54.141][C][uart.idf:259]:   RX Buffer Size: 1024
[18:35:54.141][C][uart.idf:259]:   RX Full Threshold: 114
[18:35:54.141][C][uart.idf:259]:   RX Timeout: 2
[18:35:54.154][C][uart.idf:268]:   Baud Rate: 115200 baud
[18:35:54.154][C][uart.idf:268]:   Data Bits: 8
[18:35:54.154][C][uart.idf:268]:   Parity: NONE
[18:35:54.154][C][uart.idf:268]:   Stop bits: 1
[18:35:54.154][C][uart.idf:268]:   Wake on data RX: ENABLED
[18:35:54.163][C][ld2420:190]: LD2420:
[18:35:54.163][C][ld2420:190]:   Firmware version:  v0.0.0
[18:35:54.163][W][ld2420:216]: Firmware version v0.0.0 and older supports Simple Mode only
[18:35:54.174][E][component:216]:   ld2420 is marked FAILED: unspecified
[18:35:54.174][C][ld2420.binary_sensor:010]: Binary Sensor:
[18:35:54.185][C][ld2420.binary_sensor:016]:   Presence 'Presenza Test'
[18:35:54.196][C][ld2420.binary_sensor:232]:     Device Class: 'occupancy'
[18:35:54.196][C][ld2420.sensor:010]: Sensor:
[18:35:54.196][C][ld2420.sensor:017]:   Distance 'Distanza Target Radar'
[18:35:54.207][C][ld2420.sensor:017]:     State Class: 'measurement'
[18:35:54.207][C][ld2420.sensor:017]:     Unit of Measurement: 'cm'
[18:35:54.207][C][ld2420.sensor:017]:     Accuracy Decimals: 0
[18:35:54.214][C][ld2420.sensor:232]:     Device Class: 'distance'
[18:35:54.214][C][ld2420.sensor:223]:     Icon: 'mdi:radar'
[18:35:54.219][C][captive_portal:133]: Captive Portal:
[18:35:54.238][C][wifi:1531]: WiFi:
[18:35:54.238][C][wifi:1531]:   Local MAC: 28:84:85:46:4B:7C
[18:35:54.238][C][wifi:1531]:   Connected: NO
[18:35:54.258][C][esphome.ota:097]: Over-The-Air updates:
[18:35:54.258][C][esphome.ota:097]:   Address: test-radar.local:3232
[18:35:54.258][C][esphome.ota:097]:   Version: 2
[18:35:54.260][C][esphome.ota:104]:   Password configured
[18:35:54.275][C][safe_mode:058]: Safe Mode:
[18:35:54.275][C][safe_mode:058]:   Successful after: 60s
[18:35:54.275][C][safe_mode:058]:   Invoke after: 10 attempts
[18:35:54.275][C][safe_mode:058]:   Duration: 300s
[18:35:54.286][C][safe_mode:079]:   Bootloader rollback: support unknown
[18:35:54.286][W][safe_mode:085]: Last reset too quick; invoke in 7 restarts
[18:35:54.290][C][web_server.ota:256]: Web Server OTA
[18:35:54.302][C][mdns:230]: mDNS:
[18:35:54.302][C][mdns:230]:   Hostname: test-radar

after that no matter what I do the same error keep appearing until I move back the ESP32 and the HMMD to the test board, at that point the communication starts flowing and the cycle repeats again.
Since I’ve few of them I tried to change the ESP32 and the HMMD, I even build a new production board from scratch but everything repeats the same. It looks like is someting related to calble disturbances or something similar, I changed the cable position and shape trying to keep them far from each other as much as possible without success.
Anyone has a clue of what I’m hitting against?

There’s no way to understand what you mean. Problem is related to other boards or not?
Can you present the simplest circuit that does not work.

Bad soldering perhaps?

Your production one looks like it has an extra blue wire on the mmWave module, what does that pin do and is it picking up interference?

From the bomb squad manual:

It’s always the blue wire,

:wink:

@EBME2 the first picture is the test board with screwed connections, the one that is working. There is a fifth cable because I used a precrimped JST connector and I left the fifth not connected just for test purposes, and works perfectly.

@Karosm here is a graphic representation of the project:


I recap what happens:

  1. I connect the HMMD and esp32 to the test board with screw terminals (red cables only), the sensor works like a charm
  2. I connect the sensor and the esp32 to the production table with soldered JST connectors. Only red cables are connected and the sensor keep working.
  3. When I connect the other green and blue cables, MAX98357 and INMP441 are still not connected, the sensor gives error. After that even if I remove again the green and blue cables the error persists.
  4. If I move back the components to the test board the sensor starts working again.

Since I suspected that the cause was a bad soldering I soldered a new board from scratch using new components but the problem starts appearing again.

It’s like a wizard trick, I cannot understand what is going on.

This sounds weird. You mean removing g/b cables and reboot doesn’t bring it back to life?
Did you try your test board with g/b cables connected?

Talking to an AI I got the suggestion that could be a good idea try changing the TX/RX pin, so I gave a try using GPIO04 and GPIO05 instead of 8 and 18.
The result was even worse, now the error appears immediately even without other cables connected, while it keep working with the test board. It looks like there is something peculiar in the board build by me, but since it is already the second that fails I’m not sure whether soldering a third one will be the solution.
Since I bought also some ESP32 C3 mini I think I may separate the HMMD on a different device.
Remains the question of what is making this failing, if someone has a clue or may suggest debugging method will be welcome.

Careful inspection with magnifying glass would be first step. If you find cold joints or other imperfections, you can re-solder those.

Also, verify your 3.3V voltage with DMM.