Obstacle Avoiding Robot (Virtual Simulation)

by aadityaphartale in Circuits > Arduino

92 Views, 0 Favorites, 0 Comments

Obstacle Avoiding Robot (Virtual Simulation)

Obstacle Avoiding Robot (Virtual Simulation)

In this Instructable you will learn how to make a virtual circuit of an obstacle avoiding robot using TinkerCAD. We will use the 'Circuits' function in TinkerCAD. 'Obstacle Avoiding Robot' means our robot will take a turn if it approaches an obstacle.

Virtual Components

Screenshot 2021-05-08 180850.png
Screenshot 2021-05-08 181029.png
Screenshot 2021-05-08 180935.png
Screenshot 2021-05-08 181102.png
Screenshot 2021-05-08 181137.png

All these components will be found in the menu of the TinkerCAD circuits. The needed components are:

  1. Breadboard No. 1
  2. Hobby Motor No. 2
  3. Arduino UNO R3 No. 1
  4. L293D (Motor- Driver) No.1
  5. Ultrasonic sensor sensor No.1

Just drag the components from the menu and drop them in the work area.

Connections

Screenshot 2021-05-08 181226.png

Connect components as shown in the image.

Code

Screenshot 2021-05-08 181312.png

You will need to open the code area. simply drag and drop the blocks.

Make sure you type in the correct numbers for the pins and arrange the blocks as shown in the image.

When complete, just close the code tab and click 'run simulation'. Adjust the distance on the sensor by clicking it and moving the marker which appears. You shall be able to see the effects accordingly.