A temperature control system of intelligent household electric water heater is designed. STC89C52 MCU is used as the control core and C language is used to write the program. Using keyboard to set the temperature, the temperature can be accurate to 0.1 degrees Celsius, and using LED light display, can accurately provide users with the required temperature of warm water. DS18B20 is used to collect temperature, and LED lamp is used to display the collected water temperature accurately.
When the required temperature is higher than the current collected water temperature, the relay is used to control the external heating source.
When the required temperature is lower than the current collected water temperature, the relay is disconnected and not heated. When the required temperature is higher than the acquisition temperature, the relay suction starts to heat, thermostatic element which basically realizes the intelligent control function. With the improvement of people’s living standards, water heaters play an increasingly important role in people’s lives and are more and more popular. Because gas water heater is easy to be limited by water pressure, and its safety is poor, accidents such as explosion and poisoning caused by using gas water heater every year are often heard. Consumers have a certain fear of gas water heaters, so gas water heaters gradually fade out of the market, and intelligent electric water heaters are increasingly recognized by people.
The traditional water temperature control system of electric water heater has a single function and low precision, which can not meet the needs of the digital era.
However, the water temperature control system of electric water heater using single chip computer has diversified functions, high precision and strong anti-interference ability.
The water temperature control system of electric water heater is based on STC89C52 single-chip computer as the main control element to realize the water temperature display in the water heater in the digital tube, and the automatic control heating device by relay is very important to improve people’s quality of life and work efficiency. The temperature control system of electric water heater is composed of DS18B20 temperature sensor, digital tube display module, relay, function key and so on. STC89C52 MCU is used as the control core and C language is used to write the program. Using keyboard to set the temperature, the temperature can be accurate to 0.1 degrees Celsius, and using LED light display, can accurately provide users with the required temperature of warm water.
DS18B20 is used to collect temperature, and LED lamp is used to display the collected water temperature accurately. When the required temperature is higher than the current collected water temperature, the relay is used to control the external heating source. When the required temperature is lower than the current collected water temperature, the relay is disconnected and not heated. When the required temperature is higher than the acquisition temperature, the relay starts to heat up, and has the function of power-down preservation. The data is stored in the EEPOM inside the single chip computer, which basically realizes the intelligent control function of the temperature of the electric water heater. Recycling water temperature acquisition, calling water temperature and digital tube display subroutine. TF1: Timer/counter T1 overflow flag bit.
After T1 is allowed to count, add 1 count from the initial value. When the highest bit overflows, the hardware sets “1” TF1 until the CPU response interrupts, and then the hardware clears 0. TR1: Timer T1 operation control bit. This bit is positioned and cleared by software. When GATE = 0, TR1 = 1 starts T1 counting and TR1 = 0 stops T1 counting. When GATE = 1, the INT1 pin and TR1 control the counter together. TF0: Timing/Counter 0 overflow flag bit. Meaning and function are similar to TF1.
TR0: Operating control bit of timer T0. Meaning and function are similar to TR1. IE1: External interrupt 1 request flag.
IT1: External interrupt 1 trigger mode control bit. IE0: External interrupt 0 request source flag. IT0: External interrupt 0 trigger mode control bit. In MCU control system, the design of software and hardware are equally important. One design defect will affect the overall performance of the system. In the complex working environment, there will be more interference sources affecting the normal operation of the MCU program, change the contents of registers, make the MCU program run or enter the dead cycle, resulting in the system can not work properly. Therefore, on the premise of ensuring the reliability of the hardware system, increasing the stability of the software system has an important impact on the performance of the whole system. The commonly used software anti-jamming measures are mainly digital filtering technology, repetitive detection of input signal technology, watchdog technology and so on. Influenced by external interference factors, the internal program of SCM will run or enter the dead cycle in the process of execution, which requires the use of watchdog technology to ensure the safety and reliability of the system. In this control system, the watchdog timer with STC12C5A60S2 SCM is used when the system is disturbed. When the timer starts, when the timing time is reached, the microcontroller is reset.
Electric water heater is a kind of household appliances which can be used in bathroom, bathroom and kitchen. With the improvement of people’s quality of life, modern household water heater has abandoned the previous practice and adopted a more accurate and safe implementation plan. A temperature control system of intelligent household electric water heater is designed. The temperature control system of electric water heater takes STC89C52 single chip computer as the control core and uses C language to write program.
Using keyboard to set the temperature, the temperature can be accurate to 0.1 degrees Celsius, and using LED light display, can accurately provide users with the required temperature of warm water. DS18B20 is used to collect temperature, and LED lamp is used to display the collected water temperature accurately. When the required temperature is higher than the current collected water temperature, the relay is used to control the external heating source. When the required temperature is lower than the current collected water temperature, the relay is disconnected and not heated. When the required temperature is higher than the acquisition temperature, the relay suction starts to heat, which basically realizes the intelligent control function of the electric water heater.