Making a modular differential drive robot which is designed to avoid the simple obstacles using ultrasonic sensor and servo.
To make the experience fit your profile, pick a username and tell us what interests you.
We found and based on your interests.
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.
Firstly we have made a modular mobile robot.
A detailed instructions are availalble: https://hackaday.io/project/12533-making-a-modular-differential-drive-robot
The CAD files for making the robot are available at GrabCAD : https://grabcad.com/library/modular-differential-drive-robot-1
For beginners, have a look at this video to assemble the robot:
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.
All the CAD files can be downloaded from our GrabCAD profile.
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.
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.
Create an account to leave a comment. Already have an account? Log In.
Become a member to follow this project and never miss any updates