Design and Analysis of Taxi Meter Based on Single Chip Microcomputer

Taxi meter is an indispensable instrument in taxis. With the rapid development of electronic technology, especially embedded application technology, smart chips are more and more widely applied to taxi meters. This allows the taxi meter to accurately calculate the mileage and corresponding price, so that passengers can know their own car price more intuitively, and the driver does not have to rely on manual calculation to get the passenger's cost. A lot of trouble. This paper designs a taxi meter with the single-chip STC89C51 as the core, which enables the display of mileage and corresponding price. Because of the automatic timing counting of the chip, the total mileage can be accurately calculated and converted into the corresponding price. Come, this will avoid the possibility of taxi drivers cheating and be fair and just.

1 Taximeter design requirements and design

1.1 Taximeter design requirements

Design a taxi automatic meter, the billing includes three parts: starting price, driving mileage, and total billing price, and display the starting price, single and double trip, total mileage and total amount with 1602 LCD display. Voice playback uses ISD1820 to simulate taxi passengers, arrivals, and voice reminders for fees.

1 billing function

The cost of this design is calculated based on the number of miles traveled. The starting price for the design fee is $5.00.

(1) When the mileage is <3km, the fee is calculated based on the starting price.

(2) When the mileage is >3km, the cost is calculated by 1.5 yuan per kilometer per day during the day, and the calculation fee is 1 yuan per kilometer during the daytime, 2 yuan per kilometer per night, and 1.5 yuan per night for the night. cost.

2 LCD display function

(1) The mileage is displayed with five digits, that is, the display mode is “YYY.Y”, and the unit is km. The display mileage range is 0-999.9km, which is accurate to 0.1km.

(2) The total cost display is also displayed with five digits. The display mode is “YYYYY” and the unit is yuan. The price ranges from 0-99999 yuan to the nearest one.

3 voice function

When passengers get on the bus, they need to voice the message “Welcome to XXXX Taxi Company, please explain the destination” and other tips. When the destination passenger gets off the bus, you need to voice the total cost of the bus and welcome the next ride.

1.2 Scheme determination

This design uses MPU technology, with STC89C51 single chip as the core chip, using 1602 liquid crystal display to display the corresponding mileage and price, A44E as the core of the sensing circuit, ISD1820 as the core chip of the voice prompt circuit, using 12M crystal oscillator, using independent buttons to achieve For the choice of single and double strokes, the following is the system flow chart of the scheme. The scheme diagram is shown in Figure 1-1:

2 hardware design of taxi meter

In this design, the clock circuit and the reset circuit are designed using the most commonly used circuits to form the minimum system of the microcontroller; the keyboard circuit is implemented by a separate button design method; the drive circuit of the display circuit LCD1602 is also often used by designers. The design of this design is that the design of the sensing circuit and the voice broadcast circuit is as follows:

2.1 sensing circuit

The sensor uses Hall sensor A44E, which is a kind of magnetic sensor. When the motor rotates with the impeller, we fix a small magnet on the impeller. When the A44E is close to the small magnet, the small magnet on the impeller will pass through the Hall sensor every time. A pulse signal is generated and the pulse signal is transmitted to the microcontroller through the port bit of the microcontroller. After the MPU is processed, it is displayed on the LCD. The speed circuit diagram and the drive circuit of the Hall sensor A44E are shown in Figures 2-1 and 2-2.

2.2 voice circuit

The basic structure of the ISD1810 and ISD1820 voice chips is identical to that of the ISD1110 and 1420. It uses CMOS technology and includes an oscillator, ISD1820 voice chip microphone preamplifier, and automatic gain control. Its main features are reflected in the following aspects: These features make the designer greatly reduce the difficulty of circuit design, especially in the recording and playback of voice, without the need to design a program, greatly simplifying the design difficulty, and the operation is simple. The common circuit of the ISD1820 chip is shown below:

3 Taxi Meter Software Design

3.1 MCU I / O port use

In this design, the connection of the independent buttons uses P1.4 to P1.7 of P1 port, the control of LCD1602 uses the P1.0 to P1.2 bits of P1 port, the data bit uses P0 port, the sensing circuit P3.4, pin, and voice circuit are used for P2.7 pin.

3.2 Independent button judgment

For the key of the independent keyboard, first determine whether there is a key press, if there is a need to delay for a while, then determine whether there is a key press (to play the role of anti-shake), if there is a key press, release the button, Finally, execute the key function program.

3.3 Display programming

1602 LCD display is character type, the display capacity is 16*2 characters, the working voltage is 4.5-5.5V. When writing the application, it should follow the read-first state and then write the instruction, then read the data and finally write the data. Operation timing, it is necessary to judge whether the liquid crystal is busy when performing every command or data writing.

4 Conclusion

The designed taxi meter can realize the corresponding functions when simulating through the Protues simulation software. It can simulate and simulate the start and stop of the taxi, and can also display the corresponding mileage and ride. The cost, while this design can also use the ISD1820 to enter and play a variety of related voice prompts. Therefore, the design has the characteristics of excellent performance, simple operation, strong practicability, low cost, and the matching design procedure, so that the design has a higher level of intelligence.

Ceramic PCB

Different from traditional FR-4 (plastic), ceramic materials have good high-frequency performance and electrical properties, and have properties that organic substrates do not have, such as high thermal conductivity, excellent chemical stability and thermal stability. Ideal packaging material for large scale integrated circuits and power electronic modules.

Ceramic PCB Manufacturer,Ceramic PCB Board,Ceramic Circuit Board,Ceramic Printed Circuit Board,How to Manufacture PCB

Huizhou Liandajin Electronic Co., Ltd , https://www.ldjpcb.com

This entry was posted in on