ESP32 Projects

C4001 mmWave Presence Sensor – Human Detection Up to 25 meter with ESP32/Arduino

Last Updated on November 8, 2025 by Engr. Shahzada Fahad

Description:

C4001 mmWave Presence Sensor – Human Detection Up to 25 meters with ESP32/Arduino- So far, out of all the mmWave sensors I have tested, this one has the longest detection range. Just imagine, it can detect a human target up to 25 meters away. This is the DFRobot C4001 mmWave Presence Sensor, the 25-meter version.

Long-range human detection setup with C4001 mmWave presence sensor and esp32 Arduino.




Now, if you do not need such a long detection distance, the 12-meter version of this same sensor is also incredibly impressive. I have already tested this model in a full dedicated video and article. It works with I2C and UART, supports Arduino, ESP32, ESP8266, Raspberry Pi, and it can detect human presence up to 8 meters and motion up to 12 meters. In that article, I demonstrated smart home automation, speed and distance detection, Blynk monitoring, performance under a ceiling fan, and even detection through Hardboard sheets, glass, curtains, and doors.

C4001 mmWave presence sensor 12m and 25m range versions side by side.

Anyway, both sensors look completely different in design, size, and construction. The 12-meter version supports both I2C and UART, while the 25-meter version supports UART only.

The number of transmitting and receiving antennas is also different in both versions. The 25-meter model has more antennas, which means a stronger signal, better sensitivity, and a much longer detection range. More antennas allow it to pick up weaker reflections from distant targets, especially humans, even when the movement is minimal. This is one of the key reasons why the 25-meter version can outperform the 12-meter version so easily.

Their working principle is the same, and both sensors use the same library. I have already explained the library installation process in the 12-meter version article.



Both sensors are capable of monitoring:

  • Number of targets
  • Target speed
  • Target distance
  • Target energy

Programming is also around 70 to 80 percent similar, although the 25-meter version has a few small differences that I will show you shortly.

To get the best performance and avoid false triggering, make sure to install the sensor away from WiFi routers and metal surfaces.

Let me tell you there is a big difference between human presence detection and human motion detection. To make this clear, let me walk you through some of the key features of this sensor.

Features:

The C4001 mmWave Presence Sensor offers serious performance for both indoor and outdoor applications.

It can detect human presence up to 16 meters and track motion as far as 25 meters.

It also supports distance measurement from 1.2 meters all the way up to 25 meters and can detect movement speeds between 0.1 and 10 meters per second.

Thanks to its strong anti-interference capability, it continues working reliably even in snow, haze, high or low temperatures, humidity, dust, bright light, or noisy environments. It supports both high and low-level I/O control signals, as well as full serial communication for advanced functions.

Traditional PIR sensors fail when a person stops moving, which leads to lights turning off while someone is still in the room. The C4001 mmWave radar solves this problem. It can detect subtle human presence even when the person is completely still. This means truly smart automation that feels seamless and never relies on you moving just to keep the lights on. We will practically test this.

Comparison of C4001 mmWave presence sensor and PIR sensor side by side.

This comparison really tells the story. PIR sensors are blind to still people, they cannot measure distance or speed, they cannot see through obstacles, and they are easily affected by heat or air movement. The C4001 mmWave radar checks every box where PIR fails.

It detects static humans, provides distance and velocity, works through materials like glass and acrylic, and delivers rock-solid stability even in tough environments. Now the key test: the 12-meter version didn’t detect anything behind drywall. That’s why I am really excited to try the 25-meter model.

Here are the technical specifications. You can pause the video and take your time to read through them.



Specification

Operating Voltage: 3.3V / 5V

Operating Frequency: 24GHz

Modulation Mode: FMCW

Maximum Motion Detection Range: 25m

Human Presence Detection Range: 16m

Distance Measurement Range: 1.2m to 25m

Velocity Measurement Range: 0.1 m/s to 10 m/s

Beam Angle: 100° x 40°

Communication: I/O, UART

Default Baud Rate: 9600

Operating Temperature: -40℃ to 85℃

Dimensions: 26mm x 30mm

Characteristics

Human detection: Detection range up to 16 meters and motion detection range up to 25 meters.

Distance detection: Range from 1.2 meters to 25 meters.

Velocity detection: Range from 0.1 meters per second to 10 meters per second.

Strong anti-interference capability, unaffected by snow, haze, temperature, humidity, dust, light, noise, etc.

High and low level output control through I/O ports.

Input and output control via serial port.

Small size, easy to integrate.



C4001 mmWave Sensor Pinout:

Detailed pinout guide for the C4001 mmWave presence sensor long-range model

