ROB1 was my first prototype robot base, I built a couple years back. His purpose was to get something driving around using a gyro to hold straight line, and wireless communication from my laptop.
He’s a tail dragger controlled by an Arduino UNO. I used two continuous rotation servos, a gyro, and an Xbee. I had a second Xbee connected to my laptop, and using a terminal program on my laptop, I sent drive commands to ROB1 via the Xbees.
In the video I show how the gyro is used to keep turn rotation at a constant speed, and keeps him driving in a straight line. If you try to turn him by hand while he is standing still, he pushes back to stay in place. If you try to keep him from turning, he pushes harder to keep turning. If you try to turn him while he is moving straight he pushes to maintain that straight line.
The jerky turns and driving you see are because the gain is too high on the gyro. Basically it uses too much power to start turning, then backs off too much to slow down the turn, then uses too much power again to get back up speed, then backs off too much, etc. There is a bug in my gyro math that causes the driving rate to go way out of range, so I have it set to detect this condition and shut the drive system off, which is what happens at the end of the video.
- Actuators / output devices: Two servos modified for continuous rotation
- Control method: non-autonomous, Control via laptop over Xbee's
- CPU: Arduino Uno (atmega328)
- Power source: 4.8V battery pack
- Programming language: C++
- Sensors / input devices: gyroscope
- Target environment: indoor on smooth surfaces
This is a companion discussion topic for the original entry at https://community.robotshop.com/robots/show/rob1-prototype-using-gyro-and-xbees