Shenzhen ZTRON Microelectronics Co., Ltd
Telephone
0755-8299 4126

MCU

Design of bus temperature control system


Design of bus temperature control system based on single chip computer


With the aggravation of urban air pollution and the frequent occurrence of smog, buses are widely used as an environmentally friendly public transportation tool, and in order to improve ride comfort, the popularity of urban air-conditioned buses continues to increase. The heating and cooling comfort of the air-conditioned bus not only directly affects the ride experience of passengers, but also affects the health of passengers. The relevant regulations point out that during the period from June 1st to September 30th and December 1st to March 1st of the following year every year, and when the temperature inside the compartment is higher than 28°C or lower than 12°C during this period, the bus The air-conditioning facility is turned on to maintain a comfortable driving environment. However, in the actual investigation, it was found that the temperature in most bus compartments is too low in summer, while the temperature in winter is too high, and the temperature difference between the inside and outside of the compartment is too large, causing passengers to feel uncomfortable on the bus, which makes the original increase in order to improve the comfort of passengers. The advanced cooling and heating system has become the reason why many people refuse to take the bus.


At present, new energy buses—gas-electric hybrid buses are widely used in urban traffic. They have a high gas-saving rate and are more environmentally friendly. However, the cooling and heating system of this car has not been upgraded accordingly, and it cannot better meet the passengers' requirements for temperature comfort. Some scholars have analyzed the velocity field and temperature field of the air supply system in pure electric buses, but the research on the temperature control system of natural gas buses or gas-electric hybrid buses widely used at present is still insufficient.


Aiming at the above situation, this paper designs the bus temperature control system based on single-chip microcomputer, so as to meet the passengers' requirements for the temperature comfort of air-conditioned buses to a greater extent in terms of function.


1. Hardware design of bus temperature control system


1.1 The overall design of the system hardware


The temperature inside the car will change with the outdoor temperature and the number of passengers in the car. A single given temperature control system cannot guarantee the comfort of passengers in the car. This design is based on the STC89C52 microcontroller as the core of the system, the temperature sensor DS18B20 is used to measure the temperature in the bus, and the LCD1602 liquid crystal display is selected for temperature display. Multiple buttons are set inside the compartment, and passengers can raise or lower the temperature by pressing the buttons. When the passenger presses the keyboard, the single-chip microcomputer starts the counting function to count the heating and cooling requirements within 3 minutes, and at the same time judge the degree of temperature adjustment, so as to meet the needs of passengers.


1.2 Schematic diagram of the system


Use 5 groups of button switches to simulate the cabin temperature controller, and 2 buttons in each group represent heating and cooling respectively. Once a button is pressed, the single-chip microcomputer will count the data of the button every 3 minutes, and according to the statistical result, the system will execute the heating or cooling control program. Considering the large mobility of passengers in the compartment and the hysteresis of the temperature adjustment process, the measurement of each adjustment is selected as 2°C, and the temperature change within 1h does not exceed 6°C. When the number of presses of the heating button is greater than that of the cooling button, the 3.4 pin of the single chip microcomputer outputs a high level, the Q1 transistor is turned on, the RL1 relay is turned on, connected to the input terminal of the heating function in the car, and the system starts to heat up. In this design, the heating plate is used to simulate the heating function in the car, and the heating plate is connected to the 5V power supply to start heating. When the number of button presses to raise the temperature is less than the number of button buttons to cool down, the system executes the cooling control program, the pin 3.5 of the microcontroller outputs a high level, the transistor Q2 is turned on, and the relay RL2 is turned on. In this design, a small fan is used to simulate the cooling function in the compartment. At this time, the fan is connected to the 5V power supply to start cooling.


2. Software design of bus temperature control system


2.1 Main program flow


Its operation process is: after turning on the switch and powering on, the system is initialized, after the delay processing, the temperature sensor collects the temperature, and transmits the collected temperature value to the LCD screen to display the current temperature. The sensor continues to work when the button is pressed; if there is a button operation, the single-chip microcomputer collects the number of times the button is pressed with a sampling period of 3 minutes, and then calculates whether the temperature needs to be changed, and judges the degree of temperature adjustment, so as to control the operation of the relay to realize the heating and cooling function.


