Stephan Boyer with his unicycle (via Stephen Boyer)
Stephen Boyer, an electrical engineering student at MIT, took his transportation needs into his own hands by creating a motorized unicycle. However, he is leaving the balancing to the unicycle.
Boyer explains that the unicycle only balances in the direction of travel, forward or backward, so practice is needed to balance completely. To balance, the unicycle first determines its angle from the gyro and accelerometer feeds into a complementary filter. The output is feed thru a PID loop at 625 Hz which estimates the correct balancing angle. A MOSFET H-Bridge drives the motor controlled by a PWM signal (1.22 kHz) then after.
Then the motor is called to react with a MOSFET H-Bridge, which responds to a 1.22 kHz pulse-width modulation (PWM) signal. The motor controller has an onboard voltage switch regulator that powers the logic circuit and the charge pump needed for the high-side MOSFET.
The unicycle is comprised of:
● A custom MIG-welded steel chassis
● A 450 Watt electric motor
● Two 7 Ah 12 Volt batteries
● A 5DOF inertial measurement unit
● The OSMC H-bridge
● An ATmega328P microcontroller
The circuit highlights:
● Filtering Capacitors on the power rails
● Reset pin for AVR microcontrollers
● 20 MHz external crystal oscillator
● IMU connected to ADC pins
● And indicator LEDs
The unicycle has a maximum speed of 15 mph and features a kill switch that is held in the rider’s hand and shuts off the motor when the rider lets go of it. Added software serves to detect accidental releases of the kill switch. The batteries last for at least 5 miles.
Future work includes building a case to protect the circuitry also making an aluminum chassis to lower the weight.
An EAGLE version of the circuit is on the way too. Time to build yourself a self-balancing unicycle! Alternatively, you can buy the 20 mph unicycle from Ryno for $25,000.