DFRobot C4001 mmWave Presence Sensor

View on Amazon
Overview
About DFRobot C4001 mmWave Presence Sensor
The DFRobot C4001 (SEN0610) is a 24GHz mmWave radar sensor capable of detecting human presence, motion, and micro-movements with a detection range of up to 12 meters. It supports both UART and I2C interfaces and includes configurable detection zones, thresholds, and filtering via command protocols. Its gravity form factor and versatile communication options make it ideal for smart lighting, occupancy sensing, and automation applications.
Get Your C4001
Prices are subject to change. We earn from qualifying purchases as an Amazon Associate.
C4001 Specifications
Complete technical specification details for DFRobot C4001 mmWave Presence Sensor
📊 Technical Parameters
C4001 Pinout
The C4001 has 6 pins supporting both UART and I²C communication (not simultaneously).
Visual Pinout Diagram

Pin Types
Quick Tips
mmWave radar sensor,[object Object]
Object],Supports UART (115200 baud) or I²C (address 0x20)
Cannot use UART and I²C simultaneously,Configurable detection zones and thresholds
Pin Descriptions
| Pin Name | Type | Description | Notes |
|---|---|---|---|
1 VCC | Power | Power input (3.3V to 5.5V). Wide voltage range for flexibility. | Both 3.3V and 5V compatible. |
2 GND | Power | Ground connection. Connect to system ground. | |
3 RX | UART | UART receive pin. Accepts commands from microcontroller. | Connect to ESP32 TX (GPIO 17) for UART mode. |
4 TX | UART | UART transmit pin. Sends presence and motion data. | Connect to ESP32 RX (GPIO 16) for UART mode. |
5 SDA | I2C | I²C data line. Bidirectional data communication. | Connect to ESP32 GPIO 21 for I²C mode. |
6 SCL | I2C | I²C clock line. Clock signal for I²C communication. | Connect to ESP32 GPIO 22 for I²C mode. |
Wiring C4001 to ESP32
The C4001 can be connected via either UART or I²C. For I²C: connect SDA to GPIO 21, SCL to GPIO 22. For UART: connect TX to GPIO 16 (RX), RX to GPIO 17 (TX).
Visual Wiring Diagram

Connection Status
Protocol
Pin Connections
| C4001 Pin | Connection | ESP32 Pin | Description |
|---|---|---|---|
1 VCC Required | 3.3V or 5V | Power supply (3.3V-5.5V). Use 3.3V or 5V. | |
2 GND Required | GND | Ground connection. | |
3 SDA (I²C mode) Optional | GPIO 21 | I²C data line. Use with 4.7kΩ pull-up resistor. | |
4 SCL (I²C mode) Optional | GPIO 22 | I²C clock line. Use with 4.7kΩ pull-up resistor. | |
5 TX (UART mode) Optional | GPIO 16 (RX2) | Sensor transmits data to ESP32. | |
6 RX (UART mode) Optional | GPIO 17 (TX2) | ESP32 sends commands to sensor. |
either UART or I²C - cannot use both at same time
Object]
Object]
DFRobot_C4001 library for Arduino/ESP32
Object]
Object]
output available for direct presence indication
C4001 Troubleshooting
Common issues and solutions to help you get your sensor working
Common Issues
Issue: No presence data is received.
Verify correct interface selection and wiring. Check for power supply issues. Ensure I2C address (default 0x20) or UART baud rate (115200) is properly configured.
Issue: Sensor does not respond to commands.
Ensure no interface conflict between I2C and UART. Confirm proper voltage level and pull-up resistors for I2C. Use a logic analyzer or serial monitor to debug command responses.
Debugging Tips
Use the Serial Monitor to check for error messages and verify the sensor's output. Add debug prints in your code to track the sensor's state.
Use a multimeter to verify voltage levels and check for continuity in your connections. Ensure the power supply is stable and within the sensor's requirements.
Additional Resources
C4001 Programming Examples
Ready-to-use code examples for different platforms and frameworks
#include <DFRobot_C4001.h>
DFRobot_C4001 radar;
void setup() {
Serial.begin(115200);
radar.begin(&Serial);
}
void loop() {
if (radar.available()) {
DFRobot_C4001::sRadarData_t data = radar.getRadarData();
Serial.print("Motion: ");
Serial.print(data.motion);
Serial.print(" Presence: ");
Serial.println(data.presence);
}
delay(500);
}This example uses the DFRobot_C4001 library to initialize and read motion/presence data via UART. Make sure the UART port and baud rate match your wiring setup. Full library and documentation available at DFRobot Wiki.
i2c:
sda: GPIO21
scl: GPIO22
scan: true
dfrobot_sen0395:
id: c4001_sensor
sensor:
- platform: dfrobot_sen0395
motion:
name: "Motion Detected"
presence:
name: "Presence"This ESPHome config sets up the C4001 sensor via I2C using the dfrobot_sen0395 platform. SDA and SCL default to GPIO21/22. It exposes both motion and presence states as sensors in Home Assistant. Ensure no UART conflict and the device address matches your hardware.
platformio.ini
[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
lib_deps = dfrobot/DFRobot_C4001@^1.0.0
monitor_speed = 115200main.cpp
#include <DFRobot_C4001.h>
DFRobot_C4001 radar;
void setup() {
Serial.begin(115200);
radar.begin(&Serial);
}
void loop() {
if (radar.available()) {
auto data = radar.getRadarData();
Serial.print("Motion: "), Serial.print(data.motion);
Serial.print(" Presence: "), Serial.println(data.presence);
}
delay(500);
}This PlatformIO example uses the official DFRobot_C4001 library to initialize and read radar data via UART. It prints motion and presence values every 500ms. Ensure wiring and serial port configuration match your ESP32 setup.
There is currently no official MicroPython support for the C4001 sensor. Developers may refer to the UART/I2C command protocol in the datasheet and implement a parser using machine.UART or I2C.
Wrapping Up C4001
The ESP32 DFRobot C4001 mmWave Presence Sensor is a powerful Human Presence sensor that offers excellent performance and reliability. With support for multiple development platforms including Arduino, ESP-IDF, ESPHome, PlatformIO, and MicroPython, it's a versatile choice for your IoT projects.
Best Practices
For optimal performance, ensure proper wiring and follow the recommended configuration for your chosen development platform.
Safety First
Always verify power supply requirements and pin connections before powering up your project to avoid potential damage.
Ready to Start Building?
Now that you have all the information you need, it's time to integrate the C4001 into your ESP32 project and bring your ideas to life!







