This design takes TI MCU MSP430F149 as the control core and calls peripheral modules to work together.
Temperature sensor module is used to detect the temperature of water used in the water tank. Because the output of this module is digital signal, it can be directly put into the microprocessor for processing.
After numerical conversion, the water tank can be displayed on LCD 12864. Temperature value.
The water pressure sensor in the water tank obtains the water level value in the current water tank by measuring the pressure between the water and the water. Because the water pressure sensor outputs analog quantity, it needs to be converted into digital quantity by A/D in the microprocessor and then processed.
The value after processing is displayed on the liquid crystal 12864. Users can set their own water temperature value by keys. The MCU compares the water temperature value set by users with the current water temperature value by program. If the current water temperature value is less than the set water temperature value, the electromagnetic switch will be closed and the heating device will be opened. Turn off the switch and stop heating when the temperature is higher than the set temperature. Temperature and water level are measured in time to achieve control purposes. Over the past few years, the endless use of energy by human beings has made the energy problem more and more serious, so we want to use other resources to replace these non-renewable resources. Because solar energy is the most energy that human beings are exposed to, and it is almost inexhaustible in the scope of human cognition.
So the utilization of solar energy will be a trend in the future, and also one of the main recyclable energy sources. This design is to use solar energy to control the temperature of water in the water tank, so as to bring convenience and reduce environmental pollution and protect the earth. This design mainly takes microprocessor MSP430 as the core, chooses temperature sensor and water level sensor as the source of single chip signal acquisition, temperature sensor adopts digital stainless steel DS18B20 temperature probe.
The water level detection module is selected for water level detection, and the analog signals detected are captured and sent to the single chip computer for processing.
Temperature and water level are displayed by liquid crystal 12864. Design; (3) Solar temperature and water level circuit design controlled by solenoid valve; (4) Circuit design of setting initial temperature and water level by keys; From the design requirements, we can see that the main tasks of this design are: consulting relevant information and understanding the functional principles of each part.
Refer to the data manual of components, grasp the working principle and hardware implementation method of components. Each module is programmed through the manual to meet the requirements of the system.
The design block diagram of the lower computer of the solar water heater controller is shown in Figure 1. This design mainly uses C language to write programs, and edits them step by step according to the functional requirements of each module (such as temperature detection module, liquid crystal display module, water level detection module, thermostatic element etc.).
The software of this program is IAR for msp430, and the software of PROTEUS, schematic diagram and PCB drawing is Altium desig.
Ner software. According to the above requirements, the software design of solar controller mainly adopts modular design idea, mainly by MCU clock initialization, serial port initialization, temperature detection initialization, water level detection initialization, liquid crystal initialization, keyboard scanning program design, timer interruption program, liquid crystal display program, relay control. Procedure and other components.
The main program flow chart of the solar water heater controller is shown in Fig. 2. For the setting of temperature and water level in the water tank, it is necessary to set the temperature and water level by keys when starting the controller. After setting the values of temperature and water level, the set values are saved in E2PROM of AT24C02, which is convenient for reading the last set values when the next boot or power failure restart.
This method has two advantages: first, the system reads the last value from the memory without setting the temperature and water level values at startup, thus resolving the problem of restarting the temperature and water level values at startup. Secondly, it enhances the adaptability of the controller.
After a sudden power failure, the caller can return to the normal reading of the temperature and water level values without re-setting. Experiments show that the controller of household solar water heater based on MSP430F149 MCU has the advantages of small size, simple structure, low power consumption and fast processing speed. It can realize automatic water supply, low water level alarm and record user’s usage habits.