Get insightful articles from the world of tech recruiting. Straight to your inbox.

Here's what you can do next

Check out FaceCode:
an intelligent coding interview tool

Learn More
What is a fitness tracker and how does it work?
what is a fitness tracker and how does it work

I’m waiting for the bus outside this store that’s displaying fantastic workout clothes. I sigh and then turn my head to see a billboard about a new gym in town. I’m torn between guilt, for not exercising ever, and surprise at the shiny pennies people are apparently willing to shell out to get be fit and stylish. The bus comes by, I manage to squeeze into a seat, and then I open my magazine to a page where the article is titled “This Is the Compelling Science behind Fitness Trackers.” The universe is telling me something, isn’t it?

I’m inspired enough to pen this article where I’ll talk about different sensors that make activity trackers tick.

Mini labs juggling complex data—fitness trackers

It looks like a watch. It looks like a smartphone. It is so much more…

Then there is an Apple Watch vs. Fitbit Blaze debate going on.

Fitbit Blaze Apple Watch
Fitbit and Apple are two of the most popular fitness tracker manufacturers (Source)

This wearable is a wrist-based monitor with sensors that tell you if you’ve been walking enough, sleeping and eating enough, jogging or sprinting, staying out too long in the sun, and it tracks a whole lot of other stuff to keep you as healthy as you can be.

Research might scare you into buying one

Do you know what WHO says? Every year, 38 million people die from noncommunicable diseases globally and cardiovascular diseases account for the most. It’s a wonder we don’t wear an activity band on each hand.

Although you can’t peg heart rate monitors as indicators of potentially fatal diseases, ensuring that you’ve lowered your resting heart rate is a valuable wellness/fitness metric. (Right now, we don’t have reliable clinical studies proving the accuracy of wearables from this perspective.)

These words—obesity, diabetes, physical inactivity, smoking, alcohol, salt, blood pressure, cholesterol, and sleep patterns—figure largely in reports related to health and articles about the changing lifestyles of millennials. So, do we need these wearable digital monitors? Hell, yeah!

Health advocates seem to think so. Sedentary lifestyles with a spate of activity now and then are not cutting it. Who knew happiness could stem from knowing you walked 10,000 steps in a day? Since weight loss seems to be on the “to do” list of most people. If these can tell you how many calories you are burning, then there’s nothing like them to up the motivation to chalk out health goals and achieve them.

Unravelling the mystery of these tiny marvels

Some people think that the system complexity of fitness trackers is much lesser than a full-blown smart watch. But I disagree, and I am sure after reading this article you will also realize a fitness tracker is some sort of a genius companion you ought to have.

5 layer architecture of a fitness tracker

Getting down to the details…

  • Sensing layer: This layer has sensors embedded in the device; these sensors collect data like number of footsteps, heart rate, body temperature, etc. The data collected by sensors are sent to servers using Wide Area Network such as GSM, GPRS, and LTE.
  • MAC Layer: This layer is responsible for device monitoring and control, quality-of-service management, and power management.
  • Network layer: This layer takes care of transmission, routing, and addressing using IPV6. With IPV6, address allocation and management can be done more efficiently, hence it is chosen over other Internet protocols.
  • Processing and storage layer: In this layer, the data received from the sensing layer is analyzed and stored in databases. This layer is also responsible for security control.
  • Service layer: This layer provides the analyzed and processed data to other services like mobile application on Android or iOS.

What makes one fitness band different from another? Yes, the sensing layer. Here you can see tiny sensors closely watching each move and constantly tracking them. The functionalities of these tiny marvels are beyond our imagination.

Now, let’s take a close look at a few of these sensors. It doesn’t matter whether you have a Fitbit Blaze or an Apple Watch. Both have an accelerometer, gyroscope, altimeter, heart rate monitor, flashing LED but no GPS.

Accelerometers

Accelerometers are electro-mechanical devices capable of measuring acceleration forces, which are intensity and direction of motion. In put it in simpler terms, these devices monitor your movement. (Did you know rockets use them too?) They can be 3-axis (in smartphones) or 2-axis (in cars) and be based on capacitance sensors or piezoelectric crystals. To measure orientation and rotation, some accelerometers come with gyroscopes.

This is an image of how accelerometers in smartphones work.

How does Accelerometer work

Here’s a great video if you want to know how your Apple iPhone knows up from down.

Apps and mobile devices are expected to increase the demand for an array of these sensors. Research shows that by the end of this decade, over 50 billion devices enabled by the Internet will have accelerometers in them. Performance and energy consumption will be key parameters of design. For instance, last year mCube came up with MC3600, a family of accelerometers that will consume only 0.6µA of current, which is up to 3 times lesser.

Let’s look forward to some bells and whistles!

GPS

 

Fitness tracker GPS
The GPS plays an important role in a fitness tracker (Source)

The global positioning system (GPS) is so much a part of our everyday lives, I doubt it needs any sort of explanation. This technology tracks people, objects, and finds locations, directions. From tracking stolen vehicles and mobile phones to valuable shipments, GPS affords safety in more ways than one. Navigation has never been easier. (No more fighting about the best route to the Bellagio.)

At least four of the 24 (can go up to 32) satellites that orbit the Earth are visible always from any point. A satellite transmits signals to a GPS receiver, which figures out how far it is by calculating the difference between the signal broadcast time and the signal reception time. The receiver can accurately compute altitude, time, longitude, and latitude. Your smartphone is listening for these signals. The positioning concept is based on trilateration. (But don’t expect to be found easily if you get yourself into an underground bunker.)

Again, IoT and GPS work in tandem. IoT senses when you end up in an automobile accident. GPS gets the paramedics to you in case of an emergency.

