BUILD, CODE AND CONTROL A SEGWAY TO BALANCE AND DANCE
ELECTRONICS • SIGNAL INTERPRETATION • FEEDBACK CONTROL • MICROPYTHON
Brief
Outcome
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!