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 the need for manual button pressing.
(2) Automatic assessment function: automatically record the time the vehicle stops and the mileage it has traveled, and automatically record the time and mileage of speeding and underspeeding.
(3) Display time 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.
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.
(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 conducting experiments, we found that the pulse interference generated by the simulated wheel is very large. The use of 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. [page]
(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.
Figure 1 Voice recording and playback circuit
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 transportation vehicles. It can effectively manage public transportation vehicles 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 can be used to control the announcement of stops.
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.
Previous article:Design of building direct-press visual intercom doorbell system based on single-chip microcomputer
Next article:Design and implementation of automatic storage cabinet based on AT89C52 single chip microcomputer
Recommended ReadingLatest update time:2024-11-17 06:32
- Popular Resources
- Popular amplifiers
- 西门子S7-12001500 PLC SCL语言编程从入门到精通 (北岛李工)
- Siemens Motion Control Technology and Engineering Applications (Tongxue, edited by Wu Xiaojun)
- How to read electrical control circuit diagrams (Classic best-selling books on electronics and electrical engineering) (Zheng Fengyi)
- MCU C language programming and Proteus simulation technology (Xu Aijun)
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!
- Rambus Launches Industry's First HBM 4 Controller IP: What Are the Technical Details Behind It?
- 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
- This is a simplified circuit for measuring insulation resistance using the unbalanced bridge method.
- DIY a miniaturized ultrasound device
- MPS Mall Big Offer Experience Season】 Unboxing
- Review summary: Free review - Topmicro smart display module
- Has anyone researched tinyos and nesc?
- The sensor is connected via Bluetooth and then reads the data from the mpu
- EEWORLD University Hall----Project Production: Intelligent Access Control System
- Ask for advice
- Which domestic half-bridge driver product is the best?
- Study on TMS570LS3137