Grove - 耳夹式心率传感器

心率耳夹套件包含一个耳夹和一个接收器模块。该心率测量套件可用于监测患者和运动员的心率。结果可以通过串口显示在屏幕上,并可保存用于分析。整个系统具有高灵敏度、低功耗和便携性的特点。
特性
- 低功耗
- 使用方便
- 高灵敏度
- 完全符合RoHS标准
tip
更多关于Grove模块的详细信息请参考Grove系统
规格参数
项目 | 最小值 | 典型值 | 最大值 | 单位 |
---|---|---|---|---|
电压 | 3.0 | 5.0 | 5.25 | V |
工作电流 | 6.5 | mA | ||
耳夹线长度 | 120 | cm | ||
测量范围 | ≥30/min |
应用场景
- 心率监测器。
支持的平台
Arduino | Raspberry Pi | |||
---|---|---|---|---|
![]() | ![]() | ![]() | ![]() | ![]() |
caution
上述提到的支持平台是模块软件或理论兼容性的指示。在大多数情况下,我们只为Arduino平台提供软件库或代码示例。无法为所有可能的MCU平台提供软件库/演示代码。因此,用户必须编写自己的软件库。
使用方法
以下示例演示了使用耳夹式心率传感器测量心率的简单应用。
- 将此模块连接到Grove-Base shield的数字端口D2。并将Grove-LED连接到数字端口4。
- 将Base Shield插入Arduino/Seeeduino。

- 复制并粘贴以下代码到新的Arduino草图中。
// Function: This program can be used to measure heart rate, the lowest pulse in the program be set to 30.
// Use an external interrupt to measure it.
// Hardware: Grove - Ear-clip Heart Rate Sensor, Grove - Base Shield, Grove - LED
// Arduino IDE: Arduino-1.0
// Author: FrankieChu
// Date: Jan 22, 2013
// Version: v1.0
// by www.seeedstudio.com
#define LED 4//indicator, Grove - LED is connected with D4 of Arduino
boolean led_state = LOW;//state of LED, each time an external interrupt
//will change the state of LED
unsigned char counter;
unsigned long temp[21];
unsigned long sub;
bool data_effect=true;
unsigned int heart_rate;//the measurement result of heart rate
const int max_heartpluse_duty = 2000;//you can change it follow your system's request.
//2000 meams 2 seconds. System return error
//if the duty overtrip 2 second.
void setup()
{
pinMode(LED, OUTPUT);
Serial.begin(9600);
Serial.println("Please ready your chest belt.");
delay(5000);
arrayInit();
Serial.println("Heart rate test begin.");
attachInterrupt(0, interrupt, RISING);//set interrupt 0,digital port 2
}
void loop()
{
digitalWrite(LED, led_state);//Update the state of the indicator
}
/*Function: calculate the heart rate*/
void sum()
{
if(data_effect)
{
heart_rate=1200000/(temp[20]-temp[0]);//60*20*1000/20_total_time
Serial.print("Heart_rate_is:\t");
Serial.println(heart_rate);
}
data_effect=1;//sign bit
}
/*Function: Interrupt service routine.Get the sigal from the external interrupt*/
void interrupt()
{
temp[counter]=millis();
Serial.println(counter,DEC);
Serial.println(temp[counter]);
switch(counter)
{
case 0:
sub=temp[counter]-temp[20];
Serial.println(sub);
break;
default:
sub=temp[counter]-temp[counter-1];
Serial.println(sub);
break;
}
if(sub>max_heartpluse_duty)//set 2 seconds as max heart pluse duty
{
data_effect=0;//sign bit
counter=0;
Serial.println("Heart rate measure error,test will restart!" );
arrayInit();
}
if (counter==20&&data_effect)
{
counter=0;
sum();
}
else if(counter!=20&&data_effect)
counter++;
else
{
counter=0;
data_effect=1;
}
}
/*Function: Initialization for the array(temp)*/
void arrayInit()
{
for(unsigned char i=0;i < 20;i ++)
{
temp[i]=0;
}
temp[20]=millis();
}
- 上传代码。
- 确保传感器接触到您的耳朵皮肤。这是我们测量心率时的信号:


在第一个图中,这是检测到的心跳波形图,当心跳时会出现高脉冲。
note
如果串口监视器返回错误信息,请更改传感器的位置。
资源
项目
使用 Google Map 进行交通数据可视化:我们使用 Wio LTE cat.1 来监控交通 GPS 和其他信息。对于冷链,我们可以监控 GPS 位置以及温度和湿度。对于骑行,我们可以监控 GPS 位置以及心率。
技术支持与产品讨论
感谢您选择我们的产品!我们在这里为您提供不同的支持,以确保您使用我们产品的体验尽可能顺畅。我们提供多种沟通渠道,以满足不同的偏好和需求。