아두이노 > tkkrlab - Arduino 37 sensors - KY-039 Detect the heartbeat module

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

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


BASIC4MCU | 아두이노 | 아두이노 | tkkrlab - Arduino 37 sensors - KY-039 Detect the heartbeat module

페이지 정보

작성자 키트 작성일2017-09-13 14:42 조회918회 댓글0건

본문

 

Arduino KY-039 Detect the heartbeat module

Arduino KY-039 Detect the heartbeat module

Part of Dealextream 37 sensors in a 1 kit

 

Finger measuring heartbeat module

This project uses bright infrared (IR) LED and a phototransistor to detect the pulse of the finger, a red LED flashes with each pulse. Pulse monitor works as follows: The LED is the light side of the finger, and phototransistor on the other side of the finger, phototransistor used to obtain the flux emitted, when the blood pressure pulse by the finger when the resistance of the photo transistor will be slightly changed. The project's schematic circuit as shown, We chose a very high resistance resistor R1, because most of the light through the finger is absorbed, it is desirable that the phototransistor is sensitive enough. Resistance can be selected by experiment to get the best results. The most important is to keep the shield stray light into the phototransistor. For home lighting that is particularly important because the lights at home mostly based 50HZ or 60HZ fluctuate, so faint heartbeat will add considerable noise.

When running the program the measured values are printed. To get a real heartbeat from this could be challenging.

Connecting to the Arduino

  • Sensor pin S connect to Arduino pin Analoog 0 / A0
  • Sensor pin + (middle pin) connect to Arduino pin 5+
  • Sensor pin - connect to Arduino pin GND

 

Example Code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Pulse Monitor Test Script
int sensorPin = 0;
double alpha = 0.75;
int period = 100;
double change = 0.0;
double minval = 0.0;
void setup ()
{
  Serial.begin (9600);
}
void loop ()
{
    static double oldValue = 0;
    static double oldChange = 0;
 
    int rawValue = analogRead (sensorPin);
    double value = alpha * oldValue + (1 - alpha) * rawValue;
 
    Serial.print (rawValue);
    Serial.print (",");
    Serial.println (value);
    oldValue = value;
 
    delay (period);
}
cs

https://tkkrlab.nl/wiki/Arduino_KY-039_Detect_the_heartbeat_module 

댓글 0

조회수 918

등록된 댓글이 없습니다.

아두이노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
모바일버전으로보기