30-Taxi meter based on 51 single-chip microcomputer (Hall speed measurement)

Specific realization function

The system consists of AT89C52 single-chip microcomputer + Hall sensor module + LCD1602 LCD screen + DS1302 clock module + AT24C02 power-down storage module + DC motor + key module + power supply.

Specific functions:

1. No passenger mode: display the current time;

2. Switch to passenger mode: you can display the starting price (within three kilometers), unit price (after three kilometers), total price (yuan), mileage and travel time, and you can charge according to mileage or timing;

3. Fees in mileage mode: under high-speed conditions, charges are based on the starting price and mileage unit price

4. Hourly charging mode: at low speeds, charges are based on the timed time and time unit price

5. Press the clear button, the meter can clear the price.

6. The starting price and unit price of day and night can be set, and the unit price of timing mode can be set;

7. According to the current time, the day and night charges are different.

Letters displayed on the LCD:

D------Daytime starting price

P------Unit price of mileage

PT-----time unit price

N-----Starting price at night

Buttons: set button, increase button, decrease button, switch button (switching time/passenger mode)

design background

Taxi began to appear in our country in the 1970s, but the billing system at that time was mostly imported from abroad. Not only was it not accurate enough, it was also very expensive. With the deepening of reform and opening up, the development momentum of the taxi industry has become very prominent, and domestic machinery manufacturers have introduced domestically-made taximeters. The function of the taxi meter has changed from the initial display of the distance (the driver needs to set the price by himself, rounding up after calculation), to the ability to charge independently, and now it can print invoices and voice prompts, and independently change the unit price according to time. With the development of urban tourism, the taxi industry has become a window to the city, symbolizing the degree of civilization of a city.

From the traditional mechanical type composed of all mechanical components, to the semi-electronic type taxi meter that uses electronic circuits to replace some mechanical components; and from the integrated circuit type to the current one-chip computer system design taxi meter. Passengers are most concerned about whether the taxi meter is accurate, and whether the taxi driver cheats or not, and whether the management of the meter's operating data is convenient is the most concern for taxi drivers. Therefore, how to design a taximeter that can effectively prevent the driver from cheating and facilitate the driver is particularly important.

The purpose of this design is that the taxi industry in major cities has now popularized automatic metering, so the development of metering technology is a foregone conclusion. Some small cities have not yet become popular, but with the increasing acceleration of urban construction, the taxi industry, which symbolizes the appearance of the city, will also accelerate development. There is no doubt about the popularity of taximeters. Therefore, the market for car taximeters in the future still has great potential. .

Software and hardware design

In this design, STC89C52 single-chip microcomputer is used as the main control chip of the main control module, combined with the peripheral circuit of the single-chip microcomputer to realize the control of the entire system. The DS1302 clock chip has the function of re-powering without adjusting the time. The display part adopts LCD1602 liquid crystal display, 24c02 chip The set billing data can be stored when the power is off, and the set cost will not be lost even if the power is off. The 3v DC motor simulates the operation of the engine, which makes the whole design more realistic. When there are no passengers, the LCD can display the time (year, month, day, hour, minute, and second). The time can be set by the button, and the motor does not work at this time; when there are passengers, the motor works, and the billing system can be started by pressing the button. There is a reset button, and the charge can be modified (including the starting fee, the charge per kilometer or minute over the starting fee, and daytime And night charging standards), you can switch the day and night charging standards, you can switch according to the minutes or kilometers.

The taxi meter design can be divided into six modules, the main control module, timing module, storage module, display module, button module and motor drive module.

Schematic diagram

The system schematic design adopts Altium Designer19, as shown in the figure.

program

This design uses KEIL5 software to realize the program design, as shown in the figure.

Simulation implementation

This design uses protues8.7 software to realize the simulation design, as shown in the figure.

All information

All materials include programs (notes), AD schematic diagrams, protues simulation, reference papers, program explanations, simulation explanations, simulation videos, schematic explanations, introduction to the use of materials, etc., the most complete in the entire network!

For information, please follow the WeChat public account "Electronic Engineer Growth Diary", and reply the key word: "Information"!

Guess you like

Origin blog.csdn.net/weixin_41017942/article/details/114647649