Check our facebook page for updates and special offers

A DIY Robot - PC or Laptop Controled
DIY Robot

This robot was developed as a final year project for Bradford University Cybernetics Department in 2003/2004. This page is a shortened version of the final project report. The full report is available by clicking the link at the bottom of this page.

MIRC showing main Electronics layerProject MIRC

MIRC, which stands for Mechanized Interface for Robots and Computers – it is not a robot in itself, but a mechanism for interfacing robotic hardware with standard computer systems (MIRC + Computer = Robot).

This project aimed to develop a modular system (MIRC) for interfacing already commonly available hardware for conducting household or industrial tasks, with standard computers. Ultimately, it was designed to link to an already established infrastructure to develop new and more effective ways of utilizing it.

The MIRC could ultimately enable the technology of the PC to become mobile, thus minimising the need to carry out mundane or repetitive activities and to enable long distance completion of tasks. In the proposed approach, the MIRC was operated by command from a laptop which had been programmed using fuzzy algorithms to carry out basic object avoidance and wheel tracking. By using fuzzy algorithms rather than the more standard IF/THEN statements currently used in programming the MIRC has increased flexibility and potential for adaptation for a range of uses.

Currently most advanced robots are custom made for a particular task and expensive to produce. Other robots are designed simplistically as toys or gadgets, and as such are mass produced and relatively cheap to produce. The MIRC which has been produced as a result of this project combines these factors by using mass produced components to create a technically advanced robotic system which has the additional capacity for customisation, giving endless flexibility. Ultimately it could allow the consumer to purchase a MIRC and then to create a robot custom built for their needs from standard components without the need for extensive knowledge of robotics or expensive outlay.

Complete MIRC with LaptopPCs today are much faster than they used to be. So much so, that the average computer has enough processing power to adequately analyse sensor data such as stereo video images in real time. Due to the PCs huge variety of applications and its popularity across the world it seemed clear that a robot could be based on this technology. This would allow for USB devices and component upgrades to come from the same sources as normal PC equipment. The same manufacturers could also make the products, allowing it to reach world markets very quickly. The versatility of the PC in part comes from the variety of IO ports it is able to use. This allows it to connect to many different types of hardware, and with ever growing processor power the bandwidth capabilities of the ports grows too. The most important part of the MIRC was the sensors, so a good interface for these was essential. It needed to have the capability of capturing analogue and digital sensor data and also outputting in the same way. A fully constructed model could be capable of many things. If many different manufacturers created USB and FireWire upgrades, the robots could have a huge range of functions. Devices like robot arms, vacuum cleaners, paint sprayers, even robotic legs could be added simply by attaching them in the correct place and installing the software. Wireless networking would enable robots to communicate with each other from almost anywhere and the owner to control them all via the internet.


The aim of this project was to create a prototype MIRC to show how a PC based robot could be developed. The objective was to produce a basic model with four wheels, standard sensors and a web cam forming the centre around which an individual could create their own custom robot with extra USB devices.

It was intended that the structure of the robot should be simple to facilitate easy adaptation and upgrading. The housing was designed to create three distinct layers within the MIRC to separate elements of the robot, thus leaving room to add more devices and a laptop computer when complete. The bottom layer would be designed for battery housing and mechanical hardware, such as wheels and sprockets, the middle layer to contain the main interface electronics, and the top layer to be for the external devices.

The MIRC was developed over a period of eight months. Initially research was conducted into robotic control systems, pc interfaces, sensors and actuators. A K8000 interface board formed the basis of the project, as it allowed for the connection of analogue sensors and actuators to the pc. The PC was chosen rather than built in micro processor because it was far more powerful and customisable.


Sharp Range Finder mounted on side of robotThe first type of sensors needed was proximity detectors. The sensors chosen for this were simple photo reflective IR devices. These sensors consist of an infra red LED and phototransistor in a plastic case; they would output a voltage that was dependant on the amount of IR light hitting the detector. Using analogue sensors enabled development of fuzzy logic to control how the robot avoided objects. These sensors worked well at short range as long as there was no ambient sunlight. It wasn’t until the weather got sunnier that it was realised how much the sunlight would affect operation. Sunshine affected the photo reflective sensors outputs by increasing output to about ¾ of maximum. Adding sunshine sensor and adjusting the other sensor values relative to it stopped the sunshine from making the outputs go too high but it reduced the range so much that they were useless.

A much better type of sensor is the Sharp GPD-12 Infra red range finder. It is much larger in size than the photo reflective sensors but is much more accurate as it measures the angle of the reflected light as well as the intensity. On board signal processing then converts this to an analogue output voltage. The downside to this sensor is that it costs over £10. The GPD-12 is one in a range of infra red range finders by Sharp. They come with various output types and ranges.

Robot head assembly with sonar, microphone, and web cam.The head module on the MIRC contains several sensors, one of which is an ultrasonic range finder by Milford instruments [21]. This sensor uses the Polaroid transducer system, which has a single transducer for sending and receiving echoes. This is mounted on a servo for panning and is controlled by a board connected to the computers serial port. Another sensor in the head is a USB webcam of 640*480 pixels. Currently this has not been used in the project as the laptop being used does not support USB. With a more modern laptop this camera could be utilized for many functions, such as object recognition, motion tracking and remote avatar web conferencing.




Parking Radar used for front proximity sensorOne sensor on the MIRC is an ultrasonic proximity detector. This is the Velleman K3502 parking radar kit. This kit usually sounds a buzzer when an object passes a preset distance from the sensor. To connect this sensor to the K8000 the buzzer was removed and the buzzer output was connected to a digital input on the K8000. There was no need to alter the voltage or the buzzer output, as the K8000 can tolerate a wide range of voltages (5-20V DC).






Motor Drive SystemActuators

The main actuators of the MIRC are the two drive motors. Each motor drives one wheel independently. The original design involved using a four wheel drive system. Steering was done using he ‘tank drive’ method. This allows for a zero turning circle and therefore greater manoeuvrability in a small space. This method was found to be insufficient due to large amounts of slippage and torque requirements. The current method employs two large back drive wheels and castors at the front. The steering is done in the same way as the ‘tank drive’, but as the wheels are on the back the turning circle is increased to twice the length of the MIRC. The great reduction in slippage with this method meant that less torque was required and therefore better performance was achieved. The speed and direction of the motors can be controlled via the K8000 and H-Bridge driver board [22]. The motors are fitted with a 148:1 gear box to give greater torque, but this was still insufficient for the ‘tank drive’.
The other actuators are the pan and tilt servos for the head assembly. The panning servo is controlled by the same board that controls the Polaroid transducer range finder. The tilt servo is controlled by a separate board [21] which is capable of controlling up to 8 servos. This board is not currently connected due to the lack of ports on the laptop used in development.

First Attempt for Chasis and Drive SystemRobot Body (chasis)

The body of the MIRC consists of three layers. The bottom layer is for the drive mechanics and batteries, the middle layer is for the interface electronics and the top layer for the computer and room for expansion. The base was initially made from an aluminium sheet with aluminium shelving brackets along the sides for strength. This eventually had to be changed as the original base did not prove sturdy once the heavy batteries were added. Rapid acceleration and turning caused the whole base to flex, which eventually caused the chains between the motors and wheels to slip, and one of the gearboxes to break. This was one of the main obstacles that was overcome as it slowed progress and wasted funds. The new base is made from a piece of thick MDF with wooden supports for the bearings, and performs much more effectively.


The software currently being used to control the MIRC is written in QBASIC. This language is neither modern nor powerful, but it is relevant to the dated laptop used. At the beginning of the project it was difficult trying to get java programs to work adequately on the laptop. Finally it was realised that the laptops slow processor could not handle all the computation required by this platform independent code. Although QBASIC could not be used to produce an adequate final working program with a GUI, it was sufficient to control the majority of hardware. If a more modern computer had been available to work with better quality programs could have been produced and more advance hardware added. C++ was the preferred language but the editor and compiler were too complex for the laptop used. Editing on a PC and transferring compiled programs to the laptop was not practical due to it having faulty disk drives and communication ports.


Sonor readings converted into seperate Objects recognised by the robotFuzzy Logic Control Software

In order for a robot to function effectively in the home, it must be able to adapt to circumstances that the programmer may not have considered. If the program was not able to learn and adapt, the user would soon find that the robots abilities were quite limited. No matter how many situations and tasks it was programmed to deal with, there would always be something it would fail to ‘understand’. This is why software developed for the MIRC uses fuzzy algorithms.

