กลับไปหน้ารวมไฟล์
simple-heart-rate-sensor-using-arduino-016888-en.md

The project I made right now was just for fun. I wanted to make a simple heart rate sensor that would work well for most users. This is not my original idea so I would like to give credit to XTronical for making the following video:

I got my idea at about 5:35

This is a very simple sensor as you will not not need any libraries.

Optical Biometrics: Human Pulse Sensor

Reading a temperature sensor is passive. Reading the complex biology of a human being requires active algorithmic filtration. The Simple Heart Rate Sensor uses an optical technique called Photoplethysmography (PPG) to 'see' the invisible microscopic expansion of capillaries inside a human fingertip synced to the heart.

The Optical Reflection Principle

The PulseSensor module looks like a tiny red sticker you strap to your finger or earlobe.

  1. The Transceiver: It contains a super-bright Green LED and an ambient light sensor looking back at the skin.
  2. The Physics: When your heart pumps, a microscopic surge of blood rushes into your finger capillary. Blood absorbs green light.
  3. Therefore, every single time your heart beats, the light sensor detects a tiny, fraction-of-a-second drop in the reflected green light!

Calculating BPM via Peak Detection

The raw analog signal coming into Arduino Pin A0 is a chaotic, squiggly wave full of physiological noise (breathing, moving, electrical hum).

  • You cannot just write if (analogRead(A0) > 500). It will fail.
  • You must use an algorithmic Threshold Peak Detector.
  • The code establishes a dynamic threshold. When the squiggly wave sharply spikes over the threshold line, the Arduino tags it as Beat 1.
  • It captures the millis() timestamp.
  • When the wave spikes again, it captures Beat 2.
  • The Equation: Time between beats = 800 milliseconds. BPM = 60,000 / 800 = 75 Beats Per Minute!
  • The Arduino flashes an external LED exactly in sync with the blood flow!

Biometric Build Components

  • Arduino Uno/Nano (Excellent 10-bit analog conversion).
  • PulseSensor Amped Module (A generic photoresistor will NOT work because it requires complex onboard operation-amplifier noise filtering chips!).
  • An OLED Display or 16x2 LCD to print the huge BPM: 75 text.
  • A velcro finger-strap (Keeping the sensor perfectly still against the skin is mandatory).

ข้อมูล Frontmatter ดั้งเดิม

apps:
  - "1x Arduino IDE"
author: "24Ishan"
category: "Science & Simulation"
components:
  - "1x Arduino Nano R3"
  - "1x Ear-clip Heart Rate Sensor"
  - "1x Jumper wires (generic)"
description: "Biometric analysis! Utilize an optical pulse sensor attached to a fingertip to mathematically calculate real-time Beats Per Minute (BPM) and graph the human heartbeat."
difficulty: "Easy"
documentationLinks: []
downloadableFiles:
  - "https://projects.arduinocontent.cc/d4a7eff0-5c17-4b1a-8686-069a46c4f14a.ino"
encryptedPayload: "U2FsdGVkX18IMSlqniasZ0sRlWP2cDDpeF/kXh875dssDnAbQ8QLVfW7afZ/pKfJ7ad535re+X1eqzKb1E72Vnz/ofsYXsfhJ+8QgTO31g4="
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/simple-heart-rate-sensor-using-arduino-016888_cover.jpg"
lang: "en"
likes: 9
passwordHash: "47dea670c5db61ade97057191094bd7fd355fbf83258f6ca2fd7c9c8b5e0ed28"
price: 299
seoDescription: "Build a Simple Heart Rate Sensor using Arduino Nano. Learn heart rate monitoring with easy-to-follow steps, circuit diagrams, and code."
tags:
  - "data collection"
  - "monitoring"
title: "Simple Heart Rate Sensor Using Arduino"
tools: []
videoLinks:
  - "https://www.youtube.com/embed/GKJPmA6ggVY"
views: 38216