Introduction: Heart Rate Monitor

Picture of Heart Rate Monitor

This Instructable is about making a heart rate monitor using a piezoelectric sensor. I have read somewhere in the Medical Hacks section of "Hackaday Blog" and thought to give it a try. Also I've added a Processing sketch that draws a graph of the current heart rate readings. So let's get started.

Step 1: Things You Need..

Picture of Things You Need..

1. Piezoelectric Sensor ( I removed the piezo sensor from an old buzzer that I have and used it, the removed part is shown in the picture)

2. Processing IDE

3. Arduino Board ( to read the values from the sensor)

Step 2: Getting Started...

Picture of Getting Started...

Just plug in the analog output of the sensor to any analog pins on the board (I've used A0) and connect the 5V and GND lines of the sensor. I got my piezo sensor from the buzzer that I have(broke the casing of the buzzer). and hooked it to my board as mentioned in the above lines. Now write the code in the Arduino IDE to read the analog values coming from the A0 pin and send the data to the serial port. I have attached the .ino file for your reference.

After you have flashed the code to the board, open the serial monitor and check for the readings. Initially when no pressure is applied on the piezo sensor, the readings shown on the monitor are zero. When you gently press the piezo sensor to one of your fingertips, it starts showing some values. these values correspond to the vibrations produced by your pulse. When I've tried I got a noise free and normal heart beat(72bpm). I don't know whether these are the accurate values, because I don't have any device to measure my heart rate. So I've done some pushups and checked my pulse again surprisingly it showed (82-85bpm). Hence I think the values read from the sensor might be, if not accurate, but atleast approximate values.

Step 3: Displaying Sensor Values...

Picture of Displaying Sensor Values...

The values that are read from the sensor in the previous step are now redirected to the serial port of the processing monitor. In order to do this, make changes in the following step.

myPort = new Serial(this, "COM3", 9600);

Here COM3 is the serial port where the values are being sent by Arduino. You may have to change it to your port number probably. You can find that in Tools-->port inside Arduino IDE. After modifying the sketch, run it. Make sure that you have closed the serial monitor of the arduino before you do this, because both sketches will try to listen at the same port and this may cause the processing sketch to fail. Now you can see the live graph being plotted by the sketch.

Try to understand the code, and make a few tweaks and changes( or write your own sketch) to make it look more similar like a real time heart rate monitor

Comments

Silverwood project (author)2017-07-15

I'm sorry but this is incorrect. The number you get from the analogue read shows the strength of how hard you're pressing on the piezo element. To get the heartbeat, you want to measure the time between two spikes (where the pressure on the piezo is higher). How could the arduino possibly calculate the BPM if it doesn't factor in the time? I can see the data you got looked realistic, but that's just a coincidence.

Also, I agree with what you have said, and if time permits I will check that out as well and post my results. Thanks !!

FadiJ (author)2016-05-15

What do you mean by connecting the 5v and GND of the sensor?

FadiJ (author)2016-05-15

What do you mean by connecting the 5v and GND of the sensor?

FadiJ (author)2016-05-15

What do you mean by connent the 5v and GND of the sensor?

MootazH (author)2016-03-07

Hi
it shows different value I don't think that it's working

rusov (author)2015-07-19

Hi, i've got some problems in this line:

void serialEvent (Serial myPort) {

like a declaration error, how could I solve this?

About This Instructable

7,681views

37favorites

License:

Bio: I am a Computer Science Graduate, and a Data Warehouse Engineer by profession. I am a DIY enthusiast, ardiuno/raspi hobbiyst, Love to hack electronics ... More »
More by BhattaG:Home AutomationWater Level MonitoringNight Light
Add instructable to: