There were a few components of the robot that I had to make or modify. There was the sensor board that I had to make with the sensors, resistors, and the perforated board. I also had to modify the servos to convert them to geared DC motors. Once that was done, I used a plastic container to enclose all these parts. I had to cut holes for the sensors and the motors. I will be going though in the making of these several parts of the robot. Then I will assemble them together.
For the sensor board I used the sensors that I ordered along with the perforated board and resistors. I also needed some wiring to connect all the grounds together and the power together.
So I started off first by placing the sensors on top of the board with some spacing in between them so they won't interfere with each other. The blue led is the IR emitter while the black led is the IR detector. The spacing was about half of inch. I had some trouble trying to stick the sensors pins through the hole because in between the pins there was some kind of plastic that protruded out. So I tried my best to stick the pins through the holes.
Then moving on towards the back of the board with the sensors in, I soldered the two pins on the right side of each sensor. This is where the power will be supplied to these sensors.
For the IR detectors I soldered the 10K ohms resistors to the other end of the IR detectors as shown.
After that I soldered the 150 ohms resistors to the other ends of the IR emitters as shown.
Once that was done I connected all the ends of the resistors together since they’re all going to ground as the picture shows.
I connected all the grounds together with green wires. For the parts where I soldered the right sides of each sensor, that is the power sides, I soldered all those together in red wires. I brought the power wire towards the bottom right. Now, for the sensor readings that will be read to the analog pins of the Arduino, I soldered blue wires in between the 10K ohms and the left side of each IR detector as shown. I brought the blue wires towards the bottom of the wire. For all these wires that are soldered at the bottom of the board, I soldered some more wires of the same color that will extend out to be able to connect with the Arduino. I used a few inches of wiring. It'll depend on how far will the sensor board will be from the Arduino.
Now to the other side again, I cut the excessive pins from the resistors and I placed about two layers of electrical tape over the pins that remained. The reason for this is because if you are using a metal frame there may be a short circuit.
To test the sensor board you can connect the power and the ground on the Arduino with 5V pin and the GND pin to power the board. On some camera phones, like mines, you will be able to see if the IR emitters are on. You can also use digital cameras to check.
Modifying Servo Motors to be DC Motors:
For the servo motors I had to modify them so they can continuous and become DC motors. To start off, we have to remove the four screws with a Philip screwdriver.
Then remove the cover.
Also take off the top of the motor now. Be careful that no gears or other components get lost or fall out.
From the top of the motor you will be able to see two holes when you remove the white flat gear. From these two holes you can use one of the screws to push the motor out.
Take your time and don't rush to keep from damaging the plastic housing. While pushing down through those holes you can also pry it out at the bottom of the housing towards the opposite side of the holes. Once you get the motor out with the board that it is on it should look like this.
You will have to desolder the motor from the board. I used my soldering iron to do this procedure.
Looking inside the housing where the DC motor was at, you will see a potentiometer. There will be a screw that you can remove to remove the potentiometer.
Now looking back at the top cover that you removed with the gears inside, you will be able to see a black gear that has a piece of plastic that protrudes out from it. This plastic is the stop for the servo motor. This is what prevents the servo motor from doing continuous spinning. Remove this gear by simply pulling it out.
Next, you have to melt always that plastic stop with the soldering iron. Just take your time since I almost ruined the first one. Little by little remove some plastic until it is pretty much flush with the rest of the gear.
You can test it by placing it back on top of the plastic housing where it fits into place and seeing if you can spin it freely.
Now place the motor back in its place inside the plastic housing. You will have to cut the wires from the board that it is connected to and solder those wires to the terminals of the motor. You will want to solder the red and orange wires together to the terminal with the red dot. The brown wire, the ground wire, should be soldered to the other terminal.
Now just put everything back together and put in the four screws together. The way I tested the motors to see if they were working were to hook it with the Arduino with the 5V and GND pins of the Arduino. It doesn't matter what goes to the 5V or GND. I used jumper cables to connect brown wire to GND and one jumper wire from the orange wire to 5V. If everything is good, you will see that your motor will run continuously just like a DC motor!
The Frame of the Line Robot:
Now we have to make a frame for the line robot. I decided to go with another plastic container that I got from a Goodwill store instead because it had a little more space.
I went ahead and did a cutout at the bottom of the container to make an opening where the IR sensors to be able to read the ground. I used a dremel tool to do the cutout. At first I was using a knife but using the knife was difficult, longer, and in my opinion more dangerous.
Afterwards, I used my soldering iron to make four holes to be able to mount my board to the frame. I checked periodically until the holes were big enough to fit in the screws I was using. This time I had different sizes of screws since the board and the servos use different sizes as well as the brackets I will be using.
I used some of the pieces that came with the servos to super glue the wheels onto. I decided to use the one with the circular cross section. You could probably use hot glue to glue them together. Once it’s dry, you can test them by hooking them up with the 5V power off the Arduino to check that the wheels are spinning fine without have a wobbling spin to it.
Once that was done for both servos, it was time to cut out holes for the servos to be mounted on the frame. I measured the holes to make approximately a quarter inch of clearance from the bottom of the frame to the floor. In the book that I was following from, it said that anywhere from a quarter to a half of an inch is good. I also made holes to be able to screw the servos onto the frame.
After that I needed to cut the brackets I had because they were a little too long to be able to mount on the front of the frame. I used the dremel tool again to cut the brackets and it took a little while but I got it done.
I then screwed them onto a rolling ball that I found from Harbor Freight since the caster wheel was too big. Then I made holes on the frame that would give the desired clearance that I was looking for.
I attached all the pieces together and I found that I placed the servo motors a little too close to the sensor board that one of the rear screws for the sensor board would interfere with the servo. So I ended up just using three screws to hold the sensor board down and it seem to be a good enough force to hold the board in place. For me, this is a learning process. This is my first robot I have ever made, so I’m learning and teaching myself as I go. This container is a little too small to fit all the parts together but I think it will get the job done.
The next thing I will have to do is solder some stackable headers for the motor shield to be able to stack it on top of the Arduino and to make sure there is a firm connection between them both. I already ordered some but I was sent the wrong headers I'm just waiting for a response from the seller since I bought them on Amazon. I got them this past Friday but won't hear from them until probably Monday. If not, I might use the headers that I did receive with the use of another type of header to make up for the missing header that I didn't get. I just plan on placing the Arduino board with the shield stacked on top on top of the sensor board since that seems the only place to put them. I don't think I will need to securely bolt them to the frame since this line robot won't be doing off road racing or anything like that. I will update more and once I figure out stackable headers situation.