0 Introduction
At present, most domestic bus stop announcements are made manually, but because drivers need to make announcements while ensuring safe driving, there are often a series of problems such as misreporting, missed reporting, and safety hazards. The use of GPS global positioning system for automatic station announcements solves this problem, without the need for manual intervention, greatly reducing the driver's workload, while also improving the safety of vehicle operation and promoting the modernization of the public transportation system.
At present, the information screens in buses mostly obtain news, weather forecasts, advertisements and other information through wired means, and can also display station information synchronously. However, there is an inevitable problem, that is, since there is no integrated GPRS wireless communication function, it is more troublesome to maintain. If the advertisement content needs to be changed, a large number of personnel must be sent to change the information screens in the buses that need to change the advertisement content one by one, wasting a lot of manpower and material resources. The application of GPRS enables the system to achieve an unprecedented high degree of integration, solving the drawbacks of the backward information update method in the current domestic buses. Through the GPS satellite positioning system and the GPRS wireless communication network, the bus monitoring and dispatching center can monitor the distribution of the locations of buses on each line in real time, and issue dispatching notices to the relevant buses based on the monitoring situation.
1 Composition of the automatic bus stop announcement system
The system consists of various terminals in the bus (information screen, waist card, etc.), automatic station announcer, GPRS/GSM communication network, and bus monitoring and dispatching center. The automatic station announcer is mainly composed of main control chip, GPS/GPRS communication module, LCD, SD card, and MP3 decoding chip. The overall structure of the whole system is shown in Figure 1.
The automatic station announcer uses the self-learning function to store the longitude and latitude information of the station to the SD card. When the bus arrives at a station, the longitude and latitude information received is consistent with the stored longitude and latitude information of a station. The station name of the corresponding station can be automatically announced, and the following two functions can be realized at the same time:
(1) Send corresponding information to each terminal in the bus through the RS 485 interface to achieve integrated control in the bus;
(2) Send the bus status information (latitude and longitude, speed and other parameters) to the bus monitoring and dispatching center through the GSM network to achieve a high degree of unity between the bus and the monitoring and dispatching center.
2 Hardware Design of Automatic Bus Stop Announcer
The bus stop automatic announcement device is mainly based on the LM3S1601 main chip, GPS module and GPRS module to build a terminal platform, which are connected by serial communication. The rest also includes power module, MP3 player interface and SD card interface, etc. The hardware principle structure diagram is shown in Figure 2.
2.1 Design of power module
The power supply system has a great influence on the reliability of the automatic station announcer. A good power supply circuit can filter out many interference signals transmitted through the power supply circuit. The power supply circuit of this power supply module is shown in Figure 3.
The controller input voltage is 24 V. Since the peak current during GPRS Internet access can reach 2 A, the power chip is LM2596-5.0, and the output current can reach 3 A. The LM1117-3.3 chip is used to power the LM3S1601, SD card, etc., the LM1117-2.5 chip is used to power the MP3 decoding chip, and the MIC29302 chip outputs 4 V voltage to the GPRS module.
2.2 SIM300C GPRS module
SIM300C has a built-in TCP/IP protocol stack, based on GSM/GPRS900/1 800/1 900 MHz triple-band, and adopts dual-in-line board-to-board connection, suitable for vehicle-mounted applications. Dimensions: 50 mm×33 mm×6.2 mm. Supports class2, controlled by AT commands, meets GSM 2/2+ standards, has RS 232 level, and is directly connected to the microcontroller.
2.3 Main control chip
The LM3S1601 microcontroller from TI is used as the main control chip. The chip uses the ARM Cortex-M3 core. The Cortex-M3 is the latest processor core based on the ARMv7 architecture launched by ARM, which has the characteristics of high performance, low cost and low power consumption. It adopts the Harvard structure and uses separate instruction and data buses (under the von Neumann structure, data and instructions share a bus), which significantly speeds up the processing speed. Cor-tex-M3 only supports the latest Thumb-2 instruction set. To avoid the switching between Thumb and ARM code, the Cortex-M3 core integrates an interrupt controller, providing basic 32 physical interrupts with 8 levels of priority, up to 240 physical interrupts and 256 interrupt priorities. This type of design is deterministic and has low latency, which is particularly suitable for automotive applications. It has 128 KB of on-chip FLASH, 32 KB of on-chip SRAM, 3 UART serial ports, 2 SSI interfaces, and 2 I2C interfaces, which can fully meet current needs.
2.4 E2PROM and SD card storage module
The E2PROM model is CAT24C02, which is used to store the necessary data of the station announcer, such as the station number, line, uplink and downlink, mode, etc., to prevent data loss during power failure. The SD card stores the Chinese station name, longitude and latitude information, MP3 audio files, etc. The SD card communicates with the microcontroller through the SS10 interface, adopts the FAT16 file system, and supports SD cards up to 2 GB.
2.5 MP3 decoding chip
The MP3 decoding chip uses the VS1003 chip produced by Finland's VLSI Solution. VS1003 is a single-chip MP3/WMA/MIDI audio decoding and ADPCM encoding chip. It has a low-performance and power-consuming DSP processor core VS_DSP, 5 KB of instruction RAM, 0.5 KB of data RAM, a serial controller and data input interface, 4 general-purpose I/O ports, and a UART port; at the same time, the chip has a variable sampling rate ADC, a stereo DAC, and a headphone audio amplifier.
3 Software Design and Implementation of Automatic Bus Stop Announcer
The single-chip microcomputer LM3S1601 is programmed to realize the functions of receiving and processing GPS information, surfing the Internet with GPRS, establishing connections, receiving data, playing MP3 voice files, reading and writing the contents of SD card, and displaying on LCD screen. The working process of this system is roughly as follows: self-learning of sites through buttons and receiving GPS information; automatic search of sites, and automatic station announcement: if the longitude and latitude information received by the GPS module is consistent with the longitude and latitude information of a certain site stored, the corresponding MP3 file is read from the SD card through SSI0, and the read data stream is sent to the VS1003 player through SSI1 for playback, and the corresponding station number and station name are displayed on the LCD screen, and the current longitude and latitude information is sent to the bus monitoring and dispatching center through the GSM network, thereby realizing the function of automatic station announcement; the center actively connects to the automatic station announcer, and the automatic station announcer performs different operations (such as real-time monitoring, in-vehicle information update, etc.) according to the different communication protocols received. The software composition block diagram of the system is shown in Figure 4.
3.1 Main program design of station announcer
The main program mainly completes system initialization and calls the subroutines of each module. Its flow chart is shown in Figure 5.
After the system is powered on, it is initialized, including: I/O port, timer, UART, watchdog, module (SD card, GPRS module, VS1003, etc.). After the system is initialized, it receives GPS positioning information. There are many GPS communication protocols. This program uses the most widely used NMEA-0183 protocol. This protocol includes formats such as "$GPGGA", "$GPGSA", "$GPGSV" and "$GPRMC", and this article uses the simplest format "$GPRMC" statement for design. The format is as follows: $GPRMC, <1>, <2>, <3>, <4>, <5>, <6>, <7>, <8>, <9>, <10>, <11>, <12>*hh Among them, <2> is the positioning status, A = valid positioning, V = invalid positioning, when the received data is A, it is considered that the GPS received data is valid, and then the self-learning function, GPRS processing function, and automatic site search function are judged and processed.
3.2 Design of GPRS processing subroutine
The GPRS processing subroutine mainly realizes the communication between the station announcer and the center, as well as the monitoring, scheduling and information updating functions.
The center calls to notify the station announcer to go online. The station announcer receives "+CLIP: "020********", 129", hangs up the call through "ATH", and determines whether it is a call from the center. If so, a PPP connection is established. After the connection is successful, it connects to the center's fixed IP address and port number through TCP/IP.
After the station announcer is successfully connected to the center, the two parties send handshake instructions to each other. If the "handshake" is successful, communication will be carried out; otherwise, the center will actively disconnect from the network. After the "handshake" is successful, the station announcer receives the instructions issued by the center. If it is a "real-time monitoring" instruction, GPS data will be sent in real time. In order to prevent the center and the station announcer from disconnecting from the network, both parties need to send "heartbeat packets" regularly; if it is an "information update" instruction, the update information sent by the center will be received, and the network will be automatically disconnected after receiving.
4 Conclusion
The automatic station announcement device has passed EMC and reliability tests and on-site trial operation. The system functions normally, operates stably, and exhibits strong anti-interference ability and high reliability. In particular, the GPS automatic station announcement function can change the announcement and forecast range according to customer needs and the actual situation of the bus line, ensuring the accuracy of the announcement, improving the safety of the bus, reducing the burden on the driver, and having good social and economic benefits. At present, the system function is being improved in some advanced functions, and industrialization work is also in full swing.
Previous article:Design of audio processing circuit based on I2C bus control
Next article:Application of image acquisition and processing in intelligent vehicle system
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
- [Sipeed LicheeRV 86 Panel Review] 7-Waft Graphical Interface Development Test (Part 2)
- I don't understand the principle of ultrasonic signal processing.
- Let’s talk about the first big event in 2019...
- Wifi controlled LED screen
- IIoT opens up more possibilities beyond the factory floor
- Recommended one: [Lingsheng] MCU code automatic generator (automatic programming tool)
- Learning 3D visualization scene hierarchy from scratch (1)
- What are the differences and connections between compilers and integrated development environments?
- [RISC-V MCU CH32V103 Review] ---Advanced Wiki---Practical debugging methods
- LLC resonant converter classic literature or books, personal test feedback!