1

I have recently bought a Heart Pulse Sensor. Then, to check whether the sensor is working correctly or not, I uploaded this below code:

void setup() {
 
 Serial.begin(9600);
}


void loop() {
 int sensorValue = analogRead(A0);
 
 Serial.println(sensorValue);
 delay(1);        // delay in between reads for stability
}

I know, that this code doesn't calculate the actual BPM. It sends 380-400 sensor value through the Serial monitor, while the sensor is not being pressed by my finger. But when I press it with my finger, the sensor value doesn't even come out of the range 380-400. But the sensor value was supposed to jump over 500 when a beat happened.

I think, that probably means my sensor is unable to detect beats. And now, my question is, why my sensor is unable to detect beats?

After looking at some forums, I learned that this sensor can be a clone. After looking at my sensor carefully, I found some little differences in my sensor than the sensors other people used in their tutorials. And, the most spottable differences were: *the colors of my sensor's pre-soldered jumper wires were different than other sensors. *"pulsesensor.com" was written in the other sensors, but it wasn't written on my sensor

There were also some other differences. I have given three pictures of my pulse sensor below.

enter image description here enter image description here enter image description here

My final questions:-

  1. Why my pulse sensor is unable to detect beats?
  2. Is my pulse sensor a clone or not?
  3. If it is a clone, can it be fixed somehow?
  4. Do I need to buy another one?

That's all I know. Can anyone help me! Any help appreciated.

Thanks a lot!

  • how is it wired to the Uno? – Juraj Aug 18 at 10:35
  • Pulse sensor + to Arduino 3.3v (Also tried with 5v), Pulse sensor - to Arduino GND, and finally, pulse sensor Signal pin to Arduino A0 pin – Shams Sulaiman Fida Aug 18 at 11:47
  • 1
    Serial.print takes time to execute ... print only if sensorValue > 500 – jsotola Aug 18 at 16:16
  • Use 5v, if you use 3.3v, your ADC Vref will be wrong. – hcheung Aug 19 at 13:14
  • Have you looked at the pulsesensor.com/ site for more information about your sensor? Especially note this page: pulsesensor.com/pages/getting-advanced which recommends using 115200 baud "or you won't see anything". I don't know this sensor - have you tried touching either side? Tried the sample code from the site (though your code looks fine to me...). – JRobert Aug 21 at 15:57
1

Why my pulse sensor is unable to detect beats?

Chances are something wrong. The only way to tell what specifically is to keep debugging. If you don't have access to an Oscilloscope or Multimeter, this will involve checking your wiring and altering code. To check wiring, make sure:

  1. Minus (-) is to ground
  2. Plus (+) s to your + voltage
  3. S is to the A0.

Is my pulse sensor a clone or not?

It is likely. Open-Source Hardware tends to have many clones.

If it is a clone, can it be fixed somehow?

Clones sell repeatedly if they work. There is little point making a clone sensor that does not- if scamming was the point, one could ship empty envelopes. If two different people make the exact same electronics, we hope that they behave very similarly regardless of who made them.

Do I need to buy another one?

Possible but unlikely. If you can prove your sensor is defective, a seller might be willing to ship a replacement.

Try the following code to test the sensor. My guess is that you are missing something due to Serial spamming. Beyond that, taking a pulse may be tricky - the unskilled can easily pronounce some of the living as dead from just the wrist. I suggest putting it to your throat to be on the safe side.


int minSV;
int maxSV;
unsigned int Frame;

void setup() {
 minSV=500;
 maxSV=0;
 Serial.begin(9600);
}


void loop() {
 int sensorValue = analogRead(A0);
 if(sensorValue > maxSV) maxSV = sensorValue;
 if(sensorValue < minSV) minSV= sensorValue;
 Frame = Frame +1;
 if(Frame > 10000) //would be 1s if frame takes 0.1 ms
 {
  //might want to reset min and max here after debug is complete and sensor is verified to work.  Until then, reset the arduino to reset min and max.
  Frame =0;
  Serial.print("Min: ");
  Serial.print(minSV);
  Serial.print("; Max: ");
  Serial.println(maxSV);
 }
 // removed: delay(1);        // delay in between reads for stability
}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.