PulseSensor – Project Components
Project Components (Hardware)
Let’s have a look on the hardware- and software components which are required to accomplish these user stories.
Pulse sensor
The probably most important component of this project is the sensor itself which measures a human being’s pulse. The Pulses sensor provided by World famous Electronics (World Famous Electronics(1), 2021).

(World Famous Electronics(2), 2021)
The PulseSensor that we make is essentially a photoplethysmograph (PPG), which is a well-known medical device used for non-invasive heart rate monitoring. Sometimes, PPGs measure blood-oxygen levels (SpO2), sometimes they don’t. The heart pulse signal that comes out of a PPG is an analog fluctuation in voltage, and it has a predictable wave shape as shown in figure 1. The depiction of the pulse wave is called a photoplethysmogram, or PPG. Our latest hardware version, PulseSensor Amped, amplifies the raw signal of the previous Pulse Sensor, and normalizes the pulse wave around V/2 (midpoint in voltage). PulseSensor Amped responds to relative changes in light intensity. If the amount of light incident on the sensor remains constant, the signal value will remain at (or close to) 512 (midpoint of Arduino 10-bit ADC range). More light and the signal goes up. Less light, the opposite. The amount of light from the green LED that is reflected back to the sensor changes during each pulse.

Our goal is to find successive moments of instantaneous heartbeat and measure the time between, called the inter-beat interval (IBI). By following the predictable shape and pattern of the PPG wave, we can do just that.
Now, we’re not heart researchers, but we play them on this blog. We’re basing this page on Other People’s Research that seem reasonable to us (references below). When the heart pumps blood through the body, with every beat there is a pulse wave (kind of like a shock wave) that travels along all arteries to the very extremities of capillary tissue like fingertips and earlobes where the PulseSensor is most likely attached. We are measuring the change in tissue density due to the pulse wave, actual blood circulates in the body much slower than the pulse wave travels. Let’s follow events as they progress from point ‘T’ on the PPG below. A rapid upward rise in signal value occurs as the pulse wave passes under the sensor, then the signal falls back down toward the normal point. Sometimes, the dicroic notch (downward spike) is more pronounced than others, but generally the signal settles down to background noise before the next pulse wave washes through. Since the wave is repeating and predictable, we could choose almost any recognizable feature as a reference point, say the peak, and measure the heart rate by doing math on the time between each peak. This, however, can run into false readings from the dicroic notch, if present, and may be susceptible to inaccuracy from baseline noise as well. There are other good reasons not to base the beat-finding algorithm on arbitrary wave phenomena. Ideally, we want to find the instantaneous moment of the heartbeat. This is important for accurate BPM calculation, Heart Rate Variability (HRV) studies, and Pulse Transit Time (PTT) measurement. And it is a worthy challenge! People Smarter Than Us (note1) argue that the instantaneous moment of heartbeat happens at some point during that fast-upward rise in the PPG waveform.

Some heart researchers say it’s when the signal gets to 25% of the amplitude, some say when it’s 50% of the amplitude, and some say it’s the point when the slope is steepest during the upward rise event. This version 1.1 of PulseSensor code is designed to measure the IBI by timing between moments when the signal crosses 50% of the wave amplitude during that fast-upward rise. The BPM is derived every beat from an average of the previous 10 IBI times. So, when the Arduino is powered up and running with PulseSensor Amped plugged into analog pin 0, it constantly (every 2 mS) reads the sensor value and looks for the heartbeat. (World Famous Electronics(2), 2021)
Microprocessor
The Microprocessor is needed to capture and process the raw analog signals received by the Pulse sensor. We are using an Arduino uno. Arduino is an open-source electronics platform based on easy-to-use hardware and software. It’s intended for anyone making interactive projects. (Arduino(1), 2021).

Gateway and Power Supply
As Gateway we are using a Raspberry PI 4, but it should also work with previous hardware versions (though not tested). We are using the Gateway to further process the data coming from the PulseSensor through the Arduino microcontroller. To accomplish the user story to manage everything remotely, and to provide the PulseSensor data on a central place from where it can be displayed in 3rd party applications to the Health Care Professional, we decided to go for an IoT based approach to stream the PulseSensor data into the cloud. This is being achieved leveraging components out of the Eclipse IoT project, and the Gateway will host one specific component out of the Eclipse IoT suite (Eclipse Kura). Another component is running on the cloud (Eclipse Kapua). We will read later what that all means. (Eclipse IoT(1), 2021)
Breadboard
A breadboard (in our case a SYB-46, but you can user whatever you want here) is used to easily build some circuits for LEDs which represent certain states of the entire solution.
LEDs and resistors
We require 3 LEDs, ideally in the colors red, green and yellow. Red is for displaying an alarm status (pulse exceeded certain threshold), green for pulse is OK, and the yellow LED flashes whenever a pulse is detected.
We use 100Ω resistors to protect the LEDs against damage through too high currency.

