Webcam Heart Rate Monitor Brings Photoplethysmography To Your PC

It seems like within the last ten years, every other gadget to be released has some sort of heart rate monitoring capability. Most modern smartwatches can report your BPMs, and we’ve even seen some headphones with the same ability hitting the market. Most of these devices use an optical measurement method in which skin is illuminated (usually by an LED) and a sensor records changes in skin color and light absorption. This method is called Photoplethysmography (PPG), and has even been implemented (in a simple form) in smartphone apps in which the data is generated by video of your finger covering the phone camera.

The basic theory of operation here has its roots in an experiment you probably undertook as a child. Did you ever hold a flashlight up to your hand to see the light, filtered red by your blood, shine through? That’s exactly what’s happening here. One key detail that is hard to perceive when a flashlight is illuminating your entire hand, however, is that deoxygenated blood is darker in color than oxygenated blood. By observing the frequency of the light-dark color change, we can back out the heart rate.

This is exactly how [Andy Kong] approached two methods of measuring heart rate from a webcam.

Method 1: The Cover-Up

The first detection scheme [Andy] tried is what he refers to as the “phone flashlight trick”. Essentially, you cover the webcam lens entirely with your finger. Ambient light shines through your skin and produces a video stream that looks like a dark red rectangle. Though it may be imperceptible to us, the color changes ever-so-slightly as your heart beats. An FFT of the raw data gives us a heart rate that’s surprisingly accurate. [Andy] even has a live demo up that you can try for yourself (just remember to clean the smudges off your webcam afterwards).

Method 2: Remote Sensing

Now things are getting a bit more advanced. What if you don’t want to clean your webcam after each time you measure your heart rate? Well thankfully there’s a remote sensing option as well.

For this method, [Andy] is actually using OpenCV to measure the cyclical swelling and shrinking of blood vessels in your skin by measuring the color change in your face. It’s absolutely mind-blowing that this works, considering the resolution of a standard webcam. He found the most success by focusing on fleshy patches of skin right below the eyes, though he says others recommend taking a look at the forehead.

Every now and then we see something that works even though it really seems like it shouldn’t. How is a webcam sensitive enough to measure these minute changes in facial color? Why isn’t the signal uselessly noisy? This project is in good company with other neat heart rate measurement tricks we’ve seen. It’s amazing that this works at all, and even more incredible that it works so well.

TI EZ430-Chronos Turned Medical Alert Wearable

Long before the current smartwatch craze, Texas Instruments released the eZ430-Chronos. Even by 2010s standards, it was pretty clunky. Its simple LCD display and handful of buttons also limited what kind of “smart” tasks it could realistically perform. But it did have one thing going for it: its SDK allowed users to create a custom firmware tailored to their exact specifications.

It’s been nearly a decade since we’ve seen anyone dust off the eZ430-Chronos, but that didn’t stop [ogdento] from turning one into a custom alert device for a sick family member. A simple two-button procedure on the watch will fire off emails and text messages to a pre-defined list of contacts, all without involving a third party or have to pay for a service contract. Perhaps most importantly, the relatively energy efficient eZ430 doesn’t need to be recharged weekly or even daily as would be the case for a modern smartwatch.

To make the device as simple as possible, [ogdento] went through the source code for the stock firmware and commented out every function beyond the ability to show the time. With the watch’s menu stripped down to the minimum, a new alert function was introduced that can send out a message using the device’s 915 MHz CC1101 radio.

Messages and recipients can easily be modified.

The display even shows “HELP” next to the appropriate button so there’s no confusion. A second button press is required to send the alert, and there’s even a provision for canceling it should the button be pressed accidentally.

On the receiving side, [ogdento] is using a Raspberry Pi with its own CC1101 radio plugged into the USB port. When the Python scripts running on the Pi picks up the transmission coming from the eZ430 it starts working through a list of recipients to send messages to. A quick look at the source code shows it would be easy to provide your own contact list should you want to put together your own version of this system.

We’ve seen custom alert hardware before, but like [ogdento] points out, using the eZ430-Chronos provides a considerable advantage in that its a turn-key platform. It’s comfortable to wear, reliable, and fairly rugged. While some would argue against trusting independently developed code for such a vital task, at least the hardware is a solved problem.

Sit Up Straight!: Open Source Bluetooth Posture Sensing

As more and more people spend their working hours behind a computer, bad posture and the accompanying back pain and back problems become a growing epidemic. To combat this in his own daily life, [ImageryEel] made PosturePack, a wearable Bluetooth-enabled posture sensor.

The PosturePack is designed to fit into a small pocket sewn into the pack of an undershirt, between the shoulder blades. It consists of a custom PCB with an ATmega32U4, BNO055 IMU, Bluetooth module,  small LiPo and power circuitry. Based on the orientation data from the IMU, a notification is sent over Bluetooth to a smartphone whenever the user hunches forward.

