My Balancing Robot using a RaspberryPi ModelB and a buch of Pololu Products.
12V NIMH Battery Pack
Pololu 5V StepDown Regulator (forRPi)
37D MetalGearMotors 19:1 with encoders + Hubs + MountingBrackets
Custom Made Aluminum Chassis
Position - Encoder (RoboClaw Feature)
Velocity - Encoder (RoboClaw Feature)
Angle - IMU (MinIMUv2 Accelerometer&Gyro Fusion)
Angular Velocity IMU (MinIMUv2 Gyro)
MotorController, PWM (RoboClaw Feature)
Software is written in C++. RPi runs a control loop at 50 Hz measuring all states, computing the control signal and sending it to the actuators.
The control signal is computed using LQR state-feedback. The resulting value is remapped, avoiding motor-deadzone issues.
Features for driving in a straight line and driving curves were added.
LQR gains were calculated numerically after having modeled the entire system.
-Compensating for the motors deadzone.
-Getting the correct motor parameters (Inductance, Resistance, Load Inertia, BackEmf, friction ...).
1. Measurement of the motors step responses for different DutyCycles using the encoders.
2. Creating a Motor model with initial guesses for the unknown parameters.
3. Find Parameters using numerical optimization toolbox (sth. like octave or matlab)
ToDo: Bluetooth Interface to steer the robot via smartphone or pc.