Design of AVR single chip microcomputer in refrigerator control system

Publisher:勾剑寒Latest update time:2014-02-08 Source: dqjsw Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
  With the popularity of refrigerators in daily life, people have higher and higher requirements for the performance and control functions of refrigerators. In order to meet the needs of refrigerators in people's actual lives, the control system of refrigerators is designed through hardware and software with AVR microcontroller as the core. The test results show that the performance indicators and functions of the system have achieved the expected purpose, with the advantages of complete functions, simple operation and convenient use. The system is at a higher level among similar products and has high practical value.

  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 compartments in the refrigerator, manually set the temperature of the freezer and refrigerator compartments 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 computer determines whether the temperature detected in the freezer and refrigerator is within the set range, and starts and stops the compressor. After the refrigeration compressor stops, it will automatically delay for 3 minutes before it can be restarted;

  6) The continuous rapid cooling time value is manually given through the keyboard and the set value is displayed. The single chip computer determines whether the rapid cooling time is within the set range and performs the rapid cooling operation;

  7) Use display circuits to display various states in the system.

  1.1 Hardware Design

  The hardware block diagram of the AVR-based refrigerator control system 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.

Figure 1 Hardware block diagram of the control system

Figure 1 Hardware block diagram of the control system

  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.

  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. [page]

Figure 2 Main program flow chart

Figure 2 Main program flow chart

  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 when the main program determines that it is an addition or subtraction operation, it will increase or decrease the corresponding set number according to the flag bit.

  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 procedure

  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.

Baidu Button BEGIN
Reference address:Design of AVR single chip microcomputer in refrigerator control system

Previous article:Design and implementation of automatic detection system of farmland information based on wireless sensor network
Next article:Application of single chip microcomputer in LED display hardware design

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号