Design of refrigerator control system based on AVR single chip microcomputer

Publisher:数字狂想Latest update time:2012-02-14 Source: 电子设计工程 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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.

a.jpg
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.

b.jpg
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.

Reference address:Design of refrigerator control system based on AVR single chip microcomputer

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

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号