STEP 1 / 6ESP + IOT

IoT MQTT Based Heart Rate Monitor using ESP8266 & Arduino

In this project, we will use NodeMCU ESP8266, Arduino, and an Easy Pulse Sensor to make an IoT-based heart rate monitor. We will show the Pulse Rate or BPM value on both the OLED Display…

IoT MQTT Based Heart Rate Monitor using ESP8266 & Arduino - source illustration from page 1154
PROJECT#451
TRACKIoT
PARTS08
STAGES06
STEP 1 / 6 · Overview

Know the mission before touching a wire.

Understand what you are making, prepare the right tools, and make the workbench safe.

01

Project details

IoT MQTT Based Heart Rate Monitor using ESP8266 & Arduino is a iot project. In this project, we will use NodeMCU ESP8266, Arduino, and an Easy Pulse Sensor to make an IoT-based heart rate monitor. We will show the Pulse Rate or BPM value on both the OLED Display…

Source pages
1153-1159
Named parts
8
Build goal
Working, tested prototype
02

Tools you need

  • Digital multimeter
  • Wire stripper and side cutters
  • Soldering iron with a fine tip
  • Current-limited bench supply
  • Computer with a data-capable USB cable

Use eye protection, good lighting, and a clean insulated surface throughout the build.

03

Safety precautions

  • Disconnect every power source before changing a connection.
  • Check component polarity, pinout, and supply voltage twice.
  • Use a current limit for the first power-up.
  • Keep liquids, loose metal, and uninsulated wires away from the bench.
Ready to continue?
STEP 2 / 6 · Parts library

Gather, identify, and understand every part.

Use the standardized inventory, then open What's this? to learn each part's role, advantages, limitations, handling, and specifications.

NAMED PROJECT INVENTORY8 PART LINES
PARTTYPEQTYREADY
MArduino Board or Arduino NanoMODULE1
What's this?Image, role, pros, cons, handling & specifications
Arduino Nano compatible boardMODULE LEARNING VIEW

Arduino Board or Arduino Nano

A programmable controller that reads inputs, makes decisions, and drives the project's outputs.

What it does here

It is the control centre and must use the documented board, pin map, supply, and logic level.

Buy / compare this part

Advantages

  • Reprogrammable and reusable
  • Large learning ecosystem
  • Complex behaviour remains changeable

Limitations

  • GPIO voltage and current are limited
  • Some pins affect boot or communication
  • Loads normally need a driver

Handling

  • Disconnect power before rewiring
  • Avoid static discharge
  • Never power motors, relays, or pumps directly from GPIO

Specifications to verify

  • Use the exact model, value, package, and rating listed for Arduino Board or Arduino Nano; similar-looking parts are not always interchangeable.
  • Confirm operating voltage, logic level, pinout, memory, USB interface, and maximum GPIO current.
MNodeMCU Board ESP8266MODULE1
What's this?Image, role, pros, cons, handling & specifications
NodeMCU ESP8266 development boardMODULE LEARNING VIEW

NodeMCU Board ESP8266

A programmable controller that reads inputs, makes decisions, and drives the project's outputs.

What it does here

It is the control centre and must use the documented board, pin map, supply, and logic level.

Buy / compare this part

Advantages

  • Reprogrammable and reusable
  • Large learning ecosystem
  • Complex behaviour remains changeable

Limitations

  • GPIO voltage and current are limited
  • Some pins affect boot or communication
  • Loads normally need a driver

Handling

  • Disconnect power before rewiring
  • Avoid static discharge
  • Never power motors, relays, or pumps directly from GPIO

Specifications to verify

  • Use the exact model, value, package, and rating listed for NodeMCU Board ESP8266; similar-looking parts are not always interchangeable.
  • Confirm operating voltage, logic level, pinout, memory, USB interface, and maximum GPIO current.
MEasy Pulse Sensor, HRM-2511-E Pulse SensorMODULE1
What's this?Image, role, pros, cons, handling & specifications
IoT MQTT Based Heart Rate Monitor using ESP8266 & Arduino - source illustration from page 1154MODULE LEARNING VIEW

Easy Pulse Sensor, HRM-2511-E Pulse Sensor

A sensor converts a physical condition into an electrical signal the circuit can measure.

What it does here

It provides project input as an analogue, digital, resistive, frequency, or calibrated signal.

Buy / compare this part

