Balancing Bot
I'm getting some parts & info together to make a Segway-style balancing bot. Here's a nice balance bot webpage with many interesting links to other sources, including Trevor Blackwell (of AnyBots) and his homemade Segway, near the bottom: http://www.tedlarson.com/robots/balancingbot.htm#flexo
Another guy used a Ping sensor (he goes on in some detail about how well it works) with an Arduino controller: http://www.societyofrobots.com/member_tutorials/node/185 (more good links)
And another: http://geology.heroy.smu.edu/~dpa-www/robo/nbot/
Anyone with any balance bot success is very welcome to chime in here!
Another guy used a Ping sensor (he goes on in some detail about how well it works) with an Arduino controller: http://www.societyofrobots.com/member_tutorials/node/185 (more good links)
And another: http://geology.heroy.smu.edu/~dpa-www/robo/nbot/
Anyone with any balance bot success is very welcome to chime in here!
Comments
agfa
Legway is a balancing bot built using the Lego NXT kit. It uses the light sensor to detect angle of tilt which is a pretty neat idea.
Arduway is an Arduino version of that bot using the NXT motors with an accelerometer.
I'd love to build either, but school is in session and cub scouts has become a big part of my son's week (and mine by extension).
Yes of course I am kidding. I have my twins and I am not planning on making this robot my life's work. As you have seen from my other projects, I like getting the maximum output for the minimum input. As I envision it, the whole robot should be so simple that it can be assembled in one evening, once the size, shape, servos, battery & function are verified.
Writing & improving the code can be an ongoing project, though!
The bottom would be big enough that it could possibly keep the robot from fall too far and hurting itself too. Although that would mean the robot can't start out lying on the floor and popping up either. So that would be a trade off.
The funny thing about balancers is that the better they work (more stable), the less power they need; batteries last a long time and less motor power is required. But if they are less stable and do a lot of correcting, or if you bump them a lot, they require LOTS of speed and torque from the motors, and more power from the battery.
Before I get too deep with the control system, I'll use microswitches to mechanically verify that my servos are powerful enough to make the system stable. These are the servos I have laying around and am trying first: http://www.alibaba.com/product-gs/279896653/toy_ANALOG_SERVO_VS_11.html
http://www.youtube.com/watch?v=A426svG8gXA
It isn't very stable, they wouldn't have got many marks for it.
They have several of those units which are used by students on a control systems course. The (rather expensive) controllers are programmed in real-time Java.
http://hannoware.com/dancebot/
He described it the "programming and customizing.." book.
Massimo
I too am trying to build a balancing robot. I have code running in an SX28AC linked to a LIS3LV02 accelerometer. The SX28AC also turns on/off a compressor which controls some pneumatic rams that lift the central core (containing the cpus/battery/sensors etc). When the core is lifted, the robot (should) balance, when the core is on the floor, the wheels lift off the ground, so the robot can sit and stand. The pneumatic rams also provide some suspension to the robot.
So far the code in the SX28AC reads the accelerometer and drives the motors forward/backward. It also passes telemetry back over an i2c link to a PC running Linux. Odometry off the motors (Ford Mondeo windscreen wiper motors) is a bit flaky. I'm bouncing IR directly off the amatures and counting/timing pulses. The code in the SX28AC is pretty much there apart from the odometry, and I'm not sure is I really need it if I use SLAM algorithms for mapping etc.
My next hurdle is building the central core, though I have most of the materials, it's a matter of working out what is the best way to put it all together. Everything seems to be physically larger than I want. H x W x D for the robot = 50cm x 55cm x 30cm - it will just squeeze through doorways.
I'll try to attach a photo of the SX28AC thing. Ha seems to have worked, so I'll explain a bit about that. Motor drivers are via a Robot Electronics MD22 - that's what the PCB is sitting above. 3 pins bottom right are connected to a sliding pot to provide feedback as the height of lift. Four LEDS - right most blinks when code is running, the next two indicate the state of the relays on the pneumatic valves, left most is lit when the compressor is running. The 3 two pin connectors on the left (with no wires) go to the valve and compressor. Chunky red/yellow/black are power - draws over 3A when it's all running (Gulp!) Multi-colored multi-pin goes to the accelerometer. The 3 pin blue/orange/yellow goes to a tachometer - two motors so there's two of them, though only one connected up in this photo. 4 pin with only green/grey/white wire is the i2c link, which just leaves the 4 pin red,blue,green,purple feeding the MD22.
I've got 3 spare pins. I think I will use one connected to several push buttons in parallel, so I can detect when the central core actually touches ground.
I built a vision-guided balancing robot powered by the Propeller several years ago. It turned into a race of who could "walk first", my son now aged 4 or my bot. I got it to balance very reliably- it balanced a flute of champagne in an art exhibit for 4 weeks- with minimal issues. It used an inexpensive grayscale ntsc camera to look for a bar-code belt buckle and could then "dance" with it's partner- keeping a set distance while facing the partner. To debug and tune DanceBot I wrote "ViewPort"- which led to "PropScope" and now "12Blocks". I'm hoping to go full circle and make it easy for people to get started with balancing robots using TBot- coming soon. See my signature for links...
I wrote 2 chapters for the official propeller book on how to build the balancing bot (complete with code) and the computer vision.
Big bots are easier to balance than short ones- try balancing a broomstick on your hand, then a pencil.
It's relatively easy to get a bot to balance in place for up to a minute. It's much more complex to have it moving around for an extended time. The key is to quickly and accurately control the motors.
You really should use a gyro and accelerometer- fused using a Kalman filter.
Motors should be relatively powerful and strong, with minimal backlash- and they must have decent resolution.
The Propeller makes it easy to separate complex projects into simple tasks. Ie- first debug the code to drive motors in one cog. Then, put that away and debug the code to measure the encoders... I ended up using all 8 cogs.
Hanno
Moving beyond simple balancing and remote control, I do anticipate the need for encoders for navigation, which will require a lot more processing power. That will get me into the Propeller world. The upcoming Scribbler 2 will win a lot of us Basic Stampers over.
However, as Albert Einstein once said, In theory, theory and practice are the same. In practice they are not. - so I will bow to the greater knowledge of someone that has actually built a balance robot before I state for sure that a gyro is unnecessary.
So for now, I shall retire to the shadows again.
agfa
BTW I've seen some cool videos of omni ball robots on you tube. They are the ultimate holomonic drive.
But just tonight I found a 2007 video of a guy who beat me to it using the exact same sensors & differential voltage methodology: http://www.youtube.com/watch?v=u8arOtG8aHk&NR=1
At least the guy is an engineering professor, so I shouldn't feel too bad.
Hey, maybe I can still be the first guy to make a balancer yet using just a galena crystal and a rusty nail. I'm on it!
Erco, I really like the idea of building a balancer completely analog. It could be the Herbie the Mousebot of balancing robots!
There's only one way I can top it. Here's my design for a passive balancing robot:
A much better robot here: http://www.youtube.com/watch?v=DWmS40quzxM
I plan to use two as angle detectors in a balance bot, per my earlier post. I'm initially interested in an analog solution, then moving to digital. The sensor analog voltage output is ~0.4-3.0 volts; you could RCtime that with a Stamp and get distance info pretty easily and cheaply.
Nice curve-fitting and general info on these modules at http://www.acroname.com/robotics/info/articles/sharp/sharp.html
PID it ain't, but you gotta start somewhere!