Abstract: This project mainly focuses on the design of an ARM-based robotic arm control system, and also involves the development and application of an ARM-based embedded system and the design of a QT human-machine interface (HMI). Specifically, it designs the HMI for a three-axis servo robotic arm used in injection molding machines. The system enables the setting of robotic arm operating parameters, the issuance of operating commands, and the monitoring of operating status. The system uses ARM as the core processor, an embedded Linux operating system, and Qt for software development. The HMI uses a touchscreen as the input device and serial communication for data exchange with the lower-level machine.
Keywords: ARM; three-axis servo robot; human-machine interface
ThethreeARMaxisservocontrolsystembasedonman-machineinterfacedesign
WangNai-xu
(Automation and Electronic Engineering College, Qingdao University of Science & Technology, Qingdao Shandong 266061, China)
Abstract:This project is to design arobot control system based on ARM, and also relates to the ARM embedded system development and application as well as the man-machine interface design based on QT, for three axis servo manipulator for injection molding machine, the design of control system interface. Therealization of setting, op erationinstructionmanipulatoroperatingparametersandrunningstateundersurveillance.ThesystemadoptsARMasthecoreprocessor,usingtheembeddedLinuxoperatingsystem,usingQtsoftwaretoopen.Theman-machineinterfacetouchscreenisusedasinputdevice,theuseofserialcommunicationbetweenPCanddataexchange.
Keywords:ARM;threeaxisservomanipulator;man-machineinterface
1. Introduction
The development of robotic arm control systems has progressed alongside the development of robotic arms (robots). Robotic arms evolved from early, ancient robots. Research on robotic arms began in the mid-20th century. With the development of computer and automation technologies, especially since the advent of the first digital electronic computer in 1946, computers have made remarkable progress, moving towards higher speeds, larger capacity, and lower costs. Simultaneously, the urgent need for mass production has driven the advancement of automation technology, laying the foundation for the development of robot and robotic arm control systems. On the other hand, research into nuclear energy technology requires certain mechanical devices to replace humans in handling radioactive materials. Against this backdrop, the United States developed a remote-controlled robotic arm control system and a remote-controlled robotic arm in 1947, and a mechanical master-slave robotic arm control system and robotic arm in 1948.
The development of robotic arm control systems originated in the United States. In 1954, John Devol, an American, first proposed the concept of industrial robots and applied for a patent. The key point of this patent was the use of servo technology to control the robot's joints, employing a human hand to teach the robot's movements, allowing the robot to record and reproduce those movements. This is the so-called teach-and-playback robot control system. Most existing robot control systems adopt this control method. In 1958, United Controls, an American company, developed the first robotic arm riveting robot control system. The earliest practical robot products (teach-and-playback) were "VERSTRAN" launched by AMF in 1962 and "UNIMATE" launched by UNIMATION. These industrial robots and related control systems mainly consist of human-like hands and arms. They can replace heavy human labor to achieve mechanization and automation of production, and can operate in hazardous environments to protect human safety. Therefore, they are widely used in machinery manufacturing, metallurgy, electronics, light industry, and nuclear energy sectors.
The control system of robotic arms has gone through the following stages: the era of robotic arms completing the transfer of radioactive sources, the era of robotic arms for stacking chemical products, and the era of the rise and development of industrial robotic arms.
2ARM and its architecture
ARM (Advanced RISC Machines) is a well-known company in the microprocessor industry, designing a large number of high-performance, inexpensive, and low-power RISC processors, related technologies, and software. Its technology is characterized by high performance, low cost, and low power consumption. It is suitable for various fields, such as embedded control, consumer/educational multimedia, DSP, and mobile applications. ARM-based microprocessor applications account for more than 75% of the 32-bit RISC microprocessor market share, and ARM technology is gradually permeating all aspects of our lives. ARM is a company specializing in the design and development of RISC-based chips. As an intellectual property provider, it does not directly engage in chip manufacturing. Instead, it licenses its designs to partner companies to produce chips with unique features. Major semiconductor manufacturers worldwide purchase ARM microprocessor cores from ARM and add appropriate peripheral circuits according to their different application areas to create their own ARM microprocessor chips for the market.
2.1 ARM Structure and Characteristics
Common characteristics of ARM processors
(1) Small size, low power consumption, low cost, and high performance;
(2) Supports Thumb (16-bit) / ARM (32-bit) dual instruction sets, and is well compatible with 8-bit / 16-bit devices;
(3) Extensive use of registers results in faster instruction execution;
(4) Most data operations are performed in registers;
(5) The addressing mode is flexible and simple, and the execution efficiency is high;
(6) The instruction length is fixed.
2.2 ARM Processor Architecture
2.2.1 RISC Architecture
Traditional CISC (Complex Instruction Set Computer) architecture has inherent drawbacks. As computer technology advances and new, more complex instruction sets are introduced, the computer architecture becomes increasingly complex to support these new instructions. However, the frequency of use of various instructions within the CISC instruction set varies significantly. Approximately 20% of instructions are used repeatedly, accounting for 80% of the entire program code, while the remaining 80% are used infrequently, representing only 20% of the program design. Clearly, this structure is not ideal. In 1979, the University of California, Berkeley proposed the concept of RISC (Reduced Instruction Set Computer). While RISC has the aforementioned advantages compared to CISC, it cannot be assumed that RISC can replace CISC. In fact, RISC and CISC each have their advantages, and the boundaries are not so clear-cut.
2.2.2 Register Structure of ARM Microprocessors
The ARM processor has 37 registers divided into several banks. These registers include: 31 general-purpose registers, including the program counter (PC pointer), all of which are 32-bit registers; and 6 status registers, used to identify the CPU's operating state and the program's running state, all of which are 32-bit, but currently only a portion of them are used. The ARM processor also has 7 different processor modes, each with a corresponding set of registers. That is, in any processor mode, the accessible registers include 15 general-purpose registers (R0-R14), one or two status registers, and the program counter. Among all the registers, some are the same physical registers shared across all 7 processor modes, while others are different physical registers depending on the processor mode.
2.2.3 System operating frequency
The operating frequency of a system largely determines the processing power of an ARM microprocessor. The typical processing speed of the ARM7 series microprocessors is 0.9 MIPS/MHz, with common ARM7 chip system clocks ranging from 20MHz to 133MHz. The typical processing speed of the ARM9 series microprocessors is 1.1 MIPS/MHz, with common ARM9 system clock frequencies ranging from 100MHz to 233MHz. The ARM10 can reach up to 700MHz. Different chips handle clocking differently; some chips require only one main clock frequency, while others have internal clock controllers that can provide different clock frequencies for the ARM core and functional components such as USB, UART, DSP, and audio.
3 Embedded Systems
When developing embedded systems using ARM processors, choosing the right development tools can accelerate the development process and save development costs. Therefore, an integrated development environment (IDE) containing editing software, compilation software, assembler software, linker software, debugging software, project management, and function libraries is generally essential. Other development tools, such as embedded real-time operating systems and evaluation boards, can be selected based on the scale of the application software and the development plan.
3.1μC/OS-II
μC/OS-II is a priority-based preemptive multitasking real-time operating system that includes a real-time kernel, task management, time management, inter-task communication and synchronization (semaphores, mailboxes, messages, queues), and memory management. It allows tasks to work independently without interference, easily achieving timely and error-free execution. This simplifies the design and expansion of real-time applications, greatly reducing the complexity of the application design process.
3.2pSOS
pSOSystem is a real-time embedded operating system designed and developed by Integrated Systems, Inc. (ISI, now merged with Wind River Systems) based on decades of theoretical research and practical experience in embedded real-time systems. pSOSystem integrates a complete set of embedded software modules, tools, and services. As one of the pioneers in microkernel design for embedded systems, ISI has constructed pSOSystem as a leading real-time operating system suitable for embedded application system development. pSOSystem receives substantial support from ISI and many third-party vendors.
3.3 Comparison of various operating systems and reasons for choosing Linux
Embedded operating systems are an important software foundation for ARM CPUs. From 8-bit/16-bit microcontrollers to 32-bit embedded processors represented by ARM CPU cores, embedded operating systems will replace traditional manually written monitoring programs or schedulers and become an important basic component.
Firstly, if the embedded device you want to develop is closely related to network applications or is simply a network device, then you should choose embedded Linux or μCLinux instead of μC/OS-II. This is because Linux not only integrates the TCP/IP protocol for you, but also has a wealth of other network protocols, such as DHCP Server, PPPoE, web server, etc.
Secondly, there is no absolute number to tell you what hard real-time and soft real-time are. The boundary between them is also very blurry. This is related to the type of ARM CPU you choose, its clock speed, memory, and other parameters. For processors like Intel Xscale, even with a regular Linux kernel, the worst-case kernel preemption latency is only 1.743 milliseconds, and 99.9% of the time it is 1.42 milliseconds. If you use an embedded Linux with real-time patching technology, such as MontaVistaLinux (kernel version 2.4.17), the worst-case latency is only 436 microseconds, and 99.9% of the time it is 195 microseconds. Considering the above figures and the latest improvements in real-time performance of Linux (such as low-latency O(1) debuggers and microsecond-level high-resolution POSIX timers), embedded Linux can be suitable for 90~95% of various embedded system applications. Of course, if you want a higher order of magnitude of real-time response, such as high-speed A/D conversion requiring interrupt latency of a few microseconds, or requiring a millisecond-level asynchronous serial real-time processor without DMA, μC/OS-II may be more suitable. Of course, you can also meet such strong real-time requirements by using a traditional embedded operating system like VxWorks.
Thirdly, regarding development tools, it's frankly stated that the development tools for μC/OS-II, μCLinux, and embedded Linux still lag behind commercial embedded operating system tools. Currently, the ARM SDT/ADS toolchain is widely used on ARM CPUs. While the product is excellent in terms of functionality, stability, and support from numerous third-party vendors, its only shortcoming is the lack of support for embedded operating systems. The upgraded version of SDT/ADS, RealView, is planned to support GCC and embedded Linux, but this has not yet materialized. μC/OS-II can use ARM SDT/ADS, but it lacks OS debugging capabilities. For OS debugging support, IAR or Nohan debuggers can be used. Besides GDB, μCLinux also has third-party debuggers, and when combined with Cygwin to form a Windows-based μCLinux development environment, such as Aiji's Spider and Micetek's Hitool. Fourth is the ARM CPU and reference board you choose. Cores like ARM7TDMI and ARM940T (such as S3C2500/2510) cannot use embedded Linux (MMU). If you want to use Linux, you can only use μCLinux. If you want to use Vxworks, you need to find out if the company providing the evaluation board has a BSP (Board Support Package). Vxworks itself only supports a few ARM company evaluation boards.
4-way human-computer interaction interface
With the development of embedded systems, users have increasingly higher requirements for them, making embedded GUIs (Graphical User Interfaces) increasingly important for implementing user interaction functions. As an open-source graphical system, the Linux GUI provides a rich 2D drawing library, multiple fonts for extensible character sets, bitmap display, multi-level RGB and grayscale adjustment, animation-optimized display, Windows-style dialog boxes and predefined spaces, and support for input devices such as keyboards, mice, and touchscreens, as well as LCD output.
Currently available GUI graphical development interfaces include: the compact X Window system, MicroWindows, OpenGUI, Qt/Embedded, MiniGUI, and PicoGUI.
GUI design requirements: (1) low storage space and low runtime resource consumption; (2) fast running speed and high reliability; (3) easy to port and customize.
Qt is a cross-platform C++ graphical user interface application framework. It provides application developers with all the functionality needed to build state-of-the-art graphical user interfaces. Qt is fully object-oriented, easily extensible, and allows for true component programming. Qt/E is the version of Qt for embedded Linux; the following are the steps for operating the application.
4.1 Preparations required for human-computer interaction interface development
VMware8.0.2Ubuntu10.10EABI-4.3.3_EmbedSky_20100610.tar
qt-embedded-linux-opensource-src-4.5.0_20100601.tar
4.2 Configuring the cross-compilation environment and compiling the QT library under Ubuntu
Install the standard C development environment. Since Ubuntu 10.10 Linux does not install it by default, you need to install it first (if it is already installed, you can skip this step):
$sudoapt-getinstallgccg++libgcc1libg++makegdb
If the above installation doesn't work, you can try `$sudo apt-get install build-essential`.
Place the downloaded EABI-4.3.3_EmbedSky_20100610.tar file in a newly created folder (must be letters or numbers) under ubuntu. Then use the command `sudo tar xvfjEABI-4.3.3_EmbedSky_20100610.tar` and press Enter to automatically extract the file.
4.3 Modify environment variables and add the cross-compiler's path to PATH.
Method 1: Modify the /etc/bash.bashrc file (this file only applies to the current user).
sudogedit /etc/bash.bashrc
Add `exportPATH=$PATH:/usr/local/arm/4.3.2/bin` at the end.
Method 2: Modify the /etc/profile file (this file contains system-level environment variables; settings in this file apply to all users):
$sudogedit /etc/profile
Add a path setting by adding the following to the end of the /etc/profile file, and then save the file:
exportPATH=$PATH:/usr/local/arm/4.3.2/bin
Method 3: Modify the /etc/environment file
$sudogedit /etc/environment
The original file should be PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games". Change it to PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/arm/4.3.2/bin", save and exit.
To check if the path has been added, execute the command `echo #PATH` in the terminal and press Enter. The output should show: `/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/yonghuming/ubuntu/opt/EmbedSky4.3.3/bin`. This indicates that the cross-compiler's path has been added to PATH. At this point, the cross-compilation environment installation is complete.
4.4 Test if the installation was successful
After running `arm-linux-gcc -v` in the terminal and pressing Enter, the following appears:
5QT Interface Design
This interface is the main interface of the robotic arm control system, which can monitor and alarm the machine.
This is the main interface, containing eight function keys, as shown in the figure:
This interface is the signal setting interface, which allows you to determine the usage of each device:
This interface is for setting the time, allowing you to schedule movements by setting the duration of the robotic arm's movement.
6 Conclusions
This project designed and fabricated a human-machine interface (HMI) for a three-axis servo control system of an injection molding machine, using a 32-bit ARM embedded processor with an ARM core as the core computing and control CPU. The prototype has already implemented the setting of robot arm operating parameters, the issuance of operating commands, and the monitoring of operating status. Based on this project, this paper provides a detailed overview of the customization and porting of the Linux operating system and the design of the HMI, applying embedded system design principles and development methods.
About the author:
Wang Naixu (1986-), male (Han nationality), from Yantai City, Shandong Province, holds a master's degree and his main research areas are intelligent control and pattern recognition.
Email: [email protected] Phone: 13070899172
Postal code: 266042
Address: No. 53 Zhengzhou Road, Sifang District, Qingdao City, Shandong Province