The current software does not involve fuzzy learning as this will take considerable time to develop, but example programs were created to demonstrate this. The first example does not involve learning but uses fuzzy logic to determine how the MIRC moves. This program (Appendix H) causes the MIRC to act like a finite state machine. [23] The program simply captures data from analogue range sensors on the front and sides of the MIRC. This data is then combined and converted to a value for the speed of each motor. If the MIRC approached an object that was on its left side, the right motor will slow down causing it to move away. The closer the MIRC is to the object the more the wheel will slow down, causing it to turn sharper. The outcome of this is that the MIRC behaves more like an animal than a machine. The QBASIC code for combining the sensor values and changing the motor speed is shown in figure 6 below.


LTemp = (64 - (2 * SQR((((RFront - RFrontC) / 3) * ((RFront - RFrontC) / 3)) + (((sen%(3) - senC%(3)) / 3) * ((sen%(3) - senC%(3)) / 3)))))


Figure 6. Changing speed of the motor, relative to all sensor readings

This is one line of code. LTemp is eventually used as the speed value for the left motor. The other variables are the sensor values. This applied to both motors, causes the effect mentioned previously and also will cause the MIRC to slow down if passing through a small space.

Another example program created was a fuzzy line follower (Appendix I). This program uses similar algorithms to the object avoider program. Two photo reflective sensors are mounted on the front of the MIRC for detecting lines. Different types and colours of lines were tried and the relevant programs created for them, but it was found that slow polling of the sensors would only allow for gently bending lines to be followed. If a faster computer was available, sensor data could be captured faster and therefore sharper bends could be followed.

To demonstrate fuzzy learning, a program was created that simulated evolution. (see A.I.) The program creates a type of predator and prey environment where one species hunts another for food. The prey are just simple circles which move around randomly on the computer screen. Each one has its own set of parameters which define how fast it moves and how erratically it behaves. The predators are the evolving species which eat the prey, move around and breed. Each one has its own unique set of variables which governs behaviour. This is their simulated DNA. When the program starts several prey are generated and one just predator. The ‘DNA’ for this initial predator is randomly generated. It is attracted to the prey so it chases them until it is close enough to eat. Once the predator has eaten enough food it will make a copy of its self but with some slight mutations in its ‘DNA’. The mutations may have positive or negative effects, such as being able to survive longer without food, or becoming less agile. At first the majority of predators will group together, but by the time several generations have lived and died, distinct groups can be seen. Using this method, a robot could be the predator, and the prey could be its charging station or tasks it meant to perform.


The resultant MIRC combined with a laptop appears in presentation as a robot. It has achieved its original objective of mobilisation of which can perform a range of simple tasks determined by the software used. Whilst the project has achieved its aims, there is limitless capacity to develop further to reach its full potential. With funding and further experimentation this humble foundation could prove a stepping stone to real functional usage of this type of technology. The production of an advanced MIRC is possible at a reasonable cost with mass production and as such could impact on everyday life. 
Currently there is no main program or OS. Eventually it will be a mainly fuzzy controlled system. It appears rather pointless trying to create a precise, accurate system as it would cost large amounts of money and time to make it work. The intended outcome is to create a kind of fuzzy logic based cyber pet. This would mean that a MIRC based robot would act more like an animal than a sophisticated machine. Learning algorithms could enable you to teach it tricks just like you do with a dog, rewarding good behaviour and punishing it if it does something wrong. 
Throughout this project a great deal of knowledge has been gained in various areas of cybernetics, and a significant project achievement has been reached. Images of the competed MIRC are available on the attached CD. The MIRC created for this project will continue to provide learning opportunities as it continues to develop and improve. A point to stress is how difficult turning theory into practice actually is. Testing very often showed unexpected results. A lot of time can be used getting things to work the way they were intended to, and very often a compromise is necessary.

Further Work

There is much more work that can be carried out on this project: - Once the oddometry is working effectively, a charging station for the robot could be built to locate when in need of recharging. Armed with a modern laptop, the next step will be to incorporate the webcam and wireless networking. With image processing a robot could recognise objects, rooms or even faces. Another thing to add is a robot arm. There are already robot arms available for purchase that can plug into a USB port, although a custom design may prove more effective. Eventually the entire MIRC will be connectable to a laptop by one single USB cable as this would make connection simple. Also a USB hub could be built in to the MIRC for simple addition of hardware such as robot arms or a barcode reader.

The ability of modern computers to connect to wireless networks is an important factor to the potential success of the MIRC. Being connected to the internet not only gives the MIRC access to large amounts of data. It also means that it could be connected to other networks such as mobile telephone networks. This opens the doors for a whole new interactive system. A person wishing to make a MIRC based security robot could monitor it from anywhere. Data and images could be sent to a multimedia telephone or instructions sent back to it. The most popular use of this is expected to be web conferencing. A person could use the MIRC like a remote avatar, allowing them to ‘step inside’ it and drive it around.

