Design of obstacle monitoring and early warning system for loaders based on ARM single chip microcomputer

Publisher:静心静气Latest update time:2010-02-24 Source: 仪器仪表学报Keywords:ARM Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1 Introduction

With the development of informatization, intelligence and networking, embedded system technology has gained a broad space for development. The field of industrial control is also undergoing a huge transformation. Real-time embedded software and hardware technology based on 32-bit high-end processors will be applied in every corner of industrial control. Embedded controllers have many advantages such as small size, high reliability, powerful functions, flexibility and convenience. Their application has penetrated into various fields such as industry, agriculture, education, national defense, scientific research and daily life, playing an extremely important role in promoting technological transformation, product upgrading, accelerating the automation process and improving productivity in various industries [1].

Nowadays, although some vehicles at home and abroad are equipped with ultrasonic reversing anti-collision alarm devices, DSP-based intelligent vehicle anti-collision systems, and image processing technology-based car rear-end collision warning systems, there is no obstacle monitoring and warning system for construction machinery such as loaders, which are widely used in urban construction, mining, highways and other projects. Therefore, establishing a system to monitor and warn of obstacles and provide danger signals to drivers in advance so that drivers can take effective measures in time is an effective way to reduce accidents [2-5].

2 System Hardware Design

This system takes the loader as the research object, and aims to realize signal acquisition, conditioning, transmission, display and early warning. The system is divided into four parts: obstacle distance signal acquisition module, LCD display module, sound and light alarm module and processor module. The processor is the core, and the signal input and output are connected through the bus and interface circuit. The system block diagram is shown in Figure 1.

Figure 1 System composition block diagram

The Mini ARM module integrates a C2290 microcontroller minimum system, a USB host controller, a 10M Ethernet communication controller, and a NAND FLASH electronic disk. Its hardware resources mainly include: 2M NOR FLASH, 16K SRAM, 2M/8M Bytes PSRAM, 10M Ethernet interface, 2-way USB-Host controller, integrated electronic disk, 2-way CAN controller, and RTC [6].

The LCD display module uses a liquid crystal display module with a built-in T6963C, on which the interface between the T6963C and the row and column drivers and the display buffer RAM has been implemented.

2.1 Design of obstacle distance detection circuit

There are many methods for detecting obstacles, such as ultrasonic ranging, image processing, laser ranging, etc. However, since ultrasonic sensors have the advantages of simple information processing, low price, and easy production, this system uses ultrasonic ranging to detect the distance of obstacles.

(1) Principle of ultrasonic ranging

The ultrasonic transmitter emits ultrasonic waves in a certain direction and starts timing at the moment of emission. The ultrasonic waves propagate in the air and immediately return when they encounter an obstacle. The ultrasonic receiver stops timing as soon as it receives the reflected wave. The propagation speed of ultrasonic waves in the air is c. Based on the time t recorded by the timer, the distance s from the emission point to the obstacle can be calculated [7], that is, s = ct/2 (1).

(2) Ultrasonic ranging circuit

In this system, the ultrasonic distance measurement circuit is designed by MICROCHIP's PIC16C57, and the ultrasonic sensor selected is the T/R40-16 piezoelectric ceramic sensor. During operation, the main controller PIC16C57 sends a signal to make the ultrasonic transducer at the transmitting end send out voltage excitation. After being excited, it emits ultrasonic waves in the form of pulses. When the ultrasonic receiver receives the echo signal, it is transmitted back to the main controller. The timer in the main controller starts timing when the pulse signal starts to be emitted, and stops timing when the echo signal is received. The time interval multiplied by the speed of sound is twice the distance value. Thus, the distance from the obstacle to the transmitting point is calculated. Its circuit diagram is shown in Figure 2.

Figure 2 Ultrasonic distance measurement circuit diagram

The distance value is serially output through pin 10 of PIC16C57 and connected to the serial port of ARM after passing through the MAX232 chip. The MAX232 chip is an interface circuit designed for the RS232 standard serial port, which completes the conversion between TTL level and RS232 level[8].

2.2 Sound and light alarm circuit design

This system requires a three-level alarm for dangerous conditions based on the critical value of the distance to obstacles that affect the stability of the loader. When in a low-risk situation, only the green indicator light is lit to remind the driver to pay attention; when the danger level increases, the yellow indicator light is lit, accompanied by a soothing buzzer, reminding the driver to take measures; when the highest danger level is reached, the red indicator light is lit, and the buzzer sound changes from soothing to urgent, reminding the driver to brake quickly.

