Go Down

Topic: Accurate turning without encoders (Read 1 time) previous topic - next topic

Dave Twilley

Having just built my first 2WD robot kit (DFRobot), I've been playing around with some basic object avoidance which went ok but I quickly discovered that without motor encoders, its going to be very difficult to get accurate heading changes.

So I came up with an idea and thought I'd ask on here whether it sounded feasible before buying the rest of the bits.

I was thinking that if I had 4 distance sensors facing in each direction, N,S,E,W, I could read record the outputs on all 4 and rotate slowly until the exact same readings were seen again (offset by 90 degrees), so I knew when I'd made the desired turn.  Granted, most of the time three sensors would be at infinity with the sensor in the direction of travel triggering the turn, but in more complex situations where we're in a corner we'd have readings from 2 sensors to use.

Another idea I had was to use a couple of sensors mounted on two servos, as the turn of a servo can be more accurately controlled, one could move the servo 90 degrees then rotate the vehicle until the same reading was reached.  If this is done incrementally it'll reduce the chances of the sensor/servo combination "locking" on to something else which gives an identical distance.

Failing that is there any other way of doing this without encoders?  If not then can anyone point me in the direction of encoders which will work with the DFRobot geared motors.

Many thanks.

Dave

robtillaart

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Dave Twilley

I didn't think they were that accurate?

robtillaart

with some averaging of readings they are quite good.

The advantage of a compass is that you can detect also errors like different wheel or track sizes, or if your robots glides on a slope it can reorientate.
It can even determine its (absolute) orientation at start, before any movements.

Add a GPS and you're quite complete :)
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Dave Twilley

Thanks, any recommendations on a digital compass?  With the GPS are they only any good outdoors over large distances?  I'd imagine GPS in a small room would be next to useless.

Only been doing this a couple of weeks but since I got my 2wd robot kit Friday I've been addicted to tweaking and I've very quickly realised I need "more input".  Loving this hobby.

I've got a load of servos knocking about as I fly model planes, think I'll stick my IR and/or ultrasonic sensor on that for some radar sweeping.

Go Up