Dancing Segway

BUILD, CODE AND CONTROL A SEGWAY TO BALANCE AND DANCE
ELECTRONICS • SIGNAL INTERPRETATION • FEEDBACK CONTROL • MICROPYTHON

Build a Segway then write code to control it such that it self-balances and dances to live music!
The Segway was built using gyroscopes, accelerometers and an OLED strip (for the aesthetic!) Using PID control with manually tuned parameters, each motor was controlled such that the the pitch angle was constantly adjusted and maintained in the upright position.

Beat detection was implemented - using a sample buffer that periodically sampled the music. Another buffer stores the instantaneous energy over the past 50 epochs and if the ratio of the instantaneous energy to the average energy is found to be within certain thresholds, different types of light show moves are queued!

Building the Segway
The Segway was built using gyroscopes, accelerometers and an OLED strip (for the aesthetic!)

Balancing
Using PID control with manually tuned parameters, each motor was controlled such that the pitch angle was controlled so it was maintained in the upright position.

Dance Party!
Beat detection was then implemented - using a sample buffer that periodically sampled the music. Another buffer stores the instantaneous energy over the past 50 epochs and if the ratio of the instantaneous energy to the average energy is found is within certain thresholds, different types of light show moves are queued!

PID
Fine motion control
Sensors
Strategic inputs
Fun!
Added interaction