Electronic – Line Tracing robot when sensors are behind the robot

microcontroller

I am trying to design a robot, a line tracer basically, but the catch is that, instead of the sensors being placed on the front, they are going to be placed on the back.
So I am trying to develop an algorithm, but I haven't had any success so far. The best I can think of is, when a curve comes and the it is sensed by the sensors, then the robot will move back and take the turn.
That is what I can think of.
I tried googling it, but it seems as if no one has thought of this before. So can I get an efficient algorithm?
I use an ATmega 128 microcontroller.

Best Answer

It is certainly possible to do this, but as David Kessner pointed out, it's very difficult to do this with a traditional 2-wheeled robot.

Imagine what happens when the sensor realises that the line is slightly off to one side. Which way should the robot turn? Turn one way, and the sensor is now above the line, but the robot is actually steering away from the line! Turn the other way, and the robot steers towards the line, but the sensor is further from the line. Whatever you do, you lose.

However, if you are building this robot from scratch, then there is a solution. Use omnidirectional wheels!

Omni Wheels

Using these wheels, and some clever mathematics, you can actually make your robot drive as if the whole of the robot was actually behind the sensor! You'll have to spend some time studying the behaviour of the wheels, and working out the maths, as this is too much to explain here.

To get you started, here is a some cool video of the wheels in action: