Let's Make Robots!

ROB1 Prototype using gyro and xbees


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.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Kindly post the code.

Sorry, I should have mentioned I had built him a couple years ago, and have canibalized the parts and source. The only source I can find has been modified for my 3 wheeled robot. I'm building a dalek, and I will be noodleing with this base again. So I should have some updated code in the next couple weeks. I'll get the source for my ROB2 robot posted though.