Skip to content
Advertisements

Interfacing 1$ Heart Pulse / Beat sensor AMPED SEN 11574 with Arduino

 

              Hello, and welcome to this tutorial where we try to use a 1$ Heart pulse sensor, which obviously won’t be so accurate, the genuine on is made by “World Famous Electronics llc” and you can visit their website where you can buy it for around 25$ and it’s sold with different accessories to hold it in your finger, you can also find it in Sparkfun for the same price, but the one I’m using is a 1$ cheapo version.

 

 

33

            This sensor is very easy to use, wire it with your board and here we go, there are also some useful codes in the sensor library.

            The optical system for heart beat measure consists of  a LED that glow on the basis of light on the skin and a photodiode that receives the reflected light, and everytime there’s a blood flow the light received by the photodiode changes value, and this signal should be clean from noises and amplified so it’s easy to detect… But for a cheap one the two lasts operations are quiet dodgy …

Wiring

11

       The first wiring is simple I just add a resistor + LED on pin13 which is the pin for the internal LED, the module has 3 wires (The genuine version has Black/Red/Purple for GND – /VCC + /Signal S … The cheapo versions can have 3 random colors just read the pins on the back)

22

In the second wiring I add a buzzer on pin 12 you can check the tutorial for how to use a buzzer also it include a song.

 

Library:

Download the library from Github here

Codes:

The codes I’ve used are from the library: “Getting started” and “BPM” and are good for interfacing your module and understand how it works.

Unfortunately the module wasn’t working good to try BPM and other codes 😦

And here’s the code I’ve used with the Buzzer, they have another one in examples, but I modified mine, don’t forget to watch the tutorial video in case you want to know why it’s difficult to measure my heart beat by this dodgy version.

/* PulseSensor Starter Project and Signal Tester
* The Best Way to Get Started With, or See the Raw Signal of, your PulseSensor.com™ & Arduino.
*
* Here is a link to the tutorial
* https://pulsesensor.com/pages/code-and-guide
*
* WATCH ME (Tutorial Video):
* https://www.youtube.com/watch?v=RbB8NSRa5X4
*
*
-------------------------------------------------------------
1) This shows a live human Heartbeat Pulse.
2) Live visualization in Arduino's Cool "Serial Plotter".
3) Blink an LED on each Heartbeat.
4) This is the direct Pulse Sensor's Signal.
5) A great first-step in troubleshooting your circuit and connections.
6) "Human-readable" code that is newbie friendly."

*/

//Code modified by www.surtrtech.com to work with a buzzer


// Variables
int PulseSensorPurplePin = 0; // Pulse Sensor PURPLE WIRE connected to ANALOG PIN 0
int LED13 = 13; // The on-board Arduion LED
int Buzzer=12;

int Signal; // holds the incoming raw data. Signal value can range from 0-1024
int Threshold = 519 ; // Determine which Signal to "count as a beat", and which to ingore.


// The SetUp Function:
void setup() {
pinMode(Buzzer,OUTPUT);
pinMode(LED13,OUTPUT); // pin that will blink to your heartbeat!
Serial.begin(9600); // Set's up Serial Communication at certain speed.

}

// The Main Loop Function
void loop() {

Signal = analogRead(PulseSensorPurplePin); // Read the PulseSensor's value.
// Assign this value to the "Signal" variable.

Serial.println(Signal); // Send the Signal value to Serial Plotter.


if(Signal > Threshold ){ // If the signal is above "519", then "turn-on" Arduino's on-Board LED.
digitalWrite(LED13,HIGH);
tone(Buzzer,1000);
delay(100);
} else {
digitalWrite(LED13,LOW); // Else, the sigal must be below "519", so "turn-off" this LED.
noTone(Buzzer);
}


delay(10);


}
Advertisements

Yassine View All

Electronics, Automation engineering student... I try to share my little experience with other electronics amateur.

One thought on “Interfacing 1$ Heart Pulse / Beat sensor AMPED SEN 11574 with Arduino Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: