Heartbeat/heart rate monitoring system using Arduino and android Bluetooth
Description:
Heart rate Bluetooth-In this tutorial, you will learn how to wirelessly monitor the Heartbeat rate or Heartbeats per minute using the Pulse Sensor, Arduino, a 16×2 LCD and HC 05 or HC 06 Bluetooth Module.
The Amazon Purchase links are given below:
Bluetooth Module HC-05: https://amzn.to/2Q5p6yE
Pulse Sensor / HRM / BPM : https://amzn.to/39pWUhy
16×2 lcd: https://amzn.to/2Q9pblc
Potentiometer: https://amzn.to/2t8xXGV
Arduino Uno: https://amzn.to/39aq6ZT
Mega 2560: https://amzn.to/2SszMsI
lm7805 Voltage Regulator: https://amzn.to/2ERYoTJ
330-ohm resistors pack: https://amzn.to/2Qj1Igg
female DC power jack socket: https://amzn.to/377Pg9M
470uf capacitors: https://amzn.to/2MrN3xR
5×7 cm Vero board: https://amzn.to/37b7KWO
female headers: https://amzn.to/350w6RE
connection wires: https://amzn.to/2MvOJXd
Super Starter kit for Beginners: https://amzn.to/398dliF
Jumper Wires: https://amzn.to/2SrnBwo
Bread Board: https://amzn.to/2MxV5FM
12v Adaptor: https://amzn.to/2MuOlZk
PCB plate: https://amzn.to/2MuwNMB
Variable Supply: https://amzn.to/39d0KdP
Digital Multimeter: https://amzn.to/34WbVoa
Vero Board / stripboard: https://amzn.to/39nL9Zg
Soldering iron kit: “best” You guys should definitely purchase this: https://amzn.to/2PVwexF
Solder wire: https://amzn.to/2QlOvTS
Wire Stripper: https://amzn.to/353tYJa
wirecutter: https://amzn.to/2tV2lFj
PCB small portable drill machine: https://amzn.to/2MvQqnx
DISCLAIMER:
Please Note: these are affiliate links. I may make a commission if you buy the components through these links. I would appreciate your support in this way!
Pulse Sensor / Heart rate / Heartbeats monitoring Sensor:
This is the pulse sensor, also known as the monitoring sensor for heart rate. The transmitter and receiver led’s are supplied with this sensor unit. Hemoglobin’s light-absorbing property is used in heart rate measurement. On the underside of the monitor, light from a green LED is shown on the blood vessels just below the skin. A photodetector captures the light that is not absorbed or reflected back. As light strikes it, the Photodetector produces an electrical signal. This analog signal is converted into a digital signal, and the heart rate is determined by slight changes of this signal.
As you can see, there are three male headers labeled with S,+ and – in this pulse sensor. S is the Signal pin and connects to the Arduino’s analog pin. Plus the middle pin is the VCC pin and this pin is connected to the 3.3 or 5volt Arduino pin. While the minus pin is the floor pin, this pin is attached to the base of the Arduino.
Heart rate Bluetooth Circuit Diagram:
The HC 05 Bluetooth module + 5volt or VCC pin is connected to the 5 volts of the Arduino, the Bluetooth module ground is connected to the base of the Arduino. Link the Bluetooth module’s Rx with Arduino’s pin number 1 and link the Bluetooth module’s Tx with Arduino’s pin number 0.
Pin number 1, 5 and pin number 16 are connected to ground as you can see… 5v from Arduino is connected to pin number 2 and pin number 15… the LCD’s middle pin number 3 is connected to potentiometer or variable resistor… while the other two pins are connected to ground and 5v. Arduino pins 4 to 7 are connected to LCD pins d4 to d7.
The enable LCD pin is connected to Arduino’s pin number 8 …. pin number 9 is connected to the LCD’s RS pin … the pulse sensor’s Vcc pin is connected to the 5v, but you can also connect it to the 3.3v pin.The pulse sensor’s S pin is connected to the analog pin A0 and the pulse sensor’s ground pin is connected to the Arduino ground. Let’s talk about the programming now.
Download the App: Heartbeat monitoring app
Heart rate Bluetooth Arduino Programming:
First of all, be sure to install the library for the Pulse sensor before you begin the programming. As you can see in the programming, using Serial communication, I send the text and values to the Bluetooth device. I use the default Serial port of Arduino this time to connect with the Bluetooth device. If you don’t want to use the default serial port of Arduino, you can use the software serial library to create a different port. I have a very detailed tutorial on how to use the software library to create multiple serial ports.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
#define USE_ARDUINO_INTERRUPTS true // Set-up low-level interrupts for most acurate BPM math. #include <PulseSensorPlayground.h> // Includes the PulseSensorPlayground Library. #include <LiquidCrystal.h> // Variables const int PulseWire = 0; // PulseSensor PURPLE WIRE connected to ANALOG PIN 0 const int LED13 = 13; // The on-board Arduino LED, close to PIN 13. int Threshold = 550; // Determine which Signal to "count as a beat" and which to ignore. // Use the "Gettting Started Project" to fine-tune Threshold Value beyond default setting. // Otherwise leave the default "550" value. PulseSensorPlayground pulseSensor; // Creates an instance of the PulseSensorPlayground object called "pulseSensor" #define rs 9 #define en 8 #define d4 7 #define d5 6 #define d6 5 #define d7 4 // initialize the library with the numbers of the interface pins LiquidCrystal lcd(rs, en, d4, d5, d6, d7); void setup() { Serial.begin(9600); // For Serial Monitor // set up the LCD's number of columns and rows: lcd.begin(16, 2); // Configure the PulseSensor object, by assigning our variables to it. pulseSensor.analogInput(PulseWire); pulseSensor.blinkOnPulse(LED13); //auto-magically blink Arduino's LED with heartbeat. pulseSensor.setThreshold(Threshold); // Double-check the "pulseSensor" object was created and "began" seeing a signal. if (pulseSensor.begin()) { Serial.println("We created a pulseSensor Object !"); //This prints one time at Arduino power-up, or on Arduino reset. lcd.clear(); lcd.print("BPM:"); // BEATS PER MINUTE } } void loop() { int myBPM = pulseSensor.getBeatsPerMinute(); // Calls function on our pulseSensor object that returns BPM as an "int". // "myBPM" hold this BPM value now. if (pulseSensor.sawStartOfBeat()) { // Constantly test to see if "a beat happened". Serial.println("♥ A HeartBeat Happened ! "); // If test is "true", print a message "a heartbeat happened". Serial.print("BPM: "); // Print phrase "BPM: " Serial.println(myBPM); // Print the value inside of myBPM. lcd.clear(); lcd.print("BPM:"); lcd.setCursor(0,1); lcd.print(myBPM); } delay(20); // considered best practice in a simple sketch. } |