Hi there. I am newbie at this forum. I am sorry if I do something worng. I bought a pulse sensor and arduino nano but the value come around 500-550( when I put my finger on sensor.) My sensor like this .
Looking at the code following Grumpy_Mike's link it is clear that the sensor would give an analog reading of around 550 (that is the threshold set for no activity).
Ensure that you have the device correctly mounted on your finger as shown in the video.
You can use the arduino development environment to display the results as a graph. Did you try that ?
It may be that to get the led to blink synchronised with your pulse, you have to adjust the threshold in the code but the graph should work anyway because it is not dependent on this setting.
/* 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);
}
It is possible that you are not getting a reading from your finger, these things are a bit tricky at the best of times. It requires carful positioning and the correct pressure to get a reading. Stick with the example code, your code was not fit for anything.