Advantages

  • Adds real-world awareness
  • Can usually be tested independently
  • Often supports calibration

Limitations

  • Readings can drift
  • Placement affects results
  • Some sensors need warm-up or calibration

Handling

  • Protect the sensing surface
  • Observe supply voltage and polarity
  • Keep signal leads away from noisy power wiring

Specifications to verify

  • Use the exact model, value, package, and rating listed for Easy Pulse Sensor, HRM-2511-E Pulse Sensor; similar-looking parts are not always interchangeable.
  • Confirm supply range, output type, measurement range, accuracy, response time, and pin order.
MOLED Display, 0.96" I2C OLED DisplayMODULE1
What's this?Image, role, pros, cons, handling & specifications
IoT MQTT Based Heart Rate Monitor using ESP8266 & Arduino - source illustration from page 1154MODULE LEARNING VIEW

OLED Display, 0.96" I2C OLED Display

An output component turns an electrical control signal into light, sound, motion, switching, or displayed information.

What it does here

It presents the circuit result or acts on the physical world.

Buy / compare this part

Advantages

  • Makes system state visible
  • Can be tested separately
  • Supports clear troubleshooting

Limitations

  • Loads may exceed controller current
  • Polarity or driver direction can matter
  • Inductive loads create voltage spikes

Handling

  • Use the documented driver stage
  • Check polarity and load current
  • Add flyback protection for inductive loads

Specifications to verify

  • Use the exact model, value, package, and rating listed for OLED Display, 0.96" I2C OLED Display; similar-looking parts are not always interchangeable.
  • Confirm voltage, current, polarity, interface, driver requirements, and duty cycle.
PPower Supply, 5V SupplyPOWER1
What's this?Image, role, pros, cons, handling & specifications
IoT MQTT Based Heart Rate Monitor using ESP8266 & Arduino - source illustration from page 1154POWER LEARNING VIEW

Power Supply, 5V Supply

A power component supplies, converts, stores, or regulates energy for the project.

What it does here

It must provide the documented voltage, polarity, isolation, and sufficient current safely.

Buy / compare this part

Advantages

  • Stable power improves reliability
  • Current limiting protects first tests
  • Regulation reduces resets and noise

Limitations

  • Wrong polarity can cause immediate damage
  • Underrated parts overheat
  • Mains circuits require qualified supervision

Handling

  • Measure output before connection
  • Use a fuse or current limit
  • Insulate exposed conductors

Specifications to verify

  • Use the exact model, value, package, and rating listed for Power Supply, 5V Supply; similar-looking parts are not always interchangeable.
  • Confirm input/output voltage, current, polarity, connector, isolation, and thermal rating.
MChecking the Pulse Rate (BPM) on the OLED and CloudMODULE1
What's this?Image, role, pros, cons, handling & specifications
IoT MQTT Based Heart Rate Monitor using ESP8266 & Arduino - source illustration from page 1154MODULE LEARNING VIEW

Checking the Pulse Rate (BPM) on the OLED and Cloud

An output component turns an electrical control signal into light, sound, motion, switching, or displayed information.

What it does here

It presents the circuit result or acts on the physical world.

Buy / compare this part

Advantages

  • Makes system state visible
  • Can be tested separately
  • Supports clear troubleshooting

Limitations

  • Loads may exceed controller current
  • Polarity or driver direction can matter
  • Inductive loads create voltage spikes

Handling

  • Use the documented driver stage
  • Check polarity and load current
  • Add flyback protection for inductive loads

Specifications to verify

  • Use the exact model, value, package, and rating listed for Checking the Pulse Rate (BPM) on the OLED and Cloud; similar-looking parts are not always interchangeable.
  • Confirm voltage, current, polarity, interface, driver requirements, and duty cycle.
MOpen the Arduino Code Part Serial Monitor. Then, on SerialMODULE1
What's this?Image, role, pros, cons, handling & specifications
IoT MQTT Based Heart Rate Monitor using ESP8266 & Arduino - source illustration from page 1154MODULE LEARNING VIEW

Open the Arduino Code Part Serial Monitor. Then, on Serial

A programmable controller that reads inputs, makes decisions, and drives the project's outputs.

What it does here

It is the control centre and must use the documented board, pin map, supply, and logic level.

Buy / compare this part

Advantages

  • Reprogrammable and reusable
  • Large learning ecosystem
  • Complex behaviour remains changeable

