Application of AT89C51 and TWH9221 in refrigerator

Publisher:书卷气息Latest update time:2012-03-16 Source: 现代电子技术 Keywords:AT89C51  TWH9221 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

With the popularity of household refrigerators, people have higher and higher requirements on the control functions of refrigerators, which puts forward Higher requirements, multi-function and intelligence are one of its development directions. Traditional mechanical and simple electronic control is no longer possible. This article introduces the use of AT89C51 as the core of the controller to control the working process of the refrigerator. The ozone generator dedicated integrated circuit TWH9221 is used to form the refrigerator's odor elimination circuit.

1 Working principle and control requirements of refrigerators
The control principle of refrigerators is to control the start and stop of the refrigeration compressor according to the temperature of the evaporator, so that the temperature inside the refrigerator is maintained at the set temperature. The compressor is usually started when the evaporator temperature is 3-5°C, and the compressor is turned on when the temperature is lower than -10-20°C. Stop refrigeration and turn off the compressor. Using a single-chip microcomputer can make the control more accurate and flexible.
The main functions and requirements of a refrigerator controlled by a single-chip microcomputer:
(1) Set 3 temperature measurement points, with a measurement range of -26 to +26 °C and an accuracy of ±0.5 °C.
(2) Use function keys to control temperature settings, quick freezing settings, and refrigerator and freezer temperature settings.
(3) Use digital tubes to display the freezer and refrigerator temperatures, compressor start/stop, quick freezing, and alarm status.
(4) The refrigeration compressor will automatically delay for 3 minutes after stopping before it can be restarted.
(5) The refrigerator has an automatic defrosting function, and it will automatically defrost when the frost thickness reaches 3 mm.
(6) If the door opening delay exceeds 2 minutes, an audible alarm will sound.
(7) The continuous quick freezing time setting range is 1 to 8 hours.
(8) The working voltage is 180 to 240 V. When undervoltage or overvoltage occurs, the compressor is prohibited from starting and the indicator light will be used to indicate it. 

2 Hardware circuit design of refrigerator control system
2.1 Host circuit
The host circuit uses AT89C51 single-chip microcomputer and an A/D conversion chip ADC0809 to form the basic system. In addition, function keys and LE D display is realized by serial port expansion of 5 74LS164. There are also some additional circuits such as defrost circuit, voltage detection and door opening alarm Circuit, etc. The circuit principle block diagram is shown in Figure 1.

