Preview build — page text is a draft awaiting human review. Code badges come from real compiles. The flasher is real but not yet hardware-tested; the Playground is still a preview.

Pulse sensor (optical heart-rate, analog)

Optical pulse sensor pinout (S, +, −), 3.3 V vs 5 V power, reading BPM with the PulseSensor Playground library, and fixes for noisy or flat signals.

Analog

Community draft — report a mistake

CategorySensor
InterfaceAnalog
Voltage3–5.5 V
Typical price₹150

3.3 V or 5 V? The output sits around half the supply and swings with each heartbeat. Power it from 3.3 V on ESP32 and Pico so S stays inside the 3.3 V ADC; use 5 V on Uno.

The pulse sensor shines a green LED into your skin and measures the reflected light with a photodiode. Each heartbeat pushes more blood into the capillaries, absorbing more light, so the output wiggles in time with your pulse. An op-amp on the back amplifies and centres that signal at about half the supply voltage.

The PulseSensor Playground library samples the ADC at 500 Hz, finds each beat and gives you BPM and the inter-beat interval. On a plotter you can see the classic heartbeat waveform — great for a classroom demo.

Protect the back. The components on the back are exposed; sweat and fingers short them. Cover them with the clear vinyl dot supplied (or hot glue), and use the strap rather than holding it. This is a hobby sensor, not a medical device — don’t use it to make health decisions.

Prices are indicative (Nov 2026) and vary by seller.

Pinout

PinWhat it does
SAnalog signal (purple wire) — to an ADC pin
+3–5.5 V supply (red wire, about 4 mA)
-Ground (black wire)

Library

PulseSensor Playground by Joel Murphy, Yury Gitman, Brad Needham
Arduino IDE → Library Manager → search the name above. Each guide lists the exact version we compile against.

Common errors

Signal is flat or BPM reads 0

Press a fingertip or earlobe on the sensor with light, steady pressure — too hard squeezes the blood out, too light lets room light in. Lower the library’s threshold (setThreshold()) if beats are missed.

BPM jumps between 40 and 200

Movement and ambient light. Keep still, shade the sensor (a velcro finger strap helps) and on ESP32 use an ADC1 pin away from Wi-Fi noise.

Signal follows the room lights instead of your pulse

Light leaking around your finger is being picked up. Cover the sensor completely — the green LED should be fully hidden.

↑↓ to move · Enter to open