[ImageryEel] says although the mobile notifications worked, haptic feedback integrated into the unit would be a better option. This could also be used to remind the user to stand up and take a break now and then, and provide an alternative to a smartwatch for activity monitoring without sending every movement to someone else’s servers. Software will always be the hardest part for projects like these, especially as the device become “smarter”. Learning to recognize activity and postures is actually a good place for tiny machine learning models.

Compared The posture sensors we covered before had to be installed and set up at a specific workstation, like an ultrasound-based version attached to a chair, and a webcam-based version.

Hybrid Respirator Uses Repurposed Filters

With the coronavirus raging worldwide, 2020 has seen major shortages of personal protective equipment impact healthcare workers and individuals alike. This has led many to improvise their own solutions. One of the more complete offerings we’ve seen is this hybrid respirator build from [Ben Howard].

[Ben’s] build goes above and beyond the usual craft project masks. It uses a laser-cut chipboard frame to fit three HEPA filters, originally designed for the Roomba robotic vacuum cleaner. Two are used for exhalation, while one is used for inhalation. A small blower fan is installed with the intake filter, to provide mild positive pressure when breathing in. The assembly is wrapped up in fabric, using layers of spandex, fleece, and ripstop nylon to provide the best possible seal against the wearer’s face.

It’s a build that should appeal to those who want to breathe cleaner air and also protect others from exhaled particles that can spread respiratory viruses. We’ve seen all kind of masks hit the scene this year; the graphene-impregnated variety is one of the more interesting designs. Still, one can hope that future years lead to less reliance on such measures!

The Special Fridges Behind The COVID-19 Vaccine, Why It’s Surprisingly Difficult To Be That Cool

One of the big stories last week was the announcement of results from clinical trials that suggest a new COVID-19 vaccine developed through the joint effort of the American and German companies Pfizer and BioNTech is strongly effective in providing immunity from the virus. In the midst of what is for many countries the second spike of the global pandemic this news has been received with elation as well as becoming the subject of much political manoeuvring.

While we currently have two vaccine candidates with very positive testing results, one of the most interesting things for us is the need to keep doses of the Pfizer/BioNTech vaccine extremely cold until they are administered. Let’s dig into details of the refrigeration problem at hand.

Continue reading “The Special Fridges Behind The COVID-19 Vaccine, Why It’s Surprisingly Difficult To Be That Cool”

From Trash PPE To New PPE

As the coronavirus pandemic circles the world, a fact of daily life for millions of people has become the wearing of a face mask. Some people sport colorful fabric masks, but for many, this means the ubiquitous Chinese disposable mask. They have become the litter of our time, which as [blorgggg] notes is something that shouldn’t have to be the case. Their plastic can be recycled and made into other useful things, for example, ear savers similar to the ones many of us were 3D printing earlier in the year.

As you might imagine diving into a pile of used masks can be a little unhygienic, so the first step is to disinfect with alcohol. Then the various layers can be separated and the outer polypropylene ones collected and stacked between baking parchment to be melted on a skillet. The result is a polypropylene sheet that can be laser cut if it is thick enough, and from this are cut the ear savers. It’s not quite as neat a cut as the acrylic sheet we may be used to, but it’s adequate for the task.

While on the subject of masks, earlier in the year we presented a series in whose first part we dissected a selection.

What If You Could Design Your Own Aluminum Hand?

[Ian Davis] has decided to start over on his hand. [Ian] is missing four fingers on his left hand and has for a year now been showcasing DIY prosthetics on his YouTube channel. Back in July, we covered [Ian]’s aluminum hand.

Why aluminum? [Ian] found himself reprinting previous versions’ 3D printed plastic parts multiple times due to damage in the hinged joints, or UV damage rendering them brittle. With an ingenious splaying mechanism and some sensors powered by an Arduino, [Ian] has been wearing the custom machined aluminum hand on a daily basis.

However, as with many makers, he had that itch to revisit and refine the project. Even though the last version was a big jump in quality of life, he still found room for improvement. One particular problem was that the sensors tended to shift around and made it hard to get an accurate reading. To overcome this, [Ian] turned to a molding process. However, adding a stabilizing silicon layer meant that the design of the prosthetic needed to change. With several improvements in mind, [Ian] started the process of creating the plaster positive of his palm, working to create a silicon negative. The next step from here was to create a fiberglass shell that can go over the silicone with sensor wires embedded into the fiberglass shell.

It has been amazing to see the explosion in 3D printed prosthetics over the past few years and hope the trend continues. We look forward to seeing the next steps in [Ian’s] journey towards their ideal prosthetic!

Continue reading “What If You Could Design Your Own Aluminum Hand?”