2.2 Temperature acquisition


This design uses DS18B20 temperature sensor to detect the temperature inside the car. It has the advantages of low power consumption, small size, not easy to be disturbed, easy to match with the microprocessor, and can convert different temperatures into corresponding digital signals. The location of the sensor will affect the accuracy of the measurement. In this design, only one sensor is used to simulate and collect the temperature inside the car, but in practice, it can be placed in multiple positions in the car to reflect the temperature inside the car more comprehensively. DS18B20 collects the external temperature and transmits the collected signal to the single-chip microcomputer through the P3.7 port through the digital signal.


2.3 Liquid crystal display module


This design chooses LCD1602 as the display module. It has a display capacity of 16×2 characters, which can not only display the current temperature, but also display the parameters of the switch control quantity and the working status of the relay. LCD1602 working voltage is 4.5V to 5.5V, when the voltage does not reach the rated working voltage, the display will not work. The current of LCD1602 is 2mA when the operating voltage is 5V. In order to reach the rated voltage of the display, this design adds an AC direct transformer to change the 220V voltage to 5V to ensure the normal operation of the display module.


3. Functions realized by bus temperature control system


The temperature is collected and displayed. The temperature in the bus is displayed through the temperature sensor DS18B20 and the liquid crystal display LCD1602.


Temperature control button information collection. The single-chip microcomputer judges whether there is a button pressed every 3 minutes. If no button is pressed, it will continue to collect and measure the temperature; if a button is pressed, it will judge whether to heat up or cool down.


Temperature adjustment. Set a temperature change value of 2°C. When the single-chip microcomputer judges that the temperature needs to be raised or lowered, the relay is turned on to make it work, and the temperature rise or fall operation is completed until the temperature reaches the change amount requirement.


The temperature is kept relatively constant. After the temperature adjustment is completed, the next collection control is carried out, and the limited condition is that the temperature change within 1h does not exceed 6°C. In order to avoid continuous temperature adjustment or someone maliciously changing the temperature, the air conditioner setting temperature of the system should not be lower than 16°C in summer and not higher than 30°C in winter.


Summarize


The bus temperature control system based on single-chip microcomputer aims to improve the temperature comfort of passengers in air-conditioned buses without increasing the workload of bus drivers. By installing temperature control keypads in the front, middle and rear parts of the car, passengers can decide the temperature in the car by themselves.


After many times of software and hardware debugging, it can be seen through simulation experiments that the bus temperature control system based on the single-chip microcomputer has realized the detection, collection and display of temperature. After the single-chip microcomputer processes the key data, it can automatically complete the heating and cooling functions. . Therefore, this temperature control system can be popularized and applied in air-conditioned buses.


In addition, in practice, when the bus enters and exits the bus, the doors open when passengers get on and off the bus, and the temperature inside the bus will change significantly. At this time, the temperature measurement and button statistics will cause inaccurate temperature adjustment. Therefore, this drawback will be eliminated in the future. The design still needs further improvement.


The above are the technical details of the bus temperature control system design based on the single-chip microcomputer introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. We have rich experience in customized development of smart electronic products, can evaluate the development cycle and IC price as soon as possible, and can also calculate the PCBA quotation. We are the agent of Sonix MCU and Yingguang MCU agent, selling and developing MCU and voice IC solutions of Sonix and Yingguang. We act as an agent and develop ICs and solutions of Jieli, Ankai, Quanzhi, realtek and other series, and also develop BLE Bluetooth IC, dual-mode Bluetooth module, wifi module, and Internet of Things module. We have hardware design and software development capabilities. Covering circuit design, PCB design, single-chip microcomputer development, software custom development, APP custom development, WeChat official account development, voice recognition technology, Bluetooth development, wifi technology, etc. It can also undertake the research and development of smart electronic products, the design of household appliances, the development of beauty equipment, the development of Internet of Things applications, the design of smart home solutions, the development of TWS earphones, the development of Bluetooth earphone speakers, the development of children's toys, and the development of electronic education products.


  • TOP