Inspiration

We spend hours every day hunched over laptops in dorms, libraries, and study rooms - and we never notice until our neck is already aching. We wanted something that is able to detect changes in your body position and remind you to sit up straight.

What it does

The Slouch Detector is a real-time posture monitoring system with a desktop app dashboard. The ultrasonic sensor measures your distance from the screen, while a PIR sensor detects your overall presence. The active piezzo buzzer sends a red SLOUCHING alert. The dashboard tracks how long you've been sitting straight, counts your slouch events, shows a live posture score, and lets you tune sensitivity and grace period without touching any code.

How we built it

The hardware runs on an Arduino UNO with an HC-SR04 ultrasonic sensor, a PIR motion sensor, and a piezo buzzer. The Arduino activates the sensors while Python reads the data and uses the laptop camera to visually confirm whether you're actually slouching.

The browser dashboard also receives live updates and has several features like a posture score, session timer,, and a distance meter.

Challenges we ran into

One thing that gave us trouble was sensor range. The ultrasonic sensor was jumping around by 1 to 2 centimeters every reading, so the device kept flickering between good posture and slouching even when nobody was moving. We fixed it by averaging out the readings and setting a delay timer of approximately 3 seconds.

We also had some problems with the Python code. MediaPipe refused to run on our machines because we had Python 3.13 installed and it only supported older versions.

Built With

Share this project:

Updates