In the design, P2.20 (GPIOA4) of LPC2290 is used to drive the green LED, P2.21 (GPIOA5) to drive the yellow LED, P2.22 (GPIOA6) to drive the red LED, and P2.23 (GPIOA7) to drive the buzzer. The designed alarm circuit is shown in Figure 3.

Figure 3 Alarm circuit diagram

3 System Software Design

Commonly used embedded operating systems include VxWorks, Windows CE, embedded Linux and μC/OS-Ⅱ. Since the μC/OS-Ⅱ embedded system has open source code and a real-time multi-tasking kernel for multi-tasking scheduling [9], this system uses the μC/OS-Ⅱ embedded operating system.

Due to the use of modular programming, the division of system tasks under μC/OS-II is also based on different functional modules. Each module is decomposed into one or more tasks, and each task is assigned a priority. In this way, once these tasks are established, the scheduling between them is completely completed by μC/OS-II. Combined with the design requirements of this system, serial communication tasks, alarm tasks, and LCD display tasks are created in the program. Its software flow chart is shown in Figure 4.

Figure 4 Software flow chart

After power-on, the hardware is initialized first, then the μC/OS-II operating system is initialized, tasks are established, and multi-task scheduling is performed. The task scheduling of μC/OS-II is preemptive, so when setting the task priority, the real-time requirements of the task should be considered as much as possible. Even if the importance of two tasks is the same, they must have a difference in priority, which means that the high-priority task must enter a waiting or suspended state after processing, otherwise the low-priority task will never be executed. In this system, the priority of the serial communication task is set higher than the LCD display task, and the priority of the LCD display task is higher than the alarm task.

1. The serial communication task completes the data transmission between the ultrasonic ranging part and the ARM processor. The serial communication part mainly includes two parts: user interface function and task function. The serial port has 5 user interface functions, namely deopen(), dclose(), dread(), dwrite() and diocontrol().

The following is part of the program code for the communication between the ultrasonic ranging device and LPC2290:
diocontrol(Uart0_Handles,UART0_SET_MODE, (void *)&Mode0); // Set the UART mode
diocontrol(Uart0_Handles,UART0_SET_TIMEROUT,(void *)5); // Set the receive timeout factor, if parameter = 0, the timeout is turned off
diocontrol(Uart0_Handles, UART0_CLR_FIFO, (void *)0); // Clear the receive soft FIFO
while (1)
{Rece_Count=dread(Uart0_Handles, UART_Rece
_Buff,1); // Read the first start byte sent by the ultrasonic wave and put it into the buffer
if((Rece_Count>0)&&(UART_Rece_Buff[0]== ' @')) // If the read is successful and the first byte is '@'
{dread(Uart0_Handles,&UART_Rece_Buff[1],3); //Receive the last three bytes, which are hundreds, tens and ones respectivelyfor
(i=1;i<4;i++)
UART_Rece_Buff[i]=UART_Rece_Buff[i]+48; //Convert the hexadecimal number to ASCII code valuefor
(i=0;i<3;i++)
sbuff[i]=UART_Rece_Buff[i+1]; //The received data is cached in the array for the LCD display part to call
}
}

2. The LCD display task is mainly to display the data transmitted by the ultrasonic wave in the ARM processor on the LCD screen, so that the driver can see the distance value of the obstacle in real time.

Part of the program code that displays text is as follows:

{ uint32 addr;
uint8 i;
for (i=0;i<24;i++)
/* find out the target address*/
{ addr = (y+i)*(GUI_LCM_XMAX>>3) + (x>>3);
LCD_WriteTCommand3(LCD_ADR_POS, addr&0xFF, addr>>8); // set address pointer
/* output data*/
LCD_WriteTCommand2(LCD_INC_WR, *Buff);
Buff++;
LCD_WriteTCommand2(LCD_INC_WR, * Buff);
Buff ++; LCD_WriteTCommand2(LCD_INC_WR,
*Buff);
Buff++;
LCD_WriteTCommand2(LCD_NOC_WR,*Buff);
Buff++; }
LCD_WriteTCommand3(LCD_ADR_POS, 0x00, 0x00);
// Reset address pointer
}

3. The alarm task is mainly to compare the distance value of the obstacle with the critical value under different alarm conditions through the ARM processor, and complete the corresponding alarm display.

4 Debugging and Results

The system debugging uses the ADS integrated development environment and the EasyJTAG-H emulator. After the program is written and the JTAG interface of the EasyJTAG-H emulator is connected to the MiniARM product, the debugging software can be used to download the program to the ARM board for testing.

