Human-Machine Interface Design for Intelligent Mobile Robots Based on ARM2210
2026-04-06 06:37:25··#1
A mobile robot human-machine interface (HMI) provides intuitive path graphics, movement speed and angle, obstacle information, etc., for the motion control of mobile robots. This paper designs a mobile robot HMI based on an embedded system ARM2210 development board by receiving motion information from the central processor PC104 via the ARM2210's UART0 serial port, driving the STN LCD screen YL240128A using a Toshiba T6963C LCD controller, and utilizing the basic drawing and menu operation functions provided by the ZLG/GUI software package. Menu selection is implemented using the I2C interface function provided by the ARM2210's I2C device ZLG7290 and keyboard interrupt signals, demonstrating strong practicality. Introduction Embedded systems, with their advantages of high performance, low power consumption, and low cost, have significantly changed people's lives. For example, MP3 players, smartphones, and digital cameras have permeated all aspects of people's lives. With the continuous advancement of LCD technology and the widespread application of Graphical User Interface (GUI) technology, HMIs are becoming increasingly user-friendly. They can provide intuitive path graphics, data parameters, etc., for the motion control of mobile robots. This paper introduces a method for designing a human-machine interface (HMI) for a mobile robot based on the LPC2210 embedded microprocessor and using the ZLG/GUI software package. The intelligent mobile robot we designed and developed is a comprehensive system integrating environmental perception, dynamic decision-making and planning, behavior control and execution, with a PC104 embedded microprocessor as the central processor, a TMS320F2812 as the motion controller, and ultrasonic sensors for obstacle avoidance. It mainly includes a motion system, an electronic information system, and a sensing system. It acquires video information through a CCD camera and image acquisition card, and achieves obstacle avoidance by measuring the distance to obstacles ahead using an ultrasonic sensor array. The HMI of the mobile robot mainly displays the robot's motion information to the user, such as its current speed, distance to obstacles ahead, and trajectory. The basic components of the ARM221O: The ARM221O is based on the PHILIPS ARM7TDMI-S microcontroller LPC2210, supporting real-time simulation and embedded tracking in embedded systems. The LPC2210's CPU frequency is up to 60MHz, and it expands with rich peripheral device interfaces, greatly improving system stability and simplifying development. Figure 1 is a system block diagram of ARM2210. [IMG=System Block Diagram of ARM2210]/uploadpic/THESIS/2007/11/2007111513084182194A.jpg[/IMG] Figure 1 System Block Diagram of ARM2210 Since this system includes an RS232 conversion circuit, it can transmit data with the host computer PC104 via UART0. It also includes a Toshiba T6963C dot-matrix LCD controller, expanding the LCD interface, and provides LED digital tube display and 16 key inputs, making the development of a human-machine interface very convenient. Hardware Design of the Human-Machine Interface 1. Data Transmission The serial port of PC104 can be used as a standard PC COM1 communication port or expanded into a console serial port for keyboard input and display terminal output or as a serial input/output port between computers. The ARM2210's UART0 has a 16-byte receive and transmit FIFO; the register positions conform to the '550 industry standard; the receiver FIFO trigger point can be 1, 4, 8, or 14 bytes; and it has a built-in baud rate generator. The mobile robot's motion information is transmitted to the embedded microcomputer PC104 via the TI DSP controller TMS320F2812 and ultrasonic sensors. After information fusion by the PC104, it is transmitted to the ARM2210 via serial port and displayed on the LCD screen. 2. LCD Display and Menu Selection Toshiba's T6963C LCD controller has unique hardware initialization settings, driving a maximum monochrome 640×128 (single screen) LCD. It supports separate and mixed display of graphics and text, and has a character generator, meeting the display requirements of the mobile robot's human-machine interface. Figure 2 shows the schematic diagram of a 240×128 dot-matrix graphic LCD module with built-in T6963C. In addition, the ARM2210 system is equipped with an I2C device ZLG7290 and 16 buttons. The ZLG7290 provides an I2C serial interface and key interrupt signals for easy connection to the processor; it can drive an 8-digit common-cathode seven-segment display or 64 independent LEDs and 64 keys, with 8 function keys capable of detecting the number of consecutive key presses. This system uses a 240×128 pixel STN LCD screen (YL240128A) with yellow-green display as the human-machine interface (HMI) display; and uses S11, S12, and S13 of the 16 keys on the ARM2210 system as inputs to implement selection operations on the HMI. HMI Software Design The key to the mobile robot HMI is menu operation and real-time display of graphics and data. A GUI is a computer program designed to improve the user-friendliness and ease of operation of human-machine interaction; it is a product built on computer graphics. Users no longer need to memorize a large number of commands but can operate conveniently through windows and menus. Due to the limited resources of embedded systems, the requirements for the GUI are customizability and high speed. ZLG/GUI is a user-friendly graphical user interface software for embedded systems, developed by Zhou Ligong Company. It is resource-efficient and easy to use. ZLG/GUI provides basic functions such as drawing points, lines, circles, arcs, ellipses, rectangles, squares, and filling. More advanced interface functions include ASCII display, Chinese character display, icon display, windows, and menus. It supports monochrome, grayscale, pseudo-color, and true color graphics display devices. Therefore, the ZLG/GUI software package can meet the design requirements for the human-machine interface of mobile robots. [IMG=Schematic diagram of a 240×128 dot matrix LCD module with built-in T6963C]/uploadpic/THESIS/2007/11/2007111513095081635V.jpg[/IMG] Figure 2 Schematic diagram of a 240×128 dot matrix LCD module with built-in T6963C. 1 Data Transmission When receiving data sent by the host computer PC104, the FIFO of UART0 is enabled for data transmission/reception. Reception uses interrupt processing. The UART0 serial port mode and data structure are set as follows: communication baud rate 9600, 8 data bits, 1 stop bit, and no parity check. The main procedure is as follows: /* Define serial port mode and data structure */ typedef struct Uart0Mode { uint8 datb; // Word length uint8 stpb; // Stop bits uint8 parity; // Parity bit } UART0MODE; /* Initialize serial port */ uart0_set.datb = 8; // 8 data bits uart0_set.stpb = 1; // 1 stop bit uart0_set.parity = 0; // No parity UART0_Ini(9600, uart0_set); // Initialize serial port mode /* UART0 receive interrupt */ void __irq IRQ_UART0(void) { uint8 i; if ( 0x04 == (U0IIR & 0x0F) ) rcv_new = 1; // Set new data flag for (i = 0; i < 8; i++) { rcv_buf[i] = U0RBR; // Read FIFO data and clear interrupt flag } VICVectAddr = 0x00; // Interrupt handling ends } 2 The window displays the human-machine interface mainly through icon menus to display the motion parameters of the mobile robot and related operations on the motion trajectory, such as "open", "pause", "close" etc. Therefore, first, define a data structure for the window and set the window's starting coordinates, size, title, and other related parameters; then call GUI_WindowsDraw() to output and display the window. /* Set the main window and display the output */ mainwindows.x = 0; mainwindows.y = 0; mainwindows.with = 240; mainwindows.hight = 128; mainwindows.title = (uint8 *) "Mobile Robot Interface"; mainwindows.state = NULL; GUI_WindowsDraw(&mainwindows); // Drawing the main window icon menu also requires defining related data structures, where icon data and text display can be converted into data using font software. For example, to convert the corresponding "Open" icon into data: `uint8 const menuico1[] = { 0x00,0x70,0x00,0x1C,0x00,0x12,0x1C,0x1A, 0x17,0x0A,0x21,0xF1,0x20,0x1A,0x4F,0xFE, 0x58,0x02,0x50,0x02,0x60,0x06,0x60,0x04, 0x60,0x04,0x40,0x08,0x7F,0xF8,0x00,0x00, }; /*; icon "Open"; width × height (pixels): 16 × 16 */` Then, after setting the display coordinate address, data pointer of the icon, and corresponding service function of each icon menu item, you can call GUI_MenuIcoDraw() to realize the display output. mainmenu[0].icodat = (uint8 *) menuico1; mainmenu[0].title = (uint8 *) "open"; mainmenu[0].Function = (void (*) ()) Runopen; In addition, the main program needs to call the GUI_SetColor(1,0) function to set the foreground and background colors. 1 indicates the dot is displayed, and 0 indicates the dot is off. 3 The icon menu selection interface also needs to implement the selection operation of the icon menu. The I2C device ZLG7290 provides I2C interface function and keyboard interrupt signal. The I2C bus is a chip-to-chip serial transmission bus launched by Philips. It realizes complete full-duplex synchronous data transmission with two wires, which can easily form a multi-machine system and peripheral device expansion system. The I2C bus employs a hardware-based device addressing method, completely eliminating the need for chip select line addressing via software addressing. This provides the simplest and most flexible expansion method for the hardware system. I2C operation modes are divided into master mode I2C and slave mode I2C, corresponding to the LPC2210 as the master and slave, respectively. This paper uses master mode I2C to send and receive data, thereby controlling the scanning of three buttons S11, S12, and S13 and detecting their consecutive press counts. The program first sets the default menu, then calls the function ZLG7290_GetKey() to read the pressed key values. The ZLG7290_GetKey() function directly reads the button values on the ZLG7290 device by calling IRcvStr(ZLG7290,1,&rece,1). If S11 is pressed, it indicates pointing to the previous icon menu; if S12 is pressed, it indicates selecting the current icon function; if S13 is pressed, it indicates pointing to the next icon menu. key = ZLG7290_GetKey(); if (key == KEY_OK) break; // Click the OK button to select if (key == KEY_NEXT) { mainmenu[select].state = 0; // Cancel the previous selection GUI_MenuIcoDraw(&mainmenu [select]); select++; // Point to the next menu if (select > 2) select = 0; mainmenu[select].state = 1; GUI_MenuIcoDraw(&mainmenu [select]); } if (key == KEY_BACK) { mainmenu[select].state = 0; // Cancel the previous selection GUI_MenuIcoDraw(&mainmenu [select]); if (select == 0) select = 2; else select——; // Point to the next menu mainmenu[select].state = 1; GUI_MenuIcoDraw(&mainmenu [select]); 4 To display the mobile robot's trajectory and related parameters in real time, the PC104 converts the robot's speed, direction, and turning angle into coordinate information on the LCD screen and calls the basic drawing function GUI_Line(uint32 x0, uint32 y0, uint32 x1, uint32 y1, TCOLOR color) to draw the current trajectory. Simultaneously, it updates the new speed value and distance to obstacles to the corresponding positions. Figure 3 shows the human-machine interface implementation. The entire display window is 240×128 pixels; the icon menu is 16×16 pixels with six icons; users can add icons and corresponding functions as needed. The mobile robot's trajectory display window is 160×100 pixels; other motion parameter display windows are 80×100 pixels, showing the current speed, distance to obstacles, and robot rotation angle. The position of the small car in the figure indicates the starting point of the trajectory, with coordinates and a scale of 1:500 displayed in the lower left corner. [IMG=Hybrid Interface Implementation Effect Diagram]/uploadpic/THESIS/2007/11/2007111513110783574Y.jpg[/IMG] Figure 3 Hybrid Interface Implementation Effect Diagram Conclusion With the rapid development of embedded system applications, the development of human-computer interaction systems will become more widespread. This paper describes the design method of the human-computer interface for a mobile robot based on the ARM2210 embedded system. This method is simple to design, low in cost, and makes the interaction between the operator and the robot more user-friendly. References [1] Zhou Ligong et al., ARM and Embedded System Basic Tutorial, Guangzhou Zhou Ligong Microcontroller Development Co., Ltd., 2004.11 [2] Zhou Ligong, ARM Microcontroller Basics and Practice, Beijing University of Aeronautics and Astronautics Press, 2003 [3] Zhou Ligong et al., ARM Embedded System Experiment Tutorial, Beijing University of Aeronautics and Astronautics Press, 2004.11