Design and application of intelligent vehicle detector based on C8051F121

Publisher:RainbowMelodyLatest update time:2016-09-08 Source: eechinaKeywords:C8051F121 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
1 Introduction

With the accelerated development of China's transportation infrastructure construction, the traffic volume is growing rapidly, and with it comes road congestion, air pollution, and the harm caused by traffic accidents. In order to alleviate road congestion, improve travel conditions, and improve road safety, the intelligent traffic control system, as a non-site law enforcement means, can quickly monitor, capture, and remotely transmit various illegal phenomena such as running red lights, speeding, driving in the wrong direction, changing lanes illegally, and crossing yellow lines. In order to quickly obtain evidence of violations and deal with traffic violations in a timely manner, it provides an effective monitoring method and plays a positive role in reducing and avoiding traffic accidents. Therefore, the vehicle detector developed in the article is to provide sufficient information for the intelligent traffic control system for optimal control. From the application form of the intelligent traffic control system, it can be seen that the intelligent vehicle detector is an important part of traffic information collection.

2 Vehicle detector

The vehicle detector is an indispensable part of the highway and urban traffic road monitoring system. It mainly provides various traffic parameters to the information processing and information release units in the monitoring system through data collection and equipment monitoring. It serves as the main basis for the monitoring center to analyze, judge, issue information, and propose control plans. Therefore, the level of vehicle detectors and their detection technology directly affects the overall operation and management level of the highway traffic monitoring system. The

toroidal coil vehicle detector we currently use on site is a vehicle detector based on the principle of electromagnetic induction. Its sensor is a toroidal coil (generally 2 meters x 1 meter) buried under the road surface and passed with a certain operating current . When a vehicle passes through the toroidal buried coil or stops on the toroidal buried coil, the vehicle's own iron cuts the magnetic flux line, causing the change of the inductance wall of the line. The detector can detect the presence of the vehicle by detecting the change in inductance. There are generally two ways to detect this inductance change: one is to use a phase latch and a phase comparator to detect the change in phase. The other way is to use a coupling circuit composed of a loop of toroidal buried coils to detect its oscillation frequency. We use the latter detection method here. Under normal circumstances, when the motor vehicle is not at the location of the toroidal buried coil, the oscillation frequency of the coupling circuit remains constant. The number of pulses measured in a unit time period remains basically unchanged. When the motor vehicle passes the location of the toroidal buried coil, due to the increase in the oscillation frequency of the coupling circuit, the toroidal buried coil is detected. The number of pulses measured by the microcontroller in a unit time period also increases accordingly. When there is no motor vehicle at the location of the buried coil, the number of pulses measured by the microcontroller in a unit time period is PN. When a motor vehicle passes the location of the buried coil, the number of pulses measured by the microcontroller in a unit time period is PM. The pulse increment △E is the difference between PM and PN, that is, △E=PM-PN. The empirical threshold △T of the pulse increment is pre-set in the EEPROM. When △E≥△T, it is considered that there is a car. When △E<△T, it is considered that there is no car, thereby judging whether there is a vehicle passing through the current lane.

3 Vehicle detector hardware design

The vehicle detector is an application system based on the C8051F121 chip as shown in Figure 1. Each channel is enabled to generate an oscillation signal after being selected by the 74HC18 three-wire decoding chip. The oscillation signal generated by the circuit shown in Figure 2 is then shaped by the integrated operation LM293 shaping circuit (Figure 3) to form a pulse signal and sent to the ECI pin of the C8051F121 chip. The programmable counter and capture module function are used to start the timer T0 to count the pulse signal and determine whether there is a vehicle passing through the current lane. When a vehicle passes by, the vehicle status is displayed on the panel of the vehicle detector and converted into a standard RS232 signal through the UART0 interface of the C8051Fl21 chip via the MAX202 serial port chip (Figure 4). The vehicle status data is sent to the host computer and processed by the background software to realize the function of capturing illegal vehicles. In the application, the RS422 signal sent from the red light signal board is sent to the UARTI interface of the C8051F121 chip after being converted by the MAX488 chip. The received data is then sent to the host computer through the UART0 interface.

1.gif 
Figure 1 Schematic diagram of vehicle detector

2.gif 
Figure 2 Oscillator circuit

3.gif 
Figure 3 Pulse shaping circuit

4.gif 
Figure 4 RS232 level conversion circuit

Working mode of vehicle detector: Programmable counter array (PCAO) can provide enhanced timer function. It requires less CPU intervention. PCAO contains a dedicated 16-bit counter, timer and 6 16-bit capture/compare modules (CEXn) and each capture/compare module has its own I/O line. This device uses CEX0 module, which is programmed as an independent working mode of 8-bit pulse modulation ( PWM ) output. When the low byte (PCAOL) of PCAO counter/timer is equal to the value in PCAOCPL0, the output of CEXO is high. When the count value in PCAOL overflows, the output of CEXO is set to low. When the low byte PCAOL of counter/timer overflows from 0xFF to 0x00, the value stored in the high byte (PCAOCPLHO) of counter/timer is automatically loaded into PCAOCPLO without software intervention. The pulse signal (EC1) of the external channel oscillator output signal shaped by the pulse shaping circuit is selected as the time base of programmable counting PCA.

4 Vehicle detector software design

In the process of Figure 5, it can be seen that the output frequency of the oscillating circuit using the ground sensor coil as the vehicle sampling is shaped by LM393 as the input pulse of ECl0, and the negative jump of ECI is effective. When the output of CEX0 is 1 (i.e. /INTO=1) and TR0=1, the timer counting function is started. The pulses input to ECl0 are counted in the corresponding time period. As the current vehicle sampling value, it is compared with the initialization value (when there is no vehicle) and the experience value when the system is running. It is thus determined whether there is a vehicle passing through the ground sensor coil in the current lane. When a vehicle passes and is detected, the vehicle status data is updated in time. At the same time, it is displayed on the panel of the vehicle detector and sent to COM1 of the embedded computer system through the RS232 port (COM1 port of the board). The background software receives the vehicle status signal and determines that it is in the red light signal time period. The digital camera is started according to the set violation phenomenon, and the capture command is sent through the USB data cable. Thus, three consecutive pictures of the illegal vehicle are obtained.

5.gif 
Figure 5 Basic flow chart

5 Conclusion

The toroidal coil vehicle detector is the most widely used vehicle detector in the world. It has become the most popular vehicle detector with its mature technology, easy to master, and accurate counting. This article is based on the hardware platform of the CIP-51TM microcontroller core system on chip (SOC) C8051F121 chip of Silicon Lab, USA. The hardware circuit design, interface circuit design and software design of the device are comprehensively discussed and studied in this article. The experimental results show that the device has the characteristics of low power consumption, low cost and powerful functions. It makes full use of the resources provided by the chip and meets the needs of intelligent vehicle detectors.
Keywords:C8051F121 Reference address:Design and application of intelligent vehicle detector based on C8051F121

Previous article:Design of vehicle monitoring terminal based on GPS/GPRS/RFID
Next article:Production of keil c51 header file

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号