User Tools

Site Tools


PhotoPlethysmoGraphy (PPG)

What is PhotoPlethysmography?

Plethysmographs measure changes in volume. The only method to measure absolute changes in blood volume accurately in the extremities is by using chamber-plethysmography. The volume change can be converted into blood flow by using $F = \partial V/\partial t$. However, in some cases, we are only interested in the relative volume, for example to see the pulsation rate of the heart. In that case, information is in the timing and not in the amplitude or shape of the signal. If that is the case, we can use electric impedance-plethysmography or photo-plethysmography (PPG). Details on the background of plethysmography can be found in the book of Webster1). A more comprehensive review on PPG is the paper of Allen from 20072). An example of a system design is the thesis of Rhee at MIT from 20003). A PPG sensor can be used in reflection mode (for example on the finger) or in transmission mode (for example on the ear) as shown in figure 14).

Fig. 1: (a) Light transmitted into the finger pad is reflected off bone and detected by a photo sensor. (b) Light transmitted through the aural pinna is detected by a photo sensor

Normally, a wavelength in the near-infrared is used because there we have the strongest modulation of the signal due to light absorption in the haemoglobin in the blood5).

One should carefully consider the advantages and drawbacks of the optical ear-lobe sensor method when designing an application. There are some clear advantages. First of all, it is non-invasive and the PPG signal is strong and robust. In addition, the electronic circuit is fairly simple and small. Because there is no electrical contact to the human body it is safe and can even be used in water. See for example the “Aquapulse” product6). The drawbacks, however, are the motion artefacts and the need for a potentiometer to adjust the signal7). The alternative for heart-rate measurements is to use ECG and detect the heart-rate from the R-R intervals.

Specifications of the presented PPG implementation

This document focuses on the following implementation:

  • optical detection using an ear-lobe clip in transmission mode
  • pulse filtering by means of a simple analog electronic circuit with a second order bandpass between the characteristic frequencies $1.54Hz$ and $2.34Hz$ ($-3dB$ points $1.0$ and $3.5Hz$) and a gain of $3700$ in the peak.
  • pulse detection using a comparator on the electronic circuit board to send out a digital signal for time-interval measurements
  • the analog electronic circuit is implemented as an add-on board for the Arduino microcontroller platform8)
  • a microcontroller board to measure the timing intervals between heartbeats and to send it to a computer using the USB bus
  • signal processing on an external computer

Some other options for the partitioning over software and hardware are possible:

  • it is an option to implement the signal post processing (for example HRV algorithms) on the microcontroller board to make a stand-alone application
  • although the filtering of the raw photo transistor output should be done electronically, it is possible to do the subsequent pulse detection in software from the sampled analog signal. This option might be advantageous to anticipate to level changes in the signal.

The sensor: the optoelectronic part

Most of the implementation found elsewhere are using the combination of an infrared-LED and a photo-transistor9) 10) 11) 12), sometimes hand-made in a wooden clothes peg13). The alternative for a photo transistor is a light-to-voltage optical sensor like the TSL25014) which can be used in combination with a TSHA520 infrared LED15). The advantage is that such a device includes a pre-amplifier which will reduce the system noise.

This report, however, makes use of ear-clips from Kyto Electronics. The opto-electronic components in these ear-clips consist of an infra-red LED and a photo-transistor. The cathode of the LED and the emitter of the photo-transistor are electrically connected and accessible via a normal stereo $3.5mm$ jack connector. Characteristics, pictures, specifications and connector details can be found on the page about the HRM2511. The ordering price of the sensor was €6,50 for the amount of five and is mainly determined by the shipping costs.

The electronics

The electronics implemented as Arduino shield is shown in figure 2.

Fig. 2: The circuit implemented as an Arduino shield

The electronic circuit has four functions:

  • Biasing of the LED
  • Biasing of the photo-transistor
  • Remove low-frequent motion-artefacts and drift
  • Isolate the heartbeat pulse

Fig. 3: Basic circuit topology

The circuit topology is shown in figure 3. In the first stage, the LED is biased. For an operational voltage of $5V$, a resistor of $\left ( V_{cc}-V_{f} \right )/I_{f} = (5V-1.2V)/65mA = 58\Omega$ can be used, with $V_{f}$ and $I_{f}$ the forward voltage and current from the datasheet (see table 1 on the HRM2511B page ). However, half of the forward current was chosen by means of a 120Ω resistor.

