Difference between revisions of "5.8GHz Doppler Effect Microwave Motion Sensor SKU: CQRSENWB02"
(→AT5820 Overview) |
(→AT5820 Overview) |
||
Line 108: | Line 108: | ||
*'''Send command format (HEX):''' 58 d3 00 2b 01 | *'''Send command format (HEX):''' 58 d3 00 2b 01 | ||
*'''Reply frame:''' 59 D3 02 2C 01 5B 01 // e.g. get delta, return value: 300 | *'''Reply frame:''' 59 D3 02 2C 01 5B 01 // e.g. get delta, return value: 300 | ||
+ | |||
+ | '''2.7 Turn on/off the light''' | ||
+ | |||
+ | *'''Command code:''' 0xA | ||
+ | *'''Parameters: para1:''' 0x1 (turn on the light), 0x0 (turn off the light) | ||
+ | *'''Send command format (HEX):''' 58 0A 01 01 64 00 (turn on the light); 58 0A 01 00 63 00 (turn off the light) | ||
+ | *'''Reply frame:''' 59 0A 01 00 64 00 (success), Other: fail | ||
---- | ---- |
Revision as of 06:20, 5 December 2022
Description
The microwave motion sensor is a microwave moving object detector which is designed according to the principle of Doppler Radar. This differs from the method used by a regular infrared (IR) sensor as microwave is sensitive to a variety of objects that are microwave-reflective, and its sensor readings are not affected by the ambient temperature.
Comparison with IR Sensor:
CQRobot launches 5.8GHz Doppler effect microwave motion sensor (CQRSENWB02), built-in sensor - AT5820 microwave radar chip. The AT5820 chip integrates a high-performance microwave radar transceiver and MCU, which can be interconnected with other main controllers or sensors, and filter out clutter interference through algorithms. It is not only widely used in human body detection, but also widely used in the detection of many other objects. With the characteristics of long distance and high sensitivity, it is not limited by the ambient temperature. It is used in industry, transportation, industry, agriculture, smart home, security monitoring and other fields.
The detection objects of the microwave sensor are universal. When it comes to the actual use in life, we will usually match it with another sensor for targeted detection. For example, a combination of microwave sensor and infrared pyroelectric sensor. It can accurately judge whether someone is passing by without being disturbed by sunlight and clothing color, and will not react to other objects.
Attention
There is an ultra-high frequency MOS device inside the microwave motion sensor. When you are testing, please use battery power as much as possible to avoid breakdown that is caused by the static voltage difference between the power supply and the test equipment, such as an oscilloscope.
In addition, we suggest that you use battery power to ensure the best detection effect when you are operating the product.
AT5820 Overview
The 5.8GHz radar SOC chip supports communication with the HOST through the UART interface, including program download, command control and debugging instructions. This article mainly introduces the communication protocol format of AT5820 and the description of each command.
Communication protocol definition
The frame data of the communication protocol is mainly divided into control frame data and reply frame data. The control frame is the frame data format of the control command sent by the host computer to the AT5820 SOC, and the reply frame is the reply to the host computer after the AT5820 SOC executes the command controlled by the host computer. Frame data format. The detailed frame data format is described below.
1.1 Control frame data format
The control frame is mainly the control frame data sent by the host computer to the AT5820 chip through UART, and its format is defined as follows:
Description:
- Head: Control frame header, the value is 0x58;
- Control Frame Payload: Control frame payload, divided into command packet, control command, parameter length and parameters:
- CMD Group: command grouping, 3 effective bits, supports up to 7 grouped commands;
- CMD: Control command, 5 effective bits, that is, a group supports up to 32 control commands;
- Parameter Length: the total length of the parameter (bytes);
- Para_0 ~ Para_n: Parameters (the length is specified by Parameter Length)
- Check Code: check code, the value is the sum of the previous data:
- Check Code = Head + Payload_0 + ... + Payload_n
1.2 Reply frame data format
The reply data after the SOC chip executes the control command, the reply data frame format is defined as follows:
2. Command description
2.1 Set motion sensing distance
- Command code: 0x2
- Parameters: para1: distance level 0 - 31
- Send command format (HEX): 58 02 01 xx xx xx
- Reply frame: refer to reply frame format
e.g., set distance level to 15
HEX is: 58 02 01 0F 6A 00
Resp: 59 02 01 00 5C 00 (success), Other: fail
2.2 Get motion sensing distance
- Command code: 0x3
- Parameters: none
- Send command format (HEX): 58 03 00 5B 00
- Reply frame: 59 03 01 0F 6C 00 // e.g. get distance level: 15
2.3 Set the lighting time
- Command code: 0x4
- Parameters: para1: time(low byte), para2: time(high byte). In seconds.
- Send command format (HEX): 58 04 02 xx xx xx xx
- Reply frame: refer to reply frame format
e.g., set time to 1s
HEX is: 58 04 02 01 00 5F 00
Resp: 59 04 01 00 5E 00 (success), Other: fail
2.4 Get the lighting time
- Command code: 0x5
- Parameters: none
- Send command format (HEX): 58 05 00 5D 00
- Reply frame: 59 05 02 01 00 61 00 // e.g. get lot: 0x0001 (1s)
2.5 Set motion detection delta value
- Code: 0xd3
- Parameters: 16-bits, para1: delta(low byte), para2: delta(high byte).
- Send command format (HEX): 58 d2 02 xx xx xx xx
- Reply frame: refer to reply frame format
e.g., set delta to 300
HEX is: 58 d2 02 2c 01 59 01
Resp: 59 D2 01 00 2C 01
2.6 Get motion detection delta value
- Command code: 0xd4
- Parameters: none
- Send command format (HEX): 58 d3 00 2b 01
- Reply frame: 59 D3 02 2C 01 5B 01 // e.g. get delta, return value: 300
2.7 Turn on/off the light
- Command code: 0xA
- Parameters: para1: 0x1 (turn on the light), 0x0 (turn off the light)
- Send command format (HEX): 58 0A 01 01 64 00 (turn on the light); 58 0A 01 00 63 00 (turn off the light)
- Reply frame: 59 0A 01 00 64 00 (success), Other: fail