Saturday, December 21, 2013

Line tracking truck update

This is a sequel to the line tracking truck project previously posted.

Calculating minimum turning radius:

By design, the steering front wheels can turn by as much as 18 degrees.  The wheelbase is measured at 185mm.  Based on design geometry, we calculate "r" as the minimum turning radius of the truck.  At maximum steering angle of 18 degrees on a wheelbase of 185mm, the minimum turn radius is calculated as per below to be around 600mm (2 feet). 

Thus, by mechanical design, the minimum turn radius that the tape can be laid out so that the truck can follow without overshoot is at 600mm.  A bigger radius or curvature will of course ensure that the truck will not overshoot in the turn.

This seems to be a reasonable design limit so the project can proceed to reality.  Using the same electronics already built into the truck in the light seeking truck project, we just modify the software inside the microcontroller to make this work.  This time, we will make use of the 4-channel IR sensor that was previously installed in the front bumper of the truck.

The first prototype of code made a lot of overshooting.  The steering cannot cope up with the forward motion thus causing overshoots.  As there are four sensors in the front of the truck, the logic was programmed to be as follows: (values were made by initial performance estimates)

To make sure the steering can compensate, the code was optimized for minimum cycle time.  The faster the code can run, the more that the truck can stay on the tape.  After corrections, the prototype code was ready to run.


The next development to this project is overshoot correction and recovery.  That can be a little tricky but that will be available soon.  Watch out for the next sequel...