Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

How to get a robot to go straight?

Status
Not open for further replies.

homik

New Member
I know this sounds like a really stupid question, but i'm sure some of you have encountered this problem quite frequently.

What exactly is the best way to get a robot to go straight? I've even tried to use one axel, but an ever so slight variation in the guide wheel would make it veer ever so slightly of course, which over time can produce quite a lovely, but annoying, arc in the robots course :D

Using two motors is another solution, but then you have to have a method of correcting the course, whether it be through rotation sensors to synchronize the amount of turns each wheel spins, or is suppose in extreme case gyroscopes.

So i come here looking for your collective insights. What is the best way to get a robot to go in a straight line?

Thanks in advance! :D
 
One very good advice would be to use ONLY the same company fet transistors for the h-bridge. I did that mistake and my robot was always going to the right. I placed some 1.2 ohm resistors to correct the course but when the battery voltage was dropping, it would start to turn again...

I soldered a new one(the seller gave me a korean fet wich was less performant) and evrything was alright.

The use of tamia twin / double gearboxes would help too, they go naturally very straight and are pretty good for propulsion.

If you still have problems and your robots has 3 support points that touch the grounds(2 wheels plus sort of stick to keep the robot horizontal) you can displace the third support point to make more friction on one side of the robot. Again, if the voltage drops, you have to displace it as the robots goes less faster...

Or simply some 10 ohms pot on the motors to adjust.
 
If you use two motors and PWM to control motor speed you can correct to make the robot go straight.

The problem is knowing what straight is. As your solid axle proved equal wheel rotation is not enough because of traction/slip issues.

The key is to shave sensors to help determine how the robot is positioned and where it is.

3v0
 
There only one way to keep it going strait. And that is to keep track of how many rotations the wheels make.

And one of the best ways is a encoder. Next maybe hall sensor, Or motor that is made to keep track of a stepper.

A resistor not going to get it nor draging a leg lol
 
Maybe some fuzzy logic is needed. :D
There is really no point in making a robot that relies on the drive train to keep it straight. Feedback from sensors should determine the course the robot will take.
 
Last edited:
As 3v0 mentioned, having both wheels make the same number of rotations doesn't mean that it's going straight. Variances in traction between the wheels can cause it to go off at an angle. Variances in terrain height also means that one side may have slightly more ground to cover.

Don't forget that distance covered = number of rotations * wheel diameter only assuming perfect traction.
 
Last edited:
You have to have feed back to tell what your wheels are doing

As far as tracking gos it don't matter you could go from A to B strait or in a ark or a lot of them

If you built for out side then there will be slip. Hard floors not much to worry
 
Add a tail wheel caster that sits some distance behind the robot drive wheel center. Rotation of the wheel denotes change in direction. The longer the distance between drive wheels and tail wheel, the better the resolution in directional change.
 
What exactly is the best way to get a robot to go straight

if you do not mind me asking, why do you want it to go straight?

Usually you want your robot to hit a target, and target is usually marked (radio/light/whatever), or you have some reference points you can use to go the way you want... There is no proper way that will give you 100% straight line in all cases .. different terrain angle will mess up with tail wheel, holes & grovel will mess up with external encoders etc etc .. the only sure thing is to use reference points (line on the ground, distance from wall, radio/light/sound beacon...), as many reference points as possible .. everything else will work in "some conditions", for hard floor, parket .. the good grip rubber wheels with encoders will do the job, for slightly rough but flat terrain the tail wheelly will do the trick .. but for real action - you either need a beacon or you need some other sensory input like
camera and some reference point recognition software
 
Maybe you haven't heard of it, but i participate in the Science Olympiad tournaments at my high school. One of the competitions was to build an electric vehicle that goes a certain distance in an allotted time limit on a straight line. Sounds simple at first, doesn't it? :p Well, you're not aloud to track anything on the floor (where i would have used a optical sensor of some sort) and you're only aloud to align it visually against a target at the end of the track (no laser pointers :( )

I'm not sure they're going to repeat this particular event this year, but i just wanted to know your opinions on bot making. :)

If you're curious, here's the S.O. website: Home Page | Science Olympiad
 
Last edited:
That's not really a robot, more of a "car". Just use a single driven axle, and a fixed steering wheel at the front. Then add some microadjustment to the steering wheel, ie make its support from wire so you can bend it a little to get the car going straight.
 
Maybe you haven't heard of it, but i participate in the Science Olympiad tournaments at my high school.

from what I see on the site / youtube ... all tournaments are held on the hard parket floor ... just have good tires, do not accelerate too much to avoid slippage and and of the mentioned ways will do ... I'd personally go with uC controlling 2 DC motors with encoders controlling speed of the DC motors via PWM slowly increasing speed trough time .. should be fairly simple .. you can check out the BIl's **broken link removed** kit .. that would be perfect platform .. you have encoders on both wheels, fairly powerful uC to control the robot ... and expansion board for additional sensors to play with them in future :)
 
I don't have much experience in this sort of thing, but if that's the only goal of the project I'd probably just try fixed axles with multiple wheels spaced close together on each one (say 4-6?), with good-traction tires, front-wheel drive from a single motor. Slight slip on one tire would have very little effect because there are another 3-5 tires on the same axle to keep it in check.

That may sound like an insane idea but it's worth consideration? ;) Maybe :D
 
Last edited:
i know im a little late, but just wanted to mention that a heading hold gyro should work nicely in this application.
 
I was going to say that I'd go with the trailing tail wheel sensor, and dare say many would use a PIC to control everything but you could almost certainly do it with an ordinary analog system as well. However this system would probably fall foul of the rules becuase you are tracking the relative floor movement.

Alternatives:
GPS is expensive and quite frankly overkill for the budgets of almost all the teams.
Standing the trailing wheel system on it's head , a gyroscope to hold the heading.
Inertial sensors? to track X/Y movement, common in the RC helicopter world..
Hall, compass sensors.. again had little to do with them accuracy may be an issue.

At the end of the day it's a point and pray test of how well the bot is set up, the ability to detect wheel slippage would be useful but it makes for a much more complicated robot.



Is it scored soley on accuracy over the length of the course or is the time taken a factor as well? Visions of robotic dragsters hurtling out of control makes for a great spectator sport..
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top