Limitations

  • GPIO voltage and current are limited
  • Some pins affect boot or communication
  • Loads normally need a driver

Handling

  • Disconnect power before rewiring
  • Avoid static discharge
  • Never power motors, relays, or pumps directly from GPIO

Specifications to verify

  • Use the exact model, value, package, and rating listed for Open the Arduino Code Part Serial Monitor. Then, on Serial; similar-looking parts are not always interchangeable.
  • Confirm operating voltage, logic level, pinout, memory, USB interface, and maximum GPIO current.
MOpen the Serial Monitor tab for NodeMCU ESP8266 Output asMODULE1
What's this?Image, role, pros, cons, handling & specifications
NodeMCU ESP8266 development boardMODULE LEARNING VIEW

Open the Serial Monitor tab for NodeMCU ESP8266 Output as

A programmable controller that reads inputs, makes decisions, and drives the project's outputs.

What it does here

It is the control centre and must use the documented board, pin map, supply, and logic level.

Buy / compare this part

Advantages

  • Reprogrammable and reusable
  • Large learning ecosystem
  • Complex behaviour remains changeable

Limitations

  • GPIO voltage and current are limited
  • Some pins affect boot or communication
  • Loads normally need a driver

Handling

  • Disconnect power before rewiring
  • Avoid static discharge
  • Never power motors, relays, or pumps directly from GPIO

Specifications to verify

  • Use the exact model, value, package, and rating listed for Open the Serial Monitor tab for NodeMCU ESP8266 Output as; similar-looking parts are not always interchangeable.
  • Confirm operating voltage, logic level, pinout, memory, USB interface, and maximum GPIO current.
Ready to continue?
STEP 4 / 6 · Source code

Confirm the hardware-only control path.

This project does not include firmware in the source. The circuit itself provides the required behaviour.

01

How to connect

  1. Match every controller label to the circuit view and source pin map.
  2. Join grounds before signal wires when separate low-voltage supplies are used.
  3. Keep motors, relays, pumps, and other loads on a suitable driver and external supply.

Common mistakes

Reversed VCC/GND, board-label versus GPIO-number confusion, missing common ground, and charge-only USB cables.

Troubleshoot

Disconnect loads, continuity-test one path at a time, then test with a current limit.

02

Software preparation

No IDE, board package, library, or firmware upload is required for this project.

If you add a programmable controller as an extension, document its pin map separately.

03

How to upload code

The original design is implemented entirely in hardware, so proceed after verifying the circuit and supply.

Ready to continue?
STEP 5 / 6 · Build

Assemble, deploy, test, and troubleshoot.

Use the complete source notes in build order, then pass the final checks before calling the project finished.

ASSEMBLY

Build in functional stages

  • Power and regulation
  • Controller or processing stage
  • Inputs and sensors
  • Outputs and loads
  • Enclosure and strain relief
TEST

Power up safely

  • Inspect unpowered continuity first
  • Apply the lowest safe current limit
  • Measure supply rails before signals
  • Add one load at a time
  • Record expected and actual results
TROUBLESHOOT

Work from simple to complex

  • Confirm power, ground, polarity, and orientation
  • Compare each pin with the source
  • Test inputs separately from outputs
  • Replace only one variable at a time
  • Power off before every correction
PROJECT-SPECIFIC BUILD NOTES

Follow the documented instructions.

These notes come from this project's source and remain in their original order.

01

Project overview

Project build note

In this project, we will use NodeMCU ESP8266, Arduino, and an Easy Pulse Sensor to make an IoT-based heart rate monitor. We will show the Pulse Rate or BPM value on both the OLED Display and the MQTT Dashboard. In one of our previous projects, we used an Optical Pulse Sensor with NodeMCU ESP8266 that could connect to a WiFi network and regularly send the Heart Rate (BPM) value to the Thingspeak Server.

With the free version of Thingspeak Server, you can only do certain things. The data doesn't get sent to Thingspeak Server until 15 seconds have passed. Because of this, we need to choose a method that can easily meet our needs. MQTT protocol fulfills our requirements. MQTT is a lightweight messaging protocol for networks with low bandwidth, high latency, and low reliability. Because of its features, MQTT is a great way to send a lot of sensor messages to platforms for analytics and cloud solutions. So, Ubidots is a good MQTT platform for IoT projects. With the Ubidots platform, we can send data to the cloud from any device that can connect to the Internet. In this IoT MQTT Based Heart Rate Monitor Project, the Easy Pulse Sensor will be connected to Arduino and ESP8266. First, we will show the Pulse Rate Data on the OLED Display. The data will then be sent to the Ubidtos MQTT Cloud through the WiFi connection.

