A pressure-sensitive balance board that turns stroke rehab into an objective, gamified experience — built for the oSTEM × CPES Hackathon at Cal Poly · Spring 2026.
Joshua Naim · Brian Li
The problem · What we built · Tech stack · Architecture · Hardware (~$74) · Quick start · Clinical objectivity
Balance therapy after stroke is subjective, boring, and expensive.
| strokes per year in the United States |
therapy compliance by month 3 |
typical cost of clinical balance systems |
Patients need repeatable feedback and motivation to keep practicing. Clinicians need objective metrics, not guesswork. And the system should not demand a cloud stack, a $14k cart, or data that has nothing to do with balance.
ReBalance is a pressure-sensitive balance board paired with a React dashboard that reads live weight distribution over USB and turns it into therapy you can measure.
|
Live Balance Real-time left/right weight distribution and balance score |
Balance Games Therapeutic games controlled by shifting your weight |
Progress Tracking Session history and improvement over time |
AI Analysis Objective clinical notes from pure sensor data |
Judges & reviewers: Click Try Demo Mode in the app — no board required. Every tab works with simulated pressure data.
|
Total prototype cost: ~$74 — see bill of materials. |
| Principle | How ReBalance delivers |
|---|---|
| No backend | Everything runs in the browser; data stays on-device |
| No WiFi / Bluetooth / cloud | USB cable only — plug in and go |
| Zero bias | Therapy-relevant data only; AI grounded in sensor metrics |
| Cost-effective | Clinical-grade feedback loop at hobbyist BOM cost |
┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────────────┐
│ 4 × FSR │ │ Arduino │ │ USB cable │ │ Chrome + React │
│ sensors │ ──► │ Uno R3 │ ──► │ (6 ft) │ ──► │ Web Serial API │
│ pressure │ │ ~20 Hz │ │ │ │ dashboard + AI │
└─────────────┘ └─────────────┘ └─────────────┘ └─────────────────────┘
No WiFi · No Bluetooth · No cloud · No backend · Just a cable.
| Stage | Detail |
|---|---|
| Sensors | Four force-sensitive resistors detect foot pressure |
| MCU | Firmware sums left/right channels → left,right lines over serial |
| Transport | Web Serial @ 9600 baud, newline-delimited (BALANCEBACK_READY handshake) |
| App | useSerial → balanceCalc → live UI, sessions, games, optional Gemini chat |
┌──────────────────────────────────────┐
│ ReBalance React Dashboard │
│ Home · Game · Sessions · Progress │
│ Profile · TherapyChat (Gemini) │
└──────────────────┬───────────────────┘
│ USB
▼
┌──────────────────────────────────────┐
│ Arduino UNO + 4× FSR balance board │
└──────────────────────────────────────┘
Cost-effective prototyping with high-fidelity sensor integration and few parts.
| Category | Item | Cost |
|---|---|---|
| MCU | Arduino ELEGOO UNO R3 | $16.99 |
| Sensors | 4× FSR (RP-S40-ST) | $23.98 |
| Wiring | Breadboard + jumper wires | $9.99 |
| Connection | USB cable | $5.99 |
| Build | Local supplies (tape, liner) + board | ~$27 |
| Total | ~$74 |
| Line | Meaning |
|---|---|
BALANCEBACK_READY |
Board ready |
1234,5678 |
Left and right pressure integers |
Calibration in-app: stand centered 5 seconds → baseline saved to localStorage for accurate L/R percentages.
git clone https://github.com/joshnaim1/balanceback.git
cd balanceback
npm install
npm run devOpen in Chrome or Edge → use Try Demo Mode or Connect Board.
| Step | Action |
|---|---|
| 1 | Demo mode — try the full UX without hardware |
| 2 | Complete the getting started wizard |
| 3 | Sessions — start a timed balance session |
| 4 | Game — play Balance Training, Balance Bird, or Balance Jump |
| 5 | Progress — view charts after logging data |
# .env.local
VITE_GEMINI_API_KEY=your_key_herenpm run build # production bundle
npm run test # Vitest + property tests
npm run lint # ESLintThe board doesn't read charts. It reads pressure.
| Measures balance with sensors | Not therapist judgment alone |
| Captures therapy-relevant data only | No demographics, identity, or unrelated history in the AI context |
| AI clinical notes | Generated from pure sensor data — numbers in, insight out |
| We collect | We do not collect |
|---|---|
| Display name, optional pronouns | Legal sex, gender marker |
| Stroke/injury date, affected side | Gender-affirming care history |
| Therapy goals, session feelings | Unrelated medical / EHR data |
| Balance scores, L/R %, duration | Pharmacy, billing, insurance |
All records stay in localStorage on the patient's machine. Export JSON anytime. See in-app Data Transparency (🛡️) and AISourceDisclosure on AI-generated notes.
Disclaimer: ReBalance is a hackathon prototype for balance practice and education. It is not FDA-cleared and does not replace licensed clinical care.
src/
├── App.jsx # Shell, tabs, wizard, calibration
├── components/ # Games, SessionLog, ProgressChart, HomePage, …
├── hooks/ # useSerial, useGameLoop, useReducedMotion, …
└── utils/ # balanceCalc, storage, sessionAnalytics
Accessibility specs: .kiro/specs/ui-accessibility-improvements/
| Event | oSTEM × CPES Hackathon |
| Host | Cal Poly |
| Season | Spring 2026 |
| Team | Joshua Naim & Brian Li |
| Tagline | $74 in parts. No backend. No bias. |
MIT License — Copyright © 2026 Brian Li and Joshua Naim