Galvanic Skin Response Sensor

Galvanic Skin Response Sensor is another sensor that makes the activity tracker tick. Recall O J Simpson failing the lie detector test during his civil trial?

It measures the electrical conductance of the skin with the help two electrodes attached to the hand. Strong emotion sends a stimulus to the sympathetic nervous system, resulting in more sweat secretion by sweat glands; this increases the electrical conductance of skin. When you start to sweat, either from exercise or other stimulus, the fitness tracker will detect it and after correlating it with data from other sensors, the tracker will know the level and intensity of the activity. Monitoring your stress levels is always good, right?

Look at a simple circuit diagram and video of Sean Montgomery’s Truth Meter (GSR sensor).

GSR sensors can go a long way toward helping patients suffering from stress, phobias, PTSD, or anxiety. These amazing sensors have so much potential, especially, in IoT medical applications.

Here are few graphs which demonstrate the change in conductance as sensed by GSR and the corresponding external or internal stimulant.

Output-1 of Galvanic Skin Response Sensor

Output -2 of Galvanic Skin Response Sensor

Output-3 of Galvanic Skin Response Sensor

 

If this interests you, then the “superhuman therapist” — Vinaya’s emotion sensing band, Zenta will be a treat. Emotional Artificial Intelligence is a trend to watch out in 2017 they say. Mood readers? What’s next!

Optical heart rate monitor (OHRM)

Wearables that have the optical heart rate sensor use a method called photoplethysmography (PPG) to measure the heart rate. The simplest explanation would say light is shined on the skin and the perfusion of blood is measured. Scattering is predictable, changing when the heart rate or cardiac output changes. A time variant, or AC, is produced only by light reflected by blood from the artery. The other components bones or tissues only contribute to a DC component. You get a PPG profile after the photodiode converts the light to current.

Optical Heart Rate Monitor
Source

To get a PPG signal, an optical emitter, a digital signal processor, an accelerometer, and an algorithm work together. It is the DSP that gives you relevant heart data by converting refracted light signals into 1’s and 0’s. For best performance and to counter challenges such as variations in skin tone, optical emitters use LEDs of different wavelengths to measure the heart rate of unique individuals. For example, skin that is darker absorbs more green light. Algorithms give you “motion-tolerant” heart data, including other key biometrics, by processing signals from the DSP and accelerometer. Along with diverse skin tones, optical noise, low perfusion, crossover problems, and sensor locations tend to affect the accuracy of OHRMs.

Bioimpedance sensors

working of a bio-impedance sensor
Working of a bio-impedance sensor (Source)

Bioimpedance measures how well the body resists the flow of electric current. In principle, impedance is measured by applying a small electric current via a pair of electrodes; the resulting voltage is picked up using another pair of electrodes.

The membranes of cells are thin and have higher resistivity than the fluid within and outside the cells, which have higher conductivity. Membranes with higher resistivity store the charges and behave as small capacitors.

With the help of these electric properties, the sensors measure tiny voltage changes at a pair of receiving electrodes and measures the impedance (Z) using this formula.

How does Bioimpedance sensors works

Tissue resistance translates into heart beats per minute.

Temperature sensors

I’m talking about a thermometer! Measuring your core body temperature while engaging in some physical activity is a feature most fitness trackers provide. For athletes, this helps decide the best recovery time between intense workouts and design their training plans. If you see drops or spikes that are unusual, then perhaps a visit to the doc could be on the cards.

You also have UV sensors telling you to protect yourself from harmful radiation and ambient light sensors which tell you the time of the day.

Finding the right fitness tracker

The answer lies in what you want your fitness tracker to do. The market is flooded with these stylish monitors offering vital insights into your health and lifestyle. I’m going to tell you about a few market leaders. Right. Buy a Garmin Vivosmart HR+, which works on both iOS and Android, if you want to measure your heart rate, your sleep, and track other daily activities. Oh, it is waterproof too.

Here is a screenshot of the App.

Garmin Vivosmart HR+ App
Garmin Vivosmart HR+ App

For general fitness, you can try the Fitbit Charge 2. It has great wellness features including breathing training to offer on top of measuring the heart rate, sleep, and steps. You have Jawbone’s UP4, which is apparently one of the most advanced and pricey trackers now. It uses Bioimpedance to measure perspiration, heart rate, and breathing. Whatever you want to know about the calories and active time, this tracker tells you. When you go to sleep, the tracker can tell!

Here are a few screenshots of the app.

Fitbit Charge 2 App
Fitbit Charge 2 App

Then, you have Samsung Gear Fit2. This one can detect when you are napping and sleeping, riding a bike and doing push-ups, along with the usual metrics and great features like a built-in GPS that doesn’t require a phone. You can choose from other decent activity bands like Withings Go, Microsoft Band 2, Basis Peak, Moov Now, and Misfit Ray that are winners in various categories.

There are a few more miles to cover as far as accuracy in measurements is concerned. Like Chris Harrison, who directs the Future Interfaces Group at the Human-Computer Interaction Institute (Carnegie Mellon) says, “You can make millions of smart watches that are identical, but you have millions of people who are not identical. It’s really hard to find something that’s robust across all these people.” But the bottom line is that fitness trackers aim to give you longer, healthier lives. Here’s the catch: You need to use them the right way to enjoy the right benefits.

 

Developers Internet of Things

Vasudhendra Badami is a category head (IoT) at HackerEarth. A writer by day and a reader by night. Covers topics like Internet of Things, electronics and analytics. You can find Vasudhendra on Twitter (@BadamiVasu)

Here's what you can do next

Check out FaceCode:
an intelligent coding interview tool