Too often people die of an opioid overdose because no one is around to notice they’re in trouble. Now scientists are creating a smartphone app that beams sound waves to measure breathing — and summon help if it stops.

The app is still experimental. But in a novel test, the Second Chance app detected early signs of overdose in the critical minutes after people injected heroin or other illegal drugs, researchers reported Wednesday.

One question is whether most drug users would pull out their phone and switch on an app before shooting up. The University of Washington research team contends it could offer a much-needed tool for people who haven’t yet found addiction treatment.

“They’re not trying to kill themselves — they’re addicted to these drugs. They have an incentive to be safe,” said Shyamnath Gollakota, an engineering and computer science associate professor whose lab turns regular cellphones into temporary sonar devices.

But an emergency room physician who regularly cares for overdose patients wonders how many people would try such a device.

“This is an innovative way to attack the problem,” said Dr. Zachary Dezman of the University of Maryland School of Medicine, who wasn’t involved in the research.

Still, “I don’t know if many folks who use substances are going to have the forethought to prepare,” he added.

More than 47,000 people in the U.S. died of opioid overdoses in 2017. The drugs suppress breathing but a medicine called naloxone can save victims — if it reaches them in time. Usually, that means someone has to witness the collapse. Dr. Jacob Sunshine, a University of Washington anesthesiologist, notes that people have died with a relative in the next room unaware they were in trouble.

How it works

The research team settled on cellphones as potential overdose monitors because just about everyone owns one. They designed an app that measures how someone’s chest rises and falls to see if they’re slipping into the slow, shallow breaths of an overdose or stop breathing completely.

How? The software converts the phone’s built-in speaker and microphone to send out inaudible sound waves and record how they bounce back. Analyzing the signals shows specific breathing patterns.

It won’t work inside a pocket, and people would have to stay within 3 feet. The researchers are in the process of making the app capable of dialing for help if a possible overdose is detected.

Testing the device

They put the experimental gadget to the test at North America’s first supervised injection site in Vancouver, British Columbia, where people are allowed to bring in illegal drugs and inject themselves under medical supervision in case of overdose. Study participants agreed to have doctoral student Rajalakshmi Nandakumar place the app-running cellphone nearby during their regularly monitored visit.

The software correctly identified breathing problems that could signal an overdose — seven or fewer breaths a minute, or pauses in breathing — 90 percent of the time, the researchers found. Most were near-misses; two of the 94 study participants had to be resuscitated.

For a bigger test, the researchers next turned to people who don’t abuse drugs but were about to receive anesthesia for elective surgery. Rendering someone unconscious for an operation mimics how an overdose shuts down breathing.

Measuring 30 seconds of slowed or absent breathing as those patients went under, the app correctly predicted 19 of 20 simulated overdoses, the researchers reported. The one missed case was a patient breathing slightly faster than the app’s cutoff.

The findings were reported in the journal Science Translational Medicine. The researchers have patented the invention and plan to seek Food and Drug Administration approval.