Using single chip microcomputer to realize automatic assessment and stop announcement of buses

Publisher:创意旋律Latest update time:2012-02-02 Source: 微计算机信息 Keywords:GPS Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1 Introduction

In today's society, many small and medium-sized cities conduct assessments on public buses, mostly using manual assessment methods. This method has many disadvantages. For example, it is impossible to effectively supervise the time when the vehicle arrives at each stop and the problems of passenger pressure, speeding, overloading, etc. during the journey. More importantly, it wastes a lot of human resources. Therefore, there is an urgent need for a system to effectively manage public buses.

Through market research, there are two main ways to manage public buses: one is the GPS automatic assessment system, and the other is to set a signal transmitter on the bus stop to identify the arrival of the vehicle. Although the former method is more advanced, it is expensive and will only increase the burden on bus companies in small and medium-sized cities. More importantly, it requires the transformation of the original bus stop, and the procedure is cumbersome. Although it belongs to the synchronous assessment method, it is still powerless against traffic jams. Although waiting passengers can know the distance between the vehicle and the station through the bus stop, the exact time of arrival is still uncertain, and the assessment effect is not ideal; the latter method uses the time interval between the vehicle receiving the signal and losing the signal to determine the time when the vehicle stops at the station, but this system can be said to be very poor in actual application. The power supply on the bus stop, the stability of the transmitter, the inconsistency of the receiver sensitivity on the vehicle, and the interference of the opposite station have seriously affected the assessment.

In recent years, single-chip microcomputer technology has developed rapidly and has been widely used in many fields. Since single-chip microcomputers have many advantages such as programmability and good storage scalability, the idea of ​​using single-chip microcomputers to realize automatic assessment and station announcement of public buses has emerged.

2 System Functions

(1) Automatic station announcement function: When the vehicle arrives at a parking station, the system automatically announces the station without manual button pressing.
(2) Automatic assessment function: Automatically records the time the vehicle stops and the mileage it has traveled, and automatically records the time and mileage of speeding and underspeeding.
(3) Time display function.

3 System Design Principles

Compared with ordinary vehicles, buses have an obvious feature, that is, they have a fixed route, and the stations and intersections they pass through from the starting point to the end point are also fixed. Therefore, the distance from the starting point to any station or any intersection is relatively unchanged, and the distance between any two stations, intersections, and between stations and intersections is also unchanged. We take advantage of this feature and first record the mileage of the bus from the starting station to each station and each intersection (to be precise, it is a range, that is, the data range of reaching a certain station or intersection obtained after repeated tests) in the system. In actual operation, if the mileage of the bus reaches a certain range (the lowest value of the range), the station will be automatically announced (including prompting that it is an intersection, etc.), which realizes the automatic station announcement function. For the judgment of overspeed and underspeed in automatic assessment, it is only necessary to set a counter in the system (calculating the number of circles the wheels have turned), and use the number of circles the wheels have turned per unit time to judge the overspeed and underspeed of the vehicle, and at the same time record the time of overspeed and underspeed and the mileage in the system. In this way, after the vehicle returns to the terminal, as long as the data inside the system is read, the stops and overspeed and underspeed driving conditions of the vehicle during operation can be known. For recording the vehicle parking time, the method is to start timing when the vehicle stops turning, stop timing when the wheels start turning, and save the timing time in the system. Since the length of the vehicle parking time and the parking time are recorded, it is possible to prevent some buses from delaying the pickup of passengers at the station and stopping to pick up passengers before reaching the station. It should be noted here that the so-called mileage = wheel rotation number * wheel circumference.


Figure 1 Voice recording and playback circuit (electric shock to see the enlarged picture)


4 System Hardware Design

The hardware design of this system can be divided into four parts according to the functional modules: minimum system, display circuit, counting circuit and voice circuit. The following will introduce how to use the single chip microcomputer to realize the automatic assessment and station announcement of public transportation vehicles in combination with each functional module.

1. Minimum system

