Human-Machine Interface Design for Intelligent Mobile Robots Based on ARM2210
2026-04-06 03:39:23··#1
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 daily life. With the continuous advancement of LCD technology and the widespread application of Graphical User Interface (GUI) technology, human-machine interfaces are becoming increasingly user-friendly. They can provide intuitive path graphs and data parameters for the motion control of mobile robots. This paper introduces a method for designing a human-machine interface 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 human-machine interface (HMI) of a mobile robot primarily displays the robot's motion information to the user, such as its current speed, distance to obstacles, and trajectory. The ARM221O is based on the PHILIPS ARM7TDMI-S microcontroller LPC2210, supporting embedded systems for real-time simulation and embedded tracking. The LPC2210's CPU frequency is up to 60MHz and it features a rich set of peripheral interfaces, significantly improving system stability and simplifying development. Figure 1 shows the system block diagram of the ARM2210. Because the system includes an RS232 conversion circuit, data transmission with the host computer PC104 is possible via UART0. It also includes a Toshiba T6963C dot-matrix LCD controller, expanding the LCD interface and providing LED digital tube display and 16 key inputs, making HMI development very convenient. The hardware design of the HMI involves 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. The Toshiba T6963C LCD controller has unique hardware initialization settings, driving a maximum monochrome 640*128 (single screen) LCD, supporting 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, developed by Zhou Ligong Company, is a user-friendly graphical user interface (GUI) software for embedded systems, characterized by its low resource consumption and ease of 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 of human-machine interfaces for mobile robots. When receiving data from the host computer PC104, the UART0 FIFO is enabled for data transmission/reception, with interrupt handling for reception. 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. 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 = U0RBR; // Read FIFO data and clear interrupt flag }VICVectAddr = 0x00; Interrupt handling ended} 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 window data structure and set the window's starting coordinates, size, title and other related parameters; then call GUI_WindowsDraw() to output the display 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 through 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 for each icon menu item, you can call GUI_MenuIcoDraw() to display the 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. The icon menu selection interface also needs to implement the selection operation of the icon menu. The ZLG7290 I2C device 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]); 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 implementation of the human-machine interface. 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. Conclusion With the rapid development of embedded system applications, the development of human-computer interaction systems will become more widespread. This paper describes a design method for a mobile robot human-computer interface 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 Fundamentals Tutorial, Guangzhou Zhou Ligong Microcontroller Development Co., Ltd., 2004.11 2. Zhou Ligong, ARM Microcontroller Fundamentals 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