├── .gitattributes
├── .DS_Store
├── examples
├── .DS_Store
├── Falling_Data_Decoding
│ └── Falling_Data_Decoding.ino
└── Human_State_Data_Decoding_Example
│ └── Human_State_Data_Decoding_Example.ino
├── keywords.txt
├── .gitignore
├── 60ghzfalldetection.h
├── README.md
└── 60ghzfalldetection.cpp
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
--------------------------------------------------------------------------------
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Seeed-Projects/Seeed_60GHz_FallDetectionRadar/main/.DS_Store
--------------------------------------------------------------------------------
/examples/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Seeed-Projects/Seeed_60GHz_FallDetectionRadar/main/examples/.DS_Store
--------------------------------------------------------------------------------
/keywords.txt:
--------------------------------------------------------------------------------
1 | recvRadarBytes KEYWORD2
2 | Situation_judgment KEYWORD2
3 | Fall_Detection KEYWORD2
4 | ShowData KEYWORD2
5 | us_CalculateCrc16 KEYWORD2
6 | SerialInit KEYWORD2
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Prerequisites
2 | *.d
3 |
4 | # Compiled Object files
5 | *.slo
6 | *.lo
7 | *.o
8 | *.obj
9 |
10 | # Precompiled Headers
11 | *.gch
12 | *.pch
13 |
14 | # Compiled Dynamic libraries
15 | *.so
16 | *.dylib
17 | *.dll
18 |
19 | # Fortran module files
20 | *.mod
21 | *.smod
22 |
23 | # Compiled Static libraries
24 | *.lai
25 | *.la
26 | *.a
27 | *.lib
28 |
29 | # Executables
30 | *.exe
31 | *.out
32 | *.app
33 |
--------------------------------------------------------------------------------
/examples/Falling_Data_Decoding/Falling_Data_Decoding.ino:
--------------------------------------------------------------------------------
1 | #include <60ghzfalldetection.h>
2 |
3 | FallDetection_60GHz radar;
4 |
5 | void setup()
6 | {
7 | radar.SerialInit();
8 | Serial.begin(115200);
9 | delay(1500);
10 | Serial.println("Readly");
11 | }
12 |
13 | void loop()
14 | {
15 | radar.recvRadarBytes(); //Receive radar data and start processing
16 | if (radar.newData == true) { //The data is received and transferred to the new list dataMsg[]
17 | byte dataMsg[radar.dataLen+3] = {0x00};
18 | dataMsg[0] = 0x53; //Add the header frame as the first element of the array
19 | for (byte n = 0; n < radar.dataLen; n++)dataMsg[n+1] = radar.Msg[n]; //Frame-by-frame transfer
20 | dataMsg[radar.dataLen+1] = 0x54;
21 | dataMsg[radar.dataLen+2] = 0x43;
22 | radar.newData = false; //A complete set of data frames is saved
23 |
24 | //radar.ShowData(dataMsg); //Serial port prints a set of received data frames
25 | radar.Fall_Detection(dataMsg); //Use radar built-in algorithm to output human motion status
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/examples/Human_State_Data_Decoding_Example/Human_State_Data_Decoding_Example.ino:
--------------------------------------------------------------------------------
1 | #include <60ghzfalldetection.h>
2 |
3 | FallDetection_60GHz radar;
4 |
5 | void setup()
6 | {
7 | radar.SerialInit();
8 | Serial.begin(115200);
9 | delay(1500);
10 | Serial.println("Readly");
11 | }
12 |
13 | void loop()
14 | {
15 | radar.recvRadarBytes(); //Receive radar data and start processing
16 | if (radar.newData == true) { //The data is received and transferred to the new list dataMsg[]
17 | byte dataMsg[radar.dataLen+3] = {0x00};
18 | dataMsg[0] = 0x53; //Add the header frame as the first element of the array
19 | for (byte n = 0; n < radar.dataLen; n++)dataMsg[n+1] = radar.Msg[n]; //Frame-by-frame transfer
20 | dataMsg[radar.dataLen+1] = 0x54;
21 | dataMsg[radar.dataLen+2] = 0x43;
22 | radar.newData = false; //A complete set of data frames is saved
23 |
24 | //radar.ShowData(dataMsg); //Serial port prints a set of received data frames
25 | radar.Situation_judgment(dataMsg); //Use radar built-in algorithm to output human motion status
26 | }
27 |
28 | }
--------------------------------------------------------------------------------
/60ghzfalldetection.h:
--------------------------------------------------------------------------------
1 | #ifndef _RADAR_H__
2 | #define _RADAR_H__
3 |
4 | #define MESSAGE_HEAD 0x53 //Data frame header
5 | #define MESSAGE_TAIL 0x54 //Data frame tail
6 |
7 | #define HUMAN_PSE_RADAR 0x80 //Human presence data
8 |
9 | #define PRESENCE_INF 0x01 //Presence Information
10 | #define SOMEONE_HERE 0x01 //Someone here
11 | #define NOONE_HERE 0x00 //Noone here
12 |
13 | #define MOVE_INF 0x02 //Campaign Information
14 | #define NONE 0x00 //None
15 | #define STATIONARY 0x01 //A person is stationary
16 | #define MOVEMENT 0x02 //A person in motion
17 |
18 | #define BODY_SIG 0x03 //Body movement information
19 |
20 | #define DISTANCE 0x04 //Distance from the person being detected
21 |
22 | #define MOVESPEED 0x06 //Speed of character movement
23 |
24 | #define FALL_DETECTION 0x83 //Fall data markers
25 |
26 | #define FALL_STATE 0x01 //Fall status marker
27 | #define NO_FALL 0x00 //No falls detected
28 | #define FALLING 0x01 //Fall detected
29 |
30 | #define FALL_POTENTIAL 0x02 //Confidence level for falls
31 |
32 | #define FALL_LOCATION 0x03 //Location of the fall
33 |
34 | #define POINTCLOUD_DATA 0x04 //Point cloud data
35 |
36 |
37 | class FallDetection_60GHz{
38 | private:
39 |
40 | public:
41 | const byte MsgLen = 12;
42 | byte dataLen = 12;
43 | byte Msg[12];
44 | boolean newData = false;
45 | void SerialInit();
46 | void recvRadarBytes();
47 | void Fall_Detection(byte inf[]);
48 | void Situation_judgment(byte inf[]);
49 | void ShowData(byte inf[]);
50 | };
51 |
52 | #endif
53 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Seeed 60GHz mmWave Radar Sensor - Fall Detection Module Pro
2 |
3 |

4 |
5 | [Seeed 60GHz mmWave Radar Sensor - Fall Detection Module Pro](https://www.seeedstudio.com/60GHz-mmWave-Radar-Sensor-Fall-Detection-Module-Pro-p-5375.html)
6 |
7 | 60GHz mmWave Radar Sensor - Fall Detection Module Pro applies FMCW detected theory to implement simultaneous human activities detection including moving, falling, and stationary in high accuracy, providing a fully total private and secure environment, independently from other noisy influences. It is a standard biotic radar system in private property surveillance, falling caution, elderly health care, performing well in home, hotel, as well as hospital.
8 |
9 | The unit supports secondary developments and the improvable factors like small size, digital output, inside algorithm, allow it can be applied in a variety of scenarios applications by universal UART communication interface through a development board like Wio Terminal or the XIAO series.
10 |
11 | For more information please visit [wiki](https://wiki.seeedstudio.com/Radar_MR60FDA1/).
12 |
13 | This demo is licensed [under The MIT License](http://opensource.org/licenses/mit-license.php). Check LINCESE for more information.
14 |
15 | Contributing to this software is warmly welcomed. You can do this basically by
16 | [forking](https://docs.github.com/en/get-started/quickstart/fork-a-repo), committing modifications and then [pulling requests](https://help.github.com/articles/using-pull-requests) (follow the links above
17 | for operating guide). Adding change log and your contact into file header is encouraged.
18 | Thanks for your contribution.
19 |
20 | Seeed Studio is an open hardware facilitation company based in Shenzhen, China.
21 | Benefiting from local manufacture power and convenient global logistic system,
22 | we integrate resources to serve new era of innovation. Seeed also works with
23 | global distributors and partners to push open hardware movement.
--------------------------------------------------------------------------------
/60ghzfalldetection.cpp:
--------------------------------------------------------------------------------
1 | #include "Arduino.h"
2 | #include "60ghzfalldetection.h"
3 |
4 | #ifdef __AVR__
5 | #include
6 | SoftwareSerial SSerial(2, 3); // RX, TX
7 | #define Serial1 SSerial
8 | #endif
9 |
10 | void FallDetection_60GHz::SerialInit(){
11 | Serial1.begin(115200);
12 | }
13 |
14 | // Receive data and process
15 | void FallDetection_60GHz::recvRadarBytes(){
16 | static boolean recvInProgress = false;
17 | static byte ndx = 0;
18 | byte startMarker = MESSAGE_HEAD; //Header frame
19 | byte endMarker = MESSAGE_TAIL;
20 | byte rb; // Each frame received
21 | while (Serial1.available() > 0 && newData == false)
22 | {
23 | rb = Serial1.read();
24 | if (recvInProgress == true)
25 | { // Received header frame
26 | if (rb != endMarker){ // Length in range
27 | Msg[ndx] = rb;
28 | ndx++;
29 | }
30 | else{
31 | recvInProgress = false;
32 | dataLen = ndx;
33 | ndx = 0;
34 | newData = true;
35 | }
36 | }
37 | else if (rb == startMarker){ // Waiting for the first frame to arrive
38 | recvInProgress = true;
39 | }
40 | }
41 | }
42 |
43 | //Radar transmits data frames for display via serial port
44 | void FallDetection_60GHz::ShowData(byte inf[]){
45 | for (byte n = 0; n < dataLen+3; n++) {
46 | Serial.print(inf[n], HEX);
47 | Serial.print(' ');
48 | }
49 | Serial.println();
50 | }
51 |
52 |
53 | // Judgment of occupied and unoccupied, approach and distance
54 | void FallDetection_60GHz::Situation_judgment(byte inf[]){
55 | switch(inf[2]){
56 | case HUMAN_PSE_RADAR:
57 | switch(inf[3]){
58 | case PRESENCE_INF:
59 | switch(inf[6]){
60 | case NOONE_HERE:
61 | ShowData(inf);
62 | Serial.println("Radar detects no one.");
63 | Serial.println("----------------------------");
64 | break;
65 | case SOMEONE_HERE:
66 | ShowData(inf);
67 | Serial.println("Radar detects somebody.");
68 | Serial.println("----------------------------");
69 | break;
70 | }
71 | break;
72 | case MOVE_INF:
73 | switch(inf[6]){
74 | case NONE:
75 | ShowData(inf);
76 | Serial.println("Radar detects None.");
77 | Serial.println("----------------------------");
78 | break;
79 | case STATIONARY:
80 | ShowData(inf);
81 | Serial.println("Radar detects somebody stationary.");
82 | Serial.println("----------------------------");
83 | break;
84 | case MOVEMENT:
85 | ShowData(inf);
86 | Serial.println("Radar detects somebody in motion.");
87 | Serial.println("----------------------------");
88 | break;
89 | }
90 | break;
91 | case BODY_SIG:
92 | ShowData(inf);
93 | Serial.print("The radar identifies the current motion feature value is: ");
94 | Serial.println(inf[6]);
95 | Serial.println("----------------------------");
96 | break;
97 | case DISTANCE:
98 | ShowData(inf);
99 | Serial.print("The distance of the radar from the monitored person is: ");
100 | Serial.print(inf[6]);
101 | Serial.print(" ");
102 | Serial.print(inf[7]);
103 | Serial.println(" cm");
104 | Serial.println("----------------------------");
105 | break;
106 | case MOVESPEED:
107 | ShowData(inf);
108 | Serial.print("The speed of movement of the monitored person is: ");
109 | Serial.print(inf[6]);
110 | Serial.print(" ");
111 | Serial.print(inf[7]);
112 | Serial.println(" cm/s");
113 | Serial.println("----------------------------");
114 | break;
115 | }
116 | break;
117 | }
118 | }
119 |
120 | //Respiratory sleep data frame decoding
121 | void FallDetection_60GHz::Fall_Detection(byte inf[]){
122 | switch(inf[2]){
123 | case FALL_DETECTION:
124 | switch(inf[3]){
125 | case FALL_STATE:
126 | switch(inf[6]){
127 | case NO_FALL:
128 | ShowData(inf);
129 | Serial.println("Radar detects that the current no fall.");
130 | Serial.println("----------------------------");
131 | break;
132 | case FALLING:
133 | ShowData(inf);
134 | Serial.println("Radar detects current someone falling.");
135 | Serial.println("----------------------------");
136 | break;
137 | }
138 | break;
139 | case FALL_POTENTIAL:
140 | ShowData(inf);
141 | Serial.print("The confidence level for the current radar detection of a fall is: ");
142 | Serial.println(inf[6]);
143 | Serial.println("----------------------------");
144 | break;
145 | case FALL_LOCATION:
146 | ShowData(inf);
147 | Serial.print("The fall position is: ");
148 | Serial.print("x: ");
149 | Serial.print(inf[6]);
150 | Serial.print(" ");
151 | Serial.print(inf[7]);
152 | Serial.print(" ");
153 | Serial.print("y: ");
154 | Serial.print(inf[8]);
155 | Serial.print(" ");
156 | Serial.println(inf[9]);
157 | Serial.println("----------------------------");
158 | break;
159 | case POINTCLOUD_DATA:
160 | ShowData(inf);
161 | Serial.print("The point cloud data are: ");
162 | Serial.print("x: ");
163 | Serial.print(inf[6]);
164 | Serial.print(" ");
165 | Serial.print(inf[7]);
166 | Serial.print(" ");
167 | Serial.print("y: ");
168 | Serial.print(inf[8]);
169 | Serial.print(" ");
170 | Serial.print(inf[9]);
171 | Serial.print(" ");
172 | Serial.print("z: ");
173 | Serial.print(inf[10]);
174 | Serial.print(" ");
175 | Serial.println(inf[11]);
176 | Serial.println("----------------------------");
177 | break;
178 | }
179 | break;
180 | }
181 | }
182 |
183 |
184 |
185 |
186 |
--------------------------------------------------------------------------------