elmo1elmo2

Introduction

ELMO is an autonomous robot I constructed for my master’s thesis at the department of Computer Science at the University of Twente. My assignment was to design and implement a robot that would be able to move around using genetic algorithms. This webpage shows you how I made the robot using LEGO, the Handy Board, motors, sensors, and a radio data transceiver. Each of these components will be discussed in the next paragraphs.

Lego

The body of the robot is made of LEGO Technic. Basic parts of the LEGO Technic Barcode Truck (item number 8479) are used for the construction of the body. The main function of the body is to firmly hold the Handy Board, the motors, the sensors, and the radio data transceiver.

Handy Board

elmo-handyboard

The Handy Board is a microcontroller board designed by the MIT for experimental mobile robotic projects. It is used throughout the world by researchers and teachers in the robotics field.

All devices, like motors and sensors, are connected to the Handy Board. It can be programmed through a language called Interactive C. This is a small C language consisting of a compiler (on a desktop computer) and a pseudo-code interpreter (on the Handy Board). Programs are written on a desktop computer and transferred to the Handy Board by a serial cable. The Handy Board is placed inside a rectangular holder to prevent it from falling off the moving robot.

Motors

elmo-lego-motor

Two 9 volt LEGO DC motors are used as the driving force for the robot. They are placed under the holder for the Handy Board. Each motor drives one of the two LEGO wheels that are placed on the left and right of the robot. The motors are connected to the Handy Board with a modified LEGO cable. The motor connects directly to the standard LEGO cable, but the Handy Board does not. Therefore, the standard cable is cut in half, and a connector that fits on the Handy Board is soldered to the cut end of this cable.

The motors are connected to the Handy Board in such a way that the robot moves forward if both motors get 9 volt. The robot moves backward if the motors get 9 volt. The motors are relatively strong and have no problem moving the robot. However, the variation between the two motors is quite high, because of the difference in the motors themselves, and the small differences in the gearwheels. If the robot has to move in a straight line, one motor would have to be set to a higher speed than the other.

A set of gearwheels is used to slow down the speed of the motor. The tracking power of the wheels is too low if the wheels are connected directly to the motors; the robot would not be able to move reliably on carpet. A gearwheel of size 16 is used to turn a gearwheel of size 40; therefore each wheel turns at 16/40 times the speed of its motor.

Touchsensors

elmo-lego-sensor

Four LEGO touchsensors are used behind the bumpers of the robot to detect a collision. Each sensor is placed right behind its own bumper. If the robot collides with an object, a bumper is pushed backwards, and the touchsensor is activated. As soon as the object is not touched anymore, the bumper falls back into its original position, and the touchsensor is deactivated again.

As with the motors, modified LEGO cables are used to connect the touchsensors to the Handy Board. a touchsensor gives a digital value of 0 (0 volt) to the Handy Board if it is deactivated, and a value of 1 (5 volt) if it is activated.

Infrared reflectance optosensors

elmo-qrb1114

Two QRB1114 infrared reflectance optosensors from Quality Technologies are used to distinguish between black and white surfaces. They are mounted on the front of the robot facing down, about a centimeter above the ground. Infrared light is emitted, reflected by the ground, and received by the sensor.

The infrared reflectance sensors are also connected to the Handy Board with self-made cables. The infrared reflectance sensor measures the amount of reflected light, and gives an analog value of 0 (0 volt) to 255 (5 volt) to the Handy Board. It is not recommended, however, to use these values at that resolution. Because of small differences in the sensors, and disturbing lights in the environment of the robot, fewer different colours can be measured reliably. To increase the reliability of the optosensors, a calibration routine should be run each time the robot is used. In this scenario, the user puts the robot on a particular surface, and lets it read its optosensor values. These values are used later on in the program by the robot to correct the values it then reads from its optosensors.

Radio data transceiver

elmo-bim-418-f

The Handy Board is capable of communicating at 9,600 bits per second with external devices via its Serial Communication Interface (SCI). The desktop computer can communicate at speeds upto 115,200 bits per second using its RS232 serial interface, but is limited to 9,600 bits per second by the Handy Board. The RadioMetrix BiM-418-F is a radio data transceiver capable of communicating serial data at that speed. The pin description is listed here for easy reference:

Pin Name Description
1,3 RF Gnd Connection to the antenna ground plane.
2 Antenna Connection to the antenna.
9, 10, 18 Vss 0 volt connection.
11 CD Carrier Detect.
12 RXD Received Data.
13 RX Audio Received Audio.
14 TXD Transmitted Data.
15 TX Select Transmit Select.
16 RX Select Receive Select.
17 Vcc 5 volt connection.

Transceiver to Desktop Computer connection

The transceiver cannot be connected directly to the desktop computer, because the transceiver works at 0 and 5 volt (TTL level), and the desktop computer serial interface works at 12 and -12 volt (RS232 level). Therefore, a special circuit board had to be designed to convert the serial signal from the TTL level to the RS232 level and vice versa.

The RS232 standard describes connectors with 9 and 25 pins. The 9 pin (DB-9) version was used for the circuit board because of its smaller size, but the 25 pin version (DB-25) is also listed here to make matters complete:

DB-9 DB-25 Name Description
1 8 CD Carrier Detect.
2 3 RD Received Data.
3 2 TD Transmitted Data.
4 20 DTR Data Terminal Ready.
5 7 SG Signal Ground.
6 6 DSR Data Set Ready.
7 4 RTS Request To Send.
8 5 CTS Clear To Send.
9 22 RI Ring Indicator.

The circuit board was designed around the MAX232 IC from Maxim. This widely available IC is capable of converting serial signals from TTL to RS232 level and vice versa using a supply voltage of 5 volt and four capacitors:

Pin Name Description Pin Name Description
1 C1+ Capacitor 1 + 16 Vcc 5 volt
2 V+ 5 volt (via capacitor 3) 15 Gnd 0 volt
3 C1- Capacitor 1 – 14 T1out RS232 side out 1
4 C2+ Capacitor 2 + 13 R1in RS232 side in 1
5 C2- Capacitor 2 – 12 R1out TTL side out 1
6 V- 0 volt (via capacitor 4) 11 T1in TTL side in 1
7 T2out RS232 side out 2 10 T2in TTL side in 2
8 R2in RS232 side in 2 9 R2out TTL side out 2

Circuit board

Five basic functions are required of the transceiver:

  • Setting the mode to transmit.
  • Setting the mode to receive.
  • Transmitting a byte.
  • Detecting the carrier wave.
  • Receiving a byte.

Five different pins of the RS232 connector (RTS, DTR, td, CD, and RD) are used for these functions respectively, one for each function. Setting the mode to transmit or receive could be shared by one pin using an inverter, but this would restrict setting the mode to just these two settings. Using two different pins enables all four mode settings, making it possible to put the transceiver into power-down mode or self-test mode as well. A drawback of this configuration is that two MAX232 ICs have to be used, because each MAX232 IC has four converters. However, an inverter IC is saved.
elmo-pcb-design

elmo-pcb-implementation

Transceiver to Handy Board connection

The transceiver can be connected directly to the Handy Board. No special conversion steps have to be performed, because the transceiver and the Handy Board both work at 0 and 5 volt (TTL level).

The Serial Communication Interface (SCI) is used to transmit and receive bytes. The Serial Peripheral Interface (SPI) is used to set the mode of the transceiver:

Description Transceiver Handy Board
Antenna Antenna (pin 2)
0 volt Vss and RF Gnd (pin 1, 3, 9, 10, 18) SPI (pin 0 volt)
5 volt Vcc (pin 17) SPI (pin 5 volt)
Transmit Select TX Select (pin 15) SPI (pin MOSI)
Transmitted Data TXD (pin 14) SCI (pin 5, RJ11 yellow)
Carrier Detect CD (pin 11) Analog input x (pin sensor signal)
Receive Select RX Select (pin 16) SPI (pin MISO)
Received Data RXD (pin 12) SCI (pin 2, RJ11 black)

elmo-bim-connection

Elmo autonomous robot
Tagged on:         

Leave a Reply

Your email address will not be published. Required fields are marked *