Chendur's newsletter - Accelerometer, Noise Filtering, and Step counter algorithm!


Hey friends, Happy Wednesday!

Thank you all for subscribing even though I had no piece of content out until now. This is my first newsletter issue, and I’m happy to have you all here!

The 2 concepts we’ll cover this week to understand the step counting algorithm are accelerometers and noise filtering 101. While preparing my subsequent newsletter issues, I realized some of the blog posts actually need only one, and sometimes two concepts. So I’ll write likewise :) I didn't add images of the gadget this time as this is an algorithm, but will do so wherever possible and meaningful as I don't want this newsletter to be purely theoretical.

I'm trying to write the newsletter issues in a way one can follow them while travelling on a bus, having your coffee, waiting for your food, etc. Let's jump in!

What are accelerometers?

The fitness watch uses a 3-axis accelerometer, which is basically a small chip in your watch. It measures the acceleration it experiences relative to a free-fall observer. This means that the acceleration is 0 when your fitness watch is free falling and it’s 9.8 m/s^2 when it’s resting on a table. These values are computed along the X, Y, and Z axis defined with respect to the chip.

There are a dozen types of accelerometers but the one used in fitness watches is a Micro Electro-Mechanical System aka MEMS (breakdown: it has electrical and mechanical components that are miniaturized).

Here is how it works!

  1. The component in blue can move along an axis while the yellow plates are fixed. Both the yellow and blue plate protrusions are conductive and their separation makes them a capacitor.
  2. Springs are connected to both the ends (alternatively, the blue mass can be made compliant in nature thereby acting as a spring in the ends). And, as we go about our day, the mass undergoes acceleration accordingly. This causes the blue plates to slide, thereby changing the capacitance C1 and C2 (marked in the figure).
  3. This change in capacitance is then translated to acceleration

Noise filtering basics

Every gadget with a circuit uses filtering, almost always! Due to temperature, the electrons in the conductor of the circuit undergo random motion thereby adding and subtracting from the original signal - resulting in what is called thermal noise. This is inevitable.

The 101 of noise filtering is that we want to remove unwanted signals that crop into our desired signals. In the context of the fitness watch, we need to filter the acceleration data along each of the axes that we collect from the accelerometer. The method used to filter the noise in this step counter algorithm is FIR (Finite Impulse Response). It is basically a weighted moving average filter.

Question of the week

How does the auto-rotate function on your smartphone work? Share your thoughts by replying to this email, and we can have a discussion. I’ll answer this in next week’s issue.

Blog post is out!

My blog post S1E1 on the step counter algorithm is out! Read it HERE, happy learning! And I'm open to receiving any kind of feedback.

I’m thinking of writing about how a beard trimmer works for the next episode S1E2. Also, let me know if you’d like to read about a specific gadget/device.

Have a nice rest of the week, and take care!
Until next Wednesday,
Chendur

How Do Gadgets Work?

Understand the inner science, tech, and AI of your gadgets with me, a Carnegie Mellon alumnus. Join 205+ readers every other Wednesday to see the world differently in just 3 minutes—regardless of your background! 🚀

Read more from How Do Gadgets Work?

Hey Reader, Happy Wednesday! I'm taking a short break for the first time in the last 2 years of writing this newsletter, so I'm resending one of the most opened and popular newsletters this week. Thank you all for your support! Let’s look at how Airport body scanning technology works this week. It is also called Millimeter wave detection and spot this title written on one of these machines the next time you are at an airport. I aim to write my newsletter issues in a way one can follow them...

Hey Reader, Happy Wednesday! Last week, I finished my swimming classes in India and ‘almost’ learned to swim. Let’s look at how Ships work this week. I aim to write my newsletter issues in a way one can follow them while traveling on a bus, having a coffee, waiting for food, etc. Let's jump in! How it works: 15-second answer Ships float because they are less dense than water. Though made of dense materials like steel, ships have hollow interiors filled with air, reducing their overall...

Hey Reader, Happy Friday! Last week, I came to India to visit my family and friends. I fell sick so I’m sending this newsletter on a Friday instead of the usual Wednesdays. Thank you for the support! Let’s look at how a watch works this week. I aim to write my newsletter issues in a way one can follow them while traveling on a bus, having a coffee, waiting for food, etc. Let's jump in! How it works: 15-second answer A quartz watch uses the piezoelectric effect. A quartz crystal vibrates...