Laptop controlled MIRCs could be networked together, enabling them to work as a team to complete the same objective. This could even be done with the robots in different parts of the world. Groups of robots could be simultaneously controlled by a single user. Using the fuzzy style of programming described earlier, several robots could share all their sensor data and process it between them. This could act like a shared ‘conciseness’ making each individual robot more like a single part of one machine, rather than individual robots communicating and working as a team.

This article is a short version taken from the main project report.
To see the full documentation for Project MIRC, click here.

THere is a new version of this project using moder electronics and software. See the DIY Robot II

Bookmark and Share
Comments and questions for DIY Robot (MIRC)

The information provided here can not be guaranteed as accurate or correct. Always check with an alternate source before following any suggestions made here.

John - Tuesday, 10th October 2006 2:04pm - #400
Nice work guys!
student - Monday, 18th December 2006 3:20am - #606
I've googled for quite a while, how did you manage to get the webcam to work?

did you decode the webcam?
RMCybernetics - Monday, 18th December 2006 11:50am - #608
The webcam was not used much. It could simply be connected and used independantly from the robots software. For example a standard webcam uploading application could just run in the back ground to send images to the web. There was no image proceesing done by the robot because of the time and hardware limitations fo the project.
Bonelord - Tuesday, 13th February 2007 7:48pm - #762
Thank you for the excellent write-up on this project! I'm currently working on a similar project. I would be interested in finding out what motors and batteries were used (or specs); I'm assuming they were reasonably priced to keep the budget under control. Thank you again.
RIchard Morrow (RMCybernetics) - Tuesday, 13th February 2007 8:43pm - #763
I'm glad you like it. The motors, and much of the hardware I bought was from Maplin Electronics I was quite fortunate to have a part time job there whilst I was at University, which allowed me to get a good knowledge of the stock, and staff discount was helpful.
I used a pair of these geared motors with a ratio of 148:1. They worked quite well, but were a little smaller than I would have liked. They now stock larger heavy duty motors, which would proobably be more efficient for carrying around the SLA Batteries I used.
You can find more bits from maplin that I have found useful through the links at the base of our shop page.
Yuval - Thursday, 15th February 2007 3:59pm - #774
Very nice! Have you given any thoughts about sharing the schematics ,circuit designs and software for others to try and build upon your project ? I am very interested in such a project myself.
RMCybernetics - Thursday, 15th February 2007 10:07pm - #776
The source code and full schematics have not been published because we felt that they would generate more questions than we currently have time to answer. We may look at this again some other time.
Awsome High Voltage - Monday, 12th November 2007 12:31am - #2164
What kind of computer is that?
RMCybernetics - Monday, 12th November 2007 6:12pm - #2169
It's a very old laptop/notebook PC. It had a Pentium 90 MHz processor, 16Mb of RAM, and about 500Mb disc capacity. Very slow indeed compared to todays standards.
k8000 - Monday, 7th April 2008 12:07pm - #2699
but i have a question please , how you work with the motors and the output current of the k8000 is 2mA . ??
RMCybernetics - Monday, 7th April 2008 2:46pm - #2700
I made a device to convert the analogue output voltage into a pulse width modulated signal. This signal was then fed to a special H-bridge motor driver IC which could also accept other inputs to select direction or travel.
Mad Scientist - Tuesday, 19th August 2008 11:13am - #3006
a tip for your proximity sensors: try using modulated IR sensors. they are a bit difficult to build from scratch, but you will have less issues with sunlight or other light sources.

on the other hand, I'm building a similar robot, computer-interfaced, but with another purpose. though I'm only 17 years old :D
Student - Wednesday, 30th September 2009 10:40am - #4062
Where can you find the items that you need for the MIRC robot. I searched your shop but couldn't find anything. Where can I find it in South Africa. Do you have agents in South Africa. Would a senscomp 7000 transducer work instead of a polaroid transducer system
RMCybernetics - Sunday, 11th October 2009 11:04am - #4073
Many of the components were produced by a company called Velleman.
RMCybernetics - Tuesday, 25th September 2012 9:27am - #4884

We have begun a new version of this robot using modern hardware. See DIY Robot II

Click the button to leave your comment or question