Obstacle Avoiding Robot with evive

Making a modular differential drive robot which is designed to avoid the simple obstacles using ultrasonic sensor and servo.

Similar projects worth following
We have built an obstacle avoiding robot using evive. We have mounted ultrasonic sensor on a servo. Hence it can also behave like an cheap 2-D scanner. So after detecting a obstacle, the robot analyses which direction is the best to go using distance at 3 angles from ultrasonic sensor.

View all 6 components

View all 2 project logs

  • 1
    Step 1

    First of all we will see the building part of it, then we will proceed to the coding part. You can see the image - how our robot looks like. This structure actually makes the work easier.

    Please go through the very detailed Instructable on making the modular differential drive robot here.

    All the CAD files can be downloaded from our GrabCAD profile.

  • 2
    Step 2

    We have three devices to be connected to the evive.

    To connect the two motors of the robot insert the wires of motors in the slot made in evive that are M1 and M2 in the correct orientation.

    Now, we have to connect the servo motor in evive, in this we have not used the inbuilt servo pinouts because it uses the same pin as that of motor so instead we have used digital pin 9 for communication of servo and other power related pins to the arduino for example VCC to 5 volt and GND to ground.

    To connect the ultrasonic sensor just connect the VCC to 5 volt, GND to ground and for trig pin and echo pin we have used the digital pins 3 and 2 respectively.

    Please have a detailed look at the evive's schematic pinout diagram, so that you can easily connect motors and servos.

  • 3
    Step 3

    Working of Ultrasonic sensor-

    We have mounted an ultrasonic sensor atop a servo. When the ultrasonic sensor is triggered, it sends out a pulse and simultaneously starts an internal clock. When the pulse hits an obstacle, it gets reflected back to the sensor. The sensor calculates the time difference between the sending and receiving of the pulse. Since the speed of the pulse in air (let it be 'v') and the time gap ('t') is known, the distance to the obstacle can be calculated as-

    Time for total trip = t

    Time for reaching the obstacle = t/2

    => distance = v*(t/2)

    This value has been calculated in our code and can be stored and manipulated accordingly.

View all 7 instructions

Enjoy this project?



Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates