Making a Robot With Arduino Part 2: Assembly
Sorry for taking so long, there is a lot of picture here.
After showing the motor controller last week, we can start making the robot.
This is the robot base, bare only with motor and wheels.
Notice the hole, it is used to screw in the board and component, and a place to arrange the wire around to make things neat. The wire put in a way we can put it into the motor controller neatly.
Put the motor controller on the side, where we have arrange motor wire. Under it there is some fasteners already in place. First screw in the first screw into the pre positioned fasteners. Then from it, rearrange the rest of the fasteners, to make fastening of the screw easier.
It should look this way
Twist the wire a bit, to make it easy to install into the terminal
Just unscrew the terminal abit, and install the wire, and screw it back. Don’t worry about the direction. If the motor turn reversed. Just reverse the order of wire.
Now do the same for the other motor, on the terminal opposite of this one.
The robot now should look this way
Now we can install the arduino. There is fastener that I already put in a hole on the robot, to make screw it easy. There is a few hole on the robot, just install into one that fit. You don’t need to screw into all the screw holes on the arduino. Just make sure it secure in place.
It should be around that way.
Now we can start wire up everything.
There is a few terminal on that side of the robot. The top 3 pin is the control for one side of the motor, the bottom 3 is for the other side. The middle one is the power for the motor and motor controller
Connect pin on the motor controller labeled I2 to digital 9,
Now I1 to Digital 8 on arduino.
The reason for digital pin 10 is because it is also can be use as PWM that is used to control the speed of the motor.
Now do the same for I3, I4 EB on the motor controller. Connect wire from I3 to Digital 12, I4 to Digital 13 and EB to Digital 11 for the PWM.
Now connect power output from arduino the motor controller.
The motor controller need 5v, so we put a wire on 5V.
The to one from ground, to ground, the middle one.
Now connect power to the motor
It is 4 1.5v battery connect together to get 6v. The positive goes to the terminal labeled vms, and negative to ground(the middle one). It shares a common ground, so don’t worry about the existing ground connected to the middle.
Finally connect battery to arduino
We are done for the assembly
Next round, we start writing code.