In the next stage, the photo-transistor is biased. The choice of this biasing resistor is made based on the example circuits in literature16) 17) 18) 19) and a value of $22k\Omega$ was used with satisfying results. The high-pass filter is a simple first-order RC circuit with a lower frequency bound of $\left (2 \pi R_{0}C_{0}\right )^{-1}$. The low-pass filter is implemented as an active filter to facilitate amplification as well. The high pass filter has a cut-off at $\left ( 2 \pi R_{2}C_{2} \right )^{-1}$ and amplifies $\left (R_{1} + R_{2} \right ) / R_{1}$ times. The high-pass filter frequency and the low–pass filter frequency have to be chosen such that we end-up with a band-pass filter to amplify the $2Hz$ frequency, because that is the steepness of the PPG pulse signal. To make the bandpass-filter more effective, the high-pass and low-pass filters are implemented twice resulting in a transfer function given by

\begin{equation} H\left ( j\omega \right )= \left [ \frac{R_{1}+R_{2}}{R_{1}} \frac{1+j\omega \frac{R_{1}R_{2}}{R_{1}+R_{2}} C_{2}}{1+j\omega R_{2} C_{2}} \frac{j\omega R_{0} C_{0}}{1+j\omega R_{0} C_{0}} \right ]^{2} \label{eq:TransferFunction} \end{equation}

and is plotted in figure 4 with the characteristic indicators.

Fig. 4: Schematic transfer function

In table 1 the component values and characteristic frequencies of the circuits found in literature are found. We can see that these are roughly the same. The values of Pico Technologies20) are used in our implementation. For $R_{1} = 10k\Omega$ and $R_{2} = 1M \Omega$, the asymptotic gain $A = \left (R_{1}+R_{2} \right )/R_{1}$ square becomes $10.200$, but is effectively $3700$ in the peak.

Webster21) Pico22) Ibrahim23) Cornell24) Maplin25)
Stage 1 Stage 2 Stage 1 Stage 2
$R_{1}$ $10.0 k\Omega$ $8.20 k\Omega$ $1.00 k\Omega$ $1.00 k\Omega$ $4.70 k\Omega$
$R_{2}$ $1.00 M\Omega$ $1.00 M\Omega$ $560 k\Omega$ $100 k\Omega$ $1.00 M\Omega$
$C_{2}$ $68.0 nF$ $100 nF$ $100 nF$ $470 nF$ $100 nF$
$A$ $(101.00)^{2}$ $(122.95)^{2}$ $(561.00)^{2}$ $(101.00)^{2}$ $(213,77)^{2}$
$f_{lp}$ $2.34 Hz$ $1.59 Hz$ $2.84 Hz$ $3.39 Hz$ $1.59 Hz$
$f_{hp}$ $236.39 Hz$ $195.68 Hz$ $1594.39 Hz$ $342.01 Hz$ $340.22 Hz$
$R_{0}$ $1.60 M\Omega$ $47.0 k\Omega$ $68.0 k\Omega$ $20.0 k\Omega$ $1.00 M\Omega$ $1.00 M\Omega$
$C_{0}$ $2.00 \mu F$ $2.20 \mu F$ $1.00 \mu F$ $10.0 \mu F$ $1.00 \mu F$ $100 \mu F$
$f_{hp}$ $0.05 Hz$ $1.54 Hz$ $2.34 Hz$ $0.80 Hz$ $0.16 Hz$ $1.59 Hz$
Tab. 1: Filter implementations of circuits in literature

Finally, the whole circuit is shown in figure 5. The sensor is now replaced by a connector, so only the biasing resistors $R_{5}$ and $R_{1}$ are visible. Between the filter stages a potentiometer is used because it appeared that sometimes the output signal was too big.

Fig. 5: Complete circuit, including connectors to Arduino

The combination of $R_{11}$ and $R_{8}$ is used to deal with the symmetrical power of $5V$ from the Arduino board. The two resistors define a reference level at $1.24V$ which is buffered by the OpAmp IC1A. The pin ANALOG_OUT is connected with one of the analog in pins of the Arduino. The comparator made with IC1D is used to do threshold detection with the reference level as detection level, and creates a digital out where the rising edge can be used for timing interval measurements.

