Intuitive Maze Solving Robot

In this Instructable you'll learn how to make a maze solving robot that solves human drawn mazes.

While most robots solve the first kind of drawn mazes (you have to follow the lines, they are paths), normal people tend to draw the second kind of mazes. These are much harder and pickier to see for a robot, but not impossible!

Step 1: Step 1: Maze Solving

I have actually considered many maze solving methods, but the most used method is an easy one to program while it still solves almost any maze!

In this method we tell the robot to:

  • Turn right whenever it can
  • If not, drive forward if that's possible
  • Turn left as a last solution and
  • Turn back if it runs into a dead end

In the image you see a maze being solves this way. This method is often called the Wall Follower.
As long as the destination is an exit in the outer wall, the Wall Follower will find it.

Step 2: Step 2: Order Parts

For this robot we'd need:

  • 1× Arduino Uno
  • 1× 4 AA battery holder
  • 3× TCRT5000 sensors (QTR-1A)
  • 2× 6V DC Motors
  • 13× male-female breadboard wire
  • 10× female-female breadboard wire
  • Pin header with at least 29 pins
  • Soldering equipment

Also, download and install the Arduino IDE to develop on your Arduino, and make sure your Arduino came with USB cable type A/B to connect it to your computer.

Step 3: Step 3: Read From a Sensor

The TCRT5000 sensors are built up from a infrared led (the blue orb) and a receiver (the black orb).

When the led emits infrared light onto a white surface it will get reflected into the receiver and it will return a low value (40~60 in my case)
When the led emits light onto a black surface it will get absorbed and it will return a high value (700~1010 in my case)

The second image shows a schema that tells how to connect the sensor to the Arduino. Hold the sensor so that you can see the led and receiver and the pins are pointed towards the schema to make sure you connect the right pins.

Now we just need to connect the Arduino to our computer, put the following code in Arduino IDE and compile it:

// Change A0 to whatever port you connected the sensor to
#define FRONT_SENSOR A0

void start() { Serial.begin(9600); }

void loop() {

int frontValue = analogRead(FRONT_SENSOR);
Serial.println(frontValue);
}

Now if you move the sensor very closely over white and black surfaces you should see the values change accordingly in the serial monitor.

Share

    Recommendations

    • Optics Contest

      Optics Contest
    • Plastics Contest

      Plastics Contest
    • Make it Glow Contest 2018

      Make it Glow Contest 2018

    Discussions

    0
    None
    tomatoskins

    9 months ago

    Cool! I'd love to see a video showing it off.