아두이노 > Grove - Ear-clip Heart Rate Sensor

TODAY1,084 TOTAL680,007
사이트 이용안내
Login▼/회원가입
최신글보기 질문게시판 기술자료 동영상강좌

아두이노 센서 ATMEGA128 PWM LED 초음파 AVR 블루투스 LCD UART 모터 적외선


BASIC4MCU | 아두이노 | 아두이노 | Grove - Ear-clip Heart Rate Sensor

페이지 정보

작성자 키트 작성일2017-09-11 16:38 조회611회 댓글0건

본문

 

Grove - Ear-clip Heart Rate Sensor

Contents

 [hide

Introduction

The Heart Rate Ear clip kit contains a ear clip and a receiver module. The heart rate measure kit can be used to monitor heart rate of patient and athlete. The result can be displayed on a screen via the serial port and can be saved for analysis. The entire system is a high sensitivity, low power consumption and portable. 
Model: MED03212P
Heart rate ear clip kit 

Features

  • Low power consumption
  • Convenient to use
  • High sensitivity
  • Fully RoHS compliant

Specification

ItemMinTypicalMaxUnit
Voltage3.05.05.25V
Work Current6.5mA
Length of ear clip wire120cm
Measures Range≥30/min-

Application Ideas

  • Heart rate monitor.

Usage

The following sketch demonstrates a simple application of using the Ear-clip Heart Rate Sensor to measure heart rate.

  • Connect this module to the digital port D2 on Grove-Base shield. And connect Grove-LED to Digital port 4.
  • Plug the Base Shield into Arduino/Seeeduino.
Error creating thumbnail: Invalid thumbnail parameters
opy and paste code below to a new Arduino sketch. 
// 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
#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();
}


  • Upload the code, please click here if you do not know how to upload.
  • Make sure the sensor contacts your ear skin. This is the signal when we are measuring the heart rate:

GROVE heart rate chest belt Grove-heart rate serial
In the left of the figures which is a waveform diagram of the detected heartbeat, A high pulse comes when beating. Note: If the serial monitor return an error message, please change the position of the sensor.

Resources

Grove - Ear-clip Heart Rate Sensor Demo code

Support

If you have questions or other better design ideas, you can go to our forum or wish to discuss.


http://www.seeedstudio.com/wiki/Grove_-_Heart_rate_ear_clip_kit 

댓글 0

조회수 611

등록된 댓글이 없습니다.

아두이노HOME > 아두이노 > 전체 목록

게시물 검색

2019년 1월 2월 3월 4월 5월 6월 7월 8월 9월 10월 11월 12월
2018년 1월 2월 3월 4월 5월 6월 7월 8월 9월 10월 11월 12월
Privacy Policy
MCU BASIC ⓒ 2017
모바일버전으로보기