Mini Balancing ‘Segway’ Robot

Discuss robotics applications using FlowStone here
Post Reply
DSP
Posts: 150
Joined: Fri May 14, 2010 10:55 pm

Mini Balancing ‘Segway’ Robot

Post 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!
Attachments
FlowStone Mini Segway!
FlowStone Mini Segway!
Mini Segway LR.jpg (63.4 KiB) Viewed 78733 times
User avatar
nix
Posts: 817
Joined: Tue Jul 13, 2010 10:51 am

Re: Mini Balancing ‘Segway’ Robot

Post 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
User avatar
paul.pacini
Posts: 12
Joined: Sat Jul 23, 2011 12:41 am
Location: Northern California, USA

Re: Mini Balancing ‘Segway’ Robot

Post 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! ;)
Kind regards,
Paul
____________________________
To err is human; to blame problems on external factors is even more so.
machinist
Posts: 11
Joined: Tue Oct 11, 2011 2:07 am

Re: Mini Balancing ‘Segway’ Robot

Post 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.
Asbjørn
Posts: 45
Joined: Thu Sep 16, 2010 11:51 am

Re: Mini Balancing ‘Segway’ Robot

Post by Asbjørn »

Don't you have problems with the gyro drifting after a while?
User avatar
Magnum Opus
Posts: 6
Joined: Sat May 25, 2013 1:34 am

Re: Mini Balancing ‘Segway’ Robot

Post 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.
In what way do we have to think about it so that we can understand it's simplicity.
Post Reply