New Top

All Products By Category

Pulse Sensor I

Making a Pulse (SPO2) Sensor

Many electronic hobbyists and people who are interested in science are aware that the human pulse may be detected by shining a light through a finger or earlobe. The technique is formally called photoplethysmography generally, but also more simply pulse oximetery and PSO2 sensing. It is the basis for the PSO2 (pulse and oxygen saturation instruments) that you may have experienced in a hospital. Inexpensive (~$50) consumer grade devices are now also available in drug stores and online.

Although the discovery of the principles involved in pulse oximetry dates to 1935, the development of smaller, more simple machines didn’t happen until the 1980s (following LED and photo-detector development). Pulse oximetery then revolutionized oxygen-level monitoring during anesthesia, and has since become common in other parts of hospitals and found several other medical applications. These include non-invasively sensing respiration, affective state (emotion), and general fitness. More on that later.

Electronic hobbyists who have tried this technique themselves are often frustrated or disappointed due to some of the challenges in sensing the signal. The optical signal itself is not large, in the range of one tenth of one percent ( 1 / 1000 ratio). For electronic hobbyists, one way to think about this signal is a 1 volt AC signal sitting on a 1000 volt DC offset. This makes it necessary to shine as much possible light as possible through the finger or earlobe, while taking care not to saturate (max out) the photodetector.

Several forms of noise also can degrade the signal. Below is a short list of major forms of noise and error in the signal, and their causes. Because of the small signal size of the signal in the illumination domain, any movement of the sampled body part in relationship to the sensor, can appear as an optical signal many times as a large as the desired optical signal. Any light that leaks into the sensor from outside will also register as a noise source. Finally, once the signal is translated into an analog electrical domain, high-gain analog amplifiers often couple AC hum (50 / 60 hz) in power lines into noise that appears in the output signal.

There are some additional challenges in constructing PSO2 sensors that will work successfully on a wide range of people and conditions. Even when using the same LED illumination, the amount of light reaching the sensor can vary significantly with finger size (ever shake hands with a football lineman?), skin color, and even things like nail polish. This usually makes it necessary to control the amount of “raw” illumination, as well as the gain of the photo-detector. PSO2 sensor makers have also noted very large changes in signal when measuring cold hands, because the body can shut down peripheral capillaries in the cold. (Or maybe it’s just MY problem). Finally, pressing too hard on the sensor results in (a “white knuckles effect” – only it’s your fingers). The medical profession just calls this “limited perfusion” (aka, no bloodflow). The medical PSO2 equipment makers have spent a fair amount of time and research trying to ameliorate some of the problems listed above.

Above is an image of an Analog Devices Pulse Oximeter Reference design. A few things can be learned from the topology. Both the LED current and the gain on the signal are adjustable by amplifiers. A single photodetector is used, but the LEDs are alternately switched in to power the red and infrared LEDs.

The first Modern Device PSO2 sensor prototype was built with op-amps, along the lines of circuit above. It did not however have variable gain on the input amplifier or a way to control LED current.¬† The sensor also contained a lot of parts for the device / product that I was looking to design. Also, without having access to control of the LED current, it turned out to be fairly hard to design a robust sensor that would work on a wide range of fingers. So the sensor languished in the limbo of “working but not quite finished projects”.

This is not to say that a bolted down LED current and photo-detector gain will not work. Others have also moved ahead with hobbyist-oriented PSO2 sensor projects that do work and yield valuable ideas on possible approaches to the problem. Also a project that works for “most” users is still better than not having access to a useful sensor at all.

When I discovered the Silicon Labs SI1143 chip I immediately thought about the languishing PSO2 sensor and a way to more elegantly bring it back to life. First let me say that the SI1143 chip was in no way designed to be used as PSO2 sensor. The datasheet mentions applications such as proximity sensing in cell phones and in faucet sensors for public restrooms. But I realized that the sensor had everything I needed with digital control over all the resources. The SI1143 was engineered to drive three LEDs  at up to very high levels of LED current, and very short pulses, all under I2C (digital) control. It also has some options regarding a couple of photo detectors. Although lacking a variable gain amplifier it never the less has the possibility of controlling gain, just by increasing the integration time of the photo-detector, this also causes the LED pulses to be longer.

The three separate LED drivers in the SI1143 chip also seemed ideal for driving driving separate red and infrared LEDs that are necessary for PSO2 calculations. So with that idea we spun up a little board, got some boards made and populated them. The boards were designed to be used with a used with a JeeNode, so I neglected the regulator and I2C level shifter that are included with most of our 3.3 volt sensors. I think it will still work fine with just a traditional Arduino with just a couple of resistors to limit currents in the signal level shift. Don’t try to power the sensor from 5 volts though, according to the datasheet it is not tolerant of 5 volt levels.

I’ll talk about the software and some fun things to do with the sensor in two or three further posts. In the mean time I’ll just leave with you a bit more today. Reading the datasheet, we were not at all dismissive of other things this chip can do, and we are hard at work spinning it up on a board that is more optimized for proximity sensing. In the meantime though, if your proximity sensing needs only go out to six-eight inches, don’t wait. This sensor works great as a proximity sensor. It will compete very favorably with the Sharp proximity sensors that see a lot of duty with small robots. The pulse sensor has no dead spot like the Sharp sensors and also unlike the Sharp sensors, you have access to all of the details about sampling rates and low power implementations.

As a teaser for tomorrow, here’s an image of one of the first heartbeat waveforms I saw from the sensor. This is from a simple Processing sketch that graphs an AC (changing) analog input, while ignoring the DC (steady-state) input.

If you want to get your sensor and follow along with the blog, the link is here.