1、基于ARM交通监测设计英语Design of Control Unit of Traffic Detection System based on ARMDu Rongyi Ye Qing Li XueCollege of Electrical and Information Engineering, Changsha University of Science &Technology, Changsha 410076, China E-mail:AbstractAccording to the system requirements, vehicledetection system based
2、 on double induction loops hasbeen designed. Control unit of traffic detection systemdesigned with the core of LPC2138 has been describedin detail. And the function of each hardware modulehas been analyzed. For bad experiment environmentand various interference factors, anti-interferencemeasures hav
3、e been considered and introduced intosoftware and hardware design. Hardware implementation and software flow of control unit havebeen described in detail. The result of the systemapplication shows that, compared to traditional control units with the core of singlechip, the control unit have characte
4、ristics of better information handling ability, faster speed , and better communication ability etc. The main function of the traffic detection system is to examine the speed, the flow, the vehicle type and the lane occupancy of the motor vehicles. The method based on ARM embeddedsystem in this pape
5、r provides a new means for thetraffic detection system research. Finally the prospect for further research is presented.1. IntroductionAlong with global economic development, the research of the traffic intelligent monitoring becomesone of the research focuses of countries. Through thereal-time coll
6、ection, transmission and processing of the related traffic information, the current traffic operationstatus is grasped and future traffic condition is forecast.And with the aid of various equipment and means, different traffic conditions are dealt with. Also throughpowerful information communication
7、 means, thetraffic information will be learnt by users rapidly. Thus, traffic efficiency and safety are effectivelyimproved, traffic facilities are fully utilized, and thetraffic intensive development is realized. Road trafficdetection system, specially its control unit is the keylink of the researc
8、h of the intelligence transportation system (ITS. The ARM embedded processor2 as a kind of 32 bits RISC chip with high performance and low power has the characteristics of supporting multi-operation system, high main frequency, and strong operation and processing ability etc. It also has mass and lo
9、w price SDRM data memory. This article takes ARM rather than traditional singlechip as the detection signal transmission processing module to design road traffic detection system. It provides a better thinking for thefurther research and a wider application space. 2. Detection Algorithm The conventi
10、onal single-coil detector can detect the vehicle flow and the lane occupancy in a period of time. To each lane buried coil, the definitions of the two basic parameters are as follows 3, T NQ = (1 =N j jiN j j v l T t T O 1111 (2 Where, Q is vehicle flow; O is lane occupancy in sampling period T ; N
11、is the sum of vehicles passing through in the sampling period; j t is the used time of the jth vehicle passing through the coil; j l is effective vehicle length of the jth vehicle or the sum of the loop length and the vehicle length; and j v is the jth vehicles speed. To the traffic management and t
12、he control, the vehicle speed is a key parameter to respond roadconditions and questions appears in traffic. But the conventional single-coil detector cannot measure vehicle speed. Therefore double loops are used to measure vehicle speed. It also can measure vehicle 2008 International Conference on
13、Intelligent Computation Technology and Automationlength etc. to be applied in fuzzy recognition of vehicle types. The principle of measuring the vehicles speed andlength based on double loops is as shown in Fig. 1. Fig. 1 Principle graph of measuring the vehicles speed andlengthMeasure the time inte
14、rval 0t for vehicle from the loop1 to loop2, and the time 1t from entering to leaving the loop2. For the loops width is 0l and the loop space is 1l , so the vehicle speed is 6010/ (t l l v += (3And the vehicle length is2( (1010l l t t v L += (43. Hardware DesignThe main function of the coil traffic
15、detection system is to examine the speed, the flow, the vehicle type and the lane occupancy of the motor vehicles. It also can control the functions of information display, system detection and scheduling of the variable information board in monitoring system through detection signal 1. Thus, it is
16、widely applied in the situations of expressway toll-gate, expressway security bayonet, expressway ramp control, urban intersection red-light-running monitoring and urban intersection traffic signal control5 etc. The coil traffic detection system selected for this study is composed of loop-coil vehic
17、le detector system and host computer controlsystem. The system diagram is as shown in Fig. 2.Fig. 2 Traffic detection system diagramThe loop-coil is usually realized by several cable lines enwinding. Its size is 21.5 meters. The loop-coil is connected to the vehicle detector module through wiring te
18、rminal. It constitutes the LC oscillation circuit to detect vehicles passing condition. A 5V power source and double-lanes loop-coil vehicle detection module is included in the vehicle detector. The communication between the vehicle detector and PC apply the RS232 or RS485 according to actual system
19、 situation. The main function of the vehicle detector is to monitor each traffic lanes traffic condition, carry out data acquisition and processing, as well as failure detection etc. The major function of the host computer control system is to realize the field set of the vehicles detectors working
20、parameters. Simultaneously, it can inquire and receive the traffic data from the lower computer.According to the demand and application environment of the traffic detection system, and comprehensively considering the factors of performance price ratio and chip resources, the high-performance 32bits
21、LPC2138 is chosen. LPC2138 is a microcontroller of PHILIPS Corporation. It is based on a 16 /32 bit ARM7TDMI-STM CPU 2 and has a 152KB high speed embedded flash memory. The ARM7TDMI-S TM CPU can carry out real-time simulation and embedded trace. 128 bits memory interface and the unique accelerating
22、structure enable 32 bits codes to run under the maximum clock rate. To the application with strict demand of code size, the 16 bits Thumb pattern can be used to reduce the code size above 30%, but the performance loss is a little.The hardware constitution of the control unit of the traffic detection
23、 system is shown in Fig. 3. Human-machine interface module is composed of LED display, dial switch input and reset button input. 8 bits LED lamp is used to display the detection parameters and various lanes working states. The dial switch is used to set up detection parameters, and the reset button
24、realizes the manual chip reset function.Digital I/O module is constituted with 4-path optical-isolation inputs. The optical-isolation chip isapplied with 4 pieces of dip TPL521. A piece of LM393 is used to transfer the sine calibrate signal produced by oscillation circuit into the 3.5V square-wave s
25、ignal. Then the signal is sent to CPLD. The 5V DC power is input from the interface Plug1. The diode IN1 is used to limit the transient current and filter. Then the power will be constant to 3.3V through the LM1117/3.3. The voltage amplitude of the wave reshaped is about 3.3V, which meets our requir
26、ement. LDO chip is of the series M1117. Its output current may reach 800mA and the precision of its output voltage may less than 1%. It also has the function of current limitation and hot protection. In application, a tantalum capacitor above 10 F is usually necessary to connect with the output end.
27、 It can improve the transient response and stability 6.To transplant embedded real-time operation system in ARM can make the detector conveniently realize Multi-lane information collection and processing simultaneously. It also can improve the system reliability and give full play to multi-mission p
28、otential of the 32 bits CPU.Fig. 3 Hardware diagram of control unit4. Software design for ARMThe main functions of ARM are to read the counters value of the CPLD and calculate the time of vehicles passing through the loop. Then it will carry on the processing to the values of shift and character tra
29、nslation etc. And send the values processed to the host computer by serial port.The timing process of ARM is that, (1when vehicle arrives at loop1, a activate signal presents a negative pulse to make the ARM timer start timing;(2 another signal presents a negative pulse to make ARM timer stop timing
30、. Then the time values obtained will be sent to PC through the serial port.The process reading CPLD counters values for ARM is that, when the CPLD counting finished (DatebusOk=0, ARM reads the CPLD countersvalues through its 8-bit data lines. The data will be carried out classification processing an
31、d stored in the buffer area. When the data number in the buffer reached the setting maximum, the data will be transmitted to PC through the serial port by ARM. The entire working process of ARM shows in Fig. 4.Fig. 4 Program flow chart.In the software anti-interference design, the internal watch-dog
32、 of the LPC2138 is used and initializing program of the watch-dog is as follows, WDTC = 0x10000; WDMOD = 0x03; Void WdFeed(void WDFEED = 0xAA; WDFEED = 0x55; The anti-hunting program is introduced in the judgment of the input pins condition for ARM. It is to prevent the misreading caused by the signal shaking. Anti-hunting program is that, void WaitSignal(void uint32 i; While (1 while (IO0PIN&DateOK!=0;for(i=0;i5000;i+; /soft delay, anti-hunting if(IO0PIN&DateOK!=0break; while(IO0PIN&DateOK!=0;
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1