Why can mobile phones count the number of steps we walk?

Why can mobile phones count the number of steps we walk?

With the rapid development of science and technology, the functions of smart phones are becoming more and more powerful. Many mobile phones have the function of counting steps. Why can mobile phones calculate the number of steps we walk?


▲Mobile phone calculates walking steps

The pedometer was first conceived by Leonardo da Vinci of Italy. Due to the limited technology at the time, the pedometer was not truly made until 150 years later in 1667. Early pedometers were relatively simple and mechanical.


▲Early mechanical pedometer

The principle of a mechanical pedometer is very simple, just like a pendulum. When a person walks, the pendulum in the pedometer will swing along with him. When a person takes a step, the pendulum moves. When the metal pendulum swings, it contacts the metal electrode and energizes it, thus recording a step.

The current mainstream pedometer software (taking WeChat Sports as an example) is completed through a combination of the mobile phone's built-in gyroscope, gravity sensor and accelerometer sensor. It stores data based on the vibration frequency of these devices to calculate the number of steps walked each day.

[[316874]]

The gyroscope can measure the angle of the phone and detect the center of gravity shift of the human body. When a person walks, the phone will shift in angle as the person moves. When the gyroscope detects a continuous and regular angle shift, the phone will start to judge that the user is walking.


▲The built-in gyroscope of the mobile phone

The gyroscope can also determine whether the user is walking or riding a bicycle. Since the human body posture is more stable during cycling than walking, the center of gravity offset is small, and the angle change collected by the gyroscope is also small.


▲The gyroscope structure built into the mobile phone

When we walk with our phones, we experience a roller coaster-like acceleration change with each step. When we lift our legs and take the first step, the acceleration is the largest. If we put it on a coordinate axis, the change in acceleration looks like a cosine waveform. Between two peaks, it can be considered as a step.

If there are several peaks in succession, it can be basically determined that the user is walking. The sensor device counts these previous and subsequent fluctuations as steps and records them in the mobile phone.

In actual scenarios, the algorithm also needs to remove some "interference items". For example, when we walk, the phone in our pocket will shake up and down, generating acceleration in different directions. At this time, the algorithm needs to judge and filter out useless interference items, leaving only the most important motion features.

The piezoelectric ceramics in the mobile phone will also produce different deformations depending on the size of the force, thereby producing different voltage changes. The acceleration is measured by the force acting on it, and the frequency of the user's walking is calculated.

In fact, it is the gravity sensor of the mobile phone hardware. For example, when we turn the phone to watch a movie, the screen will automatically rotate with it. This is the reaction of the phone to the downward gravity.

[[316880]]

More accurate pedometer software will also use GPS to locate the user's exercise route and then calculate the average speed.

The above tasks are completed by the collector (acceleration sensor, etc.) and the processor (Sensor Hub, coprocessor).

In fact, the pedometer function is only one part of the application of the accelerometer. In terms of vehicle safety and bridge health, the accelerometer also plays a very important role.

[[316881]]

When a car suddenly slows down while driving at high speed, the airbag will pop out. There is an acceleration sensor here to measure the negative acceleration of the vehicle in the forward direction, so as to determine whether the airbag should be popped out.

[[316882]]

Nowadays, more and more Internet companies want users to use this function, because through our walking data, we can analyze the users' going out time, activity location and area, and thus understand the users' social circles and consumption habits, which becomes auxiliary information for Internet companies to formulate marketing plans.

<<:  As mobile phone screens get bigger and bigger, what challenges do UX designers face?

>>:  During the epidemic, this native rural commercial bank did these things

Recommend

5G network test speed is unimaginable

According to the technology blog CNET, Ericsson an...

Hejun "Zeng Qiao's Capital Observation" Season 5

Supported by a 30-person research team, each sess...

Detailed explanation of common command lines for iOS development

For iOS development, we don’t use many command li...

Apple is developing cars in Canada, BlackBerry is crying

Google's driverless cars have already been pu...

Monetization activities: How to make users willingly pay for your products?

Below, let’s start with the premise of monetizati...

Creative analysis of advertising on Zhihu platform!

If Toutiao is an information engine for intellige...

Taobao Mobile: My view on Weex and Weex open source

Copyright Notice Author: Wu Zhihua (nickname: Tia...

Experience summary | Building a user incentive system for your own APP from scratch

Recently, the company’s new product has begun pla...

Register and upload an app market account in three steps!

Let me introduce myself first. I am a newbie in a...

The most effective App promotion channels, a summary of strengths!

What are the most effective App promotion channel...

If you want to please these users, try these 5 methods

Elevator, subway, taxi. Newspapers, Weibo, and &q...