Each time the ultrasonic wave detects, the serial port outputs a set of data. The baud rate of data transmission is 9600, including a start bit and three data bits. The results show that the microprocessor does not respond to data frames that do not conform to the set format, does not receive the data sent, and only processes the data that meets the requirements.

The debugging results show that the data of ultrasonic detection can be accurately displayed on the LCD screen in a timely manner, with high communication stability. At the same time, it can accurately display the corresponding alarm phenomena for various dangerous situations.

For the accuracy analysis of this system, we compared the measured values ​​of the ultrasonic sensor with the actual values ​​and plotted them in Table 1.

Table 1 Comparison table of obstacle distance measurement and actual value

When the obstacle distance is greater than 10m, it is found that the ultrasonic sensor measurement data is seriously distorted. After analysis and experiments, it is found that the maximum value of obstacle distance detection by this system is 9.99m. At the same time, from the data in Table 1, it can be seen through analysis and calculation that the measurement error is ≤0.01m.

5 Conclusion

The designed monitoring and early warning system for the obstacle distance of the loader is based on Mini ARM as the processor, considering the working site of the loader and the distance signal that needs to be monitored. Through experimental verification, the system has completed the required functional requirements, with the maximum measurement value of 9.99m and an error of ≤0.01m. It is very convenient to install and easy to use. However, there is a shortcoming of the system, that is, when using ultrasonic sensors to detect road information in front of the vehicle, if it is a raised obstacle, it can be effectively detected, but if it is a pit in front, it cannot be detected, so further research is needed.

Keywords:ARM Reference address:Design of obstacle monitoring and early warning system for loaders based on ARM single chip microcomputer

Previous article:Design and implementation of intelligent parking lot vehicle detection system
Next article:Camera Smart Car Hardware Design Solution

Recommended ReadingLatest update time:2024-11-16 20:58

Development of embedded applications based on μClinux
    The scope of embedded systems is very broad, ranging from simple single-chip microcomputer systems to non-computer systems with operating systems and a main frequency of hundreds of megahertz. With the increasing application requirements of electronic systems in various industries, embedded systems are becoming mor
[Microcontroller]
Development of embedded applications based on μClinux
Key points for developing embedded system programs based on ARM (V)
Introduction As mentioned in the previous article, in many cases, applications need to switch between ARM and Thumb states. This section discusses the implementation methods of interactive work and some precautions. 1 Reasons for interaction As mentioned earlier, Thumb instructions have better performance than
[Microcontroller]
Key points for developing embedded system programs based on ARM (V)
Linux Embedded ARM-Linux Basics
ARM Architecture 1. Please briefly describe the characteristics of ARM processors, and state at least 5 characteristics. (5 points) : low power consumption; low cost, high performance, RISC structure; fixed instruction length; support Thumb (16-bit)/ARM (32-bit) dual instruction sets; small size; 2. Please write the s
[Microcontroller]
Answer the seven working modes of ARM processor
ARM processors have seven working modes: user mode, fast interrupt mode, external interrupt mode, management mode, data access abort mode, undefined instruction abort mode, and system mode. Except for the user mode, the other six are privileged modes. The processor mode can be switched through control, or through exte
[Microcontroller]
Answer the seven working modes of ARM processor
Design of fingerprint recognition access control system based on ARM
  1 Overview   With the continuous advancement of science and technology, people have put forward higher-level security management requirements for modern office and living places. Ordinary door lock systems and manual access management no longer meet the actual needs of modern people. Due to the intelligence and netw
[Microcontroller]
Research and development of human-computer interaction for network-based power quality monitoring device based on ARM
0 Introduction The extensive use of nonlinear, asymmetric, and non-stationary power equipment has brought severe challenges to ensuring the quality of power supply. The power quality problem has attracted more and more attention from users and power supply departments. To take technical measures to improve the
[Power Management]
Learn peripherals one by one for ARM_first
LED lights are used in almost every board, not to mention their importance:   According to the schematic diagram provided by s5pc100, we can see The control register used is GPG3 Check the relevant chip manual: GPG0,1,2,3: 25 in/out pin –3xMMC channel (Channel 0 supports 4-bit and 8-bit mode, but channel 1,
[Microcontroller]
Dealing with the Middle-Endian problem of floating point numbers under ARM
Abstract: This paper describes the floating point storage byte order problem encountered in the process of porting embedded GIS software from X86 platform to ARM architecture platform, and analyzes the problem in detail. It is finally determined to be the Middle-Endian storage problem of floating point numbers under A
[Analog Electronics]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号