For many years, refrigerators have been used as storage and preservation space in the domestic market, and people's demand for refrigerators is also the most basic functions of freezing and freezing. In recent years, with the popularization of household refrigerators and the rapid rise of the mainstream consumer group born in the 1980s, people have higher and higher requirements for the performance of refrigerators, which has accelerated the transformation and upgrading of refrigerator functions and requirements, and correspondingly, the requirements for refrigerator control functions have also become higher and higher.
Since its advent, the performance of single-chip microcomputers has been continuously improved, and its functions have been continuously increased and improved. In addition, it has the characteristics of high integration, powerful functions, fast speed, small size, low power consumption, easy use, reliable performance and low price. Therefore, it is widely used in industrial control, intelligent instrumentation, data acquisition and processing, communication systems, advanced calculators, household appliances and other fields. The design of refrigerator control system based on AVR single-chip microcomputer makes full use of single-chip microcomputer technology in the control system of refrigerators, providing technical support for the development of modern refrigerators.
1 Overall system design
The designed refrigerator control system is based on AVR microcontroller, including hardware design and software design. The whole system has the following functions:
1) Regularly check the temperature of the freezer and refrigerator compartment in the refrigerator, manually set the temperature of the freezer and refrigerator compartment through the keyboard, and display the set value;
2) Regularly check the frost thickness, and automatically defrost when the frost thickness reaches 3 mm;
3) Regularly check the working voltage, and issue an over-limit alarm and prohibit the compressor from working;
4) Regularly check the door switch status, and issue a 2-minute door opening delay alarm;
5) The single-chip microcomputer determines whether the temperature detected in the freezer and refrigerator compartment is within the set range, and starts and stops the compressor. The refrigeration compressor automatically delays for 3 minutes after stopping before it can be restarted;
6) Manually set the continuous rapid cooling time value through the keyboard, and display the set value. The single-chip microcomputer determines whether the rapid cooling time is within the set range and performs rapid cooling operations;
7) Use the display circuit to display various states in the system.
1.1 Hardware Design
The hardware block diagram of the refrigerator control system based on AVR is shown in Figure 1, which mainly includes AVR microcontroller, A/D converter, detection circuit, alarm circuit, control circuit, clock and reset circuit, function keys and display circuit, etc.
AVR microcontroller is a high-speed embedded microcontroller and the core component of the entire control system. Due to its advantages of high speed, low power consumption, confidentiality and low cost, it has been widely used in military, industrial, household appliances, smart toys, portable smart instruments and robot manufacturing, etc., which greatly improves product functions, accuracy and quality, with low failure rate, high reliability and low cost.
A/D converter, or analog-to-digital converter, is an electronic component that converts analog signals into digital signals. This design uses ADC0809, an 8-channel, 8-bit successive approximation A/D converter produced by National Semiconductor Corporation of the United States in CMOS technology. It has an 8-channel multiplexer inside, which can latch the decoded signal according to the address code and select only one of the 8 analog input signals for A/D conversion. It is currently the most widely used 8-bit general-purpose A/D chip in China.
The detection circuit mainly completes the tasks of temperature detection, frost thickness detection, working voltage detection, door switch status detection, etc. in the freezer and refrigerator compartments of the refrigerator, and transmits the corresponding information to the single chip for processing. The design of the detection circuit includes the design of circuits for temperature detection, frost thickness detection, power supply voltage detection, and door opening status detection in the freezer and refrigerator compartments.
The temperature detection circuit is mainly used to complete the temperature detection of the freezer and the refrigerator. The frost thickness detection circuit is mainly used to detect the thickness of the frost so that it can automatically defrost when the frost thickness reaches 3 mm. The power supply voltage detection circuit is mainly used to detect the working voltage, and to issue an over-limit alarm and prohibit the compressor from working. The alarm circuit is mainly used to send an alarm signal when the power supply voltage detection circuit detects that the working voltage exceeds the limit. The control circuit is mainly used to control the start and stop operation of the refrigeration compressor and the defrosting heating wire. The clock and reset circuit is mainly used to provide the clock and reset signals to the microcontroller to ensure that the microcontroller can work normally. The function key and display circuit is mainly used to set the freezer and refrigerator and the quick cooling control setting by using the keyboard, and at the same time display the set value and setting mark as well as various states of the system.
1.2 Software Design
The software design of refrigerator control system based on AVR mainly includes the design of main program, subroutine and interrupt program. [page]
1) Main program
The main program is the overall control program of the entire refrigerator, such as the initialization of the control unit, control interruption, timing, display, keyboard program startup and repetition, etc. The main program flow chart is shown in Figure 2.
2) Subroutines
The subroutines include display subroutine, keyboard scanning subroutine, display subroutine according to flag bit adjustment, addition and subtraction processing subroutine, ADC0809 channel conversion number reading subroutine, rapid cooling processing subroutine, temperature comparison and processing subroutine and defrost control subroutine.
The display subroutine is to output the data in the display buffer bit by bit from the RXD terminal to the display, showing the data and status. The keyboard scanning subroutine has two functions: judging whether there is a key pressed on the keyboard and judging the closed key number.
The corresponding display subroutine is adjusted according to the flag bit, that is, the corresponding setting number is converted into 7-segment font code according to the content of the flag bit and then sent to the display buffer.
The addition and subtraction processing subroutines are both to increase or decrease the corresponding set number according to the flag bit when the main program determines that it is an addition or subtraction operation.
The subroutine to read the ADC0809 channel conversion number is to start ADC0809 and read the converted number into the corresponding buffer.
The rapid cooling control subroutine is to manually set a continuous rapid cooling time, and the microcontroller then controls the compressor to work continuously for the set continuous rapid cooling time.
Temperature comparison and processing is to compare the average value of the actual temperature of the freezer and refrigerator with the set temperature. If it is out of range, it will be processed, otherwise it will be returned.
The defrost control subroutine compares the value converted by ADC0809 with the corresponding value when the frost thickness is 3 mm. If it is less than 3 mm, defrosting is not required, otherwise the defrost heating wire is started for defrosting.
3) Interrupt program
When the central processing unit is processing internal data, an emergency occurs in the outside world, requiring the CPU to suspend the current work and handle the emergency. After the processing is completed, it returns to the original address where it was interrupted and continues the original work. This process is called an interrupt. The component that implements this function is called an interrupt system, the request source for the CPU interrupt is called an interrupt source, and the program that handles the "urgent matter" is called an interrupt service program, which is a specific program compiled in advance. This system involves T0 and T1 interrupt service programs.
The T0 interrupt service program mainly completes the reading of the conversion number of the ADC0809 channel, power supply voltage undervoltage, overvoltage processing, parallel gate status detection and processing, etc.
The t1 interrupt service program mainly completes the 3-minute timing and compares, analyzes, and controls the execution of each component based on the test results, namely, rapid cooling treatment, temperature comparison and processing, frost thickness control and processing, etc.
2 Conclusion
After the system was designed, it was tested many times. The test data showed that the performance indicators and functions of the system met the expected design objectives. It has the advantages of complete functions, simple operation and easy use. It is at a relatively high level among similar domestic products and has high practical and promotion value.
Previous article:Using high-speed AVR microcontroller to realize vibration/temperature signal acquisition and storage
Next article:Design of Radio Telemetry System Based on AVR Microcontroller and MODEM Chip
- Popular Resources
- Popular amplifiers
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!
- 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
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Japanese 0X-01 oxygen detector in-depth disassembly
- The area cannot be covered with copper and cannot have electrical wiring
- The xcl file of MSP430FR6972 cannot change the heap DATA16_HEAP starting address
- [Flower carving DIY] Interesting and fun music visualization series project (24) - infinite LED mirror light
- A contactless power supply circuit suitable for wireless mouse
- Can MPAX extended memory and memory protection be changed dynamically while the program is running?
- [AT32WB415 Review] 04 Software and Hardware IIC to obtain AHT20 temperature and humidity sensor data and extended test interface
- Free application evaluation: Defining the next industry standard for humidity sensing - SHT31 Smart Gadget
- Qorvo's high-performance BAW filters support Band 41 5G base station deployment
- Operational Amplifier Key Terms