Inspiration
When playing volleyball casually, people forget to keep track of points, and it turns into guessing. So I built a scorekeeper that watches the court and keeps the score so nobody has to.
What it does
SET (Score Event Tracker) uses a webcam to watch a volleyball. When the ball touches the floor, it works out which side of the net it landed on and awards the point to the other team. The score appears instantly on a physical scoreboard: an LCD shows Team A vs Team B, a red or blue LED lights up for the scoring team, a buzzer sounds, and a servo-powered flag rises and lowers.
How I built it
Vision (Python + OpenCV, on a laptop): A Logitech webcam feeds frames to OpenCV. The ball has yellow, blue, and white panels, so I mask the yellow and blue HSV ranges, merge them, and use morphological closing so the panels read as one blob. The largest blob becomes the ball. A calibrated floor line and net line (adjustable live with keyboard keys) decide when and where it landed. A rearm margin and cooldown stop a resting ball from scoring twice.
Link: Python sends each point to the Arduino over USB serial as a short message, for example S,2,1,0 (scoreA, scoreB, scoring team).
Hardware (Arduino UNO R3): The Arduino parses the message, updates a 16x2 LCD1602, lights the red or blue LED, plays a tone on the buzzer, and swings an SG90 servo to raise a flag for two seconds. Everything is mounted in an enclosure.
Challenges I ran into
- Low frame rate: The webcam ran at about 10 fps indoors, and fast bounces blurred. I moved capture to a background thread, processed half-size frames, forced MJPG, and shortened the exposure.
- A multicolor ball: Tracking one stripe color made the center jump, so I combined two color masks and closed the gaps.
- Double-counting: A ball resting on the floor kept scoring until I added arm/rearm logic.
- Scope: I started with the servo tracking the ball, then changed it to a scoring flag, which made the demo clearer and the system simpler.
Accomplishments I'm proud of
A full working pipeline, from camera to scoreboard, built in 6 hours with no machine learning and no sensors on the ball.
What I learned
Computer vision problems are often about the camera (light, exposure, frame rate) as much as the code, and hardware needs a test at every step.
How I used AI
I used an AI assistant (Claude) to help write and debug the Python and Arduino code and to plan the build. I assembled and wired the hardware, tuned the vision to the ball and room, and tested the system myself.
What's next
A 60 fps camera, out-of-bounds lines, rally and serve detection, support for different balls, and a web dashboard for match stats. Longer term: double-touch detection and hand tracking to flag illegal contacts.
Log in or sign up for Devpost to join the conversation.