Design of automatic bus stop announcement system based on GPS/GPRS

Publisher:知音学友Latest update time:2009-11-18 Source: 现代电子技术 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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.

Overall structure of the system

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.

Hardware principle structure diagram

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.

Power supply circuit of power module

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.

System software block diagram

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.

flow chart

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.

GPRS processing subroutine

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.

Reference address:Design of automatic bus stop announcement system based on GPS/GPRS

Previous article:Design of audio processing circuit based on I2C bus control
Next article:Application of image acquisition and processing in intelligent vehicle system

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号