简介
C4001(12m)毫米波存在传感器采用24GHz的波长信号,拥有水平100°的检测范围,8米的存在检测范围和12米的运动检测范围和测距范围。
人体检测
相较于其他类型的人体存在传感器,如红外传感器,C4001(12m)毫米波存在传感器具有动静都能检测的特点,并且其抗干扰能力相对较强,不易受到温度变化、环境光变化和环境噪声等因素的影响。不论人体是静坐、睡觉还是运动,传感器都能够快速、灵敏地检测到其存在。
毫米波存在传感器 | 红外传感器 | |
---|---|---|
感应原理 | TOF雷达原理+多普勒雷达感应原理 (主动探测) | 热释电红外感应原理 (被动辐射) |
动作感应灵敏度 | 可检测到人体的存在、微动、运动 | 只可检测到人体的运动和近距离微动 |
感应距离 | 可设置不同的感应距离 | 不能设置感应范围 |
环境温度影响 | 不受环境温度影响 | 温度升高到接近人体时灵敏度低 |
应用环境 | 不受热源、光源、气流干扰 | 易受热源、气流干扰 |
穿透能力 | 可穿透布料、塑料、玻璃等绝缘材料 | 只可穿透部分透明塑料 |
是否支持测距 | 是 | 否 |
距离和速度检测
C4001(12m)毫米波存在传感器采用FMCW调制进行测距与测速,最远测距范围达到12M测速范围为0.1 ~10m/s。
FMCW一种基于频率调制连续波的雷达系统。与传统的脉冲雷达不同,FMCW雷达通过连续地发射一系列频率逐渐变化的连续波信号,并同时接收反射回来的信号。通过分析接收到的信号,可以实现距离、速度和角度等参数的测量。
与传统脉冲雷达技术相比FMCW雷达可以连续的测量物体的距离,通过多普勒效应可以获取目标物体的速度信息,适用于需要获取目标物体运动状态的应用 。此外FMCW雷达可以实现连续的频率扫描,提供较高的测量分辨率,应为不需要等待回波信号的返回,适用于需要实时监测和跟踪目标物体的应用。
什么是毫米波雷达传感器?
毫米波雷达技术是一种非接触式传感技术,用于探测物体并提供这些物体(在我们的例子中是人类)的距离、速度和角度。毫米波传感器发射的信号的波长在24GHz和300GHz之间的高频频谱中,也称为毫米(mm)范围。
特征
-
通讯方式:采用I2C和UART两种通讯方式
-
接口方式:Gravity接口(PH2.0)
-
人体检测:8米存在检测和12米运动检测
-
距离检测:1.2m~12m
-
速度检测:0.1m/s~10m/s
-
抗干扰能力强,不受积雪、雾霾、温度、湿度、灰尘、光线、噪音等影响。
-
尺寸小,易于集成
技术规格
-
工作电压:3.3V/5V
-
最远探测距离:12m
-
波束角度:100*80°
-
调制模式:FMCW
-
工作频率:24GHz
-
工作温度:-40~85℃
-
波特率:9600
-
I2C地址:0x2A/0x2B
-
尺寸:22*30mm
接口定义
定义 | 说明 |
---|---|
+ | 电源 |
- | 地 |
C/R | I2C时钟线/RX |
D/T | I2C数据线/TX |
安装方式
毫米波人体传感器对安装方式较为敏感,不当安装会影响传感器的性能和功能。该模块常用的安装方式有顶部安装、底部安装、水平安装和向下倾斜安装。
顶部安装
底部安装
水平安装
演示例程
UART通讯存在信息获取
准备
- 硬件
C4001毫米波存在传感器12m
Arduino Uno
- 软件
Arduino IDE,点击下载Arduino IDE
DFRobot_C4001库,点击下载DFRobot_C4001库
如何安装库文件,点击链接
接线图
毫米波 | Arduino Uno |
---|---|
VIN | 5V |
GND | GND |
C/R | D5 |
D/T | D4 |
样例代码
将传感器背面拨码开关拨至UART方向,复制以下代码到您的Arduino IDE中并上传。
/*!
* @file motionDetection.ino
* @brief Example of radar detecting whether an object is moving
* @copyright Copyright (c) 2010 DFRobot Co.Ltd (http://www.dfrobot.com)
* @license The MIT License (MIT)
* @author ZhixinLiu(zhixin.liu@dfrobot.com)
* @version V1.0
* @date 2024-02-02
* @url https://github.com/dfrobot/DFRobot_C4001
*/
#include "DFRobot_C4001.h"
//#define I2C_COMMUNICATION //use I2C for communication, but use the serial port for communication if the line of codes were masked
#ifdef I2C_COMMUNICATION
/*
* DEVICE_ADDR_0 = 0x2A default iic_address
* DEVICE_ADDR_1 = 0x2B
*/
DFRobot_C4001_I2C radar(&Wire ,DEVICE_ADDR_0);
#else
/* ---------------------------------------------------------------------------------------------------------------------
* board | MCU | Leonardo/Mega2560/M0 | UNO | ESP8266 | ESP32 | microbit | m0 |
* VCC | 3.3V/5V | VCC | VCC | VCC | VCC | X | vcc |
* GND | GND | GND | GND | GND | GND | X | gnd |
* RX | TX | Serial1 TX1 | 5 | 5/D6 | D2 | X | tx1 |
* TX | RX | Serial1 RX1 | 4 | 4/D7 | D3 | X | rx1 |
* ----------------------------------------------------------------------------------------------------------------------*/
/* Baud rate cannot be changed */
#if defined(ARDUINO_AVR_UNO) || defined(ESP8266)
SoftwareSerial mySerial(4, 5);
DFRobot_C4001_UART radar(&mySerial ,9600);
#elif defined(ESP32)
DFRobot_C4001_UART radar(&Serial1 ,9600 ,/*rx*/D2 ,/*tx*/D3);
#else
DFRobot_C4001_UART radar(&Serial1 ,9600);
#endif
#endif
void setup()
{
Serial.begin(115200);
while(!Serial);
while(!radar.begin()){
Serial.println("NO Deivces !");
delay(1000);
}
Serial.println("Device connected!");
// exist Mode
radar.setSensorMode(eExitMode);
sSensorStatus_t data;
data = radar.getStatus();
// 0 stop 1 start
Serial.print("work status = ");
Serial.println(data.workStatus);
// 0 is exist 1 speed
Serial.print("work mode = ");
Serial.println(data.workMode);
// 0 no init 1 init success
Serial.print("init status = ");
Serial.println(data.initStatus);
Serial.println();
/*
* min Detection range Minimum distance, unit cm, range 0.3~25m (30~2500), not exceeding max, otherwise the function is abnormal.
* max Detection range Maximum distance, unit cm, range 2.4~25m (240~2500)
* trig Detection range Maximum distance, unit cm, default trig = max
*/
if(radar.setDetectionRange(/*min*/30, /*max*/1000, /*trig*/1000)){
Serial.println("set detection range successfully!");
}
// set trigger sensitivity 0 - 9
if(radar.setTrigSensitivity(1)){
Serial.println("set trig sensitivity successfully!");
}
// set keep sensitivity 0 - 9
if(radar.setKeepSensitivity(2)){
Serial.println("set keep sensitivity successfully!");
}
/*
* trig Trigger delay, unit 0.01s, range 0~2s (0~200)
* keep Maintain the detection timeout, unit 0.5s, range 2~1500 seconds (4~3000)
*/
if(radar.setDelay(/*trig*/100, /*keep*/4)){
Serial.println("set delay successfully!");
}
// get confige params
Serial.print("trig sensitivity = ");
Serial.println(radar.getTrigSensitivity());
Serial.print("keep sensitivity = ");
Serial.println(radar.getKeepSensitivity());
Serial.print("min range = ");
Serial.println(radar.getMinRange());
Serial.print("max range = ");
Serial.println(radar.getMaxRange());
Serial.print("trig range = ");
Serial.println(radar.getTrigRange());
Serial.print("keep time = ");
Serial.println(radar.getKeepTimerout());
Serial.print("trig delay = ");
Serial.println(radar.getTrigDelay());
}
void loop()
{
// Determine whether the object is moving
if(radar.motionDetection()){
Serial.println("exist motion");
Serial.println();
}
delay(100);
}
结果
IIC通讯距离速度获取
准备
- 硬件
C4001毫米波存在传感器25m
Arduino Uno
- 软件
Arduino IDE,点击下载Arduino IDE
DFRobot_C4001库,点击下载DFRobot_C4001库
如何安装库文件,点击链接
接线图
样例代码
复制以下代码到您的Arduino IDE中并上传。
/*!
* @file motionDetection.ino
* @brief Example of radar detecting whether an object is moving
* @copyright Copyright (c) 2010 DFRobot Co.Ltd (http://www.dfrobot.com)
* @license The MIT License (MIT)
* @author ZhixinLiu(zhixin.liu@dfrobot.com)
* @version V1.0
* @date 2024-02-02
* @url https://github.com/dfrobot/DFRobot_C4001
*/
#include "DFRobot_C4001.h"
#define I2C_COMMUNICATION //use I2C for communication, but use the serial port for communication if the line of codes were masked
#ifdef I2C_COMMUNICATION
/*
* DEVICE_ADDR_0 = 0x2A default iic_address
* DEVICE_ADDR_1 = 0x2B
*/
DFRobot_C4001_I2C radar(&Wire ,DEVICE_ADDR_0);
#else
/* ---------------------------------------------------------------------------------------------------------------------
* board | MCU | Leonardo/Mega2560/M0 | UNO | ESP8266 | ESP32 | microbit | m0 |
* VCC | 3.3V/5V | VCC | VCC | VCC | VCC | X | vcc |
* GND | GND | GND | GND | GND | GND | X | gnd |
* RX | TX | Serial1 TX1 | 5 | 5/D6 | D2 | X | tx1 |
* TX | RX | Serial1 RX1 | 4 | 4/D7 | D3 | X | rx1 |
* ----------------------------------------------------------------------------------------------------------------------*/
/* Baud rate cannot be changed */
#if defined(ARDUINO_AVR_UNO) || defined(ESP8266)
SoftwareSerial mySerial(4, 5);
DFRobot_C4001_UART radar(&mySerial ,9600);
#elif defined(ESP32)
DFRobot_C4001_UART radar(&Serial1 ,9600 ,/*rx*/D2 ,/*tx*/D3);
#else
DFRobot_C4001_UART radar(&Serial1 ,9600);
#endif
#endif
void setup()
{
Serial.begin(115200);
while(!Serial);
while(!radar.begin()){
Serial.println("NO Deivces !");
delay(1000);
}
Serial.println("Device connected!");
// exist Mode
radar.setSensorMode(eExitMode);
sSensorStatus_t data;
data = radar.getStatus();
// 0 stop 1 start
Serial.print("work status = ");
Serial.println(data.workStatus);
// 0 is exist 1 speed
Serial.print("work mode = ");
Serial.println(data.workMode);
// 0 no init 1 init success
Serial.print("init status = ");
Serial.println(data.initStatus);
Serial.println();
/*
* min Detection range Minimum distance, unit cm, range 0.3~25m (30~2500), not exceeding max, otherwise the function is abnormal.
* max Detection range Maximum distance, unit cm, range 2.4~25m (240~2500)
* trig Detection range Maximum distance, unit cm, default trig = max
*/
if(radar.setDetectionRange(/*min*/30, /*max*/1000, /*trig*/1000)){
Serial.println("set detection range successfully!");
}
// set trigger sensitivity 0 - 9
if(radar.setTrigSensitivity(1)){
Serial.println("set trig sensitivity successfully!");
}
// set keep sensitivity 0 - 9
if(radar.setKeepSensitivity(2)){
Serial.println("set keep sensitivity successfully!");
}
/*
* trig Trigger delay, unit 0.01s, range 0~2s (0~200)
* keep Maintain the detection timeout, unit 0.5s, range 2~1500 seconds (4~3000)
*/
if(radar.setDelay(/*trig*/100, /*keep*/4)){
Serial.println("set delay successfully!");
}
// get confige params
Serial.print("trig sensitivity = ");
Serial.println(radar.getTrigSensitivity());
Serial.print("keep sensitivity = ");
Serial.println(radar.getKeepSensitivity());
Serial.print("min range = ");
Serial.println(radar.getMinRange());
Serial.print("max range = ");
Serial.println(radar.getMaxRange());
Serial.print("trig range = ");
Serial.println(radar.getTrigRange());
Serial.print("keep time = ");
Serial.println(radar.getKeepTimerout());
Serial.print("trig delay = ");
Serial.println(radar.getTrigDelay());
}
void loop()
{
// Determine whether the object is moving
if(radar.motionDetection()){
Serial.println("exist motion");
Serial.println();
}
delay(100);
}
结果
常见问题
还没有客户对此产品有任何问题,欢迎通过 qq 或者论坛联系我们!
更多问题及有趣的应用,可以访问论坛进行查阅或发帖