Page 1 of 1

Mini Balancing ‘Segway’ Robot

PostPosted: Fri Sep 10, 2010 10:17 am
by DSP
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!

Re: Mini Balancing ‘Segway’ Robot

PostPosted: Fri Sep 24, 2010 3:12 am
by nix
That's cool man,
Trying to do it with feet would be hard, but I have seen your app in vehicles.
Fair play

Re: Mini Balancing ‘Segway’ Robot

PostPosted: Mon Aug 08, 2011 9:28 pm
by paul.pacini
Wow, very cool application of both hardware and software. I do imagine the PID loop-parameters are tricky to setup considering how many time-constants you’re dealing with within the system.

Are you able to drive the bot too? It seems like offsetting the error to something <>0 would cause it to lean and drive, but I’m sure that introduces lots of variability as well.

Thank you for sharing! ;)

Re: Mini Balancing ‘Segway’ Robot

PostPosted: Mon Nov 14, 2011 7:23 pm
by machinist
Can you post the program file? I'm looking into doing a similar concept with a Wii-Remote as the sensor but i'm not sure I fully understand the processing behind it.

Re: Mini Balancing ‘Segway’ Robot

PostPosted: Sun Nov 20, 2011 6:37 pm
by Asbjørn
Don't you have problems with the gyro drifting after a while?

Re: Mini Balancing ‘Segway’ Robot

PostPosted: Mon Jun 17, 2013 11:19 am
by Magnum Opus
Cool little robot there, can you show it driving around already?
Been thinking about an USB MIDI to PIC to MUX, and Flip Flop to DEMUX to PIC for TTL applications.
Giving some serious IO. Possibly disembowling a 2.4GHz remote control, or very bright IR optics.