In this illustration we will going to wire the heart beat measuring module. This module compose of two devices, the IR LED and the Photo Transistor to detect the pulse of the finger, when the module detect a Heartbeat it will synchronize along with the red flashing led as the pulse monitor. The photo-transistor used to obtain the flux emitted when the blood pressure pulse the resistance of the photo-transistor will change. As you can see the diagram below we chose a very high resistance, because most of the light pass through the finger it will absorbed. The most important is to keep the shield stray into the phototransistor. Avoid light from the surrounding because the light is mostly base 50Hz or 60Hz fluctuate, so heartbeat will add wave noise to the module.
Required Components
- Arduino Board
- Heart Beat Measuring Module
- Jumper / DuPont Wires
- Solder Less Bread Board
Wiring Diagram
Arduino Sketch 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 26 27 28 29 30 31 32 |
/* $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 14CORE TEST CODE FOR HEART BEAT SENSOR MODULE 1. Compile the code to your arduino board 2. Open your serial communication to see the result 8888888888888888888888888888888888888888888888888888888888 */ int sensorPin = 0; // Connected to Arduino Analog Pin A0 double alpha = 0.75; int period = 100; double change = 0.0; double minval = 0.0; void setup () { Serial.begin (9600); // Open serial communication at baud rate 9600 } void loop () { static double oldValue = 0; static double oldChange = 0; int rawValue = analogRead (sensorPin); // Reading analog input double value = alpha * oldValue + (1 - alpha) * rawValue; //value 1 Serial.print (rawValue); Serial.print (","); Serial.println (value); oldValue = value; delay (period); } |