2.2 A/D conversion circuit and function
The A/D conversion circuit uses the successive approximation 8-bit ADC0809 chip. 0809 has 8 analog input channels. This system only uses There are 4 channels IN0 to IN3. IN0 is used as the freezer temperature detection channel, IN1 is used as the refrigerator temperature detection channel, and I N2 is used as the defrost detection channel, and IN3 is used as the power supply voltage detection channel. The A, B, and C terminals of ADC0809 are connected through the address latch. Connected to P0.0, P0.1, and P0.2 of P0 port, these three terminals control the selection of analog channel number. P1.6 and WR, RD terminals are connected to The NOT gate is connected to ALE, START, OE of 0809 to control the start, read and write of 0809. The EOC end of 0809 is left floating and used after conversion. Use software to delay for a period of time before reading the results, without interruption.
2.3 Function keys and display circuit
The function keys and LED display circuit use 6 function keys to control the freezer, refrigerator and quick freezing temperature settings, and 4-digit LED digital tube negative It is responsible for displaying the temperature of the freezer and refrigerator compartments and the start, stop and alarm status of the compressor. The display and keyboard input are all through AT89C51 The selection of display output channel and keyboard input channel is completed by port line P3.2 and NAND gate. 1", the TXD terminal of AT89C51 outputs a synchronous pulse which is sent to the shift pulse input terminal of the display shift register 74LS164 through the AND gate. The data to be displayed by AT89C51 is output from the RXD terminal and shifted into the display channel. When the RXD data of AT89C51 is shifted, it can only be read into the shift register used for keyboard scanning. LED digital tubes use 74LS164 as the driver, so the circuit is simplified, the structure is simple, the display word bit expansion is convenient, and the driver The keyboard works very simply. AT89C51 scans the shift register 74 through RXD to the keyboard. LS164 sends data "0" bit by bit. After each transmission, it reads the keyboard signal from P3.4. If "0" is read, it means a key is pressed.
2.4 Defrost circuit
Rt temperature sensor, choose MF531 thermistor, which has negative temperature coefficient and high sensitivity. The thermistor is installed at a suitable position 3 mm away from the evaporator . When the frost thickness is greater than 3 mm, the thermistor contacts the When frost is detected, the temperature is lowered, and the resistance value R(t) increases. The output signal of the operational amplifier changes, and the A/D converter After the change, it is sent to the CPU, and after analysis and judgment by the single-chip microcomputer, a defrosting command is given.
2.5 Refrigeration compressor and defrosting heating wire start and stop control circuit
Working principle: The control signal of the AT89C51 single-chip microcomputer is output through the P1.3 and P1.4 ports, and is locked in 7 under the control of P1.7 In 4LS273, the output of 74LS273 drives solid-state relays SSR1 and SSR2 after passing through Darlington driver MC1413. When the 16th terminal of 3 has a high level output, the 3rd and 4th pins of SSR1 are connected, so that the heating wire is powered on and defrosting occurs. When the 5th terminal outputs a high level, the 3rd and 4th terminals of SSR2 are connected, so that the compressor winding is powered on and starts to cool. Latching the control signal increases the output power and prevents malfunction of the control when the microcontroller is reset. Solid-state relays are used as switches for the compressor and defrosting heating wire: they are contactless switches with high-power crystals inside. The thyristor circuit does not generate sparks, has no electromagnetic interference, and isolates the high voltage from the microcontroller system.

3 Refrigerator odor elimination circuit
The refrigerator odor eliminator circuit using TWH9221 is shown in Figure 2. A2 is a solid-state integrated circuit TWH9221 dedicated to the ozone generator 221, which consists of an electro-optical control trigger circuit, a 15 kHz oscillator, a 4 min timing circuit, a working indicator light driving circuit and 15 kHz power output stage and other parts. Pin 4 is the positive pole of the power supply, pin 1 is the negative pole of the power supply, pin 3 is the trigger end, and pin 2 is the working Status output terminal, pins 5 and 6 are pulse output terminals.

Normally, the refrigerator door is closed, light cannot shine on the photosensitive tube BG, A2 does not work, and there is no pulse output at pins 5 and 6. Open the refrigerator door When light shines on BG, the resistance of BG photosensitive tube decreases, so that the 3rd foot of A2 gets a low level trigger voltage and starts The pulse voltage output from the 5th and 6th pins is stepped up by the step-up transformer T to obtain a 15 kHz, 1 500 V high-frequency high-voltage pulse. Add to both ends of the ozone tube H, and the ozone tube H releases ozone to remove odor and preserve the food in the refrigerator. , the light cannot shine on the photosensitive tube BG, there is no trigger signal input to the 3rd pin of A2, the timer in A2 starts working, and after 4 minutes Afterwards, A2 will automatically reset and H will stop releasing ozone. [page]

4 Refrigerator control system software design
The refrigerator control program mainly consists of three parts: main program, timer T0 interrupt service program and timer T1 interrupt service program
(1) Main program
The main program is the overall control program of the entire refrigerator, such as controlling the initialization of each unit, controlling interrupts, timing, display, keyboard programming, etc. The main program flowchart is shown in Figure 3.

