THE DEVELOPMENT AND EVALUATION OF A PROTOTYPE CELL PHONE CONTROLLED ROBOTIC SYSTEM

New cell phone technology offers the possibility to implement long distance control of robotic systems, although cell phones were not developed for control purposes but rather for communication. In this publication it is described how a cell phone is combined with a microcontroller, an audio-to-digital converter, a relay board, a wireless video camera and audio feedback to control a prototype robot. The limitations of long distance audio control of the prototype robot are discussed. OPSOMMING Nuwe selfoontegnologie bied die moontlikheid van langafstandsbeheer van robotstelsels, hoewel selfone nie ontwerp is vir beheerdoeleides nie, maar vir kommunikasie. In hierdie publikasie word beskryf hoe ‘n selfoon gekombineer word met ‘n mikrobeheerder, ‘n oudio-na-digitale-omskakelaar, ‘n relê-bord, ‘n koordlose videokamera tesame met oudioterugvoer om die beheer van ‘n prototipe robot te behartig. Die beperkinge van langafstand-oudiobeheer van die prototipe robot word bespreek.


INTRODUCTION
A robotic system is the general term for a hardware system that can be controlled by computer or microprocessor instructions to perform intelligent tasks.Imagine a robotic system that can be activated and controlled from any place on earth where there is cell phone reception.Furthermore, imagine the system is fitted with a Global Positioning System (GPS) so that the position of the system can be controlled, fitted with radio signal capabilities such as Blue Tooth to open doors in the vicinity of the system, fitted with a video camera to act as eyes for the system and fitted with General Packet Radio Services (GPRS) to connect to the internet.All of these cutting edge technologies are already separately available on the market as stand alone units.Each available unit is designed with a specific purpose in mind, with an individual different processor and protected by specific software.
To test whether it is possible to control a robotic system via the cell phone network, it was decided to build and test, as a first step, a programmable relay board with a cell phone gateway between the relay board and the cell phone and integrate this into a prototype robot.This article describes the hardware and software integration of the robot and the evaluation of the cell phone communication concept.

WIRELESS PROGRAMMABLE CONTROL
The mechatronics engineer uses a computer or microcontroller [3] to control the "outside world".In movable robotic systems, such as automated guided vehicles, the controller (normally a micro controller) is fixed to the vehicle.If the system is fully automated, interference from outside must be physical or by means of wireless control.Once a signal (physical or wireless) is detected, the controller must respond by normally switching something on or off.
Wireless signals, such as radio signals (of which Blue Tooth is an example) and infrared signals, limit the distance of control.Cell phone communication via Global System for Mobile Communication (GSM) or General Packet Radio Services (GPRS) offers a communication system, which is independent of distance and with the promise to develop into very fast signal carriers [1].

GSM Voice Transmission
The GSM cellular standard [2] is a completely digital system.When transmitting, the microphone of the cell phone captures the voice for conversion from analogue to digital mode by a Digital Signal Processor (DSP) in the cell phone.The DSP also coordinates the voice, Short Message Service (SMS) and data/fax features of the cell phone.The DSP's voice processing is done in tandem with a compression technique mediated by the Compressor/decompressor (CODEC) portion of the phone.
The CODEC [2] chipset instantly transfers this compressed information to the cell phone's Radio Frequency (RF) unit.This RF unit, which is essentially the transmit and receive section of the cell phone, then sends out the voice or data information via the cell phone antenna, over the air and on to the nearest cellular base station -and ultimately to the call destination.
The incoming voice also travels much the same route, although it is first uncompressed from its incoming digital form into an audible analogue form, which is then piped out as sound through the cell phone's speaker.
What is important to notice is that the signals that are available for control purposes, when in voice mode, are in analogue form and these signals must be converted to digital form by a GSM gateway.

SMS Transmission
SMS is a way to transport up to 160 characters of text between GSM cellular devices [3].A text message goes to the short message service centre from where it is redirected to the destination phone.The service is not instantaneous and it can take several minutes or even hours to reach the destination.As a result of the time delay the SMS mode cannot be used for instantaneous response.If the delayed response time is acceptable in a control system, then it offers advantages over voice activation, since the software of the micro controller can easily read the text files.
Various devices that make use of SMS transmission to activate relays are available on the market.The delayed response dictated not to use the SMS mode of control.

THE GSM GATEWAY
When using a cell phone in voice mode, the digital signals are transformed into audio signals inside the cell phone and it is not possible to access the digital signals.In order to use the audio signals for control purposes, the audio signals must be converted back to digital signals.This conversion can be accomplished by adding a GSM gateway [2] to the cell phone.
A GSM gateway is essentially a piece of electronics that generates digital signals from DTMF (Dual Tone Multi-Frequency) tones.The audio signal from a hands free kit plugged into the cell phone is fed into the gateway and a combination of four binary signals (15 different digital values) can be obtained.These digital signals can be used as input to a microprocessor and used for control purposes.

