tomasz lasko: my homepage

Little handy green box

Are you looking for something particular on this site?



or check the sitemap


If you would like to contact me,
click here


 

I, Robot

This is a project made during my Microprocessor Technology classes led by Rafal Klaus, PhD. In our student group we were making robots in small teams. I have constructed the robot together with Maciej Blomberg and Maciej Gudan. This project is finished and successfull.

If you want to see the robot in action, you can find some photos and movies in the gallery. More photos and videos will be added soon.

Our robot's name I, Robot was inspired by a known motion picture by Alex Proyas. Well, I must admit that our robot doesn't have so humane face as the machine from the movie, but on the other hand it has some nice intelligence - it can ride on a black and white "racing track".

 

The task

The task was to build a robot which can ride on a track from start to finish, never leaving the track. We also had to make two versions of the robot:

1. Controlled from a PC by LPT, power supply could be also external

2. Independent robot with batteries and "thinking" logic onboard

In both versions the robot should make his decisions without anyone's help using a computer program. The difference is that in the first version the program runs on an x86 PC and controls the robot using a printer parallel port (LPT or PPI) and the power supply can be external and can be conducted to the robot in a cable together with data. But in the second version the robot is controlled by it's own microprocessor which runs the same program as the PC does - stripped from useless code, because this microprocessor has a program memory with capacity of only several kilobytes. Electrical power supply must be on the robot, in batteries.

There was also some diversity: sub-versions within the first version. Our PC program should manipulate the LPT port in three different ways:

- Under 16bit environment with use of BIOS or DOS API

- Under 32bit OS environment like Windows or Linux using it's API

- Programming the PC LPT port (8255) directly (in CPU IO addresspace) with use of IRQ interrupts

So, let's sum up: the program should run in 4 different ways - 3 on PC and one on a robot's microprocessor.

 

The track

The robot was supposed to move along the racing track and not to leave this track. The figure below shows this situation:

The racing track

 

 

 

The construction

The robot was constructed using a Lego Technics set. This can be seen on photos.

To propel the robot we used two motors, which are called "stepper motors". This is a kind of motor used in a hard drive, floppy or CD-ROM drive. The meaning of a "step" in such motor is that on every impulse (step) the drive shaft turns around always by the same little angle.

Our robot's undercarriage is very wide and not so long, so it can turn around standing in one place just like a tank:

Robot contruction: undercarriage

 

And now something about robot's eyes. To scan the sufrace and check whether it is dark (the track) or bright (the edge of track) we used two photoresistors which are placed in front of the robot on a special sensor arm (or you can call it a jib), directed towards the surface. Photoresistors give us information on illumination. In most cases they work this way: the more you illuminate a photoresistor, the less electrical resistance it will have and you will have more voltage in it's circuit.

We measure the voltage using A/D converters built into an Atmel AT90S8535 microprocessor which is also placed on the sensor arm, but closer to the center of the robot. Note that this microprocessor will be also used to run the steering algorithm and control the robot in it's second version. But in the first version, in which the algorithm runs on a PC, AT90S8535 is used only to read the voltage from the photoresistors and then decide whether they are above the dark track (logical 1) or above the bright edge of this track (logical 0). These logical 0 / 1 signals are sent through a data cable to the PC LPT port.

There are some two cool things relevant. First, you can control the voltage treshold used to distinguish between bright or dark surface under the photoresistor. This can be done by two buttons connected to the AT90S8535 microprocessor. Secondly, the values measured by the robot are visible on a small LCD screen placed at robot's rear, which is also connected to AT90S8535 and controlled by it. This LCD display is visible as a yellow strip on the figure below:

Robot contruction: full (with sensor arm) 

 

Please have a look at some photos and movies in the gallery.