Abstract: Based on the STC89C516RD single-chip microcomputer, a new refrigerator thermostat system is designed. Users can set the temperature of each room of the refrigerator on the display screen to control and manage the refrigerator. The system also has a clock function. Since the system is equipped with a wireless remote control function, various parameters can be set through the remote control. The operation interface of the system application module is friendly and convenient, and can be actually applied in smart refrigerators.
Keywords: single-chip microcomputer; refrigerator thermostat; wireless control; LCD display
As the requirements for refrigerators in terms of energy saving, environmental protection, and comfort continue to increase, more and more intelligent control technologies are introduced into refrigerators. Embedded intelligent home appliances are also referred to as intelligent home appliances. In this type of home appliance, the human-machine interface is friendly and convenient. The basic functions of the home appliance are controlled by a single-chip microcomputer, while also simulating the process of human intelligent activities. In the control process, various intelligent activities are combined for necessary processing, which greatly improves the quality and performance of home appliances, produces better control effects, and enables people to get more ideal services.
1 System Structure
The system uses STC89C516RD microcontroller as the control core and is powered by 220 V power supply. It displays the current time and the temperature of the refrigerator, freezer and outdoor room collected by the temperature sensor through the LCD. The time and the temperature of each room can be set by buttons. Since the system integrates infrared remote control function, users can also remotely set the time and temperature of each room through the remote control. The system structure block diagram is shown in Figure 1.
2 System hardware implementation
2.1 Power module
In the design of the power module, the 220 V AC voltage is stepped down through a 9 V transformer, and then rectified through a rectifier bridge circuit to obtain a 12 V DC voltage. Since the system does not require high power supply and only needs 5 V, a 7805 voltage regulator is used to generate a +5 V voltage for the single-chip microcomputer and LCD display. The power supply circuit is shown in Figure 2.
2.2 Temperature acquisition module
The DS18B20 temperature sensor is used to complete the temperature acquisition. DS18B20 is a one-line digital temperature sensor produced by Dallas. It belongs to a new generation of intelligent digital temperature sensors adapted to microprocessors. It integrates temperature sensing, signal conversion, and A/D conversion on a chip. It uses a TO-92 package. Its temperature measurement range is -55~+125℃, and it can be programmed to 9~12-bit conversion accuracy. The temperature measurement resolution can reach 0.062 5℃. This system uses three DS18B20s to collect the temperature of the refrigerator, freezer, and room temperature respectively.
2.3 Key control module
The keyboard control circuit is composed of 4 independent keys connected to the I/O of the microcontroller, which are used to switch the LCD display interface and adjust the parameter values. The key functions and the corresponding relationship with the I/O port are as follows:
[ON/OFF] Temperature, time switching key - (P13)
[Mode] selection key - (P12)
[-] Temperature or time minus 1 - (P11)
[+] Temperature or time plus 1 - (P10)
2.4 Wireless control module
The chipset PT2262-IR and PT2272 are used for encoding and decoding. PT2262-IR and infrared transmitting tube constitute the wireless transmitting part, which transmits 38 kHz modulated signals with key information. PT2272 and 38 kHz wireless receiving module LT0038 constitute the wireless receiving part. The module realizes wireless remote control of the switch by transmitting and receiving radio waves. The circuit is easy to implement and cost-effective. The circuits and parameters involved have been tested. The device has small size, low power consumption, low cost, and the remote control distance can reach more than 10 m.
2.5 Compressor control module
The compressor drive circuit is mainly realized by the control of the relay by the single-chip microcomputer. The relay is an "automatic switch" that uses a smaller current to control a larger current, so it plays the role of automatic adjustment, safety protection, and conversion circuit in the circuit. Since the compressor needs to be directly controlled by a single-chip microcomputer, the single-chip microcomputer is powered by +5 V, and the compressor is powered by 220 V voltage, so a relay must be used as an isolation circuit to separate the high and low voltages. Use the P1.6 port to control the relay, thereby indirectly controlling the compressor switch.
2.6 LCD display module
Select OCM12864 LCD display. The data input/output port 7 to 14 pins of the OCM12864 LCD display module are connected to the P0 port of the microcontroller to transmit data or instructions; the read/write selection pin is connected to P2.1, and the data is read when the level is high, and the data is written when the level is low; the data/instruction selection pin is connected to P2.0, and the data of the P0 port is sent to the display RAM when the level is high, and the data of the P0 port is sent to the instruction register for execution when the level is low; the read/write enable signal terminal E is connected to P2.2, and the high level is valid, and the falling edge locks the data. The reset signal is connected to P2.5, and the low level is valid; the chip select signal CS1 is connected to P2.3, and the high level is valid; the chip select signal CS2 is connected to P2.4, and the high level is valid. The LCD drive voltage is V0. When applied, a 10 kΩ adjustable resistor is added between the LCD drive power supply and the +5 V positive power supply VDD. By adjusting the resistor, the brightness and darkness contrast of the LCD display can be changed.
3 System software implementation
The entire software is written in C51 language, mainly including the following four subroutine modules: temperature acquisition module, clock module, LCD display module, keyboard control module. Each subroutine module is written and debugged separately, and then each subroutine module is debugged together, and finally the program is burned into the ROM of the microcontroller for offline operation. The main program flow chart is shown in Figure 3.
4 Debugging simulation and conclusion
After debugging simulation, the program is loaded onto the hardware circuit board and runs at full speed. The initial interface displays the current date and time, which can be adjusted by pressing the buttons. After pressing the mode switch button, the display interface switches to the temperature display mode, and the temperature of the refrigerator, freezer and outdoor is displayed on the interface. The temperature value can be set by pressing the button. When the actual temperature is greater than the set temperature, the microcontroller will start the compressor to lower the temperature. At this time, the LED lights up, indicating that the compressor is working, until the actual temperature is equal to the set temperature, the compressor stops working.
Previous article:Multi-channel wireless temperature detection system based on single chip microcomputer
Next article:AT89C51 single chip computer power failure control system
- 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!
- Rambus Launches Industry's First HBM 4 Controller IP: What Are the Technical Details Behind It?
- 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
- [Xianji HPM6750 Review] + Software simulation IIC reads the temperature and humidity sensor values
- In fact, Valentine's Day 20200214 was cancelled
- dsp28335 data space
- [Xianji HPM6750 Review 8] Detailed description of the small twists and turns encountered by SPI peripherals
- MSP430 MCU Development Record (16)
- I posted a thread about icebabycool. He didn't answer the question but laughed at me instead of showing my low IQ. Please punish this kind of rogue behavior severely.
- Help with POE design issues
- [Voice and vision module based on ESP32S3] Material unpacking—ESP32S3 BOX
- PCBA intelligent detection fixture, one-click generation of test reports
- EEWORLD University Hall----Introduction to Isolated Modulator