Maze Solver Robot

1,678

14

2

Published

Introduction: Maze Solver Robot

About: software engineering

- 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

gitHub code link :

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

Step 1: Get Your Component Ready

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

Share

    Recommendations

    • Planter Challenge

      Planter Challenge
    • Casting Contest

      Casting Contest
    • Oil Contest

      Oil Contest
    user

    We have a be nice policy.
    Please be positive and constructive.

    Tips

    4 Questions

    could you please clarify which is your first sensor front one or left one???

    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 :)

    i write the function of newPing myself i called it sonarSensor you can see it in the code and do the same job of the predefined library

    PID_v1.h i used it for getting feedback to the dc motor to control the forward function as it's oscillate in the maze so it make it stable in the forward move with adjusting the pid parameters kp.ki and kd

    0

    Oh, that's interesting. Who makes a decision about the left or right rule? You or the robot?

    0

    Does the robot use the right-hand rule?

    it relies on it's idea but it can follow the right and the left rule to the middle of the maze then i apply the left rule on the red maze and the right in the blue after it reaches the middle

    2 Comments

    thanks and i'll be happy if you try it :)