Balance Robot
Andrew Gross
Posts: 5
Hello All ,
I am new to parallax and very interested in what parallax has to offer.
Does anyone out there know anything about balanceing robots? And info on how program one.
I am new to parallax and very interested in what parallax has to offer.
Does anyone out there know anything about balanceing robots? And info on how program one.
Comments
For level ground, some people have used ultrasonics pointed at the ground to balance the robot.
Others have used devices that measure slope, accelerometers. These might be able to go up and down a small slope.
And then there is the issue of control. If you want to wander with the bot, you either need IR or radio control.
Here is some background reading. And you are going to need motors, wheels and h-bridges of good quality. If all this is too expensive, some have adapted something like the BOEbot to operate while standing on end.
http://www.geology.smu.edu/~dpa-www/robo/nbot/
http://www.youtube.com/watch?v=j-Ubi93VzHo
http://www.youtube.com/watch?v=Lr0MkFb3da4&feature=relmfu
I have done some reading in the Propeller official guide of Hanno Sandos dance bot.And I am really impressed with what Hanno has done. I want to be able to controll my balance bot threw via. radio controll. My level at best is a 4 with programing the propeller microcontroller(still learning). I have an encoder , hbridge, gyro, accelerometer, motors with gear boxes,
and a micro controller that I bought from Parallax. I think I am ready to hire someone to help me with my project. Is there anyone out there for hire to build a balance bot?
Are you just measuring distance from the floor?
http://forums.parallax.com/showthread.php?126312-Balancing-Bot&p=965087&viewfull=1#post965087
Erco used measuring the distance from the floor (both front and back). This has been done with with either ultrasonic or IR sensors. I am not sure you have to have a gyro to take the more sophisticated approach, measuring acceleration may be enough.
Refinements, such as PID for motor smoothness and so on may come later, after you first get a bot that is working. I am not sure that encoders and feedback from the motors is necessary either. One can be too ambitious and just bury themselves in hardware that makes learning more confusing.
Where is the fun in that?
I may just be ready to build one for myself. I have certainly wanted to for a long time.
So the first step is to select a micro-processor and PID software. The Propeller OBEX has 3 PID examples and I guess quadrature feedback is required. First step in construction is an axle with the motors, and h-bridges, and such attached. Also, it may be best to keep the batteries low to the ground. Some investigation into where the center of gravity should be and how to best take advantage of the pendulum effect would be helpful.
Erco seems to have done it all with a Basic Stamp and no R/C control. But that is a rather limited device as it cannot easily wander, just wobble in place. The Propeller should accommodate a more complex scheme effectively. There is likely an object in OBEX for r/c control or Zigbee.
I am thinking of building DIY quadrature feedback using IR sensors. I'll have to research and look at what motors I want to use.
Measuring the distance to the floor only works on certain surfaces and is not goiod for all-terrain, but it isn't a bad place to get started. The programing is simple and will confirm the physical construct works well at balancing and that the PID is properly functioning.
Choice of sensors will decide much after that.
http://www.junun.org/MarkIII/Info.jsp?item=37
Using all Parallax products might be a bit challenging. It seems that the first phase is to set up motors with quadrature encoders for feedback. Options are to DIY, to buy add-ons, or to purchase motors that include them. The add-ons seem to be very expensive and problematic when compared with either DIY or complete motor/encoder assemblies.
Sensor solutions are divided into ground measurement via either ultrasound or ir distance sensors (both work) or gyroscope and accelerometer solutions. In looking at the later. there are huge debates about quality and what is best as the products keep evolving.
Not sure what you are trying to say, but I simply cannot find a Parallax product for adding quadrature encoders to motors or a motor with quadrature encoders that are not part of a packaged robot. SO that leaves only the DIY option.
Strictly speaking, PID is not absolutely necessary. But I suspect that anyone that builds a balancing robot will soon become interested in having it.
It would greatly help if they gave the inside diameter of the encoder disk.
http://www.parallax.com/Store/Accessories/MotorServos/tabid/163/CategoryID/57/List/0/SortField/0/Level/a/ProductID/665/Default.aspx
Sorry I managed to screw up my posts so I deleted them.
All I was getting is that to build a balancing bot one does not need wheel encoders, at least to start with.
The first task is to get the thing to stay upright and stable. So you need to know how far off vertical you are and drive the wheels accordingly.
Once you have that licked you can think about moving forward/backward and turning. If this is commanded by some remote control again you don't need wheel encoders.
Now, I do see that if you want to get the thing to navigate autonomously then you need to know it's position and heading so wheel encoders may come into play.
PID is not absolutely necessary. I have seen a video of one rude and crude balancing bot that used simple bang-bang control and relays to drive the motors! It was more of a dancing bot:)
Then there are other control techniques like fuzzy logic or neural nets to use instead of PID.
Control systems can be tricky to tune. Many balancing robots work best when there is mechanical damping added. Typically you'll see bots rolling on fat pneumatic tires which not only look impressive, but add necessary rolling resistance and critical damping. Another trick is to operate the bot on carpeting (sometimes THICK carpeting), which damps out oscillations. Take away the carpet and the pneumatic tires and a lot of these robots will oscillate noticeably. My own balance bot was a lot more stable on carpet.
My favorite is this unicycle, which is demonstrated on a bed, which provides a LOT of damping.
http://www.youtube.com/watch?v=W5OyoFX0DhI
I also have a Ping and 4 or 5 ir distance sensors.
One builder mentions that gyros quickly get into floating point maths and that C is likely useful - that seem to be a job for the Proeller and either GCC or Catalina C.
http://www.photopete.com/swarm/balbot.htm
My only fear of building without the encoders is that I will have to start over to install them. It would be a shame to have to use different motors and reconfigure the whole thing. Still, these encoders are NOT very critical as the RPMs are not very high in relation to response time. So I am still thinking of a DIY assembly.
I see that the control loop code is run at about 50 times per second with a rather long rest inside the loop, so PWM motor control is not an issue.
http://geology.heroy.smu.edu/~dpa-www/robo/nbot/bal2.txt
I do wonder if Parallax's wheel encoders are too complex. Rather than directly feed raw positioning to the Propeller, one has to set up a communications protocol and then extract data. It seems one COG would just have to take to the encoders.
Here is a simple one ... from Parallax.
http://www.societyofrobots.com/member_tutorials/node/185
Anyway when it comes to control this is even cooler http://www.youtube.com/watch?v=puOLD3-abwU
It would be nice if they provided an alternative encoder wheel with a smaller shaft that could be drilled out to fit many sizes.
You can always roll your own encoders... http://forums.parallax.com/showthread.php?119343-Make-Your-Own-Encoders
Those Hamamatsu sensors are nearly impossible to find now, but cheap little sensors are out there. I'll be working up a robot using these sensors in the next month or so: http://www.goldmine-elec-products.com/prodinfo.asp?number=G18740
That is just about the DIY approach I was thinking of - though some use Hall Effect sensors and magnets to avoid problems with optical wheels.
It seems that the Parallax encoders are included in their heavy wheel and motor sets. They are nice, but a bit more than I would want for a balancing bot.
I have several kinds of ir sensors already that might work. So I guess I just have to build a configuration and test to verify. If it won't work, then it is back to shopping. I really could not find any bargin dc motors with encoders included and geared to an optimal ratio. But I do see them from time to time.
For anybody that really is serious about learning robotics in depth, a good pair of motors set up with encoders are quite useful.
There have been encoders for r/c servo motors and I have been ignoring looking at those, but I may reconsider. The problem is that i fear that these may no longer be available. But some have argued that 50 cps PWM controlled motors are NOT good for PID and encoders as the control is jerky and affects the ability to get calculations right. (That might argue against the HB-25 motorcontroller as well).
http://www.ebay.com/itm/C93309-Lot-4-Faulhaber-3557K020CS-Minimotor-Motors-30-1-3-71-1-10BP4-Encoders-/290765915904?pt=LH_DefaultDomain_0&hash=item43b2ffc700
I have CNY70 sensors that will work for encoders, but Hamatsu P5587 are supposed to be superior.
Anybody want to split the order on the above and forward a pair to me in Taiwan?
Initially I thought that thin disk wheels were the way to go, in order to reduce their moment of inertia (flywheel effect) for quicker response. Turns out, the flywheel effect of heavy wheels works for you, as the video of the unicycle shows. His upper rotating flywheel is solely responsible for keeping it upright on that axis.
http://www.nubotics.com/purchase/index.html
On other fronts, I still would love to jointly buy the motors I mentioned (in #26) listing on Ebay that have encoders included. These items generally cost abotu $150-$175USD each when new. So the 4 motors for $116USD are very reasonable and the motors are rated at 20VDC.
They can be run at lower voltages without harm. And I have located the schematic for the encoders which are not properly identified in the listing. Seller claims that EVERYTHING is working.
I believe the encoders (with 10 wire ribbon cable) are HEDL 5540 series.
The vendor won't do business with me in Taiwan, just wants to sell to Canada or USA.
The deal would be that I'd split the cost to you by 50% and pay any additional shipping to Taiwan in full for a pair of the 4 after you select.