Balancing bot using 3-axis accelerometer?
Meepo
Posts: 24
I bought a 3-axis accelerometer from Parallax, and I'd like to mess around with it a bit to learn how to use it. Can I build a small 2-wheel balancing bot with it, or do I also need a tilt sensor of some kind?
Comments
A rate gyro is not subject to this problem but drifts over time. Since a rate gyro is accurate in the short run and an accelerometer is accurate in the long run, they make a perfect combination. However the routines to integrate the two can be complex (try googling Kalman Filter).
A good first step toward a good balancing robot is to use a sensor that measure tilt directly in relation to the floor. This could be an arm connected to pot to measure its position, or various kinds of sensors that measure distance to the ground. This is easier than finding absolute up but limits the robot to smooth level floors. But it's a good opportunity to work out the mechanics of the balancing robot and the routines to take the tilt and translate it into directions to the wheels, usually using a PID loop.
Balancing robots are very challenging, but lot's of fun and a great learning experience.
/John
·
The Y-axis would be unused.
The control signal would work to drive the Z-axis signal back to 1-g.
This is for a robot that can only needs to balance fwd/aft.
·