(2) T0 interrupt service program
The T0 interrupt service program mainly completes power undervoltage, overvoltage processing, door opening status inspection and processing, etc. Its block diagram is shown in Figure 4 (3 )
T1 interrupt service program
T1 works in counting mode and achieves the purpose of 3 minutes delay by counting. T1 interrupt service program mainly completes the 3 minutes timing And various tests such as temperature, defrosting, quick freezing, etc., compare and analyze the test results to control the operation of the actuator.
Its block diagram is shown in Figure 5.

References

1] Shu Huailin. Principles of Single Chip Microcomputer and Interface Technology[M]. Wuhan: Huazhong University of Science and Technology Press, 2001 .
[ 2] Fang Xiaocui. Single-chip microcomputer practical system design technology [M]. Beijing: National Defense Industry Press, 1999.

Keywords:AT89C51  TWH9221 Reference address:Application of AT89C51 and TWH9221 in refrigerator

Previous article:Parallel expansion of I2C interface of 8051 microcontroller
Next article:Various methods of accurate timing programming of single chip microcomputer timing interrupt

Recommended ReadingLatest update time:2024-11-16 16:31

Simple intelligent robot designed based on AT89C51 microcontroller
introduction With the continuous development of microelectronics technology, microprocessor chips are becoming more and more integrated. Microcontrollers can integrate CPU, memory, timers/counters, parallel and serial interfaces, watchdogs, and pre-processors on one chip. A variety of circuits such as amplifiers, A/
[Microcontroller]
Design of CAN-RS232 Communication Conversion Based on AT89C51
1 Introduction RS232 has been widely used as a standard computer serial interface. At the same time, with the rapid development of fieldbus technology, CAN bus with advantages such as good real-time performance, high reliability and simple structure has been increasingly adopted in measurement and control systems. Ho
[Microcontroller]
Design of CAN-RS232 Communication Conversion Based on AT89C51
A high-precision countdown system based on AT89C51 control
1 Introduction The task of the countdown system is to count down to a set date and display the time from the current date to the set date on the display screen to enhance people's attention and sense of urgency. Development practice shows that the high-precision countdown system with clock chip DS12C887 as the cloc
[Industrial Control]
A high-precision countdown system based on AT89C51 control
Application of Virtual SPI in Communication between XF-S4240 and MCS51
SPI bus technology is a synchronous serial interface introduced by Motorola. It enables MCU to communicate with various peripheral devices in serial mode to exchange information, and has fewer hardware connections and is easy to program. SPI interface is already a standard peripheral interface, and many MCUs and p
[Microcontroller]
Design of Inertial Measurement Unit System Based on AT89C5131A
Firstly, the principle, composition and application of ADISl6355AMLZ MEMS are introduced. On this basis, a hardware platform is built, and the AT89C513lA microcontroller with built-in USB controller is used as the main controller to control ADISl6355AMLZ and collect and store data. The data acquisition design of the i
[Microcontroller]
Design of Inertial Measurement Unit System Based on AT89C5131A
Design of motion control system based on SJA1000 CAN bus and AT89C51 microcontroller
1 Introduction The motion control system is an electrical transmission control system that takes the motor, the driving device of mechanical motion, as the control object, the controller as the core, power electronics and power conversion devices as the actuators, and is composed under the guidance of automatic contro
[Microcontroller]
Design of motion control system based on SJA1000 CAN bus and AT89C51 microcontroller
Rainfall digital tube display design based on AT89C51 microcontroller
1. System Overview The modules used in the system include AT89C51 microcontroller + 8-bit common cathode digital tube + ADC0808 (simulated rainfall) + ULN2003 motor drive module + motor. The system uses AT89C51 microcontroller as the main control, and simulates changes in rainfall through ADC0808 and a potentiometer
[Microcontroller]
Rainfall digital tube display design based on AT89C51 microcontroller
Digital Compressed Voice Recording and Playing System Based on TMS320C5402
System Introduction The main function of this system is to compress the voice signal to achieve high-efficiency digital recording, which can be used for telephone messages, voice answering and other occasions. Although the recording time is long when using tape recording to achieve telephone messages, it is
[Embedded]
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号