กลับไปหน้ารวมไฟล์
push-up-counter-using-arduino-and-ultrasonic-sensor-2fe58e-en.md

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++; }.

  1. 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!
  2. You must program a State Machine.
  3. 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.
  4. State 2 (Threshold Cross): The user lowers themselves. The distance drops to 8cm. if (distance < 10cm && currentState == HIGH)...
  5. Now the Arduino changes its mind: currentState = LOW;. We are at the bottom.
  6. State 3 (The Completion Increment): The user pushes back up. The distance hits 40cm again. 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!!!

ข้อมูล Frontmatter ดั้งเดิม

apps:
  - "1x Arduino IDE"
author: "herolivechannel"
category: "Wearables, Health & Fitness"
components:
  - "1x Arduino UNO"
  - "1x Jumper wires (generic)"
  - "1x 4-Digit LED Display Tube, 7-segments, TM1637"
  - "1x Ultrasonic Sensor - HC-SR04 (Generic)"
description: "Gym automation! Build the ultimate workout tracker that forces proper form by actively using sonar to calculate exactly how far your chest sinks before counting a rep."
difficulty: "Intermediate"
documentationLinks: []
downloadableFiles:
  - "https://github.com/HeroLive/ArduinoHeroLive/tree/master/PushUp"
  - "https://projects.arduinocontent.cc/b26b292d-bfda-455a-8a28-04c9bd3d47c2.ino"
  - "https://github.com/HeroLive/ArduinoHeroLive/tree/master/PushUp"
encryptedPayload: "U2FsdGVkX19JiZA18HrexayaixIywS/L3LPM108Zg8PkbuHKyWyJZm9w+BZuMDUntRzpegcleXjiJH0kQfKPEEEjQrD1mBuoQ+ZUqWtXc3U="
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/push-up-counter-using-arduino-and-ultrasonic-sensor-2fe58e_cover.jpg"
lang: "en"
likes: 10
passwordHash: "675bd5bd9f74a1391d442584120200dbc01f18a0dd7a387f13f8d3721fafb4a5"
price: 299
seoDescription: "Build a Push-up Counter using Arduino and Ultrasonic Sensor HC SR04 with 4 digital 7 segment display. Simple DIY fitness project."
tags:
  - "counter"
  - "ultrasonic sensor"
  - "health"
  - "hc-sr04"
  - "arduino"
title: "Push-up Counter using Arduino and Ultrasonic Sensor"
tools: []
videoLinks:
  - "https://www.youtube.com/embed/uz97zhezQ3I"
views: 33947