Obstacle Avoidance Robot- Online Simulation
by Tvisha Malige in Circuits > Arduino
398 Views, 1 Favorites, 0 Comments
Obstacle Avoidance Robot- Online Simulation
Introduction:
We are going to build an obstacle detection virtual robot in this instructable. There are three variants with only minor changes in the codes of each of the variants. Watch the video to see how the project works and the live demonstration of the robot.
Gather Your Supplies
We are going to do this simulation in TinkerCAD. You can gather all these supplies there, after creating an account and signing in to TinkerCAD. You will need to get the following items:
1. Arduino UNO - 1
2. Breadboard Small - 1
3. L293D Motor Driver - 1
4. Ultrasonic Distance Sensor - 1
5. Motors - 2
Circuit Connections
According to the picture, make all the connections. You can color code the wires in any which way you wish, but this is how I color-coded mine:
Positive: Red
Negative: Black
Motor to motor Driver: Green
Arduino to motor Driver: Blue
Ultrasonic Sensor to Arduino: Purple
Left Turning
You can make your robot turn left, back, or right when it senses an obstacle. This code snippet is for turning left. If you wish to have your robot turn left when it detects an obstacle, code your Arduino with this code snippet. Else, skip this step and move on.
Right Turning
In this step, you can code your Arduino to turn right when it detects an obstacle. If you wish to make it turn left, visit the previous step or if you wish to make it go backwards, move on to the next step.
Backwards Turning
If you want to make your robot move backwards, when it meets an obstacle, code your Arduino with this code snippet. Visit the previous steps to make the robot turn left or right when it detects an obstacle.