Segway 3.0

by Xiangyun Meng

I built this Segway in my first year in college. It has gone through 3 iterations. The first version is a LEGO prototype with a hacked I2C interface so that I could attach external sensors. The second version was built from scratch but it was pretty crude without much polishing. The final version involved a lot of software and hardware refinement. The demo below shows how the final version looks like.

  1. Similar to the real Segway, it is able to balance on two wheels.
  2. It runs the uC-OS II RTOS, with multiple tasks handling various events, such as wireless communication, state control, or sensor sampling.
  3. It can be remotely controlled by a desktop computer or a PS3 controller. PID tuning could be performed in real time through the desktop GUI interface.
Source code and circuit diagrams

Demo: Controlling my Segway with a PS3 controller.

Gallery