As of 2015 there is a printed circuit board available for the circuit of figure 5 as shown in figure 6. In this figure, resistors $R_{1}$ and $R_{5}$ are placed together with the stereo jack, so that the clip can be tested without the filters.

Fig. 6: Printed circuit board for the PPG Arduino shield

As a comparison, figure 7 shows the frequency response on pin ANALOG_OUT as calculated using equation \eqref{eq:TransferFunction}. This means that the operational amplifiers are assumed to be ideal and the reference level construction with the two diodes is omitted. Besides calculated in MathCad, the circuit was simulated in MacSpice (see Schematic drawing and simulation tools).

Fig. 7: Frequency response of the final filter circuit calculated in MathCad

Finally, the circuit is made on a printed circuit board and tested. In figure 8 the oscilloscope image is shown. The blue trace is the reference level and the orange trace the PPG signal. The comparator stage will have no problem to detect the zero crossings.

Fig. 8: Oscilloscope image of measured heartbeat, measured on pin “ANALOG_OUT”

An alternative design was developed as well. It is functionally the same, but it has a different method of finding the decision level.

The software

The simple example here uses an Arduino microcontroller that detects intervals in the digital output of the presented circuit. For other implementations see the embedded readout page.

In interval mode, the output signal of the comparator (DIGITAL_OUT in figure 5) is connected to digital pin 2 of the Arduino. The concept is that this pin can generate an INT0 hardware interrupt at every low-to-high zero crossing. When doing so, the interesting information is in the time between the interrupt and the previous interrupt. This time can be measured with a resolution of $4\mu s$ which is more than accurate enough.

The code looks like:

 * Arduino code: Digital timing interval mode
const int Baudrate = 19200;
const int Digital_Input_Pin = 2;  // the pin that the heart-rate sensor is attached which contains INT0
void setup()
  Serial.begin(Baudrate);           // For sending data to the computer over USB
  pinMode(Digital_Input_Pin, INPUT);
  attachInterrupt(0, Send_Interval, RISING);  // Attach to INT0
void loop() {
  // nothing to do, its all in the interrupt handlers!
unsigned long LastTime, NewTime, j;
void Send_Interval()
  NewTime = micros();  // Resolution 4us, only one overrurn in 70 minutes
  Serial.println(NewTime-LastTime, HEX); 
  LastTime = NewTime;

Extensions and next steps

For measuring the cross-correlation between two heart-rates, we need two timed hardware inputs. This is described on the Multi-Channel PPG page. The same technology can be used for other channels like a breath sensor of an activity monitor.

Another next step can be


File Program Version Description
PPG_circuit_for_Arduino.sch Eagle 7.1 1.0 Schematic for Arduino shield with PPG sensor
1) , 4) , 9) , 16) , 21)
John G. Webster (editor), Medical instrumentation, application and design, second edition, Houghton Mifflin Company, 1992
John Allen, Photoplethysmography and its application in clinical physiological measurement, Physiol. Meas. 28 (2007) R1–R39
Sokwoo Rhee, Design And Analysis Of Artifact-Resistive Finger Photoplethysmographic Sensors For Vital Sign Monitoring, Ph.D. MIT, 2000
Note that heamoglobin and oxyheamoglobin pass equally at 805nm and have maximal difference at 660nm. This difference is used in optical oxygen saturation sensors.
Aqua Pulse - Product Details, Finnish website
The potentiometer is not absolutely required. We can live without, or we may come up with an improved circuit design which included automatic gain control (AGC)
Arduino open-source electronics prototyping platform, website
10) , 17) , 24)
Cornell, BioNB 442: Lab 9, Finger Plethysmograph
11) , 18)
Pulse Rate Monitor module supplied by, designed by the teaching resources department of the University of Middlesex
12) , 19) , 23)
Dogan Ibrahim, Kadri Buruncuk, Heart rate measurement from the finger using a low-cost microcontroller
13) , 20) , 22)
Calculating the heartrate with a pulse plethysmograph, Pico Technologies,
TSL250, TSL251, TSL252, Light-to-voltage optical sensors, Texas Intstruments Datasheet
TSHA520, High Speed Infrared Emitting Diode, $870 nm$, GaAlAs Double Hetero, Vishay Datasheet
Pulse Rate Monitor module supplied by, designed by the teaching resources department of the University of Middlesex,
methods/ppg/ppg_main.txt · Last modified: 2017/12/20 16:48 by glangereis