Balance Bot Overview
The balance bot is a robot that balances on two wheels. It is based on the Segway concept. In addition to being able to balance on two wheels, the robot can move in all directions, either via Bluetooth remote control or autonomously using sonar for object detection and path planning. The robot’s hardware is made up of a structural frame that supports the boards, components, batteries, and motors. Balance on two wheels is achieved through the use of an IMU — a device that houses a gyroscope and an accelerometer. The device I chose has 5 possible degrees of freedom of which I actually make use of 3 (2 axes on the accelerometer and 1 axis on the gyro). The IMU provides the raw information, in analog form, to determine both the angular velocity and the tilt angle of the robot. The raw data is fed into an A/D converter and the digital output is then fed into a Parallax Propeller processor (www.parallax.com) . This powerful processor has 8 cores which means it can run 8 different programs at the same time. The programs can exchange data by accessing shared memory locations. The output of the propeller is a serial data stream which is sent to a DC motor controller to control the speed and direction of the two DC motors. The remote control uses an Arduino Uno board with a joystick shield (all available from Sparkfun www.sparkfun.com). In addition, the remote contains a Bluesmirf Bluetooth module which is used to communicate with the balancebot. A more detailed parts list can be found below.
To achieve balance, I used a complementary filter to combine the data from the gyroscope and the accelerometer in order to provide both tilt angle and angular velocity. This information, along with information from the wheel encoders, is fed into a series of cascading PID loops which make up the balance control system. The remote control manipulates this information as well to command movement. The Balancebot can be toggled, using the remote, between remote control mode and autonomous mode. Autonomous mode makes use of a PING sonar sensor which placed on top of the robot. The robot travels until an object is detected in its path. The ping then scans the immediate environment to determine the clearest alternate route. The robot will then turn in that direction and proceed until the next obstacle is detected. The sonar is by no means perfect in detecting all obstacles. For instance, its performance against soft fabric-covered obstacles is compromised. Since the sonar needs a return of the signal it sends out, a sharp angle can deflect the signal and also compromise performance. In addition, the vertical range is limited and the robot can get stuck on a low object that the sonar did not detect. Instead of trying for the perfect sensor array, I chose to solve these problems by designing a means for the robot to detect if it is stuck and then extricate itself. My "stuck sensor" is based on wheel encoder readings. Once the robot determines that it is not moving forward it reverses its path and turns in another direction.
The balance algorithms are sufficiently robust so that the robot can be pushed around and still maintain its balance. It can also travel on various surfaces such a grass, asphalt and pavers.
Click the following link to see the Balance Bot in action https://www.youtube.com/watch?v=Y4yq41anvS8 .
Major parts list:
- IMU (inertial measurement unit which contains an IDG500 dual-axis gyroscope and an Analog Devices triple axis ADXL335 accelerometer)
- Microchip MCP 3208 A/D converter
- Parallax propeller protoboard (containing P8X32A-Q44 Propeller chip)
- Sparkfun Bluesmirf Gold Bluetooth radio
- Dimension Engineering Sabertooth 2 x 5 motor controller
- Parallax PING sonar sensor
- HiTec HS-422 Servo motor
- 7.2 V/291 RPM DC Gearhead motors (2X)
- Quadrature motor encoders (2X)
- Banebot 4 7/8 x 0.8” , ½” Hex mount wheels (with 6mm Bore, 2 wide, series 40 hex hub) (2X)
- 9V Li-Ion battery (for electronics)
- Intellect 7.2V 4600 mAh Flat NiMH battery with Tamiya connector (for motors)
- VEX frame material/Lynxmotion brackets
- Parallax motor mount kit (aluminum motor mount brackets)
In addition, the remote control parts consist of the following Sparkfun parts:
- Arduino Uno R3 board
- Joystick shield kit
- Bluesmirf Gold modem
- Arduino project case
- 9V Li-Ion battery
This is the essential hardware that makes up the Balance Bot.