C1001 mmWave Human detection Sensor with ESP32, Life, Fall, & Sleep Detection
Table of Contents
C1001 mmWave Human Detection Sensor:
C1001 mmWave Human detection Sensor with ESP32, Life Detection, Fall Detection, & Sleep Detection- C1001 mmWave Human Detection Sensor by DFrobot is a game changer. This small sensor has surpassed PIR and all other human body detection sensors. Because; it uses a 60GHz operating frequency millimeter-wave radar. While ordinary 24GHz millimeter-wave radars can only detect presence, speed, and distance, the C1001 sensor can perform more advanced detection functions.
We will use the C1001 mmWave sensor without a controller and also with the ESP32 WiFi + Bluetooth module. I will practically demonstrate its full functionality. But first, let me share some details about this sensor with you. Its features will blow your mind.
The C1001 millimeter-wave human body detection sensor can recognize human postures using a point cloud imaging algorithm. It can accurately detect if someone is lying down. It can precisely perform human life detection, how long a person stay in one place, it can report if someone has fallen, and it can also detect body static state.
The thing that surprised me the most is its ability to detect a body even if it is not moving. Many sensors fail here. If you were using a PIR sensor, stop using it now because with the C1001 millimeter-wave radar, you do not need to move. You know well that a PIR sensor will not detect you if you do not move. So, you cannot use PIR sensors efficiently in rooms. You cannot use them in bathrooms, in public toilets or outdoors during the day, and their range is also limited.
Let’s discuss a real-world problem. Let’s say you want to design a system for your room so that the lights stay ON while you are reading a book, watching TV, or just sitting on the sofa using your phone.
Can you do this with a PIR sensor? Never. Because to trigger a PIR sensor, you need to move in front of it. Otherwise, the lights in your room will turn OFF, and you will have to wave your hand to turn them back ON. So, a PIR sensor will make you dance like a monkey.
But if you use the C1001 mmWave Human Detection Sensor, you will not face any such issues. You can use it in public toilets to easily know if someone is there or not. This is a best sensor for detecting a person who is hiding.
You can also use it for security purposes.
And it does not stop there. It can not only detect all kinds of human presence, but also:
The C1001 millimeter-wave human detection sensor can continuously record if a person is there and can judge their sleep state, breathing, and heart rate based on body movement during sleep. After a period of sleep, it gives a sleep score and combines the sleep data with health care applications.
C1001-mmWave Specifications:
Working voltage: 5V
Working current: ≤100mA
Operating frequency: 61~61.5GHz
Maximum detection distance: 11m
Transmit power: 6dBm
Radar detection angle: 100×100 degrees
Working temperature: -20~60℃
Sleep detection distance (from chest): 0.4-2.5m
Respiration and heartbeat detection distance (chest cavity): 0.4-1.5m
Respiration measurement accuracy: 90%
Respiration measurement range: 10-25 times/minute
Heart rate measurement accuracy: 80%
Heart rate measurement range: 60-100 beats/minute
Amazon Links:
ESP32 WiFi + Bluetooth Module (Recommended)
C1001 mmWave Human Detection Sensor
C1001 mmWave Official Product Page
*Disclosure: These are affiliate links. As an Amazon Associate I earn from qualifying purchases.
C1001 mmWave Sensor Installation:
Fall Mode Top Load:
The radar module’s beam coverage is shown in the figure below. The radar covers a 3D area with a horizontal angle of 100° and a pitch angle of 100°.
To ensure accurate radar detection, please install it at the top, as shown in the figure below.
C1001 mmWave Sleep Mode:
For the sleep monitoring, you know the radar coverage is a 3-dimensional sector area with a horizontal angle of 40° and a pitch angle of 40°.
Within the radar detection range, to accurately detect human presence, breathing, and heartbeat during sleep, the radar must be installed correctly.
Radar installation orientation:
The radar should be oriented as you can see in the image;
Tilt installation:
The radar should be tilted downward at an angle of 30~45°.
There is no special installation requirement for humans’ presence detection; like for example, if you want to monitor the presence of someone in a particular area. It can be placed on top or on the side there is no special requirement. However, for the breathing and heart rate monitoring, they need to be 1.5 meters in front of the person and facing their chest.
C1001 mmWave Sensor Pinout:
VIN is the Power supply
GND is the ground
RX and TX are for the Serial communication
IO1 is the human presence status level output (3.3V)
IO2 is fall status level output (3.3V)
Let’s first solder these male headers and then we will start the interfacing and programming.
I only have this one sensor, and I do not want it to get damaged, so I am going to use the Andonstar digital microscope and a pointed soldering bit. I have already written detailed articles about the Andonstar digital microscope and different types of soldering bits.
C1001 mmWave interfacing with ESP32:
As you can see, I have connected the mmWave sensor to the ESP32 WiFi + Bluetooth module. I am using this ESP32 development board; because I have already added a 5V relay to it, so I do not need to do extra wiring. In the final example, we will use this to control a light. But for now, you can completely ignore this relay. I have already explained the design of this board in detail. Anyway, interfacing this sensor is very simple. You need to connect the VIN and GND pins of the C1001 mmWave human detection sensor to the 5V and GND pins of the ESP32. Then, connect its RX and TX pins to the ESP32’s GPIO pins 17 and 16. For the connections you can follow this circuit diagram.
mmWave Sensor Circuit Diagram:
C1001 mmWave Library Installation:
Required Library:
Before starting programming, you need to add the DFRobot_HumanDetection library to the Arduino IDE.
To add it in the Arduino IDE, simply go to the Sketch menu, then to Include Library, and click on the Add .ZIP Library.
Browse to the location, select the ZIP folder, and then click on the open button.
C1001 mmWave ESP32 Programming:
C1001 mmWave Sleep Detection Mode Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
#include "DFRobot_HumanDetection.h" DFRobot_HumanDetection hu(&Serial1); void setup() { Serial.begin(115200); Serial1.begin(115200, SERIAL_8N1, 16, 17); Serial.println("Start initialization"); while (hu.begin() != 0) { Serial.println("init error!!!"); delay(1000); } Serial.println("Initialization successful"); Serial.println("Start switching work mode"); while (hu.configWorkMode(hu.eSleepMode) != 0) { Serial.println("error!!!"); delay(1000); } Serial.println("Work mode switch successful"); Serial.print("Current work mode:"); switch (hu.getWorkMode()) { case 1: Serial.println("Fall detection mode"); break; case 2: Serial.println("Sleep detection mode"); break; default: Serial.println("Read error"); } hu.configLEDLight(hu.eHPLed, 1); // Set HP LED switch, it will not light up even if the sensor detects a person when set to 0. hu.sensorRet(); // Module reset, must perform sensorRet after setting data, otherwise the sensor may not be usable Serial.print("HP LED status:"); switch (hu.getLEDLightState(hu.eHPLed)) { case 0: Serial.println("Off"); break; case 1: Serial.println("On"); break; default: Serial.println("Read error"); } Serial.println(); Serial.println(); } void loop() { Serial.print("Existing information:"); switch (hu.smHumanData(hu.eHumanPresence)) { case 0: Serial.println("No one is present"); break; case 1: Serial.println("Someone is present"); break; default: Serial.println("Read error"); } Serial.print("Motion information:"); switch (hu.smHumanData(hu.eHumanMovement)) { case 0: Serial.println("None"); break; case 1: Serial.println("Still"); break; case 2: Serial.println("Active"); break; default: Serial.println("Read error"); } Serial.printf("Body movement parameters:%d\n", hu.smHumanData(hu.eHumanMovingRange)); Serial.printf("Respiration rate:%d\n", hu.getBreatheValue()); Serial.printf("Heart rate:%d\n", hu.gitHeartRate()); Serial.println(); delay(1000); } |
This program is for sleep detection mode.
Practical Demonstration:
The mmWave sensor successfully detected my presence and monitored my body movement parameters, respiration rate, and heart rate. For the best performance in sleep detection mode, you need to follow the correct installation procedure, which I have already explained in detail.
C1001 mmWave Fall Mode Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
#include "DFRobot_HumanDetection.h" DFRobot_HumanDetection hu(&Serial1); void setup() { Serial.begin(115200); Serial1.begin(115200, SERIAL_8N1, 16, 17); Serial.println("Start initialization"); while (hu.begin() != 0) { Serial.println("init error!!!"); delay(1000); } Serial.println("Initialization successful"); Serial.println("Start switching work mode"); while (hu.configWorkMode(hu.eFallingMode) != 0) { Serial.println("error!!!"); delay(1000); } Serial.println("Work mode switch successful"); hu.configLEDLight(hu.eFALLLed, 1); // Set HP LED switch, it will not light up even if the sensor detects a person present when set to 0. hu.configLEDLight(hu.eHPLed, 1); // Set FALL LED switch, it will not light up even if the sensor detects a person falling when set to 0. hu.dmInstallHeight(270); // Set installation height, it needs to be set according to the actual height of the surface from the sensor, unit: CM. hu.dmFallTime(5); // Set fall time, the sensor needs to delay the current set time after detecting a person falling before outputting the detected fall, this can avoid false triggering, unit: seconds. hu.dmUnmannedTime(1); // Set unattended time, when a person leaves the sensor detection range, the sensor delays a period of time before outputting a no person status, unit: seconds. hu.dmFallConfig(hu.eResidenceTime, 200); // Set dwell time, when a person remains still within the sensor detection range for more than the set time, the sensor outputs a stationary dwell status. Unit: seconds. hu.dmFallConfig(hu.eFallSensitivityC, 3); // Set fall sensitivity, range 0~3, the larger the value, the more sensitive. hu.sensorRet(); // Module reset, must perform sensorRet after setting data, otherwise the sensor may not be usable. Serial.print("Current work mode:"); switch (hu.getWorkMode()) { case 1: Serial.println("Fall detection mode"); break; case 2: Serial.println("Sleep detection mode"); break; default: Serial.println("Read error"); } Serial.print("HP LED status:"); switch (hu.getLEDLightState(hu.eHPLed)) { case 0: Serial.println("Off"); break; case 1: Serial.println("On"); break; default: Serial.println("Read error"); } Serial.print("FALL status:"); switch (hu.getLEDLightState(hu.eFALLLed)) { case 0: Serial.println("Off"); break; case 1: Serial.println("On"); break; default: Serial.println("Read error"); } Serial.print("Radar installation height: "); Serial.print(hu.dmGetInstallHeight()); Serial.println(" cm"); Serial.print("Fall duration: "); Serial.print(hu.getFallTime()); Serial.println(" seconds"); Serial.print("Unattended duration: "); Serial.print(hu.getUnmannedTime()); Serial.println(" seconds"); Serial.print("Dwell duration: "); Serial.print(hu.getStaticResidencyTime()); Serial.println(" seconds"); Serial.print("Fall sensitivity: "); Serial.print(hu.getFallData(hu.eFallSensitivity)); Serial.println(" seconds"); Serial.println("==============================="); } void loop() { Serial.print("Existing information:"); switch (hu.smHumanData(hu.eHumanPresence)) { case 0: Serial.println("No one is present"); break; case 1: Serial.println("Someone is present"); break; default: Serial.println("Read error"); } Serial.print("Motion information:"); switch (hu.smHumanData(hu.eHumanMovement)) { case 0: Serial.println("None"); break; case 1: Serial.println("Still"); break; case 2: Serial.println("Active"); break; default: Serial.println("Read error"); } Serial.print("Body movement parameters: "); Serial.print( hu.smHumanData(hu.eHumanMovingRange)); Serial.print("Fall status:"); switch (hu.getFallData(hu.eFallState)) { case 0: Serial.println("Not fallen"); break; case 1: Serial.println("Fallen"); break; default: Serial.println("Read error"); } Serial.print("Stationary dwell status: "); switch (hu.getFallData(hu.estaticResidencyState)) { case 0: Serial.println("No stationary dwell"); break; case 1: Serial.println("Stationary dwell present"); break; default: Serial.println("Read error"); } Serial.println(); delay(1000); } |
This program is for fall detection mode.
Practical Demonstration:
In this mode, the mmWave sensor successfully detected my presence and motion information. When I was standing, it showed the status as Not Fallen.
And when I acted like falling, it successfully detected it. For fall detection mode, you need to install the sensor on the ceiling of the bathroom.
Read my latest article on the C1001 mmWave Human Detection Sensor, i have performed 7 tests; including human detection behind wood sheets, human detection behind plastic sheets, Vibration tests, false triggering tests, and human detection behind walls, with C1001 mmWave sensor you can see through different materials.
C1001 mmWave Light controller:
Next, we will use the C1001 mmWave Sensor to control the light. I want the light to stay ON while I am sitting on this chair and turn OFF when I leave. If you want to control fans, AC, and other loads along with the lights, you can simply increase the number of relays. This 5V SPDT type relay is connected to GPIO13 of the ESP32. You can use this relay to control any AC or DC load.
Safety:
When the 110/220Vac supply is connected, never touch the relay contacts as it can be extremely dangerous. It is important to note that when working with mains voltage, proper safety precautions should always be taken and it is advisable to consult relevant electrical codes and standards.
For the connections you can follow this circuit diagram.
C1001 mmWave Light Controller Circuit:
C1001 mmWave Light Controller Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
#include "DFRobot_HumanDetection.h" DFRobot_HumanDetection hu(&Serial1); int relay = 13; void setup() { Serial.begin(115200); Serial1.begin(115200, SERIAL_8N1, 16, 17); pinMode(relay, OUTPUT); myInitialization(); } void loop() { Serial.print("Existing information:"); switch (hu.smHumanData(hu.eHumanPresence)) { case 0: Serial.println("No one is present"); digitalWrite(relay, LOW); break; case 1: Serial.println("Someone is present"); digitalWrite(relay, HIGH); break; default: Serial.println("Read error"); } Serial.print("Motion information:"); switch (hu.smHumanData(hu.eHumanMovement)) { case 0: Serial.println("None"); break; case 1: Serial.println("Still"); break; case 2: Serial.println("Active"); break; default: Serial.println("Read error"); } Serial.print("Body movement parameters: "); Serial.print( hu.smHumanData(hu.eHumanMovingRange)); Serial.println(); delay(1000); } void myInitialization() { Serial.println("Start initialization"); while (hu.begin() != 0) { Serial.println("init error!!!"); delay(1000); } Serial.println("Initialization successful"); Serial.println("Start switching work mode"); while (hu.configWorkMode(hu.eSleepMode) != 0) { Serial.println("error!!!"); delay(1000); } Serial.println("Work mode switch successful"); hu.configLEDLight(hu.eHPLed, 1); // Set HP LED switch, it will not light up even if the sensor detects a person present when set to 0. hu.sensorRet(); // Module reset, must perform sensorRet after setting data, otherwise the sensor may not be usable. } |
This is basically the sleep mode code, which I have modified to make it an automatic light controller. Now, you can use the C1001 mmWave Human Detection Sensor to control lights, buzzers, or anything else based on human presence. I have removed unnecessary instructions from this program.
Practical demonstration:
While working on this project, I tested the mmWave Human Detection sensor many times, and it worked great every time. As long as I was sitting in the chair, the light never turned off, and there was no false triggering.
When I got up from the chair and left, the light turned off automatically.
And when I came back, the light turned on automatically.
The good thing about this sensor is that it can detect you even if you are completely still, and that’s what I like the most about it. I am very impressed with this sensor.
We can use it in labs, toilets, kitchens, bathrooms, libraries, bedrooms, living rooms, outdoors, and anywhere else. So, that’s all for now.
Support me on Patreon for more videos and articles.
Watch Video Tutorial:
Hi Shahzada.
I was very interested in this sensor from seeing your video. Great job!
I wanted to see if this sensor would work for a particular application of detecting a seated person. I recreated the C1001 mmWave Light controller setup and noticed that the sensor can immediately detect a person when they pass in front of the sensor. But when they leave, it can take about 90 seconds when it reports that it does not detect a person. I was hoping that the time it takes to detect the absence would be similar to the presence.
Have you noticed this condition? Do you know if there are any settings that can be adjusted to speed up sensor reporting the absence?