Introduction: Linkit One Pulse Rate Monitor

This is a really fun and cool instructable, In this instructable I'm going to show you how to build a pulse rate monitor. This device monitors your heart BPM (beats per minute) and displays it on screen. This project has a wide range of medical applications. I'm using the Linkit one board because it has an on-board WiFi and I will set up more instructables on how to take it wireless.

Also checkout my previous instructables, before diving right into this one.

Step 1: Tools and Components

So lets start with gathering all the components and tools required for this project. Most of the components come along the LinkIt one box, like battery and WiFi antenna. So here is what you need -

  • LinkIt One
  • Pulse sensor (I got it for cheap price on
  • Jumper wires
  • Micro USB Cable

Step 2: Circuit

The circuit is really simple all you have to make is three connections -

  • Linkit One A0 to Pulse sensor signal pin
  • Linkit One +5v to Pulse sensor VCC
  • Linkit One Gnd to Pulse sensor Gnd

You need to attach the arduino to your PC via a serial to USB cable, to upload the code.

Step 3: Tape

You need to cover the pulse rate sensor with some tape, as touching the sensor directly to the skin will introduce noise in the signal back to the arduino and any moisture in the skin can even damage the circuit. This problem can be solved by wrapping the sensor with some transparent tape. A thin layer of tape should do the trick and make sure it is transparent because you need the light to pass through the tape.

Step 4: Code

Now time for the code, the code can be found below. You will require the Arduino IDE with the Linkit one plugin to upload the code to the Linkit one. After uploading the code open up a serial monitor on a suitable Com port and now place the pulse sensor on your finger or the tip of your ear and you should see the BPM displayed on the screen.

//  Variables
int pulsePin = 0; // Pulse Sensor purple wire connected to analog pin 0 int blinkPin = 13; // pin to blink led at each beat int fadePin = 5; // pin to do fancy classy fading blink at each beat int fadeRate = 0; // used to fade LED on with PWM on fadePin // Volatile Variables, used in the interrupt service routine! volatile int BPM; // int that holds raw Analog in 0. updated every 2mS volatile int Signal; // holds the incoming raw data volatile int IBI = 600; // int that holds the time interval between beats! Must be seeded! volatile boolean Pulse = false; // "True" when User's live heartbeat is detected. "False" when not a "live beat". volatile boolean QS = false; // becomes true when Arduoino finds a beat. // Regards Serial OutPut -- Set This Up to your needs static boolean serialVisual = false; // Set to 'false' by Default. Re-set to 'true' to see Arduino Serial Monitor ASCII Visual Pulse void setup(){ pinMode(blinkPin,OUTPUT); // pin that will blink to your heartbeat! pinMode(fadePin,OUTPUT); // pin that will fade to your heartbeat! Serial.begin(115200); // we agree to talk fast! interruptSetup(); // sets up to read Pulse Sensor signal every 2mS // IF YOU ARE POWERING The Pulse Sensor AT VOLTAGE LESS THAN THE BOARD VOLTAGE, // UN-COMMENT THE NEXT LINE AND APPLY THAT VOLTAGE TO THE A-REF PIN // analogReference(EXTERNAL); } // Where the Magic Happens void loop(){ serialOutput() ; if (QS == true){ // A Heartbeat Was Found // BPM and IBI have been Determined // Quantified Self "QS" true when arduino finds a heartbeat digitalWrite(blinkPin,HIGH); // Blink LED, we got a beat. fadeRate = 255; // Makes the LED Fade Effect Happen // Set 'fadeRate' Variable to 255 to fade LED with pulse serialOutputWhenBeatHappens(); // A Beat Happened, Output that to serial. QS = false; // reset the Quantified Self flag for next time } ledFadeToBeat(); // Makes the LED Fade Effect Happen delay(20); // take a break } void ledFadeToBeat(){ fadeRate -= 15; // set LED fade value fadeRate = constrain(fadeRate,0,255); // keep LED fade value from going into negative numbers! analogWrite(fadePin,fadeRate); // fade LED }


TeaB4 made it!(author)2016-06-12

i can't use this code on linkit one what happen?

About This Instructable




More by appytechie:Program the Linkit One Using a Raspberry PILinkit One Controlled El-wireLinkit One - Dice
Add instructable to: