I like to push-up the exercise. I do it about 10 times at a time, but sometimes I get tired and don't make the right move down and up high enough, and I don't remember the number of times. So I made a counter to follow the rules. I choose arduino to be the control circuit, an ultrasonic sensor to determine the number of times the body goes up and down an 7 segment display to show the result. The counter can be reset for next time.
Fitness Telemetry: Ultrasonic Rep Counter
Counting your own reps is tedious. The Ultrasonic Push-up Counter is a floor-mounted sensor array that ensures you are actually putting the work in. If your chest does not physically cross the mathematical low-plane threshold, the Arduino shouts, "No Rep!" and refuses to increment the counter.
The State-Machine Mechanics (HC-SR04)
You cannot simply write, if (distance < 10) { reps++; }.
- If the user holds the push-up at the bottom for 3 seconds, that code will rapid-fire count 100 reps instantly in a loop!
- You must program a State Machine.
- State 1 (High): The sensor looks straight up perfectly at the user's chest.
distance = 45cm. The user is in the "up" plank rest position. - State 2 (Threshold Cross): The user lowers themselves. The distance drops to
8cm.if (distance < 10cm && currentState == HIGH)... - Now the Arduino changes its mind:
currentState = LOW;. We are at the bottom. - State 3 (The Completion Increment): The user pushes back up. The distance hits
40cmagain.if (distance > 30cm && currentState == LOW) { reps++; currentState = HIGH; }Only a full descent AND a full ascent sequence counts as one rep!
Visual and Audio Feedback
The user's eyes are straining; they can't look at a tiny LCD screen while sweating!
- You use a massive Double 7-Segment Display built with huge 2-inch digits, or an addressable WS2812B NeoPixel ring!
- Every successful rep triggers a bright Green flash and an incredibly loud, satisfying Piezo Buzzer "BEEP", letting the athlete know the rep registered without breaking their form!
Equipment Needed
- Arduino Nano (To build a small, durable floor-pod).
- HC-SR04 Ultrasonic Distance Sensor.
- Large 7-Segment Display (TM1637 module) or large LED arrays.
- Piezo Buzzer (Active or Passive).
- A sturdy 3D-printed enclosure ensuring the weight plates don't crush the sensor.
I hope that you like this project. And subscribe my youtube channel.
Thanks for your watching!!!