Monitoring breathing with light in a mattress

Breathing rate is one of the first signs that a patient is getting worse, yet it is still often counted by hand. I built a sensor that measures it without cameras, wearables or contact: an optical fibre woven through a hospital mattress, and a deep learning model that reads breathing from the light that comes out of it.

Sarkar et al., Journal of Lightwave Technology 42(18), 6342 to 6350, 2024. Earlier version presented at the Optical Fiber Sensors Conference, 2023.

Try it: breathe into the speckle

Each breath presses gently on the fibre, and the speckle pattern shifts. Pick a breathing rate and watch the signal appear.

How similar the pattern is to a reference frame

How 90 pixels change over time: each column is one instant, so each breath shows as a band

Rate read from the speckle: measuring

This demo is a simplified simulation that runs in your browser, not the trained model. The rate shown is estimated by timing the peaks in the similarity signal. In the study, a convolutional neural network learned to classify one-minute speckle videos into five breathing rates from images like the strip above.

How it works

Laser light at 633 nm travels through 10 m of multimode optical fibre. Because the fibre carries hundreds of light paths at once, they interfere at the far end to form a grainy speckle pattern. Laid in seven turns, 20 cm apart, inside a hospital mattress, the fibre bends very slightly with every breath, and the speckle changes with it. A camera records the speckle as video.

Rather than looking at single frames, the model looks at change over time. Each one-minute video is turned into a single image, with time running across and a set of pixels running down, so the rhythm of breathing becomes a visible pattern that a convolutional neural network can learn.

Orange optical fibre laid in a looping S pattern across a white hospital mattress.
The fibre woven through the mattress in the lab.
Diagram: a 633 nm laser couples into the multimode fibre, which loops through a 198 by 88 cm mattress and ends at a camera connected to a computer.
The measurement chain, from laser to camera. Adapted from Sarkar et al., 2024.

What we found

  • 98%accuracy classifying five breathing rates, with sensitivity and specificity of 99%
  • 32%accuracy when the model saw single frames instead of video, showing the information is in the motion
  • 53%for a control task with no real signal, confirming the model was not learning time of day

A deeper network reached 98% where a shallow one managed 75%, at the cost of longer training. The two control experiments matter as much as the headline number: they show the model is reading breathing, not some other pattern hidden in the data.

Limits and next steps

The study used one healthy participant and five fixed breathing rates. The natural next steps are more people, irregular breathing, and predicting the rate as a continuous number rather than choosing between classes. The same sensor also led to my next project, predicting when someone is about to leave the bed.