Autonomous Wheelchair Attachment - YHack 1st Place Hardware — Self-Driving Wheelchair Add-On

timeline: 2026
tech stack: Python, Arduino C++, LD19 LiDAR, ElevenLabs Voice, Anthropic LLM, A* + DWA, Computer Vision, Viam
Overview
An autonomous navigation attachment that bolts onto any standard wheelchair and takes natural-language commands. The user speaks ("take me to the door"), an LLM parses the goal into a coordinate, and an A* planner with DWA + potential-field local control drives the chair there on four mecanum wheels while a 4-layer spatial memory learns the space across trips. Built in 24 hours at YHack and awarded 1st place in the hardware track.
How It Works
The system runs as three concurrent loops on a laptop tethered to an Arduino Mega over USB serial.
The voice loop captures speech through ElevenLabs STT (with Whisper as a fallback), passes the text to an Anthropic LLM that returns structured goto commands, and speaks responses back through ElevenLabs TTS. The planning loop runs at 10–20 Hz: it takes the goal, runs A* over a blended costmap pulled from a 4-layer spatial memory (static occupancy from LiDAR raycasting, an ORB-feature landmark database, dynamic obstacle priors learned across trips, and a learned traversal cost map), then feeds the global path through a DWA + potential-field local planner and a jerk-limited velocity smoother. The motor loop on the Mega runs at 50–100 Hz: it takes vx/vy/ω velocity commands as line-delimited JSON over serial at 115200 baud, applies mecanum inverse kinematics (FL = vx − vy − ω, etc.), and outputs PWM through four VNH5019 motor drivers.
The attachment clamps onto the wheelchair frame and connects to the wheels through a friction-drive mechanism, so the chair can still be used manually at any time.
loading diagram…


Motor Control
The Arduino Mega 2560 runs the inner control loop at 50–100 Hz. It receives line-delimited JSON velocity commands (vx, vy, ω) over USB serial at 115200 baud, applies mecanum inverse kinematics to compute four wheel speeds, and outputs PWM through four VNH5019 H-bridge drivers (one per motor). A 500 ms serial watchdog stops the motors if the laptop goes silent, an e-stop button hardware-interrupts the Mega for instant zero-velocity, and current sense on A0–A3 catches motor stalls. Try it below — use WASD to drive and E/F to rotate. The code updates live with the actual IK math running on the Mega.

// Mecanum Inverse Kinematics — Arduino Megafloat vx = 0.00, vy = 0.00, w = 0.00;int FL = (vx + vy - w) * 210;int FR = (vx - vy + w) * 210;int RL = (vx - vy - w) * 210;int RR = (vx + vy + w) * 210;// → FL=0 FR=0 RL=0 RR=0
Results
The prototype successfully navigated an indoor course at YHack, taking voice commands and reaching named waypoints while avoiding static and dynamic obstacles in real time. Judges awarded it 1st place in the hardware category for the combination of practical impact, technical execution, and the fact that it augments existing wheelchairs rather than replacing them. The biggest open gap was pose estimation — the demo ran on dead-reckoning with LiDAR scan-matching as a guard, and proper EKF fusion of LiDAR, encoders, and visual odometry is the next milestone.
