Obstacle Avoiding Virtual Circuit

by Ananyaa_115 in Circuits > Arduino

43 Views, 0 Favorites, 0 Comments

Obstacle Avoiding Virtual Circuit

An obstacle avoid robot circuit and code
thumbnail circuit.PNG

This is a simple circuit for an obstacle avoidance robot but without the base or chassis

In this, we will go through the circuit and code step by step and see the working of it on the website TinkerCad.com

Supplies

ultrasonic sensor.PNG
motor.PNG
L293D.PNG
arduino.PNG
breadboard.PNG

These are the parts or components needed for the circuit.

  1. Breadboard 1x
  2. Arduino 1x
  3. L293D Motor Driver 1x
  4. USB Cable (for Arduino) 1x
  5. Gear Motor 2x
  6. Ultrasonic Sensor HC-SR04 1x
  7. Male to female and Male to Male Jumper wires (if doing physically)
  8. Tyres (if doing physically)

You can either take all these components in real life with a tire and code it on Arduino IDE or Use the TinkerCAD Website to get parts and code it there itself.

Assembling

circuit.PNG

This is the entire assembling of this circuit. We will put it exactly this way. The breadboard needs to be connected with all components. All these parts will be assembled with some jumper wires. If you are doing it physically you will need wires but TinkerCAD has built-in wires.

Code

text code.PNG
code.PNG

These are the block and the text-based code. You can use both on tinkercad but if you are doing it physically then connect the USB cable to the Arduino and the laptop. Use Arduino IDE for coding. You can use only text-based code in Arduino IDE.

Testing

Try it Out!! On TinkerCAD You can click on the ultrasonic sensor when the simulation is going on, and there will be a ball and a certain range given for changing it. In real life, you can test it by putting an object in front of the sensor and it will turn but you can't put an object in front of a virtual sensor so we can move the ball there and the distance will be there right above the sensor. Thank you So much!! Hope this was helpful and you can DIY at home. BYEE!!