Mini Balancing ‘Segway’ Robot
Posted: Fri Sep 10, 2010 10:17 am
Here are some details of my new FlowStone balancing robot. This was made using a Robot Electronics RD02 motor controller and wheels plus a Phidgets 3/3/3/ spatial interface (accelerometers, Gyro, compass).
The RD02 Motor controller communicates via RS232 using the FlowStone COM port module and the Phidgets Gyro is via USB. Not shown in the photo is my new wireless USB hub that has now made it totally wireless!
Operation:
Basically the gyro board senses any movement in the body of the robot, this is read by FlowStone and fed into the PID module as an error (0 = center). The PID module calculates from the error how much it should move the motors to bring it back into balance. This motor message is then sent to the motor controller board and the robot balances.
Results:
It seems that the PID settings are quite critical to keep it from oscillating, but once dialed in it will balance with almost no visible movement all day! If you push the unit out of balance it quickly recovers and balances again.
Conclusion:
Using FlowStone for this project saved me so much time, the main benefit was that I could adjust the PID setting in situ without having to re-compile each time to test the settings! Also having all of the drivers just there in Flowstone for the Phidgets and RS232 meant I could focus in the real programming and waste time not the interfaceing!
The RD02 Motor controller communicates via RS232 using the FlowStone COM port module and the Phidgets Gyro is via USB. Not shown in the photo is my new wireless USB hub that has now made it totally wireless!
Operation:
Basically the gyro board senses any movement in the body of the robot, this is read by FlowStone and fed into the PID module as an error (0 = center). The PID module calculates from the error how much it should move the motors to bring it back into balance. This motor message is then sent to the motor controller board and the robot balances.
Results:
It seems that the PID settings are quite critical to keep it from oscillating, but once dialed in it will balance with almost no visible movement all day! If you push the unit out of balance it quickly recovers and balances again.
Conclusion:
Using FlowStone for this project saved me so much time, the main benefit was that I could adjust the PID setting in situ without having to re-compile each time to test the settings! Also having all of the drivers just there in Flowstone for the Phidgets and RS232 meant I could focus in the real programming and waste time not the interfaceing!