How does your phone track steps?

 

The short answer

Your phone uses an accelerometer, gyroscope, and sophisticated algorithms to accurately track your steps. The accelerometer detects the motion and speed of your steps, the gyroscope monitors your orientation and rotation, and algorithms process this data to distinguish steps from other movements.

The long answer

Your smartphone can do a lot: make calls, send texts, take pictures, help you navigate, surf the web (remember when people said "surf the web"?), and so much more.

Phones even take it a step further (sorry) and act as pedometers, counting your steps.

Here are three key mechanisms that a smartphone uses to track how many steps you take:

Mechanism #1: Accelerometer

An accelerometer is a device that measures acceleration, or the rate of change of the velocity of an object. As you walk, your hips and legs alternate between a swing state and a stance state. When your leg swings forward, there is an acceleration, but once you plant your foot, your leg starts to decelerate.

Trust me, it is far easier to understand this diagram when it's only showing one leg.

Your phone's accelerometer measures the cycle of acceleration and deceleration as you walk or run. The phone interprets one complete cycleโ€”from acceleration as your foot leaves the ground to deceleration when it landsโ€”as a single step.

Mechanism #2: Gyroscope

A gyroscope is a device that tracks the orientation and rotation of an object in three-dimensional space. It's how your phone knows to rotate your screen when you turn your phone on its side to watch a movie. But it also helps with tracking an accurate step count.

As a person walks, the gyroscope in their phone (carried in a pocket, hand, or armband) may capture a slight rotation with each step. This can help differentiate between motions with similar acceleration patterns but different orientation patterns.

For example, if you're in a car in stop-and-go traffic, you're technically experiencing patterns of acceleration and deceleration. But with your phone steadily pointing up to provide you directions, there is no change in rotation. In essence, the gyroscope adds context to the data captured by the accelerometer to make sense of which activity you are doing.

Mechanism #3: Algorithms

A lot of data is captured by the accelerometer and gyroscope, so it must be processed and run through an algorithm to make sense of what's going on.

For instance, the accelerometer data is processed to capture the key points when a step began and a step ended in order to calculate the step count. An algorithm analyzes the patterns of acceleration detected by the accelerometer to identify the signature movements of walking or running.

But since there are many types of steps (e.g. running, walking, stepping up stairs) and users of pedometers (e.g. people with a hip injury, elderly people), many complex algorithms are used to calibrate to the specific user and sense what type of step is occurring. In short, algorithms in your phone's software take the raw data, filter out non-step movements to avoid miscounting, and produce a pretty accurate step count.

๐Ÿง  Bonus brain points

How can you improve the accuracy of your phone's step counter?

Here are three ways you can improve the accuracy of how your phone measures your steps:

  1. Wear your phone in your pocket Placing the device at your hip will allow the accelerator, gyroscope, and algorithms to most accurately count every step you take (and filter out non-step motions). Leaving it in your bag makes it difficult to accurately track and analyze your motion data.

  2. Calibrate your step counter If you feel like the step counter is off, you can take steps (pun intended) to recalibrate your device.

  3. Provide personal data like your height, weight, age, and sex These factors play into the algorithms your phone uses to determine how many steps you take. By providing this information to your phone's step counting software, you can help ensure greater accuracy in the count.

Curious about how the world works?

Today You Should Know is a free, weekly email newsletter designed to help you learn something new every Friday.

Subscribe today ๐Ÿ‘‡


Check out some other curious questions:


Sources

Bennett, H. (2023, October 7). Hereโ€™s how inaccurate your phoneโ€™s step counter could be. BBC Science Focus Magazine. https://www.sciencefocus.com/science/fitness-app-step-count

Grujiฤiฤ‡, R. (2023, November 28). Gait cycle. Kenhub. https://www.kenhub.com/en/library/anatomy/gait-cycle

Mayank, M. (2019, August 22). How Does a Gyroscope Sensor Work in Your Smartphone?. TechAhead. https://www.techaheadcorp.com/knowledge-center/how-gyroscope-sensor-work-in-smartphone/

Navigine. (2020, September 22). Lecture 1: Pedometer Algorithm explained. YouTube. https://www.youtube.com/watch?v=cpwrwPTqMac

StepsApp GmbH. (n.d.). Does a pedometer count exactly?. StepsApp. https://steps.app/en/blog/tech/does-a-pedometer-count-exactly

Yao, Q., Wang, J., Sun, Y., Zhang, L., Sun, S., Cheng, M., Yang, Q., Wang, S., Huang, L., Lin, T., & Jia, Y. (2022). Accuracy of steps measured by smartphones-based WeRun compared with ActiGraph-GT3X accelerometer in free-living conditions. Frontiers in Public Health, 10. https://doi.org/10.3389/fpubh.2022.1009022

Zhao, N. (2010, June). Full-Featured Pedometer Design Realized with 3-Axis Digital Accelerometer. Analog Dialogue. https://www.analog.com/en/resources/analog-dialogue/articles/pedometer-design-3-axis-digital-acceler.html

 
Caitlin Olson

Caitlin is an amateur nerd who started Today You Should Know because she wanted an excuse to Google all the questions that have popped into my head. What Caitlin lacks in expertise, she makes up for in enthusiasm.

Have a question youโ€™d like Caitlin to cover? Submit it using the link in the header.

Previous
Previous

Why do we say "brand" new?

Next
Next

Why do stars twinkle? And do stars actually twinkle?