Projects / Ideas / Tilt switch step counter

Tilt switch step counter

BeginnerWearablesIdeaReviewed
In short

How do you build a tilt switch step counter?

A ball tilt switch counts steps in a shoe or pocket and shows a total, a very cheap pedometer for learning. You need ATtiny85-20PU microcontroller, Tilt sensor (ball switch, SW-520D), TM1637 4-digit display, CR2032 coin cell and CR2032 coin cell holder.

Level
Beginner
Time
About 60 min
Parts
5
An idea, not a guided build yet. Goal, parts and steps; no wiring, code or tests. Copy it to My Garage to plan it.
Goal

Count events from a simple mechanical sensor and filter bounce.

How to build it

  1. Read the tilt switch on a pin
  2. Ignore pulses closer than 250 ms
  3. Count steps
  4. Show the total on a 4-digit display
  5. Compare with counting by hand over 100 steps

Related projects

Common questions

What parts do I need for the tilt switch step counter?

ATtiny85-20PU microcontroller, Tilt sensor (ball switch, SW-520D), TM1637 4-digit display, CR2032 coin cell and CR2032 coin cell holder.

How long does the tilt switch step counter take to build?

About 60 minutes for a beginner maker.