Your smartphone can't take your car keys away, but it could still help you avoid being pulled over for drunk driving or worse, being in a serious accident. It can do this for the same reason it can tell you how many steps you've taken in a day.

Even better, by detecting changes in the way you walk or move around in real time, your phone can catch intoxication as it sets in, and while you still have time to stop drinking and sober up before getting on the road. It could also serve as an early warning system for alcoholics in treatment and their sponsors.

Researchers were able to identify when participants' breath alcohol concentration exceeded the legal limit for driving 90 percent of the time.

“We have powerful sensors we carry around with us wherever we go,” researcher, Brian Suffoletto, a member of the Department of Emergency Medicine at Stanford University's School of Medicine, said. “We need to learn how to use them to best serve public health.” Suffoletto conducted the research while at the University of Pittsburgh.

For the study, Suffoletto and colleagues recruited 22 adults. Volunteers, ages 21 to 43, came to a lab and received a mixed drink with enough vodka to produce a breath alcohol concentration of .20 percent. They had one hour to finish the drink.

Over the next seven hours, participants had their breath alcohol concentration analyzed every hour and performed a walking task while wearing a smartphone secured to their lower backs with an elastic belt. Participants walked a straight line for 10 steps, turned around and walked back 10 steps.

The smartphones registered acceleration and participants' motion — side to side, up and down, and forward and backward — while the they walked. Just by looking at changes in the way participants walked, researchers were able to identify when their breath alcohol concentration exceeded the legal limit for driving 90 percent of the time.

Suffoletto's interest is not just academic. “I lost a close friend to a drinking and driving crash in college,” he said “And as an emergency physician, I have taken care of scores of adults with injuries related to acute alcohol intoxication.”

This was a proof-of-concept study to show that our smartphones can identify functional impairments common to intoxication. No one carries their cell phone attached to their lower back, so the team plans to study people carrying phones in their hands and in their pockets in the future.

“In 5 years, I would like to imagine a world in which if people go out with friends and drink at risky levels,” Suffoletto said. “They get an alert at the first sign of impairment and are sent strategies to help them stop drinking and protect them from high-risk events like driving, interpersonal violence and unprotected sexual encounters.”

The study is published in the Journal of Studies on Alcohol and Drugs.