by Cláudio Brito » Tue Aug 27, 2013 5:27 pm
by Cláudio Brito
Tue Aug 27, 2013 5:27 pm
We have instaled one low cost optical encoder inside the motor. This is how the signal looks like at 92 rpm:
We intend to add 3 more so we can achieve a resolution around 1200 counts per revolution. This will allow us to do a precise speed control at low speeds.
Other approaches were made:
1. Magnetic encoder inside the motor using hall effect sensor plus the original encoder magnet;
2. Optical encoder mounted on the wheel;
- Option 1 resulted in a very inconstant signal, probably due to interference of the motor magnetic field;
- Option 2 worked but was not the most robust alternative since any oscillations or dust in the sensor would result in bad performance. Also had a limited resolution;
This is the analog comparator circuit used for the encoder:
About the software...
A Kalman filter was implemented to filter and combine information from the gyro and the accelerometer to obtain a good angle estimation.
The first approach used to achieve balance was a PID controller based on a static equilibrium angle and the current angle. This was a very limited approach since
any change on the center of mass would cause the robot to fall, but this first simple step was fundamental to see the controller behavior on the easiest case.
So far, this is how it behaves:
A more general algorithm is currently being developed, so the robot can learn by himself the equilibrium angle.
We have instaled one low cost optical encoder inside the motor. This is how the signal looks like at 92 rpm:
We intend to add 3 more so we can achieve a resolution around 1200 counts per revolution. This will allow us to do a precise speed control at low speeds.
Other approaches were made:
1. Magnetic encoder inside the motor using hall effect sensor plus the original encoder magnet;
2. Optical encoder mounted on the wheel;
- Option 1 resulted in a very inconstant signal, probably due to interference of the motor magnetic field;
- Option 2 worked but was not the most robust alternative since any oscillations or dust in the sensor would result in bad performance. Also had a limited resolution;
This is the analog comparator circuit used for the encoder:
About the software...
A Kalman filter was implemented to filter and combine information from the gyro and the accelerometer to obtain a good angle estimation.
The first approach used to achieve balance was a PID controller based on a static equilibrium angle and the current angle. This was a very limited approach since
any change on the center of mass would cause the robot to fall, but this first simple step was fundamental to see the controller behavior on the easiest case.
So far, this is how it behaves:
A more general algorithm is currently being developed, so the robot can learn by himself the equilibrium angle.