The Ghost Rider is a self-balancing unicycle developed as part of Northwestern’s EE 327 course. Its aim was to autonomously
stabilize in both sagittal (front–back) and coronal (side-to-side) planes using a DC Motor Driven Wheel and a
servo-driven counterweight. Orientation feedback comes from an IMU running a tuned Madgwick filter, with separate PID
controllers for each axis.
While the final prototype could not balance entirely unaided, it demonstrated clear self-stabilizing responses to disturbances. Future
improvements would involve nonlinear iLQR control rather than PID for better trajectory tracking and realistic unicycle dynamics.
Lessons Learned
This project didn’t go exactly as planned, but it provided valuable growth opportunities. Below are key lessons we learned throughout the
quarter:
Communication: Dividing work by specialty improved efficiency but limited team members’ visibility into each other’s progress. I
learned that clear communication and thorough documentation are essential to effective engineering teamwork.
Simplification: Our initial goal was ambitious. A simpler, lower-dimensional problem might have led to earlier success and foundational
lessons to build on.
Resourcefulness: Supply issues forced us to improvise by modifying a servo motor for the wheel drive. This taught me that flexibility and
creativity can keep projects moving despite external setbacks.
Safety: Working with LiPo batteries highlighted the importance of rigorous power and wiring safety precautions.
Design Constraints and Requirements
Since self-balancing unicycles are uncommon, we defined key project parameters, including budget and motor specs. Some of our core calculations are
outlined below.
Budget: $300 total ($100/student), final spend $219.45 — balancing motor quality, IMU accuracy, and structural choices.
Battery Capacity: \(I_{\text{avg}} = 6.86\ \text{A},\ C = 3.43\ \text{Ah}\)
Mechanical Design
The design was my primary focus. Starting from an existing unicycle, we adapted and modified it extensively. Below is an overview of the design elements:
Custom seat & shaft to mount electronics and counterweight arm
Counterweight coupling via 80/20 extrusion + 3D printed adapter
Wheel motor coupling to modified unicycle crank axle
System Architecture
Control is handled by an ESP32 microcontroller running FreeRTOS, with tasks for motor control, IMU reading, servo actuation, and web-server monitoring.
Synchronization uses semaphores and mutexes to ensure real-time safe operation.
Wheel PID → Pitch stabilization via DC motor
Counterweight PID → Roll stabilization via servo arm
IMU Sensor Fusion
The Madgwick filter fuses accelerometer and gyroscope data into quaternion orientation estimates: