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

Sunday, 22 November 2009

Got the parts!! Been investigating.

All the parts have now arrived except for the TIP102 transistors. The main challenge has been trying to fit all of the components of the robot into the rather small chassis of K-9. I attached the tracked drive system to the bottom of the toy so it protrudes out of the bottom by around 30mm. If time allows and there is sufficient space I will introduce this into the body of the robot later on so that it looks right.


Marking for the drilling points




Chassis attached to base plate. Battery tray and guide wheel have been cut out to make more room inside the robot for other components.




To give an idea of scale that is an HP Officejet 6110 he is sat on.

Removing the unwanted plastic was a tricky task. It would be nice to have some proper tools for doing this.
The tracks are mounted quite far towards the front of K-9. His head is quite heavy so under braking he could topple forwards so for this reason i moved the tracks as close to the front as possible.

With the order came the control PC. This is a VIA PX10000G (details here) which is a Pico-ITX form factor PC. Tiny does not even come close to describing this thing. Here is a picture - no i do not have giant hands!!

I've got a 4GB flash card and put XP on it. I used the instructions here to 'embed' the operating system and enable EWF.I connected up both Velleman control boards and ran the test program on both. I also had a wireless dongle plugged in and connected via Remote Desktop.
The special power supply is also very impressive, an M3-ATX from LinITX.
I ran the entire set-up from a 3000mAh 14.8V LiPo pack with a meter inline to measure the current. Under full load the whole lot pulls 0.7 Amps so this battery will power the robot for some considerable time (calculated to 4.29 hours!!). With this in mind I may omit the umbillical option from the build.

Wednesday, 18 November 2009

Circuit diagram and ordering

I am slightly behind schedule but have now drawn up the proper circuit diagram for the motor drive system and ordered most of the parts for the project.

A purchase of smartdraw proved very valuable. I am a great fan of open source but simply couldn't find anything to beat this.A bill-of-materials has been drawn up from this and other components and the orders placed for most of the items required to build the robot.

Saturday, 14 November 2009

Investigation of PWM

This week I investigated the Velleman K8055 board for suitablility of driving an H-Bridge motor controller. I am using a good fast opto-isolator. I originally intended to use the TIP523 opto isolator with darlington output but it is slow and has a max bandwidth of 12.5kHz so I have switched to a non-darlington type which can switch in 3 microseconds. This has added the need for an additional transistor between the opto-isolator and each transistor of the H-Bridge.
Investigaton of the Vellemans outputs allowed me to calculate its frequency. It does not seem to be documented anywhere other than the PIC microcontroller datasheet which gives a number of possibilities. It was time to connect it up to an oscilloscope.




 

As you can see from these pictures there is 20us per div giving approximately 40us for the time period. 1/40us gives a frequency of 25kHz. The closest frequency I can calculate is to take the oscilator frequency of 6MHz and divide by 16 twice which gives 23437.5Hz. This frequency will need to be divided down a little to be suitable for the motors.

Monday, 9 November 2009

Schematic for H-Bridge drawn up

A preliminary schematic has been drawn for one of the H-Bridges driving one of the motors. It is only a draft and does not contain the interface electronics to the logic level components and the small transistors required to drive the main transistors.


Friday, 6 November 2009

The Story So Far...

Ok, what has been left out in this project is what has been done so far.
I started all of this back in July 2009. I knew this project was coming up so I decided to get a head start and find out exactly what was entailed in building a robot and to see if it was within the scope of my abilities. I have a long experience with electronics and some experience with the components of robotics so this is not all new to me. In a way I have built a robot before when I constructed an animal feed system for dairy cows which was computer controlled and involved data logging. That system was DOS based and used the parallel port to control the entire thing.
My son has had a K-9 toy hanging around the house for some time. The remote control for this was lost some time ago so it was effectively useless. The first thing I did was open up K-9 and take a look around. The toy takes 4 AA batteries meaning it operates between 4.8 to 6 Volts DC (NiMH or Alkaline), there are two motors and a control PCB.

The only thing I could make K-9 do was make sounds by pressing the demo button so I rigged up an audio lead to plug into the line-in input of a PC to record the sounds. I added an inline resistor to protect the input and also to help avoid an impedance mismatch which would result in clipping of the sound.


Here near the top centre you can see the resistor soldered onto the speaker terminal inside K-9.
This lead was plugged into a nearby PC and the sounds recorded using Audacity. I would keep these for future use.
After this came lots of research into background. Also I looked into small factor PC systems including Mini,Nano and Pico ITX systems. With the limited space available and also to keep wattage down my main interest focused on the Pico ITX systems available from VIA with a tiny footprint of just 7.2 x 10cm.
I already own a 4GB compact flash card and IDE adaptor and have experience with embedded systems so acheiving the integration of this tiny little PC would not pose much of a problem. It was originally intended to use the existing chassis of K-9 with its motors and power them from the 5V supply line of the PC but as more recent developments have shown this simply wasn't up to the job so a dual supply will more than likely be used with a supply for the logic and PC and a separate supply for the dirty components like the motors and any other inductive devices.

As for batteries there was only one option - LiPo. lightweight and with a huge energy density these batteries are great for this project. NiMH and lead-acid were the other options but have been disregarded. NiMH dont have the energy density required to keep the robot going for a long time and lead-acid are simply too heavy and cumbersome. LiPo poses its own problems with critical voltages having to be observed to avoid damage and a more complicated balanced charging system.

I didn't spend too much time looking at sensors. I have come across the infra-red range finder modules before and decided to take a closer look. After considering the alternatives very briefly I decided to stick with what i know and trust which are the Sharp range of IR range finders.

and that brings me up to October which strangely enough is where the previous post starts. Sorry for jumbling up the order a bit.

I am now onto circuit diagrams for the drive system.

Sunday, 1 November 2009

Drive System Research

After initial tests using the existing motors it became quickly apparent that they would be inadequate for purpose. This is due to the fact that the K-9 will not go in anything that resembles a straight line without considerable human intervention. It also has problems turning due to insufficient power.

Therefore a tracked drive system for the robot with powerful motors has been purchased. It was also realised that the motors would be manufactured with different tolerances so it would skew off a straight line no matter how well made it is. After some reasearch it has been decided that the motors will be driven using H-Bridge circuits with PWM control employing some kind of PID system (Proportional Integral Derivative - good description here - http://en.wikipedia.org/wiki/PID_controller ). The drive system purchased is the smallest which can be obtained within budget but is too large for the K-9 body so will protrude from the base of the robot by around 20mm.

Followers