Want a balancing robot? With the right microcontroller and a little planning, you can build one yourself. This system’s designers—Nghia Tran, Victor Tran, Tammy Tran, Andy Tran, and Trucmai Nguyen—used a Texas Instruments LM3S9B96. After gyro and accelerometer data are read and processed, a balancing algorithm is performed and output is sent out to the left and right motors. A wireless adapter and network enables users to remotely control the robot.
The designers provided the following information about the project:
- The EK-LM3S9B96 uses PWM0, PWM1, and PWM2, PWM3 peripheral to control to the left and right motor drivers, respectively.
- Quadrature encoder input 0 (QEI0) and Quadrature encoder input 1 (QEI1) are used for reading the left and right motors’ encoder feedback.
- SSI1 is configured to function as a master SPI for the inertial measurement unit IMU interface. The designers used an Analog Devices ADIS16350.
- The Ethernet controller embedded on the LM3S9B96 connects to a wireless adaptor.
- UART0 is for debug and JTAG is for programming.
- A user can set the PWM values to the motor driver. The PWM value range is: –32000 to 32000
- The balance control is also a PID control loop with torque output and tilt angle feedback
Click here to study the entire project.