Segway Robot

Eric Wang

Introduction

Common Commercially available Segway

For my final project I be designing and controlling a mobile inverted pendulum robot. Its design will be based off a Segway, which has two wheels and is able to automatically balance at an upright position. At a minimum, I am hoping to control it through a PID feedback controller that receives sensor readings from a gyroscope and accelerometer. If time permits, I would also like to make it remote controlled, explore different controllers, and/or design a “swing up” initialization sequence where the robot can swing itself up from the ground by itself.


Mechanical Design

Front facing veiw of segway robot

The robot itself will be made from three layers of protoboards stacked like a bookshelf as seen in the figure below. The top “shelf” will hold the two battery packs and the bottom two shelfs will hold the other chips (Arduino, sensors and drivers). The two DC motors will be secured on the bottom of the last protoboard. Four threaded rods will separate the three layers, one in each corner of the boards. The exact sizes of the boards and the rods will be determined once I have the motors and chips I need.


Electronic Parts and Connections

Connections for electronics

The PID controller will be implemented on an Arduino nano, which will also receive sensor readings from the gyroscope and control the DC motors. A 12 V rechargeable lithium ion battery will power the motors and the Arduino will be powered by a separate 5V battery pack. The connections for all the parts are relatively simple and is outlined in the figure above.


MATLAB Modeling

Estimating the PID parameters

MATLAB has a very useful tool for estimating the the PID parameters for a controller. Given the transfer function of the system, it can help give a sense of where to start with the tuning procedure. Right now, the transfer function is calculated with approximated variables of the mechanical system (mass, inertia, length, etc.) as I do not have the parts yet.


Timeline and Progress

  • Hardware Budget

    1 Ocotber, 2019

    List out all items and create detailed hardware budget

  • Web description

    22 Ocotber, 2019

    Create project description website outlining project design and progress

  • Modeling and Presentation

    24 Ocotber, 2019

    In class presentation of project. Finish modeling the kinematics of the system. Find Transfer function of the plant. Simulate in MATLAB and find approximate PID tuning parameters based on estimated mechanical variables.

  • Implementation status report

    26 November, 2019

    Finish builing the robot and implement PID controller on the arduino. Test approximated parameters and tune.

  • Project Presentations

    10 December, 2019

    At minimum allow robot to stand upright. Add movement control if time permits.

  • Project Hand in

    12 Decemeber, 2019

    Hand in Project