Introduction: Arduino Heart Rate Monitor

About: Part software developer, part maker.

Hi Everyone,

I’ve built this handheld Arduino controlled heart rate monitor.

Step 1: What I've Used - Materials

Some time ago, I’ve ordered this heart rate sensor of eBay, with the idea to fabricate a device that can be handheld and will show you the current heart rate, much in the style of the Star Trek Tricorder.

The device I’ve built consists of an Arduino Pro Mini with a pulse sensor and an OLED display.

The sensor is originally developed by a company called World Famous Electronics and was started as a Kickstarter campaign in 2011. They provide a library for the Arduino so you can interface it very easily. I’ll leave a link to it down in the description.

To display the beats per minute measurement, the Arduino is connected to a mini OLED.

Some of the components used in the project (Affiliate links):

Arduino Pro Mini https://www.banggood.com/custlink/3GD3mkeDj9

PulseSensor https://www.banggood.com/custlink/mmD3GM0mLo

Mini OLED https://www.banggood.com/custlink/3D3mmUBvO6

Soldering Station https://www.banggood.com/custlink/3mmG3U6GaQ

Solder https://www.banggood.com/custlink/G3m3KU6Daq

Electrical Snips https://www.banggood.com/custlink/vKG3GMB3j1

Rotary Tool https://www.banggood.com/custlink/Gv333M4D0p

Step 2: Schematic

The display uses the I2C protocol so it is only connected with 4 wires. On the schematic you can see that that other than the power wires of both the sensor and the OLED, we need to connect just 3 more wires.

The A0 pin of the pulse sensor is connected to the A0 analog input of the Arduino, the SDA pin of the display is connected to the A4 analog input on the Arduino and the SCL is connected to A5 analog input.

The entire project is powered by 3 AA batteries that are housed in the top of the handle which used to be an accelerator for a spinning toy. The batteries input is connected to the raw input of the Arduino pro mini.

Link to schematic on EasyEda:

https://easyeda.com/bkolicoski/Arduino-Heart-Rate-Monitor

Step 3: Code

The code for the Arduino is very simple and it’s just a mixture of both the examples for the OLED and the sensor.

At the beginning, we have the libraries definitions and initialization for the OLED and the sensor. Next is the definition of the two images I’ve used in the project, my logo and the heart icon used when displaying the beats per minute.

In the setup function we make sure that we can communicate with both the sensor and the screen and if everything goes well, we display the boot logo.

In the loop section we first get the current BPM value from the sensor and we then check if we saw the rising edge of a heartbeat for 5 times in a row in order to present that BPM value. If not we display a message on the screen so the user can wait.

I did it like this to get rid of any glitches in the data so we only show values once we know we have a stable output from the sensor. The entire source code is hosted on my GitHub account and you can find it at the link below.

https://github.com/bkolicoski/arduino-heart-rate-monitor

Step 4: Enclosure

I’ve first made all of the connections on a breadboard and after verifying that everything works I’ve proceeded to make the enclosure.

After opening up the handle, I removed the motor that was in its bottom and started planning out the placement of the sensors. I’ve cut out two openings, one for the sensor and another one for the screen. After cleaning out both holes with a file, I’ve glued the screen and the sensor to one side of the plastic handle and continued with the wiring.

Since I worked with an Arduino Uno for the prototyping, I uploaded the same sketch to an Arduino Pro Mini before I soldered anything as this is a lot more easier.

Step 5: Enjoy!

The device is by no means a scientific one and it definitely has its glitches. The sensor is quite delicate and can often output a lot of inconsistent data, especially if it’s being pressed quite hard or very little.

However this was a very fun project to build and was really educational for me as I’m working for the first time with both the sensor and the OLED.

If you have any suggestions on how I can improve the monitor then be sure to leave them down in the comments, share and like this Instructable and subscribe to my YouTube channel for more similar videos in future.

Cheers!