I am working on a wall follower program with Arduino. Below video shows PID (Proportional-Integral-Derivative controller) version of 'wall follower'. It follows the sofa (fabric), the wall (brick) and the cupboard (wood) as shown in the video.
It utilizes the below electronics components for this purpose:
Ardino microcontroller
DC motors - 2
L293D motor driver shield
Two Ultrasonic sensors
One ultrasonic sensor is mounted on the left side of the car and another mounted on the front of the car. PID algorithm is applied to the Left Ultrasonic sensor. Front sensor navigates to the right (sharp turn) when there is an object in front of the car.
Now, the questions are, why the robot collide with the cupboard at the end? Could you please guide me about debugging the issue, that will help the robot move ahead from the cupboard? Why the robot is unable to detect the turn at the cupboard (when it is able to detect other left/right turns)?
Please read the first post in any forum entitled how to use this forum. http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
Thanks for your suggestions. I have tried to incorporate them at my best below. I have attached the hand-drawn circuit diagram for the Wall Follower (PID Controller) with this reply.
As well as I am putting the relevant code in the code tags for the wall follower below.
I have written the description of the problem (along with the video) in the original post.
Please let me know if more details are needed OR all the details should be put in one post for clarity.
This project is "almost" complete now. The reason for saying "almost" is because, it is very sensitive to voltage. And do not behave consistently. I need to design a voltage regulator to maintain a constant voltage to microcontroller and sensors.
I needed to make changes to the PID values, to make it work (as it exists now, in the below video).
Please take a look at the latest video and the latest code.