THE PROCESSOR
Different electronic devices such as the cell phone, the gateway and existing programmable relay systems all have built in microcontrollers but a central processor is necessary to integrate and control all electronic devices.
An ATMEL AT90 8515 microcontroller [7] was chosen as the central processor because of its simplicity.This processor is easy to programme with the STK500 [7] http://sajie.journals.ac.za hardware parallel programmer and ideal for testing purposes, but limited in memory and operating speed and would not be suitable when, for example, image processing or global positioning is added to the system.
To the output ports of the micro controller, eight 10-ampere relays were fitted to supply power for externally controlled devices.The relays are fully under micro controller control and can be switched on separately or in any combination.
There are several programmable relay controllers, like the AF-20MR-D, commercially available.A controller like this has its own microcontroller and accepts electrical inputs as well as tone signals from standard telephones via a modem.Because the software of such units are protected, no changes can be made so these units can only be used as stand alone units and are not suitable in robotic integration applications.

MODES OF CONTROL
Depending on the application, there are normally three different modes of control to choose from.In this robot application, the following set of modes was applied: In the first mode, a relay is switched on as long as the signal is on and automatically switched off when the signal is off.If the relay switches an electric motor on, the motor only runs while the appropriate button is pressed on the controlling cell phone.This mode can be used for immediate response applications.
In the second mode, once a relay is switched on, it will stay on until it receives a signal to switch off.This mode can be used to switch on, for instance, an irrigation system and then switches it off at a later stage.
In the third mode, a relay can be switched on for a specific time interval.This mode can be used, for instance, to switch on the heating plates of a stove for a predetermined time.Apart from the switching signal, the controller also needs information about the duration of the delay.

Mechanical hardware
To test the robot for practical use it was decided to drive the two rear wheels of the robot with two windscreen wiper motors and with a 12 Volt motorcar battery as power source to resemble the layout and power of a wheelchair.It was fitted with one leading swivel wheel.

Photo 1: Top view inside robot
Photo 1 shows the mechanical layout of the robot with the battery, microcontroller board and wireless camera

Electronic hardware
The layout of the electronic hardware [4,5] is shown in photo 2. A printed circuit board was designed and prepared to accommodate the different electronic components.The receiving cell phone is connected to the board through a hands free earplug that also activates automatic pickup when the phone rings.
The two electric motors were connected in such a way that when a two is pressed on the cell phone both motors run forward and when an eight is pressed, both run backwards.In order to force the robot to turn around its centre point and avoid unnecessary large turning circles, the signal four causes the left side motor to run backwards while the right side motor runs forward.When a six is pressed, the opposite motion takes place.

THE SOFTWARE
Once a control signal is sent to the receiving system, there must be a way to ascertain that the signal was indeed received, received correctly and acted on correctly.Being audio connected, the feedback signal is also an audio signal.It is the programmer's choice to decide when feedback is necessary and which type of feedback is required.

Photo 2: Microcontroller board with peripherals
Feedback from the robot was programmed in the software but kept as simple as possible to be able to only test the feasibility thereof.For Mode 1, provision was made for video feedback.
For mode two, it was decided to use short-recorded voice messages (such as SWITCH ONE ON or SWITCH TWO OFF), stored in the controller memory and which can be played back through a voice module, once a signal is confirmed.Because of memory space on the ATMEL controller, only a small number of messages were recorded and tested.The messages can be recorded with a microphone and sound card and stored in format RAW [6] on the hard disc and then transferred to the microcontroller.
The formats that are required in Mode 3 at the remote phone to activate a time delay is number,hour,hour,minute,minute,# to switch ON and number,# to switch OFF (for example, 21059,# to switch ON relay two for 10 hours and 59 minutes).
In mode three, the length of the time delay must be repeated before activation of the signal.In this case the words zero, one, two,...,nine and hours and minutes must be recorded and saved.Combinations of the words must be formed, for instance, ONE ZERO HOURS FIVE NINE MINUTES for a delay of 10 hours and 59 minutes.If the format is not correct, the message WRONG FORMAT must be sent in audio format through a voice module and the incorrect signal ignored.This method requires cumbersome programming.

The single signal problem
One of the greatest drawbacks of a system using audio tones for input signals is that only one signal can be transmitted at a time.When two or more audio signals are activated simultaneously on the gateway, the mixed signal is filtered out.The consequence of this is that, unlike radio control where one can control a number of movements simultaneously, one has to hardwire two electric motors, for instance, to run simultaneously off one signal or the same result can be obtained by splitting the signal software wise.
As a result of the single signal, the two drive motors of the robot cannot be controlled separately and are thus hardwired to simultaneously run forwards, backwards, left or right.The consequence of this is that the robot must come to a standstill before there can be any change of direction.The robot cannot move forward and turn at the same time because, for forward motion both motors turn forwards but for turning, one motor turns backward.This results in very jerky movements and does not allow for smooth operation.
When two motors simultaneously run backwards or forwards from one signal, the motors must be absolutely identical to obtain straight-line motion.This is normally not the case and the speed of one motor must be adjusted electronically.If the traction surface differs between the two motors (like one wheel on a carpet and the other on tiles) straight line motion is very difficult.The braking system of the robot relies on the torque through the gearboxes of the wiper motors to stop the motion.If the backlash on the gearboxes is not identical, the robot turns slightly in the direction of the motor with least backlash every time it stops.This is very undesirable.

