Designing a Pedometer and Calorie Counter
Table of Contents
Chapter 2: Designing a Pedometer and Calorie Counter
Pedometers or step counters are now popular as an everyday exercise progress monitor and motivator. The increasing popularity of these devices can be attributed to several reasons. First, many people are known to overestimate their level of activity, hence these devices can provide more reliable feedback to an individual about how much or little they move during the day. Second, they provide instant and constant feedback about activity levels, making it possible to “gamify” by providing credits for every step an individual takes. Third, they can encourage individuals to compete with themselves in getting fit and losing weight.
Step Counting Lecture Slides (slides)
Part 1: Introduction to Step Counting (notes)
We start by explaining what an accelerometer on a phone or fitness band measures when you walk, and why it is convenient to work with the magnitude signal.
Part 2: Sources of noise
We describe some of the real-world challenges in accurately estimating the number of steps including common sources of noise such as the device moving around, differences across people in terms of their gait patterns, and others.
Part 3: Designing a Step Counter (notes)
This part describes how you design a step counter and how you detect the number of steps
Part 4: Calorie Tracking (notes)
Step counters not only tell us the number of steps but also a (rough) estimate of the number of calories burned. We now look at how we can map from steps to calories.
Notebook: Step Counting with Find Peaks (html) (ipynb)
This notebook shows a step counter using find_peaks
and applies it to a number of sample sensor logs. The different logs correspond to different sensor placements (left pocket, right pocket, wrist), and to different walking patterns (e.g. with delays between short burst of steps). The notebook shows how tweaking the prominence
and width
parameters can allow you to fine-tune the performance of the step counter.