Introduction
Learning about the human body and how it works can be fun and educational, especially for kids. Building a heart rate monitor using the Pulse Sensor SEN-11574 and displaying the heart rate on an I2C LCD screen can be an exciting and interactive project. In this guide, we’ll show you how to create a simple yet engaging heart rate monitor that kids can use to measure their heartbeats and learn about their cardiovascular system.
Components Needed
- Arduino Board (e.g., Arduino Uno)
- Pulse Sensor SEN-11574: A sensor that detects the heart rate by measuring changes in blood volume.
- 16×2 I2C LCD Display: To visualize and display the heart rate.
- Jumper Wires: To establish connections between the components.
- Breadboard : For creating a stable prototype.
- Arduino IDE: To write and upload the Arduino code.
EN-11574 Pulse Sensor
The SEN-11574 Pulse Sensor is a specialized sensor designed for monitoring heart rate and pulse-related data in various electronic projects. This sensor is particularly popular for its ease of use and reliability in capturing heartbeat data.
The SEN-11574 Pulse Sensor is specifically designed to detect subtle changes in blood volume under the skin, making it an ideal choice for measuring heart rate and pulse. It is commonly used in projects related to health monitoring, fitness devices, and biofeedback applications.
LED (Light Emitting Diode): The sensor includes a bright red LED that illuminates the skin to help detect blood volume changes.
Photodetector: It features a photodetector (phototransistor or photodiode) that measures the intensity of light reflected off the skin. Variations in reflected light intensity correspond to the heartbeat, as blood volume changes with each pulse.
The SEN-11574 Pulse Sensor typically has three pins:
- Signal (S): This pin connects to an analog input pin on your microcontroller (e.g., Arduino). It provides the analog signal that varies with each heartbeat.
- Power (VCC): This pin connects to the power supply voltage (usually 3.3V or 5V) to operate the LED and photodetector.
- Ground (GND): Connect this pin to the ground (0V) of your power supply.
Working Principle of SEN-11574
The SEN-11574 Pulse Sensor operates by emitting a red light from the LED into the skin. The photodetector then measures the amount of light that is reflected back to it. As blood is pumped through the blood vessels with each heartbeat, it changes the blood volume in the skin, affecting the amount of light reflected. This change in reflected light intensity is detected by the photodetector and converted into an analog signal that corresponds to the heartbeat.
Circuit Diagram
Pulse Sensor SEN-11574: Connect the sensor to the Arduino as follows:
- Connect the red wire to 5V on the Arduino.
- Connect the black wire to GND (Ground) on the Arduino.
- Connect the purple (or purple/red) wire to A0 on the Arduino.
16×2 I2C LCD Display: Connect the I2C LCD display to the Arduino as follows:
- Connect the SDA pin of the I2C module to the SDA pin on the Arduino (analog pin A4).
- Connect the SCL pin of the I2C module to the SCL pin on the Arduino (analog pin A5).
Installing the Necessary Libraries:
To interface with the I2C LCD display, you’ll need to install the “LiquidCrystal_I2C” library. Here’s how to do it:
- Open the Arduino IDE.
- Go to “Sketch” -> “Include Library” -> “Manage Libraries…”
- In the Library Manager, type “LiquidCrystal_I2C” into the search bar.
- Click the “Install” button to install the “LiquidCrystal_I2C” library.
Code
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2); // Create a LiquidCrystal_I2C object
const int pulsePin = A0; // Pulse Sensor's analog output connected to A0
void setup() {
lcd.init(); // Initialize the LCD
lcd.backlight();
lcd.setCursor(0, 0);
lcd.print("Heart Rate:");
Serial.begin(9600); // Initialize serial communication for debugging
}
void loop() {
int sensorValue = analogRead(pulsePin); // Read the sensor value
int heartRate = map(sensorValue, 250, 600, 50, 150); // Map the sensor value to heart rate range
lcd.setCursor(0, 1);
lcd.print(" "); // Clear the previous heart rate reading
lcd.setCursor(0, 1);
lcd.print(heartRate); // Display the heart rate
Serial.print("Heart Rate: ");
Serial.println(heartRate); // Print heart rate to serial monitor
delay(1000); // Delay for 1 second
}
Explanation of the Code:
- We create a LiquidCrystal_I2C object to control the I2C LCD display.
- In the
setup()
function, we initialize the I2C LCD display, set up the cursor position, and begin serial communication for debugging. - In the
loop()
function, we read the analog value from the Pulse Sensor connected to pin A0. - We map the sensor value to a heart rate range (50-150 beats per minute) to provide a meaningful heart rate reading.
- We display the heart rate on the I2C LCD and print it to the serial monitor for observation.
Testing the Heart Rate Monitor:
- Upload the code to your Arduino.
- Place the Pulse Sensor SEN-11574 on your fingertip, earlobe, or any suitable location.
- Observe the heart rate displayed on the I2C LCD. It should change as your heart beats.
- Encourage kids to measure their heart rates and learn about the importance of a healthy cardiovascular system.
Conclusion
Building a heart rate monitor with the Pulse Sensor SEN-11574 and an I2C LCD display can be a fun and educational project for kids. It introduces them to basic electronics, sensor technology, and the concept of heart rate measurement. This hands-on experience can foster curiosity and knowledge about the human body and its vital functions. Enjoy the project and the learning journey!