Detect and Track Humans with mmWave Radar on an Arduino

Hello forum goers, got another guide for you all.

mmWave radar sensors are becoming incredibly accessible. Modules like the one we look at in the guide (Rd-03D) have a mind-blowing amount of signal processing going on under the hood. This can do things like detect a 0.3 Picosecond difference in signal return to determine the angle of a target and use the micro-doppler shifts of your breathing to only detect humans (and maybe animals but we didn’t test it). It’s a wickedly cool and inexpensive sensor to add to your project or just play around with so check it out: “Detect and Track Humans with mmWave Radar on an Arduino”



In this guide, we are going to be learning how to use the Rd-03D radar sensor to detect and track humans in your next Arduino project. We will be looking at how it works and what you can expect from it, how to wire up and code your Arduino to interf…

Read more

3 Likes

Hi Jarryd

Great Guide! Thankyou so much for doing all of the heavy lifting on this one :smiling_face_with_sunglasses:.
I was just wondering if there would eventually be a guide using Micropython on the Raspbery Pi Pico with its’ dedicated 2nd UART interface??

cheers Bruce

3 Likes

Hey @Bruce288839,

We are working on it right now and if all goes to plan it will be out Wednesday. It will hopefully have a few more bells and whistles with multi-target tracking!

3 Likes

looking good! the video after yours was show casing how effective it is with at least 3 people also and runing it in home assistant. I suck at any sort of code “learning as i go” however, have you guys made any code for ESPhome at all? Ive currently used the LD2410c and honestly from my testing they are not the best, and very particular use case, this Rd-03D seems more promising =)

1 Like

Hi @Paul283026

Welcome to the forum!

We haven’t tested this sensor with ESPHome as of yet, currently the specific chipset that runs this sensor isn’t supported natively by ESPHome yet, but being that its a UART based sensor it does make it a little easier to get working.

Using an LLM like ChatGPT is a great way to get an idea of the code that would be needed to get things like this working.

1 Like

Hi Paul,

To add on to Dan’s response, the library decodes a bytes object rather than a somewhat-human-readable like NMEA from GPS.

I’ve got this planned for a project at home, but a second microcontroller would run the sensor interface, and output the required information in though UART like Dan said.
I haven’t delved too deep into the workings of this configuration but it should be possible (and a lot easier) with a second micro: UART Bus — ESPHome

When getting them onto the website they were the best-in-class sensor so should be a step up!

Liam

Hello. We want to implement this sensor in a nursing home to help monitor the movement of our residents and detect if they get up, sit up in bed, walk, and fall. We currently use PIR motion sensors, but I’m investigating this possibility to see if it provides us with more information and we can better care for our seniors.
If you think this project might be interesting, I encourage you to help me with the code so I can implement it with an ESp32. I suppose the ceiling would be a good place to place the sensor and capture two residents at the same time. We would greatly appreciate any support and assistance (by the way, I’m writing from Spain…)

Hi @JOSEIGNACIO296093

Welcome to the forum!

You should be able to use this sensor for that, I would though recommend having it mounted on the wall rather than the roof, as the sensor can only detect a body in 2 axis (X and Y) having it on the roof would give you top down view, having it on the wall will give you a side on view which you should be able to program the microcontroller to detect if a body has gone from being upright to not more accurately.

1 Like

Hi all,

Just leaving this here in case someone else runs into the same issue. I bought the RD-03D radar sensor from AI-Thinker (this one:
https://it.aliexpress.com/item/1005006240221601.html)

and tested a library shared here

Despite compiling and running without errors, the library doesn’t read anything. The sensor is definitely sending data—I confirmed it by reading the raw serial output—but the code fails to recognize or parse the packets. No target is ever detected, and nothing useful comes through.

It’s not a problem with the wiring or the baud rate. The sensor is active, but the parsing logic in the library just doesn’t match the actual structure of the data.

Here’s what I see in the raw serial output:

CopyEdit

0xAD 0xFF 0x03 0x00 0x52 0x00 0x4D 0xE0 0x84 0x80 0x6C 0x00 0x00 0x00 0x80 0x00 ...
0xAD 0xFF 0x03 0x00 0x4D 0x00 0x4E 0xC0 0x80 0x00 0x6C 0x00 0x00 0x00 0x00 0x00 ...

As you can see, the packets consistently begin with 0xAD 0xFF 0x03 0x00, not 0xAA 0xFF or any other header assumed by the library.

So if you have my same model and wondering why the sensor appears dead or unresponsive in your code, it’s most likely because the parsing logic is completely misaligned with the actual data format.

Is that correct or I’m missing something?

Nader

EDIT:

The problem is SoftwareSerial that in my case is not supporting the baudrate. Using arduino mega with serial1 it seems that the data is now consitent. I managed to print something, but the data is bulky the distance measurement keep jumping from the correct-ish position, to a nan value, something that is not happening in the example video.

X (mm): 285

Y (mm): 1741

Distance (mm): 179.20

Angle (degrees): 9.30

Speed (cm/s): 0.00


X (mm): 277

Y (mm): 1720

Distance (mm): 143.08

Angle (degrees): 9.15

Speed (cm/s): 0.00


X (mm): 271

Y (mm): 1706

Distance (mm): nan

Hey @Nader297638,

Thanks for letting us know! I just plugged in one I have here and it reads:

0xAA 0xFF 0x03 0x00....

I just want to confirm that after using the hardware serial it is outputting this header? These might be slightly different boards if it isn’t (our boards have a G502 model number, and that link has G331, directly under the AI Thinker logo on it).

There have been a lot of changes with Arduino serial in recent boards and we are using software serial to ensure compatibility across all of them. Hardware serial like you are doing would be the better option as it ensures a full message is read. However, we found that software serial was still fast enough to read the first half of the message which is where the tracking info for target 1 is. This board supports multi-target tracking but we found it to introduce issues and left it at single-target. Although only a partial message is read, the library was written to handle it and extract the single-target data.

Cheers!

1 Like

Hi, I purchased my Rd-03D board through Core Electronics. The model is G520. The same issue is occurring for the G520.

The code compiles and uploads OK.

However, no reading is transmitted.

The Serial Monitor reads

Radar Sensor Started

Could you confirm the library works for the G520? thanks Luke

Those who are planning to work with mmWave, here is another good project for you. This compact, low-cost multifunctional sensor integrates presence detection (via an mmWave radar), light level sensing, and temperature monitoring onto a Wemos D1 mini board, with a small 2-layer PCB (37 × 44 mm) designed for easy connection via USB or JST. Built using components like the HLK-LD2410C radar, BH1750 light sensor (with a 4.7 kΩ resistor for calibration), and a DS18B20 temperature probe, it’s programmed in ESPHome and integrates seamlessly with Home Assistant for automating lights and even ceiling fans (via RF control). Everything fits into a 3D-printed corner-mountable case, and the design leaves GPIO pins accessible for future expansion. D1 mini MMwave multisensor - Share Project - PCBWay