This paper presents the design method of software and hardware for the controller system of solar water heater, which consists of water temperature and water level sensor, single chip computer, heating relay and upper water solenoid valve. Especially, the design method of water level and temperature integrated sensor is emphasized, and the control panel of solar water heater is developed jointly by enterprises and put into mass production. The economic and social benefits are obvious. The system realizes automatic manual water feeding, automatic manual heating and pipeline insulation control functions, with lightning stroke, leakage and system overheating protection functions. Solar energy as a green energy, especially in the application of solar water heaters, has won the praise of the majority of users. However, there are many problems in the controller of solar water heater, especially in the design of integrated sensor technology of water temperature and water level, lightning protection, leakage and overheating protection, which affect its popularization and use. In this paper, the problems of the above solar water heater controller are studied, and practical and effective solutions are put forward. The control panel of the solar water heater designed and manufactured is shown in Figure 1. The block diagram of hardware system of solar water heater controller is shown in Fig.
2. It takes STC12C5A60S2 as its control core, external function key circuit, water level and temperature integrated sensor, leakage and overheating protection circuit, solenoid valve relay current drive circuit, alarm buzzer, LED digital tube display circuit and system power supply. Composition of circuit, etc. Electric auxiliary heating can be started manually in rainy weather or insufficient sunshine. When the water temperature of the water tank is heated to the user’s set temperature, the system can automatically cut off the electric auxiliary heating or stop it manually at any time. Heating; In autumn and winter, the air and solar water pipes are very easy to freeze and crack. The system can start the heat preservation function of the pipes manually and improve the efficiency of the solar water heater to the greatest extent. The water level and temperature sensor consists of a 10K thermistor, four color ring resistors, a rubber jacket and four stainless steel springs.
The thermistor in the sensor and 5K resistance in the controller constitute a series circuit. According to the principle of series voltage divider, the temperature information in the water tank can be sampled and real-time displayed and controlled by A/D conversion single chip computer. The two ends of the thermistor are wrapped with a high temperature wire, which runs through the top and the end of the sensor to ensure the accuracy of temperature acquisition to the greatest extent. Four color ring resistors and four stainless steel spring tubes in the sensor are welded in series and then fixed with rubber wrap. The stainless steel spring mainly plays the role of increasing the length of the water level sensor. Four color ring resistors divide the water level into four gears. Because the rubber wrapped in each gear is conductive, and the rubber at the gear is insulated, different water levels can be equivalent to different resistors. Different frequencies can be generated through the oscillating circuit. The detection of water level is realized.
The water level equivalent resistance 1 and 2 foot interfaces corresponding to the four gear stainless steel springs in Fig. 3 are connected with the 1 and 2 interfaces in Fig. 4. The equivalent resistance RF, R1, R2, R3, U1A, U1B and C1 constitute an asymmetric multi-harmonic oscillator [1]. After shaping by reverse driver U1C and filter capacitor C2, the water level equivalent resistance 1 and 2 foot interfaces are connected to the P1 0 pins of the single chip computer through measuring the P10 pins. The position of water level can be obtained by square wave frequency. The 10K negative temperature coefficient thermistor in Fig. 3 is connected with the 5K resistance R4 in Fig.
4 in series, and then filtered by C3 and connected to the P1_1 (ADC0 channel) pin of the single chip computer. The ADC value corresponding to the water temperature and voltage of the pin is measured, and then the water temperature value in the water tank can be obtained by looking up the table.
The R1 in formula 2 is the water temperature resistance of 10K thermistor. Usually, the resistance value of thermistor and water temperature are made into a table as shown in Table 2. Each element in the table consists of ADC value corresponding to water temperature and water temperature, which are stored in ROM of single chip computer. After the voltage AD conversion corresponding to the detected water temperature, the corresponding water temperature is obtained by looking up the table. Resistors R5, R6 and R7 are varistors [2]. To avoid the impact of lightning on the overall life of the circuit control system of water temperature and water level sensor. The driving circuit of electric heating, pipeline insulation relay and upper water solenoid valve is shown in Fig. 5. STC12C5A60S2 single chip computer is difficult to drive relay and solenoid valve, which are heavy loads. Therefore, thermostatic element ULN2001A driver chip is used to control the coil of solenoid valve to turn on and off. ULN2001A integrates 3-way Darlington current amplifier circuit. It only needs the input pins of P16 and P17 of MCU to input TTL high level (about 5V) at the input pins of ULN2001A. The output pins of 8, 7 and 6 can output the maximum control current of 500MA to drive the work of electric heating and pipeline insulation relay coils. The high-level output of the P15 pin of the single-chip computer can be controlled by saturated conduction of the transistor Q 1, and the upper-water solenoid valve of 12V can be controlled, otherwise the upper-water solenoid valve can be closed. Because the coil of solenoid valve produces reverse electromotive force at the moment of switching off, IN4007 diode is used to absorb reverse current to protect the service life of triode Q1. B1, BZ1 and BZ3 in Fig. 5 are varistors to protect coils of upper water solenoid valves, electric heating and pipeline insulation relays from lightning damage. The system protection circuit is shown in Fig.
6. The inductance coil is mounted on 220V AC power supply, then two lead wires of the coil are connected to J4 socket, and the diodes D11 and D12 are connected to both ends of the coil. When the power source leaks, the current flowing through the leakage coil is unbalanced, and the coil will generate induced voltage and current. The coil will form a continuous current loop through D11 and D12, so as to avoid the secondary side opening of the mutual inductance coil and to generate a higher dangerous voltage [3]. MCU pin P1 4 detects the leakage voltage filtered by C11, C12 and R10. Once the leakage occurs, the relay can be turned off and the power supply protection system and personnel safety can be cut off. When the temperature in the system exceeds 75 C, the P1 3 foot of the single chip computer detects the voltage change of 3470 points of the thermistor, thus cutting off the power supply of the system and playing the role of system overheating protection. The power supply circuit of the system is shown in Fig. 7. The DC power supply needed by the solar controller system is 12V and 5V. After converting 220V into AC 12 by transformer, it is connected to interface J1. After D1, D2, D3 and D4 full-wave rectification, 12V DC power is obtained. After 7805 voltage stabilization, 5V DC power is obtained. The capacitors C1, C2, C3 and C4 are filtered. The high frequency and low frequency components of the power supply are filtered to ensure the stability and reliability of the power supply. The controller system of solar water heater uses four independent keys, namely mode selection, heating, heat preservation and water supply, to realize the external input function of the system. Key de-jitter includes software and hardware methods. The system uses software algorithm to realize key de-jitter processing, which is reliable and reduces the hardware cost of the system. The principle of 8*8 matrix (Gongyang) used in LED display is that 64 light-emitting diodes display water level, water temperature, time and special functions. The driving current of each light-emitting diode is guaranteed to be 5-10 MS in order to ensure the brightness of the display. The system buzzer is a passive buzzer driven by pulse. When the water level is below 20% in the process of starting or using water, the buzzer is triggered to realize the function of automatic water supply by sound and light alarm. The above three sub-functions are simple and schematic. The solar water heater controller system is programmed with modular structure based on C program [4], including main program, automatic heating subroutine, automatic water feeding subroutine, dynamic scanning subroutine of LED digital tube and key de-jitter algorithm design. Keyboard de-jitter [5] Timer is used to interrupt every 2ms, read the status of four keys and store them; after 8 consecutive scans, see if the status of the eight keys is consistent, the time of the eight keys is about 16 Ms. If the status of the keys is consistent in the 16ms, it is sure that the keys pressed are in a stable state. It is not in the jitter stage, thus realizing the de-jitter of keys. The state detection process of keys from press to pop-up is shown in Figure 8. The main loop program of the system performs different operations according to the key values after jitter removal. The flow chart of the main program of the system is shown in Figure 9. The main program in the detection and display of water temperature and water level link, using digital filtering processing that is read three times continuously, take the intermediate value after sorting to read the water temperature and water level value, improve the anti-interference ability of the system. The main innovations of the solar water heater controller system are as follows: 1) using self-made water temperature and water level integrated sensor, the detection effect is stable and reliable, and the cost is low; 2) with lightning protection, leakage and overheating protection functions, the cost-effective ratio is high and easy to be accepted by users.
The system will be easy to install and operate, high display accuracy, stability and reliability and other superior performance has been mass production, creating considerable economic and social benefits for enterprises.