Hey guys, this is my first robot i made using the arduino. This robot detects whether there is an object or not and if there is it will start moving. If there is no object then the robot will not move. I made this myself and i hope you guys will like it.
Step 1: The Materials Required
The list of items required to do this project are :-
- 2 Motors
- Double sided tape
- Battery connector
- IR sensor
- 2 Wheels
- Chassis board
- Male to Male wires
Step 2: Connecting the Motors
As you can see in the pictures above we connect the motors to the board using a hinge.tighten the screws properly so that the motor doesn't fall off when it move. We need to do this on both sides of the board. after this is done we need to bring the wires through the holes onto the other side
Step 3: Connecting the L239D
In this step we must make a loop in the wire and insert it inside the output parts of the L239D. After it is inserted we must screw in the screws so that the wire does not get disconnected.
Step 4: Sticking on the Boards
Now using the double sided tape we must stick the arduino, the IR sensor, and the L239D onto the chassis. This must be done in a convenient way.
Step 5: Connecting the Arduino to the L239D
Here we must use four male to female wires to do this. First connect 2 wires on the input side of each motor. We must then connect these to the digital pins which we inserted in our code(ex;-11, 10, 9, and 8). Each wire should be connected to the pin number which was assigned to them. After this is completed we must attach the battery connector to the L239D, where the positive pin is to ground and the negative pin to 9 volts. Then we must us another male to female wire and connect the 5 volts pin in the L239D to the 5 volts pin in the Arduino.
Step 6: Connecting the Arduino to the IR Sensor
Now for the final part of the project we must use three male to female wires. First connect one wire from the VCC in the IR sensor to the 5 volts pin in the Arduino. Next connect the ground pin to the ground pin in the Arduino, and finally connect the output pin to the digital pin which was assigned in the code.
Step 7: Wheels
Finally you connect the wheels to the chassis and the project is now over. All that is left is to upload the code on the Arduino and it will run.
Step 8: The Code
The code which i wrote can be seen above this.
Step 9: Video of the Working Model
This is the video of a working model of this robot.