With the rapid development of economy, all cities are facing different degrees of traffic congestion. Traffic congestion has become a public nuisance in cities because it seriously affects the normal order of society and also causes the continuous deterioration of urban environment. The impact of traffic congestion on social life is, first of all, the increase in travel time and travel costs; secondly, with the increase in travel costs, it may inhibit travel, resulting in a decline in the quality of life of urban population; in terms of energy consumption and the effective use of urban road traffic, traffic congestion will undoubtedly lead to a serious waste of resources; traffic congestion also has a serious impact on public transportation, which greatly reduces the operating efficiency of public transportation; the harm of traffic congestion to urban environmental quality is another problem that cannot be ignored. Traffic congestion will lead to increased automobile exhaust pollution and make noise pollution more serious.
Vehicle restriction, as an effective measure to solve urban traffic congestion, has been proven in practice and its effect has been recognized by society. Most cities use the scheme of restricting vehicles according to the last digit of the license plate, such as the odd-even number restriction. There are a series of disadvantages in restricting traffic based on license plate numbers: the restricted numbers, time and road sections are too confusing and difficult to remember; on the other hand, some vehicles that really need to travel are restricted, which has a certain degree of impact on the daily life order of some citizens; some families even evade vehicle restrictions by buying a second car, which is contrary to the original intention of the restriction.
In view of the above situation, this paper combines single-chip microcomputer technology and radio frequency identification technology to design a device for counting the number of days a vehicle travels. The vehicle is equipped with an electronic tag to interact with the road collection unit, and the road collection unit identifies and records vehicle information. The license plate information is sent to the traffic control center server, and the travel days calculation system calculates the number of days the vehicle travels as the basis for collecting congestion fees, thereby achieving the purpose of vehicle restriction.
1 Urban vehicle restriction method
At present, urban vehicle restriction is mainly based on the last digit of the vehicle license plate. For example, in Beijing, vehicles are divided into different groups according to the last digit of the license plate, and one or several groups of vehicles with the last digit are designated for restriction every day of the week. This method uses administrative means to forcibly restrict vehicle travel, which is not humane enough.
This paper proposes to collect congestion fees based on the number of days a vehicle travels to achieve the purpose of limiting vehicle traffic. The system simulation diagram is shown in Figure 1. The system mainly consists of a vehicle electronic tag, a collection unit, and a congestion fee calculation system of the traffic control center. When a vehicle passes through the gantry across the lane, an identification unit is installed on the gantry to activate the electronic tag working circuit. The vehicle electronic tag and the identification unit interact with each other and send the license plate information to the identification unit. The collection unit receives the license plate information, stores it in the internal chip, and sends the stored data to the traffic control center server at regular intervals. The vehicle electronic tag consists of a radio frequency chip and a microprocessor. The collection unit above the road includes a radio frequency signal receiving module, a control module, and a data sending module. The radio frequency signal receiving module consists of a receiving antenna and a reader. The control module controls the reception, storage, and transmission of data.
The main functions of the traffic control center congestion fee calculation system are to count the number of vehicle travel days and calculate the congestion fee. This paper mainly studies the acquisition of vehicle travel days. For the congestion fee calculation part, each city can formulate a congestion fee collection plan based on its own actual situation and the number of vehicle travel days. The
system function block diagram is shown in Figure 2. The main work is divided into three stages.
1.1 Wireless RF signal transmission and reception stage
When a vehicle passes near the front of the gantry where the acquisition unit is installed, it is in the radiation area of the reader antenna inside the acquisition unit, and the electronic tag starts to send an encrypted carrier signal to the reader. The two are microwave communications, and the communication operating frequency reaches 2.4 GHz. The sleep-wake-sleep mode is used to control data transmission for the electronic tags of the received vehicles to avoid repeated transmission of vehicle information and reduce power consumption.
The ALHOLA time-division algorithm is used to identify multiple vehicles to prevent collisions in the transmission of multiple tag information. The data transmission between the electronic tag and the reader uses verification and encryption to ensure data transmission security.
After the reader demodulates the received information, it sends the data to the control module.
1.2 Control module information processing and data transmission
The control module first determines whether it is a vehicle in this city based on the first two digits of the license plate (only local vehicle travel data is recorded). If it is a vehicle in this city, it is stored, otherwise it continues to read the next information. The license plate information is encoded in combination with the date of the day and stored in the memory. The
control module uses a microprocessor as the control chip, and an external storage chip is used to save data. The Ethernet controller chip is selected to connect to the external Ethernet network through the RJ45 interface. The transmission protocol complies with the standard TCP/IP protocol and sends the data to the traffic control center server.
1.3 Congestion fee calculation system
The collection unit sends the vehicle travel information of the day to the traffic control center server. The vehicle travel information in each unit is screened, and duplicate data is removed to obtain the vehicle travel information of the day. At
the end of the month or the end of the year, the vehicle travel information is counted to obtain the total number of travel days of the vehicle per month or year, and then the congestion fee can be collected based on the number of vehicle travel days. The
traffic control center should make necessary public announcements on the road sections where the collection unit is installed and the congestion fee collection rate. The owner is notified of the number of travel days in the month and the amount of congestion fee to be paid by SMS every month. At the end of the year, the traffic control center summarizes and calculates the congestion fee that the vehicle should pay for the year, and notifies the owner of the time to pay the congestion fee. For overdue payment, arrears, etc., the traffic control center can impose appropriate fines on the vehicle as a necessary warning. For the deliberate destruction of electronic tags and other behaviors to evade vehicle identification, education and fines are adopted to ensure the vehicle identification rate and improve the effect of urban vehicle restriction.
2 Hardware Design
The hardware structure of the system mainly includes the RF transceiver chip CC2430, Ethernet controller RTL8019AS, storage chip, and network isolation transformer. The CC2430 chip automatically completes the packaging, encoding, and modulation of the data signal at the sending end, converts it into RP, and sends it to the antenna through the back-end input/output matching circuit to complete the signal transmission. The receiving end demodulates and unpacks the useful signal received from the antenna through CC2430, performs CRC check, and finally stores the data. The 8051 microcontroller inside the CC2430 chip controls the Ethernet controller RTL8019AS to send data. The main chips used are RTL8019AS, CSl93C46 (64×16 b E2PROM), 74HC573 (8-bit latch), and 62256 (32KBRAM). In order to allocate the address space, CSI93C46 is used for read (or write) operation to set the I/O base address and Ethernet physical address of the RTL8019AS port. As the central processor, 8051 can control the RF chip to sleep or wake it up to send and receive data. The two external interrupt input terminals of 8051 are connected to switches K1 and K2 respectively. The function of switch K1 is to use external interrupt to exit the power-down mode of the microcontroller, and the function of switch K2 is to realize the data transmission control inside the microcontroller. As the central processor, the 8051 microcontroller not only needs to control the wireless signal transmission and reception, but also needs to control the Ethernet controller. In the software design, it is necessary to determine whether the license plate information is for the city's vehicle, store the data, and send or receive the control signal sent by the traffic control center according to the clock timing to perform data transmission operations; the RF transceiver chip is mainly used as the sending and receiving device of the system. It is used to realize the given vehicle information. Its main function is that it can realize the data interaction between the electronic tag and the acquisition unit; the RTIL8019AS chip is mainly used to realize the mutual communication between the microcontroller and the remote PC through Ethernet. The serial port of 8051 is changed to the RJ 45 interface that can be involved in Ethernet. The data transmission follows the standard TCP/IP protocol.
2.1 Electronic tag & reader
CC2430 is a true system-on-chip (SoC) CMOS solution that can improve performance and meet the requirements of low cost and low power consumption for 2.4 GHz ISM band applications based on ZigBee. It combines a high-performance 2.4 GHz DSSS (direct sequence spread spectrum) RF transceiver core with an industrial-grade compact and efficient 8051 controller. CC2430 integrates ZigBee radio frequency (RF) front end, memory and microcontroller on a single chip, using an 8-bit MCU (8051), with 32 KB/64 KB/128 KB programming flash memory and 8 KB RAM, and also includes analog/digital converter (ADC), timer, AES-128 security coprocessor, watchdog timer, sleep mode timer with 32 kHz crystal oscillator, power-on reset circuit, power-off detection circuit and 21 programmable I/O pins. The target code of CC2430's 8051 core is compatible with the standard 8051 microprocessor, and the standard 8051 assembler and compiler can be used for software development. Its 21 programmable I/O pins can set the bits and bytes of a group of SFR registers through software, so that these pins can be used as normal I/O ports or as peripheral I/O ports connected to ADC, timer or USART components. The
CC2430 circuit connection diagram is shown in Figure 3. The circuit uses CC2430 chip as the core component of the electronic tag and the reader in the acquisition unit. A 32.768 kHz quartz resonator and two capacitors are selected to form a 32.768 kHz crystal oscillator circuit; a 32 MHz quartz resonator and two capacitors are selected to form a 32 MHz crystal oscillator circuit (the specific crystal oscillator circuit diagram is omitted). The voltage regulator can power all internal power supplies that require 1.8V voltage. The capacitor is used as a decoupling capacitor for power supply filtering to improve the stability of the chip. In the circuit, J2 is the I/O pin JTAG emulator interface. J1 is the CC2430 chip expansion output port, and the SPI port and the entire P0 I/O port are mainly reserved on the expansion output port. Two light-emitting diode indicator lights are designed as circuit debugging indicators. An unbalanced antenna is used. In order to make the antenna perform better, an unbalanced transformer is connected between the antenna and CC2430. The balun is composed of a capacitor, three inductors and a PCB microwave transmission line. The entire structure meets the RF input/output matching resistance (50 Ω) requirement.
In the electronic tag, the microcontroller chip 8051 controls CC2430, and sends the data to be sent to CC2430 through the SPI port. CC2430 automatically completes the packaging, encoding, and modulation of the data signal, converts it into an RF signal, and sends it to the antenna through the back-end input/output matching circuit to complete the signal transmission. The data reception in the acquisition unit reader demodulates and unpacks the useful signal received from the antenna through CC2430, performs CRC check, and then sends it to the microcontroller chip for processing and outputs it through the RS 232 conversion chip. After the above process, data is sent and received. The schematic diagram of the RF transceiver design is shown in Figure 4. The dotted line part is the reader part, which is sent to the Ethernet controller through the RS 232 serial port.
2.2 Ethernet Controller
For the Ethernet data transmission part, the Realtek RTL8019AD Ethernet controller is selected. It has excellent performance and low price and occupies a considerable proportion in the market. Its main performance is as follows:
(1) It complies with Ethernet II and IEEE 802.3 (10Base5, 10Base2, 10BaseT) standards;
(2) Full duplex, the transmission and reception can reach a rate of 10 Mb/s at the same time;
(3) Built-in 16 KB SRAM for transmission and reception buffer, reducing the speed requirement of the main processor;
(4) Supports 8/16-bit data bus, 8 interrupt request lines and 16 base address selections;
(5) Supports UTP, AUI, BNC automatic detection, and also supports automatic polarity correction for 10BaseT topology;
(6) Allows 4 diagnostic LED pins to be programmable output;
(7) 100-pin PQFP package reduces PCB size.
Figure 5 shows the interface circuit of 8051 microcontroller controlling RTL8019AS to realize communication with Ethernet. The network interface adopts UTP RJ 45 interface. The main chips used are RTL8019AS, CSI93C46 (64×16 b E2PROM), 74HC573 (8-bit latch), 62 256 (32 KB RAM). [page]
In order to allocate the address space, the port I/O base address and Ethernet physical address of RTL8019AS are set by reading (or writing) CSI93C46. CSI93C46 is a Serial E2PROM with a 4-wire SPI serial interface and a capacity of 1 Kb. It mainly stores the configuration information of RTL8019AS. RTL8019AS receives the status of the DO pin of CSI-93C46 through ESDO by controlling the CS, SK, and DI pins of CSI93C46. After RTL8019AS is reset, it reads the content of CSI93C46 and sets the value of the internal register. If the content in CSI93C46 is incorrect, it will not work properly. First, write the configured data into CSI93C46 through the programmer, and then solder it into the circuit.
10BaseT wiring is used to mark Ethernet communication through twisted pair cables, and RTL8019AS has a built-in 10BaseT transceiver, so the circuit of the network interface is relatively simple. An external isolation LPF filter 0132 is connected, TPIN+/- is the receiving line, TPOUT+/- is the sending line, and after isolation, they are connected to the RX+/- and TX+/- ends of the RJ 45 interface respectively.
The clock circuit is connected to a 20 MHz crystal oscillator and two capacitors through T1 and T2 to achieve full-duplex mode.
LED0 and LED1 are each connected to a light-emitting diode to reflect the communication status: LED0 represents LED_COL, that is, there is a communication conflict; LED2 represents LED_RX, that is, the information packet on the Internet is received.
2. 3 Hardware transmission performance and power consumption
The free space propagation distance is related to the transmission power, receiving sensitivity and the carrier frequency used. Its mathematical expression is:
Where: d is the propagation distance; Lp is the free space loss; c is the speed of light; f is the carrier frequency. From theoretical calculations, it can be seen that the maximum recognition distance of CC2430 can reach 1500 m. In practice, due to external interference, obstacles and air quality, the recognition distance cannot reach the theoretical length. Table 1 shows the test results of long-distance data transmission and reception using CC2430. Assume that the data packet size is 32 B and the data rate is 1 MHz. 100 data packets are sent from the electronic tag to the acquisition unit and from the acquisition unit to the electronic tag, respectively, and the number of correct data packets received is recorded. It can be seen that within a range of less than 40 m, the acquisition unit can realize the full recognition of the vehicle without packet loss. In actual use, various other interferences may be encountered, and anti-interference ability is one of the issues that the system needs to consider.
The system uses low-power devices. The active devices in the electronic tag include voltage conversion chip and CC2430. Their working current is 3.5μA and 27 mA (receive)/25 mA (send) respectively. And it adopts the sleep-wake-sleep working mode, and the power consumption is lower when in sleep. Just add a battery to meet the use of 3 to 5 years. Achieve low-cost, low-power, high-performance system requirements.
3 Software Design
The software design is divided into CC2430 for wireless transceiver and single-chip microcomputer control Ethernet for data transmission. The difficulty of software design lies in the transceiver of RF chip data. The following mainly introduces the control of RF data transceiver and Ethernet data transmission, and briefly analyzes the operation of these two aspects.
3.1 RF data transmission protocol The
data transmission between the electronic tag and the acquisition unit follows the ZigBee wireless network transmission protocol. The ZigBee protocol is established on the basis of the IEEE 802.15.4 standard and works in the unlicensed 2.4 GHz frequency band. It stipulates technical standards for networking, security and application software. It is composed of a group of sublayers, each of which provides a group of specific services for its upper layer: data entities provide data transmission services, and management entities provide all other services. Each service entity provides a service interface to the upper layer through a service access point (SAP), and each SAP provides a series of basic service instructions to complete the corresponding functions. The architecture model of the ZigBee protocol stack is shown in Figure 6. The IEEE 802.15.4 standard defines the physical layer (PHY) and the medium access control sublayer (MAC); the ZigBee Alliance defines the design of the network layer and application layer (APL) framework. The application layer framework mainly includes three parts: the application support sublayer (APS), the ZigBee device object (ZDO), and the application object specified by the manufacturer.
The ZigBee protocol stack solves the network networking problem very well. The entire protocol stack has good security, strong hierarchy, low power consumption, and can realize mesh network. In the ZigBee 2006 protocol stack, the underlying drivers of CC2430 have been fully solidified in the protocol stack and can be directly called. The CC2430 chip is selected as the hardware core chip of the wireless communication module, and the ZigBee 2006 protocol stack is selected in the software part to realize the communication function between wireless modules.
3.2 The RF data transceiver processing program
uses the software IAR 7.30B to develop the program. The system software is based on the ZigBee 2006 protocol stack provided free of charge by TIChipcon, and is based on the GenericApp routine in the Zstack-1.4.3-1.2.1 version. The serial port part and the data receiving and sending part programs are given below.
3.2.1 Serial port initialization
mainly sets the member values of halUARTCfg_t structure:
by assigning values to halUARTCfg_t, you can set the baud rate, number of characters, data bits, stop bits, parity bits, etc. Among them, callBackFunc is a custom serial port callback function, that is, once there is data transmission at the export, OSAL will automatically switch to the custom callback function and perform custom operations.
3.2.2 Data reception
When data is sent to the application layer through wireless, the application layer will send an AF_INCOMING_MSG_CMD message event.
Here it means that the AF_INCOMING_MSG_CMD message event is received, and then the information processing function GenericApp_MessageMSGCB (MSGpkt) of the received message event is called to start receiving data and send and receive data by calling the serial port HalUARTWrite (uint8 port, uint8*buf, uintl6 len) write function.
3.2.3 Data transmission
When data is input in the serial port callback function, the application layer will send a GENERICAPP_SEND_MSG_EVT message event.
Call the GenericApp_SendTheMessage() data transmission function, which is the AF_DataRequest() function in the ZigBee 2006 protocol stack provided by TI/Chipcon. The specific form is as follows:
3.3 The Ethernet data transmission control
program is compiled in Franklin C51 language, which is highly readable, portable and easy to develop.
3.3.1 Initialize RTL8019AS
Connect RTL8019AS's RESDRV through C51's P3.4 to perform reset operation. RSTDRV is valid at high level, as long as a high level of more than 1μs is applied to the pin.
Initialize the relevant registers of page 0 and page 1. The registers of page 2 are read-only and cannot be set. The registers of page 3 are not compatible with NE2000 and do not need to be set.
(1) CR = 0x21, select the register of page 0;
(2) TPSR = 0x45, the starting page address of the send page, initialized to point to the page of the first send buffer, that is, 0x40;
(3) PSTART = 0x4c, PSTOP = 0x80, construct the buffer ring: 0x4C ~ 0x80;
(4) BNBY = 0x4c, set the pointer;
(5) RCR = 0xcc, set the receive configuration register, use the receive buffer, only receive data packets with its own address (and broadcast address data packets) and multicast address packets, discard packets less than 64 B, and do not receive data packets with error verification;
(6) TCR = 0xe0, set the transmit configuration register, enable CRC automatic generation and automatic verification, and work in normal mode;
(7) DCR = 0xe8, set the data configuration register, use FIFO buffer, normal mode, 8-bit data DMA;
(8) IMR = 0x00, set the interrupt mask register, mask all interrupts;
(9) CR = 0x61, select the register of page 1;
(10) CURR = 0x4d, CURR is the pointer of RTL8019AS to write memory, pointing to the next page of the page currently being written, and points to 0x4c + 1 = 0x4d when initialized;
(11) Set the multi-address registers MAR0 ~ MAR5, all set to 0x00;
(12) Set the network card address registers PAR0 ~ PAR5;
(13) CR = 0x22, select the register of page 1, and enter the normal working state.
3.3.2 Sending frame
The data to be sent is encapsulated in the frame format and sent to the sending buffer area in RTL8019AS through the remote DMA channel, and then the transmission command is issued to complete the frame transmission. It is necessary to set the Ethernet destination address, Ethernet source address, and protocol type, and then set the data segment according to the set protocol type. After that, start the remote DMA, write the data into the RAM of RTL8019AS, and then start the local DMA to send the data to the Internet.
RTL8019AS cannot store the entire data packet into FIFO through the DMA channel at one time, so it must wait for the previous data packet to be sent before constructing a new data packet. In order to improve the transmission efficiency, the design divides the 12-page transmission buffer into two 6-page transmission buffers, one for data packet transmission and the other for constructing new data packets, which are used alternately.
Through debugging, a constructed ARP request packet is received by a PC, and the receiving effect is satisfactory.
4 Conclusion
Using the wireless transceiver function of CC2430, combined with the microcontroller and Ethernet to achieve remote communication, a set of urban traffic restriction system for vehicle identification is designed. The system uses the advantages of CC2430 such as low power consumption, low cost and high performance to achieve vehicle identification. The information interaction between the roadside collection unit and the remote computer is realized by using the RTL8019AS Ethernet controller with superior performance and low price. The system mainly completes vehicle identification and vehicle information transmission. After testing, it can accurately identify vehicles and meet the requirements of travel days statistics. The traffic management department can use the vehicle model information to count the number of vehicle travel days as the basis for collecting congestion fees, thereby realizing vehicle restrictions.
Previous article:Circuit Design of Intelligent Real-time Tire Monitoring System Based on CAN Bus
Next article:How to use MCU to improve the performance of automotive design
Recommended ReadingLatest update time:2024-11-16 16:20
- Popular Resources
- Popular amplifiers
- Radio Frequency Identification (RFID) System Technology and Application (Written by Ci Xinxin, Wang Subin, and Wang Shuo)
- Introduction to Internet of Things Engineering 2nd Edition (Gongyi Wu)
- MCU C language programming and Proteus simulation technology (Xu Aijun)
- Principles and Applications of Single Chip Microcomputers 3rd Edition (Zhang Yigang)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- A brief introduction and configuration of 28335 external interrupt
- Analyze the relationship between J-link hardware, firmware, and drivers
- [ST NUCLEO-G071RB Review]_05_System clock configuration and Tetris game implemented on the serial port
- stm32F429 uses analog IIC to drive AD5933 to measure human body impedance (small impedance). After writing to the register, all the results read are FF.
- Based on FM33LC0xxN series BLDC solution information (schematic diagram + routine)
- MaixSense R329 development board armbian system test (Part 2)
- AT24C1024 full capacity read and write NXPLPC11XX source program
- TDA2030A single power supply amplifier circuit diagram
- Matlab Image Processing Application Collection
- Switching power supply related issues