yashastronomy
Published © GPL3+

DIY Infrared Heart Beat Sensor using Arduino

Make a heart beat sensor with only an infrared emitter and a receiver, Arduino and see the real time plot of your heart beat.

BeginnerFull instructions provided14,465
DIY Infrared Heart Beat Sensor using Arduino

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
IR transmitter (generic)
you can also use an IR proximity sensor by removing or blocking its reciever.
×1
IR receiver (generic)
remove the transmitter this time.
×1
USB-A to Mini-USB Cable
USB-A to Mini-USB Cable
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

heart_beat_sensor_101

its the schematic for connecting the IR receiver and emitter to the Arduino.

Code

heart_Beat_sensor_101/code

Arduino
this is the code you need to upload to the Arduino board after making the connections.
// code by YaSh.
//Heart_Rate_Sensor code.

int reading = 0;
int reading_final;
int Heart_rate;
void setup()
{
    Serial.begin(9600);     //Initializing Serial connections.
    pinMode(A0,INPUT);
    pinMode(A1,INPUT);
    
}
//Taking readings and plotting.
void loop() 
{
      for(int i=0;i<5;i++)                   //For debugging.
      {
          reading = reading + analogRead(A0);
          //calculating sum of ambient junk readings 5 times so that we can eliminate them afterwards.
      }
      reading_final = (reading)/5;           // Average junk reading calulated.
      delay(100);
      Heart_rate = analogRead(A0)-reading_final;  // Final reading value.
      Serial.println(Heart_rate);                 //Printing and plotting.
}

Credits

yashastronomy
0 projects • 16 followers
Contact

Comments

Please log in or sign up to comment.