Let’s quickly take a look at the interface pins. The sensor has a very simple pin layout.

  1. VIN is used to power the module and you can use either 3.3V or 5V.
  2. GND is ground.
  3. Then we have RX and
  4. TX which are used for UART communication with microcontrollers like Arduino or ESP32. Finally, there is an
  5. OUT pin that provides a voltage output. You can directly use this output to control LEDs, buzzers, relays, or trigger automation even without writing a single line of code. This gives you the flexibility to use the sensor in both microcontroller-based and standalone systems.

Amazon Links:

C4001 mmWave Sensor 12 meters version

C4001 mmWave Sensor 25 meter Version

C4001 mmWave Sensor Product Official Page

Other Tools and Components:

ESP32 WiFi + Bluetooth Module (Recommended)

Arduino Nano USB C type (Recommended)

*Please Note: These are affiliate links. I may make a commission if you buy the components through these links. I would appreciate your support in this way!




C4001 mmWave Sensor Interfacing with the ESP32:

ESP32 hardware wiring diagram for C4001 mmWave presence sensor.

Connect the VIN and GND pins to the ESP32 3.3V and GND. Then connect the TX and RX pins to the ESP32 Serial1 interface, which uses GPIO 16 for RX and GPIO 17 for TX. That’s all you need for hardware connections.

Now let’s move on to the programming and see how we can read distance, motion, and presence data from this powerful radar sensor.

C4001 mmWave 25m Version Programming:

Programming C4001 mmWave presence sensor with ESP32 example code.

As you can see here, I have two programs opened. Which one you upload depends entirely on your use case. With the 12-meter version, one program was enough for everything. With the 25-meter version, you need to choose.

If you want accurate distance measurement and speed detection, then upload the code you can see on the left side. It runs the radar in Speed Mode, which gives us real-time distance and velocity data.



Speed Mode Code:

Let’s go ahead and upload this program.

Long-range speed and movement analysis using C4001 mmWave presence sensor.

Right now, you can see all the values are zero because there is no one in front of the sensor.

C4001 mmWave presence sensor used for distance and velocity detection.

The moment I move into its detection zone, it will immediately start reporting the target count, speed, distance, and energy. This behavior is similar to what we saw with the 12-meter version, and I have already explained these parameters in detail in that article.

In Speed Mode, the radar does more than just detect presence. It can also measure the distance and speed of a moving target. This mode is useful when you want motion tracking with actual range data in centimeters or meters. The target must be moving for the radar to calculate speed and distance, so it is not ideal for detecting someone standing still.

Now let’s take a closer look at the other code.



Exist / Presence Mode Code:

If you want accurate motion detection up to 25 meters, then upload this code. It runs the radar in exist Mode. The  Exist / Presence mode, is excellent for far-distance detection, but this mode does NOT provide distance measurement. It only tells you whether motion exists in the monitored area.

In this mode, beating the C4001 mmWave sensor is almost impossible, because it can perfectly detect even completely still humans. I am going to take this test to an extreme level, so stay tuned; you definitely don’t want to miss this.

Anyway; to control false triggering, you can adjust the Trigger and Keep values based on your requirements. These values directly affect the radar sensor’s response time.

Trigger (trig)

This is the confirmation window. It defines how long motion must be continuously detected before the radar reports it as motion.

Unit: 0.01 seconds



In my setup:

trig = 100

100 × 0.01 s = 1.00 s

That means motion must remain valid for 1 second before the radar flips to “motion detected.”

If you increase this value, the radar will take longer to confirm the motion, which helps reduce false triggers or alarms.

Keep (hold time)

This is the timeout window. It defines how long the radar will continue reporting motion after motion actually stops.

Unit: 0.5 seconds

In my setup:

keep = 4

4 × 0.5 s = 2.0 s

So, after motion stops, the radar will still report motion for 2 seconds before clearing the status.

Relay Timing Logic to Avoid Unwanted Switching

To ensure smooth operation, I have also implemented a 5-second timer for the relay. Whenever motion is detected, the relay immediately turns ON for 5 seconds. If motion is detected again within those 5 seconds, the timer automatically resets.

This means the relay will never switch OFF as long as a person or any moving object remains in that detection area. The moment motion stops completely, only then the countdown will continue, and the relay will turn OFF after 5 seconds.

This smart timer approach prevents rapid ON/OFF switching of the relay, protects connected loads, and ensures reliable motion-based automation.

So, that’s all about the most important things. I have already uploaded the program and now let’s watch this in action.




Practical Demonstration:

For testing purposes, I have placed the sensor on the table. Although it works perfectly fine for demos, the best performance comes when you install it at the recommended mounting height, which is about 1.2 to 1.8 meters above the floor. This height allows the radar waves to properly detect human presence and motion in a realistic environment.

C4001 mmWave presence sensor detecting human movement at long distance.

