The participants had to build an autonomous robot which could follow a white line and keep track of directions while traversing the maze. The bot had to analyse the path in the dry run. In the final run, it then had to take the correct path through the maze in minimum possible time.

SPDT switch (One side connects battery to circuitry, other side connects battery to charging terminals)

After a lot of preparation, I entered the double doors of the Girish Gaitonde Lecture Hall Complex

At the entrance to the lecture hall complex, I was assigned the first slot.

Inside lecture room 002 (for that was the venue), it was completely dark. The maze was made from white vinyl strips pasted on a large wooden board, which was painted black.

The maze also had certain checkpoints, each of which when crossed, added 25 points to the total score.

At the end of the track was a white thermocol block (polystyrene) which on sensing, the maze solver had to blink a red LED to get 5 points.

When my turn came, I calibrated my robot’s sensors (in the fashion that all Pololu sensors are calibrated), set it into Mode 1 (maze analysis mode) and placed it at the start point.

(Note: Mode 2 is for the final run, in which the robot processes the path recorded in the dry run, eliminates all the bad turns and traverses the shortest path from start to end.)

Each participant is given three chances to restart.

The first time, it took an about turn right at the beginning and veered off the track. (Recalibration…)

The second time it went 2 inches forward before going completely cuckoo. (Recalibration again…)

The third time, thankfully, it went ahead and started the run.

All went well on the first run. Yippee!

The only problem was that it took a double turn at a dead-end. This mean’t that I would have to leave it in mode 1 again for the second run. If I put it in mode 2 now, it would get confused while processing the double turn and refuse to move.

So leaving it in mode 1, I took it back to the start point for the final run.

And right there, I made the mistake of turning it off and on again.

When a robot is turned off and on, the sensor calibration has to be done ALL OVER AGAIN.

I re-calibrated it, but something must have gone wonky because it got stuck in a loop and refused to proceed.

In the end, I scored enough points for a participation certificate. (Minimum points required: 60)

A very important point to note is that during the final testing at home (on a regular flex sheet) the maze solver solved the maze five out of five times.

This was quite an achievement and a great learning experience.

Lessons learn’t:

The material of the track adversely affects the functioning of a maze solver’s sensors and caster wheel.

Ensure that variables for turning are appropriate for any texture and that motors & wheels are also powerful enough.

For all you geeks out there who are into programming, here’s the code. Feel free to remix and use.

#include <QTRSensors.h>

// Code written by Raunak Hede – www.raunakhede.com

#define Kp 1 // experiment to determine this, start by something small that just makes your bot follow the line at a slow speed
#define Kd 15 // experiment to determine this, slowly increase the speeds and adjust this value. ( Note: Kp < Kd)
#define rightMaxSpeed 250 // max speed of the robot
#define leftMaxSpeed 250 // max speed of the robot
#define rightBaseSpeed 100 // this is the speed at which the motors should spin when the robot is perfectly on the line
#define leftBaseSpeed 100 // this is the speed at which the motors should spin when the robot is perfectly on the line
#define NUM_SENSORS 8 // number of sensors used
#define TIMEOUT 2500 // waits for 2500 us for sensor outputs to go low
#define EMITTER_PIN 12 // emitter is controlled by digital pin 2

pinMode(13, OUTPUT);
digitalWrite(13, HIGH);
pinMode(12, OUTPUT);
digitalWrite(12, HIGH);
for (int i = 0; i < 200; i++) // make the calibration take about 10 seconds
{
qtrrc.calibrate(); // reads all sensors 10 times at 2500 us per read (i.e. ~25 ms per call)
}
digitalWrite(13, LOW);// turn off Arduino’s LED to indicate we are through with calibration