# Maze Solver Robot

3,450

19

14

- this robot designed to solve a simple maze without any AI using this following techniques in the code :

1) PID

2) rotation equations

3) calibration

https://github.com/marwaMosafa/Maze-solver-algorithm-

### Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

i used all the component listed above :

1- 2 geared dc motor

2- 2 wheels

3- 1 custer wheel

4- LCD

5- bread board and some wires ( male -male ) && (male - female )

6- 3 ultra sonic sensor

4- ultra sonic holder

5- Arduino UNO board

6- 2 battery 3.7 V with battery holder

7- L298N motor drive

8- wooden chasis for the robot body

9- switch

## Step 2: First Layer

1- connect the motor ,wheels and the drive to the chasis

2- connect motors to motor drive using wires

3- pins of the drive to pins 3,12,13,5,2,7 in order to arduino

note that :

if the wheel of the right motor for example move in the opposite direction you gave just swap the wires of the motor that connected to the drive

## Step 3: Second Layer

- put the arduino , sensors and breadboard layer on the second chasis and lets put some wires

please read the code file to know my connection but let's summarize :

1) VCC and GND of each sonar sensor to breadboard , Trigger and Echo will attached to pins A0,A1,A2,A3,A4,A5 for the 3 sensors

2) 5V and GND from arduino to supply the breadBoard

3) 5v out from drive to arduino input

4) GND from arduino to GND the drive

## Step 4: Power It Up

place your battery holder with your batteries in and take the red wire connect it to the input pin to the drive and the black wire to the GND of the drive with the wire of the arduino

## Step 5: Optional Step

this step for making some joy with your robot

1) place your lcd and make the connections to arduino like the code attached

2) connect the red wire of the battery holder to the ON pin of the switch and take a wire from the other pin to the input of the drive to control the power on of the robot with the switch

3) finally it's done and feel free to try it and let me know if you face any problems

## Recommendations

• ### Large Motors Class

13,110 Enrolled

## 14 Discussions

I want to know when it is taking right, Left or going straight and how is it using the PID?

what would happen on a dead end of maze?
As there is no function for that.

i used three sensors front,left and right and the front one is the base sensor in each condition with one of the two others

Why are you using PID_v1.h instead of NewPing.h? What advantage does PID_v1 have over that? I am asking, because I have only used NewPing :)