I want you to see a real, practical demo. So I connected a bulb to the relay. Whenever the sensor detects someone, the bulb will turn on. Think of it as if the sensor is installed in your hallway, kitchen, bathroom, or lawn. Let’s start the testing and see how smart this sensor really is.



Range test:

Right now, you can see I am very far away from the sensor, and since I am standing completely still behind this pillar, it is not detecting me. This is the maximum distance where I can practically test this sensor. Anyway, now I am going to step in front of the sensor and let’s see if the bulb turns ON.

Outdoor range test for the C4001 mmWave presence sensor long-range model.

This is mind-blowing. Detecting human motion from such a long distance is seriously incredible. This is the highest detection range I have ever witnessed from any sensor. Range test successfully passed.



Limiting the Range:

In this mode; we have full control over the maximum detection range. We can set it to whatever we want.

Adjusting detection range settings on C4001 mmWave presence sensor.

For example, if I don’t want the bulb to turn ON when there’s movement outside the room; as you can see, the light is still ON because right now the maximum detection range is set to its maximum value which is 25 meters; simply open the program, change the max value, and re-upload it. That’s it.

How to set the longest sensing range of the C4001 mmWave presence sensor.

Now, as you can see, after setting the range, the light doesn’t turn ON even though I am moving in front of the sensor. It only turns ON when I enter its detection area.

Successfully calibrated range on the C4001 mmWave presence sensor 25m model.

This is absolutely mind-blowing. As long as I stay in this area, the light will remain ON.

Once I step out, the light will automatically turn OFF.



Still Human Detection Test:

Now it is time for the real presence test. I will remain completely still. This will prove whether this is actually a human presence sensor or not. I will fast-forward the video a little. “Watch video tutorial given at the end of this article”.

C4001 mmWave presence sensor identifying non-moving humans

As you can see, I have been standing here for quite a while. I am still far from the sensor, but even without motion, it continues to detect me. I stayed as still as possible and this sensor truly impressed me. It is a real human presence detection sensor. For motion detection and human presence, this thing is absolutely top-notch.

Now, when I step out of the monitored area, this bulb will automatically turn off.

Let’s push this to the extreme. I am going to sit on the floor and remain still. Let’s see if it can still detect me.

C4001 mmWave presence sensor tracking low-movement human presence.

I have been sitting here for a long time and the bulb did not turn OFF even once. Now you can confidently decide that this mmWave sensor is not like ordinary sensors. You can use it in advanced security systems and smart automation projects where reliability actually matters.

Behind the Curtain:

It even detected me perfectly through the curtain. I have already tested all of this with the 12-meter C4001 version, and if that smaller module can handle it, then this 25-meter version should have no problem at all. This one is a beast.




Human Detection Behind Wall:

Now comes the real challenge; human detection behind a wall, because the 12-meter version failed in this scenario. So let’s find out whether this 25-meter module can detect a person through a solid wall or not.

Checking sensing ability of C4001 mmWave presence sensor behind obstacles.

Unfortunately, even this sensor was not able to detect me behind the wall. That’s totally fine, because I don’t plan to use it for human detection behind walls. For that purpose, I already have another dedicated sensor from DFRobot, the Gravity Digital Microwave Sensor V2.0, and I have covered that one in great detail in my previous videos.

So now tell me in the comments, what do you think about the 25-meter version of the C4001 mmWave Sensor? Is it something you would use in your smart home or security projects?

C4001 mmWave sensor with Blynk:

Now this final example is for those who want to monitor the C4001 mmWave sensor through the internet using the Blynk application. I am using the same Blynk setup that I used with the 12-meter version, so the virtual pin remains V0. Here is the code you will need to upload to your ESP32 Dev Module.



Blynk Code:

Remote monitoring with C4001 mmWave presence sensor and Blynk dashboard.

With this setup, I can now monitor human presence from anywhere in the world through my phone. That means even if I am not at home, I can still know whether someone is moving inside the monitored area. Pretty awesome for smart security systems.

So, that’s all for now.



Watch Video Tutorial:

DFRobot C4001 mmWave Radar for ESP32 25 m Range!

 


Discover more from Electronic Clinic

Subscribe to get the latest posts sent to your email.

Engr. Shahzada Fahad

Engr. Shahzada Fahad is an Electrical Engineer with over 15 years of hands-on experience in electronics design, programming, and PCB development. He specializes in microcontrollers (Arduino, ESP32, STM32, Raspberry Pi), robotics, and IoT systems. He is the founder and lead author at Electronic Clinic, dedicated to sharing practical knowledge.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button

Discover more from Electronic Clinic

Subscribe now to keep reading and get access to the full archive.

Continue reading

Electronic Clinic
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.