Abstract: A digital bus station system based on ARM7 and CPLD architecture is proposed. The system communicates with the bus control center in real time through the GPRS module, uses CA authentication to ensure the security of communication, and uses two SRAMs to form a high-speed cache with "ping-pong logic" to ensure the continuity of display data. It can realize the dynamic display of multiple line information in the same station, real-time vehicle arrival forecast, public information release, timely update of line information, and online system upgrade. It has the characteristics of good real-time performance, high security, and strong scalability.
In view of the shortcomings of existing printed bus stops, such as providing little information, being unable to provide vehicle arrival forecasts, and being troublesome to add or modify route information, this paper proposes a new digital bus stop system. The system is based on ARM7 and CPLD architecture, communicates with the bus control center via GPRS, and uses CA authentication to ensure the security of communication. It can realize real-time vehicle arrival forecasts, release public information (such as weather forecasts, important news, traffic conditions, emergency information), timely update of route information, and online system upgrades. It has the characteristics of good real-time performance, high security, and strong scalability, which helps to comprehensively improve the information service level of urban bus stops.
1 Overall structure and working principle of digital bus stop system
The system is divided into four parts: control center, kiosk terminal communication module, kiosk terminal control module, and kiosk terminal display module. The overall structure diagram is shown in Figure 1. The composition and working principle of each part are introduced as follows:
(1) Control center: responsible for monitoring the operation of buses in the city or a certain area, including information collection, information processing, real-time bus dispatch, platform display control and other functions. The control center establishes wireless communication with each kiosk terminal through GPRS to achieve relevant control of the kiosk terminal. In addition, the control center also updates the vehicle arrival time forecast in real time based on the GPS installed on the bus, combined with the vehicle speed and road condition information.
(2) Kiosk terminal control module: It consists of the core chip ARM and its peripheral devices. It receives the information frame sent by the control center through the GPRS module, executes the control command issued by the control center, and completes the font library search according to the display information sent by the control center, and writes into the high-speed data cache composed of two SRAMs. The two SRAMs use "ping-pong logic", that is, at a certain moment, the ARM chip writes display data to one SRAM, and the other is read by the CPLD at this time. The two are switched in turn to ensure the high speed of data and the continuity of display. To ensure the security of the system, each kiosk terminal has a key. This key is written when the device is initialized. The external interface cannot access this key information. ARM completes the decryption of the received information frame based on this key. If an information frame that cannot be verified is encountered, the system considers that the information frame has been tampered with and discards it. In addition, since each kiosk terminal needs to work continuously for a long time, in order to prevent the temperature from being too high and causing the system to malfunction or even cause a fire, each kiosk terminal is equipped with a heat dissipation device, including a temperature sensor and a cooling fan. ARM obtains the temperature inside the kiosk terminal through the temperature sensor. Once it finds that the temperature exceeds the set value, it immediately starts the cooling fan to ensure that the system can work for a long time.
(3) Kiosk terminal display module: It consists of CPLD, LED scanning drive circuit, and LED dot matrix display screen. CPLD reads data from the cache consisting of two SRAMs to complete the scanning drive process of the LED display screen. Its internal solidified digital logic generates screen display control signals, including serial data shift signals, data latch signals, row scanning signals, etc. The LED display screen row scanning circuit and column data circuit drive the LED display screen according to these signals.
Figure 1 System overall structure diagram[page]
2 System Hardware Design
2.1 Kiosk terminal control module
The core chip ARM of the kiosk terminal control module is connected to the control center through the GPRS module, and completes the CA verification of the data frame (including control commands and display information) sent by the control center; it writes the Chinese character dot matrix information to be displayed into a high-speed data cache composed of two SRAMs using "ping-pong logic" to control the CPLD to accurately read the data in the cache. The GPRS module uses the BenQ M22 GPRS wireless module, which can realize automatic network connection and protocol processing without the support of a background computer. It uses the RS-232 serial port communication standard to communicate with ARM, with a baud rate of 57.6k. ARM uses the LPC2378 produced by NXP. The LPC2378 is an ARM7TDMI-S processor that can run at a working frequency of up to 72MHz. The chip has UART, hardware I2C, SPI and timer peripheral components [2]. Its rich on-chip and off-chip resources, fast responsiveness and high cost performance are very suitable for high-speed serial port communication and CA authentication. In addition, for safety reasons, ARM is also connected to a heat dissipation device, including a temperature sensor and a cooling fan. ARM monitors the temperature of the kiosk terminal in real time through the temperature sensor. Once the temperature exceeds the set value, the cooling fan is immediately started to ensure that the system can work uninterruptedly for a long time. The kiosk terminal control module also includes Flash, JTAG debugging port, etc.
2.2 Kiosk terminal display module
The kiosk terminal display module consists of CPLD, LED scanning drive circuit, and LED display dot matrix. The scanning drive circuit of the LED display is implemented by CPLD. CPLD reads the data in the cache, and its internal solidified digital logic generates screen display control signals, including serial data shift signals, data latch signals, line scanning signals, etc., to complete the scanning drive process of the LED display. The CPLD function is implemented by programming in the hardware description language VHDL, which can greatly shorten the development cycle, make the design flexible and easy to modify. At the same time, the high integration, high speed, high reliability, and short development cycle of CPLD greatly improve the circuit performance. Here, the CPLD uses the ALTERA MAXⅡ series EPM1270 chip, which has 116 I/O ports and 1270 logic units, and has high performance, low power consumption and other performance characteristics to meet the requirements.
3 System Software Design
3.1 CA Authentication
The control center and the kiosk terminal establish wireless communication through GPRS. In order to ensure the integrity of data during the communication process, this design uses CA message authentication based on the hmac-sha1 algorithm to ensure that the information is not illegally attacked or tampered with. Hmac-sha1 is a key-based message integrity verification method, and its security is based on the hash algorithm. It requires both parties to share a key, agree on an algorithm, and perform a hash operation on the message to form a fixed-length authentication code (MAC). The two parties to the communication determine the legitimacy of the message by verifying the authentication code. This algorithm is widely used for encryption, digital signatures, message verification, etc. It can effectively resist exhaustive attacks, prevent information frame data from being arbitrarily tampered with and subverted, and maximize the security of system operation.
The steps of CA authentication based on the hmac-sha1 algorithm are as follows:
Let K and N be the key and synchronization sequence number agreed upon by the control center and the kiosk terminal, respectively, B represents the size of the data block (in bits), and K0 is the key K of length B.
Sender
Step 1: Use the key K to find the corresponding length K0 of B.
Step 2: Use the hmac-sha1 algorithm to generate a message digest MAC code.
Step 3: N increases by 1 and updates the local N at the same time.
Step 4: Use DES digital signature technology to encrypt the message and message digest MAC code, and send them to the kiosk terminal.
Receiver
Step 5: First, decrypt the received data using the corresponding decryption algorithm, and then repeat the calculations in Step 1 and Step 2 to generate a MAC code. If it matches the received message digest MAC code, it indicates that the data is legal.
Step 6: If the received N is less than the locally stored N, it is a retransmission and can be synchronized or discarded. Otherwise, it means the data is fresh and legal. [page]
3.2 ARM Software Design
ARM is the core chip of the kiosk terminal. In order to ensure the speed and stability of the entire kiosk terminal system, its software design is based on the embedded real-time operating system μC/OS-Ⅱ[5]. This can make full use of the operating system's efficient task scheduling algorithm and make program development and expansion more convenient. Its task structure is shown in Figure 2.
Figure 2 ARM software overall structure diagram
After ARM is powered on or reset, the system is initialized first, including the initialization of the operating system and the initialization of hardware interrupts, timers, and communication interfaces. After the system is initialized, the following tasks are created in sequence:
Task_RS232Com: Serial port communication task, completes the communication with the GPRS module and receives the information frame sent by the control center;
Task_LEDControl: LED display control task, writes the data to be displayed (including route information and real-time vehicle arrival forecast, etc.) into the high-speed data cache composed of SRAM2 and SRAM3, and transmits the written address to CPLD to control CPLD to read the data in the cache;
Task_LineProcess: line information management task, saves the update of bus line information;
Task_TempProtect: Temperature protection task, which reads the temperature value provided by the temperature sensor regularly. Once it is found that the temperature exceeds the set value, the system immediately turns on the cooling fan to dissipate heat to ensure the normal operation of the system;
Task_update: system update task, complete system online upgrade;
3.4 CPLD Software Design
CPLD completes the scanning and driving process of the LED display screen by generating serial data shift signals, data latch signals, row scanning signals, etc. Its software design block diagram is shown in Figure 3, which mainly includes the following parts: (1) Clock generator: generates clock signals of various frequencies; (2) Read switching circuit: under the control of ARM, switches between two SRAMs to complete the reading of high-speed data cache; (3) Read address generator: enables CPLD to accurately address in the high-speed cache composed of two SRAMs; (4) Scan control circuit: generates corresponding scan control signals according to the data read in the cache, and sends them to the column data circuit and row scanning circuit through the LED drive circuit interface; (5) JTAG port: provides an interface for online debugging.
Figure 3 CPLD software design block diagram
The digital bus shelter system based on ARM7 and CPLD proposed in this paper communicates with the control center in real time through the GPRS module and uses CA authentication to ensure the real-time and security of the system operation. It can effectively solve the many shortcomings of the existing bus shelters, such as the lack of information provided by the bus stop signs, the inability to provide vehicle arrival forecasts, and the trouble of adding routes or modifying route information. The real-time vehicle arrival forecast provided by the system enables passengers in the waiting area of the bus station to view the route information and arrival time of all waiting vehicles through the LED display screen of the shelter terminal, so that they can know what is going on, which can effectively alleviate the anxiety of waiting passengers waiting for the bus; at the same time, public information release can provide weather forecasts, traffic conditions and other important information in a timely manner, bringing convenience to passengers' travel. In addition, the system has an online upgrade function, which is convenient for future system updates and maintenance. In short, the digital bus shelter system helps to comprehensively improve the information service level of urban bus stations and has broad application prospects in the construction of future urban intelligent transportation.
Previous article:Stability Design of FPGA/CPLD State Machine
Next article:Design of USB interface based on DSP platform
Recommended ReadingLatest update time:2024-11-16 20:27
- Popular Resources
- Popular amplifiers
- Learn CPLD and Verilog HDL programming technology from scratch_Let beginners easily learn CPLD system design technology through practical methods
- Practical Electronic Components and Circuit Basics (4th Edition)_Explanation of basic circuit principles, introduction to electronic components, design of various circuits and practical circuit analysis
- Practical Deep Neural Networks on Mobile Platforms: Principles, Architecture, and Optimization
- FPGA Principle and Structure (Zhao Qian)
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
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
- FAQ_How to solve the problem of drastic jumps in the ADC sampling of BlueNRG-12
- Matrix keyboard program problem
- [GD32L233C-START Review] (4) LPTIMER wake-up trigger ADC in Sleep low power mode
- DSP Math Library - TMS320C55x DSP Library
- Qorvo helps Murata launch small UWB module to enable low-power IoT devices
- Ding~ It’s time to punch in on the first day of work after the holiday~Are you regretting that the holiday is not long enough or are you touched that you can finally start working again?
- How does Arteli AT32 MCU use on-chip Flash to implement EEPROM function?
- [Qinheng RISC-V core CH582] Development environment installation
- What is the MediaTek MT7628 WiFi module? What are its functions?
- High salary recruitment: European sales manager (German required)