The feedback problem
Without visual images available in Mode 1, it would not be possible to steer the robot.To test the feasibility of control with video feedback the robot was equipped with a short range (100 metres indoors) wireless camera.Video streaming is already possible with the Nokia 6230i but is currently not possible on the existing cell phone networks.When it becomes available the camera of the phone itself can replace the wireless camera.
Even with wireless video feedback it is very difficult to control the robot.The position of the camera on the robot is important.Ideally, the camera should be positioned about two metres away from the robot so that one can have a bird's eye view of the robot.Since this is impractical, the camera should be fitted to the robot in such a way that the drive wheels can be seen on the remote screen.This is necessary so that obstructions near the wheels can be seen and avoided.
With the camera in its 'best' position it was possible to steer the robot remotely to dock into a charging station where the battery could be recharged.
A prerequisite for the successful remote control of the robot is that the environment where the robot must operate should be known.The person controlling the robot does not have any sense of direction other than known points in sight of the camera.

The relays
The relays fitted on the control board do not switch on gradually but abruptly, causing the robot to jump from stand still to full speed almost instantaneously.For this reason the speed of the robot was limited to approximately 30 m/min.
Although the relays can handle 10 ampere individually, provision must be made on the circuit board for larger connecting lines from the output of the relays to the connector blocks, where the motors are connected, to handle 10 amperes of current.

The lost signal
If the cell phone signal is lost in Mode 1, depending on the application, it can have serious consequences.Sometimes, as for a radio controlled aeroplane, if the signal is lost the last signal must be kept alive or the aeroplane must start circling.When a drilling operation is interrupted by a lost signal, all signals should be cut until the signal is recovered.The programmer must make provision for a lost signal.
A bit separate from the four sound bits on the gateway comes on while the cell phone signal is on, and an interrupt is activated when the bit goes off.This extra bit of information distinguishes between not sending a signal and a lost signal.

CONCLUSIONS AND RECOMMENDATIONS
The fact that only one controlling signal is available at any moment, puts serious limitations on the controllability of a remote moveable robot.To overcome this problem the possibility to avoid audio signals by using fax or GPRS [6] communication, and thus stay in digital mode, can be investigated.Although the principle of audio control is not ideal for direct motion control, there are countless applications for Mode 2 and Mode 3 (irrigation control, swimming pool maintenance, changing of electronic lock codes, stove control, etc.) for a product like this.
The different modes of control offer a whole range of time dependant control options.The controlled system can be controlled instantaneously in Mode 1, for any time period in Mode 3 and almost indefinitely in Mode 2. Normally, depending on the application, only one mode would be sufficient for control purposes, but it is recommended that further experiments to investigate the ability to apply a mixture of modes, i.e. one signal can be switched on permanently, while the next one can be controlled in Mode 1, should be done.
Audio feedback is a very practical and instantaneous way to ensure that the correct actions have been taken by the controlled system after receiving a signal.It can, however, be foreseen that the feedback messages could be confusing when, for instance, a motor that was running switches of unintentionally and creates a feedback message while another motor is being switched on.The same situation would prevail when a feedback message is lost through a lost signal.To avoid confusing feedback messages, the messages should be planned very carefully and provision must be made for all possible scenarios.
The picture received from a robot, equipped with a single camera at a height of approximately 500 mm.above the floor, can be compared with the view that a human would have when crawling with one eye blindfolded.It is recommended that the next version of the robot be equipped with more than one camera or that the single camera should be able to 'look' sideways without the robot turning.Fitting the robot with a compass that can be viewed through the camera would also help to gain an improved sense of direction.
The 10-ampere relays proved to be very robust.To introduce speed control however, it is recommended that MOSFET technology [1,7] be applied in the place of the relays.It would also be better to separate the relay board from the microcontroller board.
The advantages of having the possibilities of distance control should, by far, outweigh the disadvantage of paying for cell phone time.

CONCLUDING REMARKS
The application field of remote control of robotic systems undoubtedly falls within the domain of the Industrial Engineer.The proof that cell phone controllers can be designed, built and programmed locally should encourage Industrial Engineers to consider the many possibilities that are offered by this type of control.The application field is almost limitless.It is possible to go beyond the capabilities of the imported single application units such as SMS controllers and fixed line programmable relays.
Valuable lessons have been learnt with this project and the next generation cell phone controlled robotic system could address all the shortcomings of this prototype.
/sajie.journals.ac.zaDiagram 1 shows only the most important logic of the software.Subroutines for Mode 1 and Mode 2 are very similar to that of Mode 3 and are not shown.An escape Diagram 1: Flow diagram of the most important part of the software http://sajie.journals.ac.za subroutine (not shown) ends the communication when the signal is lost or when the remote phone is switched off.