The minimum system consists of five parts: 89C51, RAM, latch, clock circuit, and reset circuit. This is the core of the system, and all instructions are issued by 89C51.

RAM: Since the vehicle needs to record a large amount of data during driving, such as the time the vehicle stops, the time of slow driving, the time of speeding, etc., the 89C51 has only 256B of data storage RAM, of which 128B is available to the user. The data capacity cannot meet the needs of the system at all, so an external RAM is required.

Latch: Although 89C51 has four 8-bit I/O ports, P0, P1, P2, and P3, only P0 can be used directly for read/write operations on external memory, and P0 also outputs the low 8-bit address of the external memory (the high 8-bit address is directly output by 89C51's P2 port). In order to avoid signal conflicts between data and address, a latch (74LS373 is used in the experiment) needs to be added between 89C51 and RAM to enable time-sharing output of data and address.

Clock circuit: The system must have a reliable clock to work stably. This system uses an internal clock mode, an external 6MHZ crystal oscillator, and a parallel resonant oscillation circuit composed of a crystal oscillator and a capacitor (15P), so that the circuit inside the 89C51 can generate self-oscillation.

Reset circuit: When a high level appears at the RESET terminal of 89C51 for 10ms, the microcontroller is reset. The system combines manual reset and power-on reset together. [page]

(II) Display circuit

The display part mainly displays the time. In the system design, since the parallel port of 89C51 itself is limited, 8155 is used in the system to expand the parallel port. We use the 8155PB port to output the segment code (that is, the data to be displayed), and use the lower four bits (PA0, PA1, PA2, PA3) of the 8155PA port to generate 16 bit selection signals after decoding by a 74LS154 (four-sixteen decoder). If a bit selection signal is valid, the corresponding LED light will be lit. We use the dynamic display method here. The obvious advantage of this method over the static display method is that it occupies less I/O port resources, so there is no need to expand the I/O port of 89C51.

(III) Counting circuit

During the operation of the vehicle, how do we calculate the mileage of the vehicle and how to judge whether the vehicle is speeding or underspeeding? These are all achieved through the counting circuit. We only need to record the number of revolutions of the wheel and then multiply it by the circumference of the wheel to get the mileage of the vehicle. As for the speed, set the system to collect the count value (i.e. the number of vehicle revolutions) at a fixed time interval (such as 5 seconds), multiply this value by the circumference of the wheel to get the mileage of the vehicle, and then divide it by the time to get the speed. In this way, we can judge whether the vehicle is speeding or underspeeding. In fact, the counting circuit is very simple. It only uses the external interrupt INT0 of 89C51. Whenever this pin has a falling edge signal, the counter is increased by 1 (a 16-bit counter is used in the system, and the maximum count value can reach 65535). In the process of the experiment, we found that the pulse interference generated by the simulated wheel is very large. The effect of using software delay is not ideal, and it affects the display (the LED light used for display produces obvious jitter), so we think of using hardware delay at the INT0 end. The RS trigger has good characteristics in this regard, so an RS trigger is added between the INT0 pin and the wheel that generates the pulse.

(IV) Voice circuit

The station announcement function of the automatic assessment and station announcement system is mainly realized by the voice circuit. The voice chip we used in the experiment is ISD4002-120P. The storage time of this chip is only 120 seconds. It can only be used in the laboratory stage. In actual applications, the chip with a longer storage time can be replaced. Since the vehicle only needs to announce the station while it is running, and no recording is required, we use the circuit shown in Figure 1 to record the voice chip.

The switch is in the recording state when it is at the "REC" end. Press and hold the "AN" key, and the indicator light will light up, and you can speak into the microphone to record. Release the key to stop recording and form a segment. Press it again to record the next segment. Press the "STOP" key to reset, and start recording from the first segment again. The switch is in the playback state when it is on the "PLAY" side. Press "AN" once to play a segment, and it will automatically stop playing after a segment ends. Press the "AN" key again to play the next segment.

Put the recorded chip into the system. When the vehicle's mileage reaches a certain range, we use the fast-forward function of the voice chip to jump to the corresponding voice segment and start playing, thereby realizing automatic station announcement.

5 System Software Design

The system software adopts a modular structure, mainly composed of the main program, counting interrupt subroutine, and time interrupt subroutine. The main program flow chart (as shown in Figure 2) and the counting interrupt subroutine flow chart (as shown in Figure 3) are listed below:



6 Conclusion

In general, this system adopts a relatively novel idea, using a single-chip microcomputer to realize the automatic assessment and announcement of public buses. It can effectively manage public buses and has a good market prospect. In actual use, the keyboard can be expanded in the system to prevent the bus route from changing and some abnormal situations from occurring, and the keyboard is used to control the announcement.

References

[1] He Limin. MCS-51 Series Single-chip Microcomputer Application System Design: System Configuration and Interface Technology. Beijing: Beijing University of Aeronautics and Astronautics Press, 1990.
[2] Liu Leshan, Ye Jizhong. Principles and Applications of Microcomputer Interface Technology. Hubei: Huazhong University of Science and Technology Press, 1996.

Keywords:GPS Reference address:Using single chip microcomputer to realize automatic assessment and stop announcement of buses

Previous article:Interfacing DS1318 with 8051 Microcontroller
Next article:Telephone remote communication system between single chip microcomputer and PC

Recommended ReadingLatest update time:2024-11-16 17:56

Design of GPS positioning system based on PXA270 embedded development board
As a satellite navigation system, GPS has the characteristics of good performance, high accuracy and wide application. It is the most widely used navigation and positioning system so far. It is an important trend in the current GPS field to integrate GPS with embedded technology to form an embedded geographic platform
[Power Management]
Design of GPS positioning system based on PXA270 embedded development board
Design of liquid dripping speed monitoring system with 89C51 microcontroller as the core control device
1 Introduction The liquid drip speed control system is a set of control equipment that can improve efficiency and service quality for large hospitals. In particular, the remote monitoring function allows the nurse station to monitor the patient's drip status in real time and adjust the drip speed according to the pati
[Microcontroller]
Design of liquid dripping speed monitoring system with 89C51 microcontroller as the core control device
Design of GPS information voice broadcast system based on memory microcontroller
As the application technology of the global positioning system ( GPS ) becomes more and more perfect, the application of GPS in various industries is developing and expanding rapidly. Especially in the automobile operation system, the application of GPS has been very extensive. The vehicle-mounted GPS receivi
[Microcontroller]
Design of GPS information voice broadcast system based on memory microcontroller
GPS OEM board + MCU + LCD display
What I have done is GPS + MCU + LCD display. The crystal oscillator on the board is 11.5902Mhz. The hardware connection is to use the NEMA port of Garmin25 to convert the TTL level via RS232 to the 10th pin (RXD) of 89C51. I have a problem, that is, I cannot enter the serial port interrupt after executing the program.
[Microcontroller]
stm32+neo6m GPS module positioning system
Development platform: The main processor is the stm32f103 series from STMicroelectronics. This chip is widely used and has a lot of information. Main positioning module: a chip from ublox Development environment: MDK5.0 The main code still refers to the history of atoms, and on its basis, it realizes the operati
[Microcontroller]
Briefly describe the application of GPS technology in engineering survey
  GPS is the abbreviation of Global Positioning System in English ,  and  its Chinese abbreviation is "球位系". GPS is a new generation of space satellite navigation and positioning system jointly developed by the US Army, Navy and Air Force in the 1970s. Its main purpose is to provide real-time, all-weather and global na
[Test Measurement]
Briefly describe the application of GPS technology in engineering survey
Design of embedded vehicle monitor based on GPS positioning
       With the improvement of people's living standards, cars have gradually entered ordinary families, and the number of cars in major cities in China has increased year by year. At the same time, car theft and robbery have also become a more serious social problem. Although the application of various types of car a
[Microcontroller]
Design of embedded vehicle monitor based on GPS positioning
Design of automatic bus stop announcement system based on GPS/GPRS
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 automat
[Microcontroller]
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号