Introduction: The block diagram of the automobile air conditioning control system is shown in Figure 1. The system consists of key scanning, voltage detection, temperature detection, fan control, compressor control, LED digital tube display, buzzer alarm circuit and single-chip microcomputer.
The block diagram of the automobile air conditioning control system is shown in Figure 1. The system consists of key scanning, voltage detection, temperature detection, fan control, compressor control, LED digital tube display, buzzer alarm circuit and single-chip microcomputer.
Figure 1 Block diagram of automobile air conditioning control system
The main working principle of the single-chip microcomputer is: scan the keyboard, when the cooling key is pressed, and there is no fault alarm, the system compares the in-car temperature sampled by the ADC with the pre-set cooling temperature. If the in-car temperature is higher than the set temperature, the condensing fan and compressor cooling are turned on; when the in-car temperature is 2°C lower than the set temperature, the compressor and condensing fan are turned off. If the cold key is pressed at this time, the system will ignore the preset temperature and start cooling directly. Among them, the single-chip microcomputer PB0 and PB1 ports output high and low signals to control the switch of the MOS tube, and then control the start and stop of the fan and compressor; PC0 port samples the input voltage and compares it with the system default value to determine whether the voltage is normal; PC2 port samples the defrost temperature to determine the defrost operation; PC3 port samples the in-car temperature and outputs the calculated result to the LED digital tube display.
System hardware design
1 Introduction to the main control chip
The Atmega8 microcontroller has 8Kb of online programming Flash program memory, 512 bytes of EEPROM, 1Kb SRAM, 32 general working registers, 23 general I/O ports, 3 timers/counters with flexible comparison modes, 18+2 internal and external interrupt sources, 1 programmable SUART interface, 1 I2C bus interface, 4-channel 10-bit ADC, 2-channel 8-bit ADC, programmable watchdog timer, 1 SPI interface and 5 power saving modes selectable by software.
2 Power supply
The system power supply circuit is shown in Figure 2. The DC/DC conversion chip uses MC34063, which has the characteristics of integrated reference voltage, oscillator synchronization and wide input voltage range. Its output voltage can be expressed as Vout=1.25(1+R39/R40), and the output current can reach 500mA, which fully meets the power consumption requirements of this system. In order to reduce interference, capacitors C10, C12, and C13 are added to the input and output ends of the chip for filtering.
Figure 2 System power supply part
3 Voltage and temperature detection circuit
As shown in Figure 3, voltage and temperature detection uses the dedicated ADC sampling channel inside the microcontroller, which does not add additional chips and is conducive to reducing system costs. The ADC reference voltage is equivalent to the microcontroller operating voltage of 5V. The system input voltage is simply filtered by R3 and R8 and sent to PC0 (ADC0). This port continuously samples 21 times according to the voltage division ratio, and then adds the values obtained each time to restore the system input voltage; RT1 and RT2 are negative temperature coefficient sensors. When the temperature rises or falls, their resistance decreases or increases accordingly. The corresponding ADC port performs numerical averaging filtering on the voltage values sampled multiple times and compares them with the known voltage/temperature range to obtain the real-time temperature.
Figure 3 Voltage and temperature detection circuit
4 Keyboard and display circuit
As shown in Figure 4, due to the limited I/O ports of the single-chip microcomputer, the keyboard and display circuit adopt port multiplexing, and the SN74164 serial input and parallel output chip is added to the 3-bit 8-segment LED digital tube driver to further alleviate the pressure of limited ports. The keyboard has 7 buttons, namely, power on/off, cooling/ventilation, forced cooling, setting, up, down, and can be used to set the temperature and fresh air time. The LED digital tube can display the current temperature in the car, the system preset temperature, the input voltage, etc. When the buzzer alarms, it can display the fault code, which provides convenience for maintenance and debugging.
Figure 4 Keyboard and display circuit
5 Output control circuit
The fan and compressor output control circuit is shown in Figure 5. The microcontroller output control signal is reversed by ULA2003 to drive transistor Q2. The collector of Q2 is then connected to the control input of the compressor's start-stop switch relay. When the relay turns from closed to open, the diode D10 is the relay coil. In order to effectively control the conduction and shutdown of the transistor, the system adds a high input voltage and high current ULN2003A driver chip. It uses Darlington internally with a maximum input voltage of 50V and a maximum current of 500mA.
Figure 5 Output control circuit
software design
Program design can be divided into two parts: the main program and the interrupt service program.
The main program includes timer, ADC module initialization, keyboard display processing, buzzer alarm, etc. After the main program is initialized, the system judges whether the input voltage is normal and whether the temperature sensor is short-circuited or open-circuited according to the ADC conversion results. If the above situation occurs, the system will cut off all outputs and give a fault code, otherwise it will display the indoor temperature. Then scan the keyboard and perform corresponding operations according to the key value, such as switching between high, medium and low air volume, cooling on/off, forced cooling selection, cooling temperature setting and fresh air supply time setting.
The interrupt service program includes timer T0 and T1 interrupt service programs. The timer T0 timing time is 1ms. Set variable a. Each time the interrupt subroutine is entered, if the fault flag is valid, a increases by 1. The buzzer is turned on before a is less than 50; when a is greater than 50, the buzzer is turned off and a is cleared. This is done to distinguish the key ring tone. The timer T1 timing time is 1s, which is mainly used for the delay between the compressor and the condensing fan. That is, the time interval between two consecutive compressor openings cannot be less than 6s, and the condensing fan is turned off after a delay of 3s after the compressor is turned off.
Conclusion
This controller is controlled by Atmega8 single-chip microcomputer, with simple circuit structure, stable performance, strong functions, high reliability and low cost. Practical application proves that this controller has strong anti-interference ability and can work stably for a long time in low and high temperature areas. Because it uses a single-chip microcomputer with Flash technology, it is convenient to upgrade online and can be used for the control of automobile air conditioners in economy cars, luxury buses, large trucks, etc.
Previous article:Temperature plotter based on tinyAVR and Nokia3310 LCD
Next article:AVR microcontroller - use of I/O port
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Keysight Technologies Helps Samsung Electronics Successfully Validate FiRa® 2.0 Safe Distance Measurement Test Case
- Innovation is not limited to Meizhi, Welling will appear at the 2024 China Home Appliance Technology Conference
- Innovation is not limited to Meizhi, Welling will appear at the 2024 China Home Appliance Technology Conference
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Download from the Internet--ARM Getting Started Notes
- Learn ARM development(22)
- Learn ARM development(21)
- Learn ARM development(20)
- Learn ARM development(19)
- Learn ARM development(14)
- Here is a flyback switching power supply built with TOP series switching IC, undervoltage protection. I have a question here. Please leave.
- Fixed-point DSP fractional multiplication and addition calculation
- Abnormal erasure of data in the information segment of the msp430 MCU, please help me
- FPGA Image Processing Series - Implementing Window Processing
- Micro open source USB development board
- I have some circuit design questions.
- 【AT-START-F425 Review】TMR Servo Driver
- The air conditioner has been too cold recently. Do you turn on the air conditioner when you work?
- Two PyCon AU 2019 talks
- MSP430 Flash Emulation Tool