Welcome to Kerala Project Center.

Maze Solver Robot

Maze Solver Robot

Micromouse maze-solving robot contest

Image: June 1978 NCC maze Contest.jpg by MoonlightDoubleE via Wikimedia Commons, CC BY 4.0

Simple obstacle-avoiding robots react to whatever's directly ahead, but a maze genuinely tests decision-making — the robot has to choose a direction at every junction and know when it's found a dead end.

This project builds an autonomous robot that uses IR sensors to detect walls on its left, right, and front, applying a wall-following algorithm (commonly "always turn left" or right-hand-rule logic) to systematically explore and solve a maze without any human control.

How It Works

  • Three IR sensors (front, left, right) continuously report whether a wall is present in each direction.
  • At each junction, the controller applies a wall-following rule — for example, always attempt a left turn first, then straight, then right, treating a fully blocked path as a dead end requiring a U-turn.
  • The motor driver executes the chosen movement (forward, turn left, turn right, reverse) based on the sensor readings and the following rule.
  • This systematic rule guarantees the robot eventually reaches the maze exit on a simply-connected maze, without needing a pre-built map.

Components



Arduino Uno
3x IR proximity sensors (front, left, right)
Motor driver (L298N) + DC gear motors + wheels
Chassis + battery pack


Applications

  • Robotics competitions and maze-solving challenges
  • Teaching autonomous navigation algorithms
  • Foundational technique for warehouse/indoor navigation robots

Advantages

  • Solves any simply-connected maze without needing a pre-programmed map
  • Demonstrates real algorithmic decision-making, not just reactive obstacle avoidance
  • Simple, inexpensive sensor set compared to camera-based navigation

Sample Code — Wall-Following Maze Logic



// Simplified left-hand wall-following maze solver - Arduino
int irFront = 2, irLeft = 3, irRight = 4;

void setup() {
  pinMode(irFront, INPUT);
  pinMode(irLeft, INPUT);
  pinMode(irRight, INPUT);
}

void loop() {
  bool wallFront = digitalRead(irFront) == HIGH;
  bool wallLeft  = digitalRead(irLeft) == HIGH;
  bool wallRight = digitalRead(irRight) == HIGH;

  if (!wallLeft) {
    turnLeft(); moveForward();
  } else if (!wallFront) {
    moveForward();
  } else if (!wallRight) {
    turnRight(); moveForward();
  } else {
    uTurn(); // dead end
  }
}


Related Research


Hours

Monday - Saturday: 9:00 AM - 5:00 PM
Sunday: Not Working

Location

2nd Floor, Comptron Arcade, Kallattumukku,
Thiruvananthapuram, Kerala 695012

Book Now

+91 9633118080