Cables and Wires
A USB cable is needed to connect the Arduino (USB B plug) microprocessor with the Raspberry PI (USB A plug).
Furthermore, we need some wires to build the circuits between the Arduino microprocessor, the Gateway and the breadboard.

Prices
The below table provide some average prices for the component (9/2021). The distributors are just exemplary, there are many other options to purchase the components. Price comparisons between the various distributors will definitely pay off. Especially using an older Raspberry Pi may lead to some potential cost savings. However, we strongly recommend using the PulseSensor from the original manufacturer World Famous Electronics only ! (World Famous Electronics(3), 2021)
| # | Item | Units | Price(total) | Distributor |
| 1 | Pulse sensor | 1 | 22,00 € | https://pulsesensor.com/products/pulse-sensor-amped |
| 2 | Arduino uno | 1 | 23,00 € | https://www.reichelt.de/ |
| 3 | Raspberry PI 4 – 4Gbyte | 1 | 84,00 € | www.elv.de |
| 4 | Raspberry PI Power supply | 1 | 9,00 € | www.elv.de |
| 5 | Breadboard (SYB-46) | 1 | 2,00 € | https://csd-electronics.de |
| 6 | LEDs | 3 | 0,30 € | www.conrad.de |
| 7 | Resistors (100Ω) | 3 | 0,30 € | www.conrad.de |
| 8 | USB cable | 1 | 0,80 € | www.conrad.de |
| 9 | Experimental board jumper set | 1 | 4,00 € | https://de.rs-online.com |
| SUM | 145,40 € |
Project Components (Software)
Arduino Software (IDE)
The Arduino Software (IDE) allows you to write programs and upload them to the Arduino board. (Arduino(2), 2021)
Raspberry PI OS
We run our Raspberry PI with Raspberry Pi OS with desktop and recommended software. Other OS (without recommended software or OS Lite are possible too), Raspberry OS is based on Debian Buster. (Raspberry Pi Foundation (1), 2021)
Eclipse Kapua™
Both Eclipse Kapua™ and Eclipse Kura™ are open source incubator projects under the Eclipse Technology Project, an open source technology for IoT solution developers. Eclipse Kapua™ is a modular IoT cloud platform to manage and integrate devices and their data. (Eclipse IoT(2), 2021)
Eclipse Kura™
Eclipse Kura™ is an extensible open source IoT Edge Framework based on Java/OSGi. Kura offers API access to the hardware interfaces of IoT Gateways (serial ports, GPS, watchdog, GPIOs, I2C, etc.). It features ready-to-use field protocols (including Modbus, OPC-UA, S7), an application container, and a web-based visual data flow programming to acquire data from the field, process it at the edge, and publish it to leading IoT Cloud Platforms through MQTT connectivity. It can be seen as a solid integrated foundation of IoT services for any IoT application. (Eclipse IoT(3), 2021)
Eclipse IDE
Eclipse is an open-source programming tool for developing various types of software. Originally, Eclipse was used as an integrated development environment (IDE) for the Java programming language, but it is now also used for many other development tasks because of its expandability. (Eclipse IDE(1), 2021)
openHAB
openHab is a vendor and technology agnostic open source automation software for your home, which we use to display PulseSensor data and generated alarms on an App. (openHAB(1), 2021)
Telegraf
Telegraf actually is an agent which routes messages from an input source to an output sink. During this routing process it can e.g. process and transform data into another format. We use Telegraf in this project to receive the PulseSensor metrics data such as Pulse or the sample raw data to push them to the Grafana Live API to enable real-time monitoring dashboards.
Grafana
Grafana is a cross-platform open source application for the graphical representation of data from various data sources such e.g. InfluxDB, MySQL, PostgreSQL, Prometheus and Graphite. The recorded raw data can then be output in various display formats. (Grafana(1), 2021)
Docker
Docker is free software for isolating applications with the help of container virtualization. Docker simplifies the deployment of applications because containers that contain all the necessary packages can be easily transported as files and installed. (Docker(1), 2021)
Prices
All used software is open source, so no additional costs occur here.