All about the project
I'm a Media Arts Design student who study in Multimedia University, Cyberjaya Malaysia. This is my Gamma Year of studying Media Art, Interaction Design is the subject that will teach students on how to use Arduino components and how it works. So in my final assignment, I have choosed Obstacles Avoiding robot as my own project and learn how every components works.
Step 1:
Prepare and build your Robot chasis. Inside the package have a few components, chassis, two motors, two wheels, a front wheel, a battery holder, some screws, switch and jumper wires. Photo below:
Step 2:
Before solder the jumper wires on your both motor, I would recommend to test every components for make sure they all are working well, example: Both DC motors, Arduino board, Motor Shield, Servo motor and Ultrasonic sensor. Then we will start solder the red and black wire on both motors, example picture below:
Step 3:
Come to our battery chassis and switch part. We only need to cut half of the black wire from the battery chassis and solder 1 wire side at 1 hole, another black wire will solder at another hole. Our switch is ready!
Step 4:
We will need to stack Arduino board and Motor Shield board, Motor Shield will stack on Arduino board. Example below:
Step 5:
We will move on to the Motor Shield board. This shield provides power to the motors and the servo motor, the motors need a lot of current, and this shield can provide up to 600mA of current to each motor. We need to solder/fixed the DC motors wires at the Motor shield board. If the your DC motor wires are long enough to reach the Motor Shield will be great, if not you might need to use external jumper wires(No matter is Male/Female jumper wire), cut off the jumper wire head and make sure inside the copper line shows up. (You will need to cut jumper wire rubber to make the copper wire appear). And you need to solder the external wires to the DC motor wires. Example:
Then connect the left motor wire to M1 connector of the motor shield. Right motor wire will coneect to M3 connector from the Motor shield board. Example:
Step 6:
Then we will need to connect the battery switch wires both red and black wire to the Motor shield board.
After that, we will need to ready Male and Female jumper wires for solder them to 5V, GND, Analog Pin 4 and Analog Pin 5. Before that, we will need to find same colors of female and male jumper wires and cut them into half. Why must be same color? First is easy for us to recognize which wire are for which part. Second, white Male jumper wire will solder with white Female jumper wire which connect to 5V. Black color Male jumper wire will solder with female jumper wire and Male jumper wire will solder to GND. Orange color Male jumper wire will solder with orange Female jumper wire, Orange male jumper wire will solder at Analog Pin 5. Lastly but not least, brown male jumper wire will solder with female brown jumper wire, then brown color male jumper wire will solder to Analog Pin 4. Example:
Step 7:
You are able to use double sided tape or hot glue gun for attach the both shield on the robot chassis.
Step 8: Come to Ultrasonic Sensor part
From the Female & Male jumper wires that we solder just now, White jumper wire(5V)(Female site jumper wire) will connect to Ultrasonic Sensor VCC pin. Black Jumper wire(GND)(Female site jumper wire) will connect to GND pin. Brown jumper wire(Analog Pin 4)(Female site jumper wire) will connect to Echo pin. Orange color jumper wire(Analog Pin 5)(Female site jumper wire) will connect to TRIG pin.
Step 9:
Lastly, For the Servo motor will connect to servo_2 slot. Note* (There are few types of servo motor out there. you might need to find it online for how they plug to servo_2 slot). Below is for my own version of servo slot.
Last Step: Code
For this Obstacles avoiding robot, we will need 3 libraries, which is Motor Shield library for Motor Shield driver, New Ping library is for the Ultrasonic Sensor. Third is Arduino IDE. Below are the downloadable links for libraries:
I'm appreciate for you guys to view my project. I hope the instructions are clear enough for you guys to follow and build the Obstacles Avoiding Robot for yourself. Thank you!
Video for testing:
Comments