Hi! I've been working on a project using the DFRobot mmwave sensor sen0395. I installed the DRF_Radar library and found the example code to turn the built in LED on if presence has been detected and it works. I planned to get it to detect heartrate and breathingrate which the sensor is capable of, however I'm not sure where to start from here. I'm pretty sure it's an abandoned hardware because I haven't seen many recent conversations about it. I haven't found any information about how I'd go about programming an mmwave sensor to detect heart rate or breathing rate.
I am using my Elegoo Arduino Mega R3 for this project.
The Mega's 31 pin goes to the I02 pin of the sensor.
The Mega's 5v goes to the V pin on the sensor.
The Mega's Ground goes to G pin on the sensor.
The Mega's RX 0 pin goes to the RX pin on the sensor.
And the Mega's TX 1 pin goes to TX on the sensor.
There's one more pin on the sensor I didn't wire up the I01 pin. Not sure if I am supposed to do anything with that pin.
I typed sen0395 insto the IDE Library Manager and found the library. I then clicked the 3 dots ... menu beside the library name and saw the following
Choose the most appropriate to your use case and start editing, that is how most people proceed.
Good luck.
1 Like
Okay, thanks! Also does the library have a list of functions to use?
There are several tools you can use to discover the functions exposed in the class. I think you need to turn on a preference, but I'm not sure. Also, the magic doesn't happen until the compiler makes a successful pass.
If you rt click the library name (the .h files) that will open the .h file in a new tab protected from writes. Other than that starting to type should bring up a list and hovering over a member will show more information.
Here are some screen grabs of what I was talking about. Notice if you grab the right edge of the dialog box and widen it you will see what the function returns if anything. Most are just bool as in OK, NOT OK.
1 Like
Okay! I was able to find the functions. Also if I want to have the sensor detect HR and BR would I have to make my own functions for that?
Since the sensor is designed to detect human presence, but not HR and BR, you will have to figure out how to do that.
That may not be possible with the sensor, so please keep us informed of your progress.
1 Like
Okay I see. I just realized I got the wrong sensor I was supposed to get the C1001 60GHz mmwave sensor because that's the one that does fall detection, sleep detection, heart rate, and breathing rate. I wonder if the library for that sensor is different than the one my Sen0395 sensor has.
That library does not exist yet.
1 Like
If you can't find a library, do what the people who write libraries do.
That is, read the sensor data sheet carefully, which provides the information needed to to write code to access the data offered by the sensor.
1 Like
Be sure to let us know when you have finished the library and submitted it for approval.
Okay! Also I found a library for my C1001 mmwave sensor. I used the 'basic' Example from the DFRobot_HumanDetection library it uploads to the Ardurino Mega, but the initialization for the sensor fails when I run the code.
I looked online that I had to use the RX pin on the ardurino and connect it to the TX pin on the sensor and the TX to the RX pin. Though it still says "init error" after initializating.
Ok, since you are writing a library, you know how to troubleshoot that error. Keep us informed.
I was able to figure out how to get it working properly on the mmwave sensor library I found I just needed to hook up the rx and tx from the sensor to the RX1 and TX1 on the Ardurino instead of RX0 ← 0 and TX0 → 1.