Project : Pointlessbot

Start Date : Christmas Holidays 1997

Finish Date : Discontinued

Aim : To build a bot that will react to sound in its environment.

Considerations : IR. Sensors for collision avoidance and expansion port for further development.


Drive Units (Fig 1)

Finding small low voltage motors and gearboxes is no mean feat these days. I bought the two that I used from a local model shop (I also see that they are available from R.S. and Maplin). Their operation voltage is between 1.5v and 3v and they also have variable gear ratio by the adding or removing of gears. The main plus side is that they are very light and have plenty of torque, giving me quite a good top speed.

Power Supply for Motors.

The power supply for these motors are 2 x 1.2v NiCad cells which are split, giving a 1.2v output and a 2.4v output so that a choice of two speeds is available.


Main Control Board (Fig2)

The Brain:

The PIC 16C84 was my choice for this project. The reasons for this are value for money and support from Microchip. All the development software to get you started is freely available from their site.

The PIC has two ports, Port A and Port B, and both ports are bi-directional. I used port B (an 8 bit port) as the databus and port A (5 bit port) as a control port.Port B uses 3 bits to a 3 to 8 line decoder to control all other IC's on the board, and the remaining 2 bits are control bits. These are connected to a bank of DIL switches and are used for debugging and software testing.

Control:

The main board has two output latches and one input buffer. The first output latch is connected to an 8 segment display, this is used to display error messages and help with code debugging. The second of the latches is used as a motor control latch. At current project status only four control bits are used.

Bit 1 - Motors on/off

Bit 2 - Speed Control low/high

Bit 3 - Left motor cw/ccw

Bit 4 - Right motor cw/ccw

Bit 5 - Bit 8 reserved for future development

The output from this latch is connected to relays via transistors to control the motors and their speed.

The input latch reads from the sensor array and also the feedback sensors on the motors (see sensors for more details).

Output port:

The output port is a 20 pin DIL header. It has full access to the databus and control bus as well as a clock source from the PIC and a +5 volts power source.This port will be used for further development as well as the sound recognition device.


Software:

The test code for pointless bot is available here.

Sensors (Fig3)

Anti-collision:

The sensor array is made up from three infra-red emitters and detectors. The detectors are a four legged device with integral modulation system, so no need for a comparitor in the circuit (these devices are available from R.S. part no. 564-396). The array is connected to the input buffer on bits 3,4 and 5 and this buffer is read by the software detecting for any collisions that may occur. Their range is approximately 25 mm depending on the surface - less on darker surfaces, so some collisions do occur at times (this is all part of the fun).

Motor feedback:

Two IR. emitters and detectors are used for motor feedback these parts were scrounged form old 5 1/4" floppy drives. The decoding wheels are made form the two cogs left over from the gearboxes, slots cut in them and then covered in foil. These feedback sensors are used to control the amount of distance traveled by the bot.

 

Fig 1. The main drive units.

Fig 2. The control board.

Fig 3. Sensor array.

 

New Castor Assembly.
Rear View.
Front View & I.R. Sensors.
1