Foundation Degree in computing - main project. Project to convert K-9 toy into an autonomous robot. By Kristian Dunn

Thursday, 11 February 2010

A lot has happened - The hardware is built!!!

There has been a lack of blog post recently due to exam season but I have been busy during this period and frantically getting the hardware built.
Using the vero-board designs I mapped out the track cuts onto the board with marker pen and cut them with a drill.
 

Once the tracks were cut the next phase wold be to place the links and components on the top side of the board. This was done by marking the board with marker pen again and following the diagrams.


Once the board was built it needed to be checked with a continuity meter for shortsand then wired up and tested.

 

The same procedure was repeated for the output board too and the completed boards stacked with an insulation layer between them. After the breadboard test I decided to add heat sinks to the main output darlingtons. During the test of the boards it was noticed that the circuit was unresponsive and with a 12V input the motor outputs were only outputting 6.8V. I rectified this by changing the 1k resistors for 220R resistors on the opto isolators. Here is the completed stacked boards.




Note the fuseholder added. I did this as a safety feature and to avoid damage to the circuit boards in the event of a fault. The LiPo batteries are capable of a discharge current of 100A so should be treated with a bit of respect.
In this next picture you can see the modifications made to one of the Velleman boards. The staples pushed into the IC socket bypass the socket where the darlinton driver chip was which is not required in this case. Also you can see the two leftmost resistors have been removed. There is a modification on the underside of the board where the pwm output from the PIC have been connected directly to the pwm outputs on the board and the tracks cut from the other drive electronics.



My chosen method of attaching the boards to the body was cable ties. Cable ties allow for a little adjustment once fitted and look reasonably tidy. 
The next piece of hardware to fit was the optical sensors to measure wheel rotation. These are Optex OPB360T slotted opto-switches. Fitting the devices came down to a combination of old Meccano, computer screws and superglue. The old Meccano is some cheap generic stuff my kids had which had got a bit bent along with some spare parts. Lucky for me the generic stuff is very easy to bend and reshape. The opto-switches need a resistor inline with the transmitting LED to stop it frying and i then took the leads from the opto-transistor side and fed them directly into the Velleman card. I was hoping that the short circuit generated by the transistor would be enough to trigger the inputs on the card. The card itself has +5v fed through a 10k resistor meaning the transistor would have to sink around 0.5mA which is well within the spec.
My initial tests showed that the IR shone straight through the translucent gear wheel making it useless. First thing i did to fix this was to turn down the brightness of the LED by using a bigger resistor so I replaced the 220 ohm for a 1k to pull the current right down. The forward voltage of the LED is 1.7V so this would give me an overall current of 3.3mA.
This was still not enough so I decided to make the gear wheel with the hole in it opaque. I dissasembled the gearboxes and removed the wheel in question then printed out 2 black circles of the correct size. I cut these out and glued them on to the wheels (i had previously tried just colouring them in with marker pen but this didn't work). After the glue had dried i poked out the holes in the gear wheels and reassembled the gearboxes. This worked brilliantly.

Here are the pictures of the chassis.

Here are the bare sensors attched to the chassis using the Meccano brackets which are superglued to the chassis.

And here is the final result.
 

 Now it was time to attach the chassis to the base of the robot, add some connectors and wire in the sensors.

This picture shows the attached parts. The top of the picture shows the circuit boards strapped in with a sheet of antistatic foam wedged between them to prevent pins touching each other. In the design I neglected to leave room on the boards for PCB posts!!

 
Note also that I have removed the USB connectors from the Velleman boards and soldered the cables in directly. There was not enough room for the very large USB plugs to fit either horizontally or vertically. the velleman boards are held in by a cable tie and the rubber feet on the bottom of the boards.

The next stage was to add the sensors to "see" the outside world.
First I installed the sharp GP2D12 sensors. The front one was fixed by drilling two small holes into the front and attaching with screws. I did not want the side sensors to stick out of the robot so attached them to the drive chassis. Not wanting to penetrate the motors or gearboxes i used superglue to attach these.
I also added bump sensors in the form of long-lever microswitches. The second-hand Meccano came in very useful here once again. They were wired with a common ground connection. The 2 front switches were wired in parallel. Here is the end result.

 

"How do you get those nice twisted cables?" - The answer - Cut the individual wires to the same length. Shove the ends into your cordless drill and tighten the chuck on them. Hold the other end firmly and pull the trigger. Voila! - Neatly twisted cables!!

I found the GP2D12's to give rather erratic results and examination of the data sheet says to add a 10uF capacitor to the supply of them.

Thats the 10uF right in the middle of the picture screwed into the connector block.
Here is the robot prior to assembly.
 

Note the wires and connector block coming from the head. These would be wired to a relay and then on to the velleman board. As you can imagine it is a bit of a tight squeeze inside the body of K-9.

The head would be the final thing to get going before closing the lid.

(Sorry the video is rotated)
This is K-9 without his head just to test all the electronics are working (as you can see the kids like it too).

Here is the testing of the nose and ears after wiring up on a test rig.

And here is the finished article

This is K-9 attached to the charger.
I am very happy with the way things have gone so far - Now its time for programming.


No comments:

Post a Comment

Followers