Hi,
I have two MR60BHA1 modules.
How do i use MR60BHA1 heart rate and breathing waveform data.
If you are still working on the feature, please let me know when it will be available.
Thanks,
Bruno
I am also looking for this information. The video on the product page looked like the device was sending waveform data, but doesn’t seem to be the case for the ones I’ve purchased.
Are you able to send any data to the module, like to request any kind of data? I followed the wiki and formulated the data packets to make requests but there doesn’t seem to be any response (other than the regular info it streams by default)
I was thinking maybe our firmware is not the latest. I noticed the module supports some kind of OTA firmware upgrade, but there are no details on the wiki or product page about it.
Looking forward to extracting the waveforms from this device…
I’d like to access the waveform as well. The demo video on the product page led me to believe waveform data for heart and breathing would be available. Are there any insights or updates on timing for an upgraded firmware that would enable these signals?
I think I am close to processing this raw output. I am pretty sure the raw data is what I am seeing on the Arduino IDE Serial Monitor, I’m just trying to figure out how to get it into the processRadarData() subroutine. I’m thinking it will require either modifying 60ghzbreathheart.h or at least accessing its public (private?) values. It will take me a while to figure out so any help is appreciated.
I am using Arduino IDE 2.2.1, an Xiao ESP32C3 and a MR60BHA1.
Here is my code so far:
#include "Arduino.h"
#include <60ghzbreathheart.h>
#include <HardwareSerial.h>
HardwareSerial MySerial(0); //Create a new HardwareSerial class -- D6/D7
// can also try hardware serial with
BreathHeart_60GHz radar = BreathHeart_60GHz(&MySerial);
#define FRAME_HEADER_1 0x53
#define FRAME_HEADER_2 0x59
#define FRAME_END_1 0x54
#define FRAME_END_2 0x43
void processRadarData() {
byte frameHeader1 = MySerial.read();
byte frameHeader2 = MySerial.read();
if (frameHeader1 == FRAME_HEADER_1 && frameHeader2 == FRAME_HEADER_2) {
byte controlWord = MySerial.read();
byte commandWord = MySerial.read();
byte lengthId1 = MySerial.read();
byte lengthId2 = MySerial.read();
int lengthId = (lengthId1 << 8) | lengthId2;
byte data[lengthId];
for (int i = 0; i < lengthId; i++) {
data[i] = MySerial.read();
}
byte checkCode = MySerial.read();
byte frameEnd1 = MySerial.read();
byte frameEnd2 = MySerial.read();
if (frameEnd1 == FRAME_END_1 && frameEnd2 == FRAME_END_2) {
switch (controlWord) {
case 0x01:
Serial.println("Control Word: Heartbeat Packet Identification");
break;
case 0x02:
Serial.println("Control Word: Product Information");
break;
case 0x03:
Serial.println("Control Word: OTA Upgrade");
break;
case 0x05:
Serial.println("Control Word: Working Status");
break;
case 0x07:
Serial.println("Control Word: Radar Detection Range Information");
break;
case 0x80:
Serial.println("Control Word: Human Presence");
break;
case 0x81:
Serial.println("Control Word: Breathing Detection");
break;
case 0x84:
Serial.println("Control Word: Sleep Monitoring");
break;
case 0x85:
Serial.println("Control Word: Heart Rate Monitoring");
break;
default:
Serial.println("Control Word: Unknown");
break;
}
}
}
}
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
MySerial.begin(115200, SERIAL_8N1, -1, -1); // at CPU Freq is 40MHz, work half speed of defined.
while (!Serial)
; //When the serial port is opened, the program starts to execute.
Serial.println("Ready3");
radar.reset_func();
Serial.println("Sensor reset!!!");
radar.ModeSelect_fuc(1); //1: indicates real-time transmission mode, 2: indicates sleep state mode.
//After setting the mode, if you do not see data returned, you may need to re-power the sensor.
}
void loop() {
// put your main code here, to run repeatedly:
radar.recvRadarBytes(); //Receive radar data and start processing
radar.showData(); //Serial port prints a set of received data frames
processRadarData(); //Process the data from the radar
delay(200); //Add time delay to avoid program jam
}