Easy Pulse Sensor

The Easy Pulse Sensor is a pulse sensor that you can make yourself. It is made for hobbyists and educational uses. It is used to explain how photoplethysmography works (PPG). PPG is a non-invasive way to find the pulse wave of the heart and blood vessels from a fingertip. A transmission mode PPG probe (HRM-2511E) is used in the Easy Pulse Sensor. On one side of the Sensor, the finger is lit up by an infrared light source. On the other side of the sensor is a photodetector that measures small changes

in the intensity of the light that gets through. These changes are caused by changes in the amount of blood in the tissue. The onboard components and instruments give an analog PPG waveform that is clean and filtered. The digital pulse output is also shown by the LED on the board. Both the analog and the digital signals match the heartbeat. Block Diagram: IoT Based Heart Rate Monitor using ESP8266 Arduino on MQTT Let's look at the block diagram to make things clear and easy to understand. This is a simple diagram that shows how the project will work: ESP8266, Arduino, and a pulse sensor are used to make an IoT-based heart rate monitor. First, we hook up the Pulse Sensor to the Arduino. We send the data from Arduino to NodeMCU ESP8266 through UART Communication. We could have put the Pulse Sensor directly on the NodeMCU ESP8266 Board. But the pulse sensor doesn't seem to be working and the Serial Monitor doesn't show anything. So it's easy to get the data from Arduino to ESP8266 by using the UART method.

The NodeMCU ESP8266 can connect to the WiFi Network. The BPM topic is then uploaded or published to MQTT Cloud Called Ubidots. As a subscriber, you can use the Ubidots Dashboard to look at the published data on your computer or phone. This is how the IoT Based Heart Rate Monitor Project works in its entirety.

02

Part Required

Project build note

Arduino Board or Arduino Nano NodeMCU Board ESP8266 Easy Pulse Sensor, HRM-2511-E Pulse Sensor OLED Display, 0.96" I2C OLED Display Power Supply, 5V Supply Connecting Wires Breadboard Circuit Diagram & Connections You can turn the block diagram shown above into a circuit diagram. I make the schematics with Fritzing. Pulse Sensor ESP8266 and Arduino are easy to connect to each other. To talk between ESP8266 and Arduino, we use the Software Serial Method. Connect the TX and RX pins of the ESP8266 to the digital 7 and 8 pins of the Arduino. Connect the pulse sensor's input to the Arduino A0 Pin. In the same way, connect the Pulse Sensor's VCC and GND pins to Arduino's 5V and GND pins.

Since the OLED Display is an I2C Module, connect its I2C Pins (SDA and SCL) to D2 and D1 on the NodeMCU. Connect the OLED Display's VCC and GND pins to the 3.3V and GND pins on the ESP8266. Checking the Pulse Rate (BPM) on the OLED and Cloud Upload the code to the Arduino and NodeMCU Board. After you've uploaded the code, attach the Probe to your finger or ear if you're using the Earlobe clip. Open the Arduino Code Part Serial Monitor. Then, on Serial Monitor, you will see the Pulse Rate or BPM Value. Open the Serial Monitor tab for NodeMCU ESP8266 Output as well. You will be able to see data coming in through Arduino's UART. Serial Monitor will also show the log of the data that was published. The BPM value can also be seen on the OLED Display, in addition to the Serial Monitor. If you don't want this project to have a MQTT connection,

you can use an OLED to see the Heart Rate data instead.

Ready to continue?
PROJECT ACHIEVED

You built IoT MQTT Based Heart Rate Monitor using ESP8266 & Arduino.

You followed the full workflow from understanding the mission to testing the finished project. That is a real engineering achievement - well done.

IoT Bidirectional Visitor Counter using ESPP8266 & MQTT project thumbnail featuring ESP8266, NodeMCU, Relay module
NEXT IOT ADVENTURE

IoT Bidirectional Visitor Counter using ESPP8266 & MQTT

Ready to reuse what you learned in another project from the same track?

Start this project
Browse all 500 projects