You are on page 1of 6

Development of ARM-based Embedded System

for Robot Applications


Shouqian Yu, Weihai Chen, Li Li, Jianglei Qin
School of Automation Science and Electrical Engineering
Beijing University of Aeronautics and Astronautics
Beijing 100083, China
yushouqian@sina.com, whchen55@163.com

Abstract—Based on the combination of advanced RISC system requirements. [4, 5, 6, 7]. As the core device of an
microprocessor (ARM), DSP and ARM-Linux, this paper embedded system, the embedded microprocessor can be an 8-,
introduces an approach for developing embedded robot control 16- or 32-bit microprocessor. Because of the limitation from
systems. The design of embedded control system includes four the lower performance such as low running speed, low
aspects, i.e., system structure, functions, hardware, and software
addressing capability and high power consumption, etc, the 8-
design. In the development of the system, some features are
included such as hierarchy structure, modular hardware, and or 16-bit microprocessors cannot meet the requirements of
structured software, to make the system suitable for a variety of some complex embedded applications. In the field of the 32-
robots applications through some hardware adjustment and bit embedded system application, ARM (Advanced RISC
software customization only. The effectiveness of proposed Machine) gains tremendous success. [8, 9, 10, 11]. Generally
approach has been verified by a straight line motion speaking, the ARM-kernel microprocessors present as smaller
demonstration of a 6-DOF series manipulator size, lower power consumption, lower cost, and relatively
higher performance, etc. For instance, with a plenty of register
Keywords— Embedded control system, ARM, controller,
and high instruction executing speed, most of data operations
robot application
are completed in registers. Besides, the ARM-kernel
I. INTRODUCTION microprocessors have advantages in addressing flexibility,
With the development of the science and technology, the facility and higher execution efficiency as well as fixed
application of robots will be significantly increased in a lengths of instructions, and so on. An embedded operating
number of fields, such as outer space exploration, ocean system can be encapsulated in ARM, to accomplish complex
resource exploitation, etc.[1, 2, 3]. However, no matter what algorithms and to finish a variety of tasks instead of personal
purpose for utilizing the robots, almost all of them are made computers.
up of two parts, the mechanical body and the control system. This paper firstly introduces the configuration of the
The mechanical body not only represents the basic embedded system, and then presents a robot control system bd
characteristic of a robot, but also determines that it is an on an embedded operating system and ARM as well as DSP. At
unmanned system. Dealing with tasks in dangerous and the end, the article illuminates an experiment that using the
complex environments, the robot should be entitled the developed system for controlling a 7-DOF serial robot.
abilities of thinking and making decisions to some extents,
moreover, it needs multi motors work together coordinately II. STRUCTURE OF THE EMBEDDED SYSTEM
for the motion control of a robot. All of these demand complex An embedded system is made up of the embedded
algorithms including motion control algorithm and pattern operating system and the hardware supporting the operating
recognition algorithm. As far as we know, it is difficult for system. The embedded operating system is the console of an
robots we discussed above to carry a computer with them as a embedded system, which is mainly used for controlling
motion control system, meanwhile, it is also impossible for the devices of information processing as well as user interfaces.
robot control system with only low-performance The hardware components of embedded systems should
microprocessors to deal with so many complex calculations. conform to specific applications, so that there are strict
Fortunately, it is just a possible solution to overcome these limitations on them, such as cost, function, size, weight and
difficulties through developing embedded systems and 32-bit power consumption, etc.
microprocessors. The software of embedded systems has the following
An embedded system is a special-purpose computer characteristics:
system, which is completely encapsulated by the device it 1) The development of embedded software is closely
controls, so there are some specific requirements for each relative to the hardware. The embedded software is
system, such as functions, reliability, cost, size, and power implemented on certain hardware platform, dealing
consumption, etc. Based on the computer technology, an with some parts of hardware-software co-design on
embedded system is designed for specific-application with device drivers.
hardware and software that could be tailored to adapt the

1-4244-0025-2/06/$20.00 ©2006 IEEE RAM 2006


2) Codes with both high efficiency and high reliability. ASB are all high performance bus designed with larger
Due to the limited and precious memory space for bandwidth, and supporting multi-master equipment and multi-
program running in the embedded system, it is slave equipment. Actually APB is a secondary bus providing
necessary to take the code efficiency into account AHB/ASB with a simply extending as low power consumption
during programming. For a real-time operating system, and interface. APB is connected with AHB or ASB through
the processor should rigidly deal with all kinds of tasks the bridge. The architecture of S3C2410 is AHB+APB, as
produced asynchronously. Besides, an embedded shown in Fig.1, it is the interior architecture of S3C2410.
software system is supposed to have some capabilities
such as exception handling and quick reset, etc.
3) The software should been solidified into FLASH or ARM920T S3C2410
ROM. Generally, to improve both executing speed and
system reliability, and as well, to reduce system-reset
time, the embedded software will be downloaded and
solidified into FLASH or ROM of the target device.
Hardware of an embedded system has the following LCD controller / NAND Flash controller /
AHB to APB
characteristics: O uter memory controller / i nterrupt
Bridge
controller / USB mainframe
1) Small size and high integration. An embedded system
is a minimum system without a lot of components
needless for target functions.
2) Low power consumption and fine electromagnetic
compatibility performance. It is capable of working in UART0,1,2 / IIC / IIS /
bad environments and supporting quick restart when Timer0~3(PWM) and Timer4
GPIO / USB equipment /
the system is dead. / RTC / ADC
SPI0,1

III. SYSTEM FUNCTIONS AND DESIGN Figure 1 The architecture of S3C2410

The main purpose of this design is to meet the requirements of


controlling the multi- robots system, meanwhile, to pay The client controller is designed on DSP called
attention to some characteristics, such as: size, weight and TMS320LF2407, which performs low power consumption,
power consumption, etc. to which the robot is sensitive. flexible instruction set and facility for internal operations in
addition to the high-speed calculation capability. The whole
A. Hardware Architecture hardware architecture of the system is shown in Fig2.
The server controller is suggested to adopt S3C2410
supplied by Samsung as its CPU. The S3C2410 is a 16/32-bit,
A/D Sensor
266MHz, low power consumption, and high performance The server
Analog
RISC microprocessor with ARM920T as its kernel [5, 6], Controller
which is particularly suitable for real-time control. Meanwhile, S3C2410 Digital I/O
Optic-
it supports Window CE、Palm OS、Symbian OS、Linux and
isolator
real-time operating system, etc. LCD
Moreover, S3C2410 supplies abundant equipment inside to Analog output
bring down the cost of the whole system and there is no need
of collocating excess equipment any more. The function of
integrated circuit include: separate 16KB instruction Cache
and 16KB data Cache, MMU virtual memory management,
The client 1 The client n
LCD controller, supporting NAND Flash system induction, DSP
… DSP
outside memory controller, three-channels UART, four-
channels DMA, four-channels PWM timer, 117 currency I/O
PWM
interface, 24-channels outer interrupt recourse, RTC with
Encoder signal

calendar, 8-channels 10bit ADC and touch screen interface, Optic-


A/D
IIC-BUS interface, IIS-BUS interface, USB mainframe, USB isolator
equipment, two-channels SPI, and interior PLL clock times
Analog input
frequent count. The peripheral inside the chip is connected
with the bus inside of the chip as well.
The bus inside chip of S3C2410 adopts advanced Figure 2 The hardware structure of the system
microprocessor bus architecture (AMBA). AMBA includes
advanced high-performance bus (AHB), advanced system bus The characteristics for the client controller can be shown
(ASB), and advanced peripheral bus (APB). Both AHB and as following:
1) The server controller inspects and controls the state of resources such as PWM, AD, I/O interface and QEP circuit,
the system as well as responds to the instructions from where QEP circuit inputs encoder signals coming from servo
the console, and then send data and instructions to the motor and realize the four-time frequent count to analyze
client controller; whether the motor is stalled or is out of its order. UART in
2) Communication bus, local bus, are available for LF2407 chip is used as the interface with the server controller.
communicating with other controller; The client controller controls the speed and position of the
3) Multi sensor information, such as pose, position, depth, motor according to the command and data from the server
height, speed, and acceleration sensors, can be controller by utilizing the forward feedback and backward
integrated directly through designed interface. feedback algorithms. The client controller itself is a complete
4) PWM signals are available for adjusting the speed and controller with CPU itself, memory, input-output systems and
position of the motor to control the speed and pose of interrupts. It can operate independently according to the
robots. memorized program and thus to decrease the workload of the
5) A/D collection is available. Through watching the A/D server controller. In addition, there are three extendable
value of working voltage and current, it can realize to methods for communication between server controller and the
control system or record the state.
client controller: bus communication, serial port
6) I/O control is available for inspecting and control the
communication, and two ports RAM communication.
peripheral switch data.
Furthermore, the recorded data in the system is used for There are differences in control algorithms for unlike type
setting the parameter storage, moving path or recording of robots, the difference is mainly shown by their server
relative inspecting data; through dealing with the information, algorithms. The server algorithms are based on the specific
the control algorithm is finally realized by gathering, counting tasks that the robot will carry out. Generally, a robot system
the data from different sensors and synthesizing multi-sensors’ needs only a server controller as the brain; the numbers of
information together. several client controllers are dependent on the specific task
requirements. Through simply adjusting a few interfaces or
B. Module Function and Design to add/delete some sensors will make the hardware suitable for
various tasks. A server controller prototype is illustrated in
The server controller, the peripheral device module
Figure 3
includes S3C2401, SDRAM, NAND FLASH and crystal
oscillators which are the basic elements of system running,
and power interface, RS485 bus interface, A/D interface, I/O
interface, PWM interface, client-communication interface and
LCD interface, etc.
S3C2410 has been integrated itself with several general-
purpose peripheral components, so its resources are available
for the channels as A/D and I/O directly. For example, two on-
chip UARTs are respectively used for RS485 and client-
communication interfaces. To prevent external disturbances,
these ports are isolated by high-speed optic-isolator
HCPL2630. SDRAM is available for the storage of running
program code, NAND FLASH save the startup code and
document system. Electrical power system uses a LM275-5
and two S1117, to realize the conversion of 24V-5V, 5V-2.3V
and 5V-1.8V. And a special reset chip is used for reset.
The server controller manages the whole system and
carries out the main arithmetic steps. While dealing with
signals fed back by sensors and sending commands to client Figure 3 Server controller prototype
controllers with respect to these signals, the server controller
receives signals from client controllers to estimate their states The sizes of controllers are shown as following: The
in order to send data and commands. Moreover the server measurement of server controller is 60 mm ×45 mm ×35 mm,
controller is in charge of human- machine interface, driving total power consumption is about 5V×200mA, where the CPU
LCD, displaying simple interface and state information. module holds 3.3V×30mA. A client controller is designed
The client controller includes TMS320LF2407, SDRAM, with backboard format, its measurement is 75mm×45mm×55
NAND FLASH, and crystal oscillator which are the basic mm. Comparing with 5V×1000mA which is the power
elements for the system running, it also includes power consumption of a CPU module for PC104, the controllers
interface, RS485 bus interface, A/D interface, I/O interface, discussed above have lower power consumption.
PWM interface, server-communication interface and LCD
interface, etc. TMS320LF2407 integrated itself with some
general peripheral as well, so it can directly use the system IV. SOFTWARE DESIGN
The operating system is one of the most important parts in requirements of real-time operations. In terms of software,
the whole system. It is in charge of managing all available real-time presents in the operating time limited of every
resource and distributing them among different tasks in order. process in the software system. Real-Time Operating should
According to different resource distribution strategies, there satisfy the demand of time limit, if not, the system will be
are two kinds of the operating system: one is Real-Time considered as invalidity even if the logic is right.
Operating System; the other is Time-Sharing Operating In order to inspect the system, the states of the system must
System. be collected and pass to the client controller in time, and then,
This system software is based on the RTLinux which is the client controller will find the next executing step according
Real-Time and multi-tasks operating system. RTLinux is to this information. Linux itself is a Time-Sharing Operating
changed from the kernel of Linux by adding RTLinux kernel System, so its design aims are to optimize the average
control between the process of Linux and hardware interrupt. performances of each process in the whole system. But this
It carries out a virtual interrupt mechanism in the kernel of goal counters to the controllable of high response speed and
RTLinux. limited response time which are demanded by Real-Time
Software design can be described as following: To Operating System. Its kernel adopts time-sharing arithmetic,
transplant the OS, design driving programming, package the and the accuracy of the timer is very low. The process used for
system state collection is easily disturbed by other processes,
API functions, disassemble and design multitasks, program
even get no response in a long time (may be as long as 0.6s or
control algorithms for the server and the client controller, etc.
longer). This situation may cause the system unable to get the
Based on the requirement from real-time control, it is made up
current state information and out of control. This is vital for
of two parts: one is the hardware part available for collecting
the system. So this state collection needs to be completed by a
the system state; the other is the standard Linux process. The
Real-Time process.
standard Linux process is made up of the programs for server-
RTLinux is a hardware real-time system rebuild from the
clients driver communication, client interface and the kernel of
kernel of Linux. As shows in fig2, there are two parts in the
system control, etc. The client controller is available for RTLinux: one part is the rebuilding of the kernel of Linux,
running the program. forming a small RTLinux real-time kernel within the kernel of
The architecture of system software is shown in Figure 4. Linux. This kernel provides an interrupt process of short time
lapse which can not be lapsed and rapped by Linux, and some
bottom real-time and interrupt control processes. The other
Interrupt control
User program part is a Linux standard model which provides RTLinux
hardware
Application Programming Interface (API). Through these API
the real-time task can be founded, deleted, transferred and
controlled. So in terms of the application of RTLinux, there
Linux kernel RTLinux Kernel
are two fields: one is real-time field, the other is non-real-time
field. There are many ways to communication between these
LCD driver two fields, such as FIFO and memory. While the functions in
Real-Time task real-time field satisfy the demand of real-time, it counters the
The client driver design principle of RTLinux that is making the kernel as
simply as possible, making the work in the real-time kernel
model as few as possible and if it can be finished in Linux
Figure 4 Software architecture of system without effecting the real-time operation, it should be finished
in Linux.
A. The embedded operating systems Linux in RTLinux is in charge of the initialization of
system and equipment and the management of dynamic
The system software is based on Real-Time Operating resources. RTLinux finishes hardware real-time task by using
Systems. In the field of the embedded, real-time is a very
static distribution memory, because when there is no memory
important concept. Real-Time systems are a kind of computer
resource, the hard real-time operation is not available for the
systems which complete certain functions in certain time, and
blocked thread.
give the right response to outer asynchronous events.
Since resources of the hardware of the embedded system
The kernel of Real-Time systems is to complete a pre-
defining operation in certain time; otherwise it would cause are limited, so that RTLinux can not be directly used as the
some serious consequences, such as bring down the operating system. Based on the actual application, the whole
performance or even cause the system breakdown. It is system can be customized, and stored in a Flash with less
necessary to point out that the Real-Time system does not capacity through configuring kernel, cutting down the shell
mean that the response and operating speed of the system is and the embedded C library. In this paper the system RTLinux
very high. Furthermore, cooperating software and hardware is mentioned above has been customized, the operating system
essential to realize the real time operation. Firstly, it is adopts MMU (Memory Manage Unit) that has been included
necessary to make sure that the hardware fulfills the in ARM9.
B. The Server-Client Controller Communication Program V. EXPERIMENT STUDIES
The client controller can be considered as an equipment of In this section, we present an experiment to verify the
the server controller. The server-client controller communication performance of our design by utilizing a 6-DOF serial robot.
program is the driver program for equipment of Linux. The The basic idea of the experiment issues that: Firstly, the robot
equipment driver is the software layer between client program is located in its initial position. Then, it moves along x-axis
and hardware. And as same as the kernel, the driver is run in positive direction to x = 200mm. Finally, it moves along x-
the highest level of the system, and all the recourse in the axis negative direction to x = -200mm. The whole process of
system is available for it. the experiment shows from Figure 5 to Figure 7.
Usually there are two kinds of methods of using equipment
driver: the first is to add the equipment driver to the kernel as
a load model dynamic. The model is a part of the kernel, but it
is independent, and it is not compiled into the kernel. The
second way is to compile the equipment driver into the kernel
as a part of the kernel code. When the driver is used
frequently, the second way is more suitable. So in this paper,
the second way is used.
In addition, Linux divided the equipments into three kinds:
character equipment, block equipment and network
equipment. The character equipment can be call on by the
character flow and this is very convenient for the control of
(a) Simulation (b) Actual motion
motor. RS485 bus communication is used in the system, so the
Figure 5 A 6-DOF robot is located in its initial position
client controller is considered as the character equipment. The
server controller send control data and signal by sending
ASCII character string to the client controller, and the client
controller respond to the server controller by returning ASCII
character string as well. In order to use the client driver, the
user needs to call the open system to start the equipment and
then return an equipment descriptor. When the user process
wants to send commands to the client controller, it call the
write program of the driver, then the write program will copy
the character string of the command to output buffer. Driver
program passes the code from output buffer to the client
controller practically.
The key of the arithmetic is the synchronization
(a) Simulation (b) Actual motion
performance between the server and the client controllers.
Figure 6 The 6-DOF robot moves along x-axis positive direction
Synchronization performance plays an important role in the
work of multi-controllers. Before data transmitted, the server
controller sends signals with a receiver mark and only the
module with the same mark number is able to receive the
following data. When the corresponding client controller
receives the signal, it will send an answer signal to the server
controller. For the synchronization of their work, the
processors are supposed to use the bus respectively. To make
synchronization among the multi- controller communication
and to prevent signal conflict as well, each of processors use
an I/O port and all of them are connected together. Therefore,
when a controller is either receiving or transmitting data, it
sends out high-potential signals to other controllers showing
(a) Simulation (b) Actual motion
that the bus is busy now and the controllers receive the signals
will not transmit data, preventing bus conflict. This approach Figure 7 The 6-DOF robot moves along x-axis negative direction
proved to be feasible by practice. By utilization of this
approach, synchronization of multi-processor work will be The motion cycle can be described as follows:
fine without bus conflict. 1) Locate the robot in its initial position P0(0, − 270, 250)
For the system, the operations of sensor data include as shown in Fig. 5, where Fig.5(a) is the simulation
acquiring, checking, extracting and processing will be done results with the pose of the end-effector and joint
according to NMEA0183 standard, facilitating for system angles, Fig.5(b) is the picture from actual robot .
upgrade.
2) Move the robot from P0 to P1(200, − 270, 250) as shown ACKNOWLEDGMENT
in Fig.6, where Fig.6(a) is the simulation results with the This work were supported by natural science foundation of
pose of the end-effector and joint angles, Fig.6(b) is China under the research project 50375008, 60575052, and
the motion picture from actual robot. 863 program of China under the research project
3) Move the robot from P1 to P2(−200, − 270, 250) as 2002AA421160

shown in Fig.7, where Fig.7(a) is the simulation results


with the pose of the end-effector and joint angles,
REFERENCES
Fig.7(b) is the motion picture from actual robot.
In this control system, the server controller (S3C2410) [1] R. M. Murray, Z. X. Li, S. S. Sastry. “A Mathematical
Introduction to Robotic Manipulation”, America: CRC Press,
calculates the coordinate values of 1000 position points at the 1994.
first time, which are sent to all of the client controllers through [2] W. H. Chen, G. L. Yang, Edwin H. L. Ho, and I. M. Chen,.
RS485 bus and downloaded into their FLASH. Each of the “Interactive Motion Control of Modular Reconfigurable
client controllers carries out these points and asks for more Manipulators”, Proceeding of the 2003 IEEE/RSJ Inter.
500 points until 500 points have been finished. This approach Conference on Intelligent Robots and Systems Las Vegas,
Nevada. October 2003.
is used for reducing interaction time between server and client
[3] L. Romdhance, “Design and analysis of a hybrid serial parallel
controllers, improving the synchronization performance of the manipulator”, Mechanism and Machine Theory, 1999, Vol. 34:
serial robot and increasing track precision. In addition, by 1037-1055.
utilization of an ARM-kernel microprocessor, all of the [4] K. Yaghmour, “Building Embedded Linux Systems”,. America,
actions are accomplished by the robot itself rather than a O’Reilly, 2004.
computer. [5] Michael Barr, “Programming Embedded Systems in C and
C++” , America: O’Reilly, 2001
In this experiment, the client controllers are PowerCube [6] J. Catsoulis. ”Designing Embedded Hardware”. America:
controller fabricated by Amtec company because we use the O’Reilly, 2001
PowerCube modules to build a robot system [14]. There is a [7] L. P. Yan, H. Zeng, K. Song, “Analysis and Design for
RS485 communication card will be needed to realize the Embedded Intelligent Family Gateways”, Control and
communication between server and client controllers. Automation, 2005, 2: 14-16.
[8] T. Z. Sun, W. J. Yuan, and H. F. Zhang, “Manual for Embedded
The experiment shows that this control system has the Design and Linux Driver Development: Based on ARM9
advantage in stability, fine real-time performance and general- Microprocessors”, Beijing: Publishing House of Electronics
purpose capability. Besides, it is capable of working in Industry, 2005
hazardous and complex environments. [9] Y. Chen, M. Li, Y. Yang. “Analysis and Practice of Open-Code
Embedded System Software: Based on SKYEYE and ARM
Development Platform”, Beijing: Beijing University of
VI. CONCLUSION Aeronautics and Astronautics Press, 2003
The embedded robot control system designed in this paper is [10] L. G. Zhou, . Foundation and Practice for ARM Microprocessors,
Beijing: Beijing University of Aeronautics and Astronautics
applied to a 6-DOF serial robot and performs fine Press, 2003
characteristics of reliability, real-time and general-purpose [11] J. G. Li, X. Y. Nie, and Z. M. Jiang, “Development
capability. Moreover its small size and low power Specifications for ARM Application Systems”, Beijing:
consumption fulfill the requirements. Without computer, the Tsinghua University Press, 2003
control system can carries out the control arithmetic on the [12] H. P., Liu, W. J Wang, and Y. Jiang, “Application and
Development on C Language for TMS320LF240x DSP”,
server controller (ARM) and control the client controllers Beijing: Beijing University of Aeronautics and Astronautics
(DSP) through bus. Thus the robot is entitled the ability of Press, 2003
making decision independently to some extent. So far, there [13] S. Wang, J. J. Li, and J. H. Liang, “Embedded Autopilot Design
are some shortcomings in this developed embedded control of Micro-Robots”, Journal of Beijing University of Aeronautics
system as well, such as the design of control arithmetic and and Astronautics, 2005, 31(7): 775-779
improvement of functions, on which further study should be [14] http://www.powercube.com
conducted.

You might also like