# Problem with Pulse Sensor

**URL:** <https://forum.arduino.cc/t/problem-with-pulse-sensor/1145728>\
**Category:** Sensors\
**Created:** [July 7, 2023, 7:48pm UTC](https://forum.arduino.cc/t/problem-with-pulse-sensor/1145728 "2023-07-07T19:48:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![markinym](https://avatars.discourse-cdn.com/v4/letter/m/dec6dc/32.png) [@markinym](https://forum.arduino.cc/u/markinym)\
**Post date:** [July 7, 2023, 7:48pm UTC](https://forum.arduino.cc/t/problem-with-pulse-sensor/1145728/1 "2023-07-07T19:48:41Z")

</div>

Hello Friends,  
I'm new to Arduino and I'm doing a project in college using one, so all help is welcome!  
I'm using an Arduino uno with a pulse sensor to check heartbeats. So when i put my finger on the sensor, the serial monitor shows more than 300BPM in seconds, which is unusual. I think the problem is in my code.

I'm using this [code](https://github.com/WorldFamousElectronics/PulseSensorStarterProject/blob/master/PulseSensor_StarterProject_Arduino/PulseSensor_StarterProject_Arduino.ino)

```arduino

/* PulseSensor™ Starter Project http://www.pulsesensor.com
 *   
This an Arduino project. It's Best Way to Get Started with your PulseSensor™ & Arduino. 
-------------------------------------------------------------
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." 

*/

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

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

// The SetUp Function:
void setup() {
  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 "550", then "turn-on" Arduino's on-Board LED.  
     digitalWrite(LED13,HIGH);          
   } else {
     digitalWrite(LED13,LOW); // Else, the sigal must be below "550", so "turn-off" this LED.
   }

delay(10);
   
}

```

I'm using this sensor. I borrowed it from a friend that was not using it, according to him, this is a variant sensor, but works perfectly.

 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/7/1/a/71a10b3bcb618c0ac410be8dd969a3d1847b073c.jpeg)

---

<div class="post-metadata">

**Author:** ![anon94801460](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@anon94801460](https://forum.arduino.cc/u/anon94801460)\
**Post date:** [July 7, 2023, 7:55pm UTC](https://forum.arduino.cc/t/problem-with-pulse-sensor/1145728/2 "2023-07-07T19:55:14Z")

</div>

For informed help, please read and follow the directions in the "How to get the best out of this forum" post, linked at the head of every forum category.

---

<div class="post-metadata">

**Author:** ![anon56112670](https://avatars.discourse-cdn.com/v4/letter/a/c5a1d2/32.png) [@anon56112670](https://forum.arduino.cc/u/anon56112670)\
**Post date:** [July 7, 2023, 8:00pm UTC](https://forum.arduino.cc/t/problem-with-pulse-sensor/1145728/3 "2023-07-07T20:00:29Z")

</div>

> [@markinym](#):
>
> a pulse sensor

Not very specific.  
Please try harder.

Why can't we see you code here?  
Is it secret?

---

<div class="post-metadata">

**Author:** ![kolaha](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/kolaha/32/966427_2.png) [@kolaha](https://forum.arduino.cc/u/kolaha)\
**Post date:** [July 7, 2023, 8:25pm UTC](https://forum.arduino.cc/t/problem-with-pulse-sensor/1145728/4 "2023-07-07T20:25:29Z")

</div>

upload example sketch analog-to-serial, open serial plotter, put finger on sensor, post resulting graph

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [January 3, 2024, 8:26pm UTC](https://forum.arduino.cc/t/problem-with-pulse-sensor/1145728/5 "2024-01-03T20:26:12Z")

</div>

Closed on January 3, 2024, 8:26pm UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
