Abstract: A fully automatic solar water heater controller is designed. The system uses low-power and high-performance RISC microcontroller AVR as the core of the control circuit to monitor water temperature and water level in real time. It can realize temperature and water level detection management, fault and related alarm prompts, etc. It uses E2 PROM to save the set parameters and has a power-off memory function. After power failure, the parameters do not need to be reset. This fully automatic solar water heater controller has the characteristics of easy use, high stability, energy saving, and high practicality.
0 Introduction
With the improvement of people's living standards, the use of various water heaters has become quite popular, and the corresponding control instruments have also come out one after another. However, the various water heater control circuits on the market are still far from the ideal requirements. Consumers need real fully automatic control to achieve the simplest use, just like home TVs and refrigerators, just turn on the power and set it up, and then you don't have to worry about it. In view of the continuous expansion of the domestic solar water heater market, and the urgent need for improvement of the corresponding controller, this solar water heater controller was developed. The solar water heater designed in this paper uses AVR Meg a 32 single-chip microcomputer as the detection and control core, which not only realizes the real-time display function of temperature and water level parameters, but also has the function of temperature setting and control. The controller can use the auxiliary heating device to make the water temperature in the water tank reach the preset temperature according to the weather conditions, so as to achieve the purpose of 24-hour hot water supply. The actual application results show that compared with the previous display instrument, the controller has the advantages of high cost performance, high temperature control and display accuracy, easy use and stable performance, which improves the control level of solar energy application in China and has considerable economic and social benefits.
1 Design goals and implementation plan description
1. 1 System schematic diagram
The system schematic diagram is shown in Figure 1. Among them: W is the water level sensor (pressure type), including T2; T1 is the collector top temperature sensor; T2 is the water tank temperature sensor, which is integrated with the water level W; T3 is the antifreeze circulation temperature sensor (installed at the lowest temperature point of the collector circulation pipeline); T4 is the water pipe temperature sensor (installed at the lowest temperature point of the water circulation pipeline); T5 is the pipeline electric heating temperature control sensor (generally installed in the tap water supply pipeline, the position can be determined according to the actual situation); P1 is the collector pipeline circulation pump, which also serves as an antifreeze circulation pump; P2 is the water pipeline circulation pump (it can also be in the form of solenoid valve + automatic booster pump); E1 is the water supply solenoid valve (tap water directly enters the water tank for water replenishment); E2 is the top water solenoid valve (tap water enters the collector, and the top water enters the water tank); EH1 is the electric heater; EH2 is the electric heating belt (optional).
System schematic diagram
Figure 1 System schematic diagram.
1. 2 Main functions and descriptions
In the solar water heating project control system, it is necessary to realize: LED display, temperature difference cycle, constant temperature water outlet, constant temperature water supply, automatic water supply, timed water supply, low water level water supply, automatic heating, timed heating, electric heating to prevent dry burning, anti-freeze electric heating, anti-freeze cycle, fixed time period constant temperature pipeline cycle, high temperature protection, warning water level protection, anti-explosion pipe, power-off parameter and operation status memory, factory parameter reset, fault and related alarm prompts, safety protection, pipeline antifreeze electric heating, water pipe antifreeze, water lamp display mode, keyboard lock, emergency power off, power-on self-test and many other functions. These functions can be divided into the following 6 categories: keyboard input, A/D conversion, real-time clock, data display, E2PROM use and fault alarm. The system uses the low-power and high-performance RISC microcontroller AVR as the core of the control circuit. The AVR microprocessor is an 8-bit embedded RISC processor from Atmel, which has the advantages of high performance, high confidentiality, and low power consumption. The program memory and data memory are independently accessible Harvard structures, and the code execution efficiency is high. The AVR Mega 32 processor used in the system includes 32 KB on-chip programmable FLASH program memory; 1 KB of E2PROM and 2 KB of RAM; at the same time, the chip integrates a watchdog; 8-way 10-bit ADC; 3-way programmable PWM output; it has online system programming function, rich on-chip resources, high integration, and easy to use. AVR Mega 32 can easily realize the setting of external input parameters, A/D conversion, E2PROM data storage, working status indication, etc.
1. 2. 1 Keyboard input
The keyboard input part can use 4*4 keys to form 0~9 numeric keys and confirmation keys, and 8-bit digital tubes to form display circuit prompt information. In the single-chip microcomputer application system, keyboard scanning is only one of the work contents of the single-chip microcomputer. When the single-chip microcomputer is busy with various tasks, how to take into account the keyboard input depends on the working mode of the keyboard, and the working mode of the keyboard depends on the busy and idle conditions of the CPU. The principle is to ensure that it can respond to key operations in time without wasting too much CPU working time. Usually, there are three working modes of the keyboard, namely programmed scanning, timed scanning and interrupt scanning.
In order to further improve the working efficiency of the scanning keyboard, the interrupt scanning mode can be used. Only when a key is pressed on the keyboard, the keyboard scan is executed and the key function program is executed. The keyboard recognition method can be divided into three types:
scanning method, line reversal method and encoding method. For independent keyboards with fewer keys, the encoding method can be used. For example, for a 4*4 keyboard, the keyboard can be encoded as:
01H, 02H, ..., 0FH, 10H, a total of 16.
1. 2. 2 A/D conversion
Regarding temperature difference cycle, constant temperature water outlet, constant temperature water supply, automatic water supply, low water level water supply, automatic heating, electric heating to prevent dry burning, anti-freeze electric heating, anti-freeze cycle, high temperature protection, warning water level protection, anti-explosion pipe, safety protection, pipeline antifreeze electric heating, water pipe antifreeze, etc. Most functions are to detect water temperature and water level in multiple parts of the system, that is, the analog quantity of the sensor is A/D converted through the 8-channel 10-bit ADC built-in AVR Mega 32.
PT100 sensor is now mostly used to detect water temperature, and the circuit diagram is shown in Figure 2.
Pt100 circuit diagram
Figure 2 Pt100 circuit diagram.
R2, R3, R4 and Pt100 form a sensor measurement bridge. In order to ensure the stability of the bridge output voltage signal, the input voltage of the bridge is stabilized to 2.5 V through
TL431
. The differential signal obtained from the bridge is amplified by a two-stage op amp and then input into the single-chip microcomputer. One arm of the bridge uses an adjustable resistor R3. By adjusting R3, the size of the differential voltage signal input to the op amp can be adjusted, which is usually used to adjust the zero point. The amplifier circuit uses the LM358 integrated operational amplifier. In order to prevent the nonlinear error caused by the excessively high single-stage amplification factor, the amplifier circuit adopts a two-stage amplification, as shown in Figure 3. The amplification factor of the first stage is about 10 times, and the amplification factor of the second stage is about 3 times. The temperature changes from 0 to 100#. When the temperature rises, the resistance of Pt100 increases, the differential signal input to the amplifier circuit increases, and the output voltage AV of the amplifier circuit increases accordingly.
Generally, in the temperature acquisition scheme using Pt100, the analog signal AV collected by the amplifier LM358 is sampled for temperature, that is, A/D conversion is performed.
After filtering the value, the A/D value must be converted to temperature. It only needs to determine the proportional coefficient K and the reference deviation B.
The C language implementation process of temperature conversion is:
temperature = (adc_data* K) - B; // Convert to temperature value
1. 2. 3 Real-time clock
The trickle charging clock chip launched by DALLAS is used. It integrates real-time clock/calendar and 31 B static RAM, and can communicate with the microcontroller through a serial interface. The real-time clock and calendar circuits provide information on seconds, minutes, hours, weeks, months, and years. The number of days in each month and leap years can be automatically adjusted. The clock operation can be determined by the AM/PM flag to use a 24-hour or 12-hour time format. The DS1302 can simply communicate with the microcontroller in a synchronous serial manner, requiring only three lines: reset (RST), I/O data line, and serial clock (SCLK).
The DS1302 has very low working power consumption. When maintaining data and clock information, the power consumption is less than 1 mW. It is easy to use it to realize automatic water supply, automatic heating control and time display. Assume that the MCU sets the alarm to 3:00 a.m. and starts the electric heating. When the CPU reads the DS1302 time as 3:00, the corresponding I/O pin will output a high level, turn on the relay to start the heater, and the same applies to the timed water supply function. At the same time, when the temperature and water level are not displayed, it can also be used as an accurate electronic clock to display the time.
1. 2. 4 Data display
This system adopts a static display method, using 3 digital tubes to alternately display the water temperature, time, and alarm information. When the key is pressed, it will also be displayed by the digital tube. The water level display is displayed by LED. The display circuit consists of 3 shift registers 74H C164 and 3 digital numbers. Each digital tube is connected to 8 1k resistors to protect the digital tube and prevent the digital tube from being burned out by excessive current. The specific circuit is shown in Figure 3.
Digital tube static display
Figure 3 Digital tube static display.
1. 2. 5 Other parts
In addition to the reset button, manual water supply and manual heating permission button, the remaining buttons of this system are for selecting setting items (temperature display or timing display). Each time the choose button is pressed, the setting function changes once. Press the + button once, the setting value is increased by 1. Press the - button once, and the setting value is reduced by 1. In order to prevent the set parameters from being lost after power failure, E2PROM is used to store the set parameters.
2 Conclusion
The solar energy engineering water heater controller designed in this paper has simple hardware design and powerful functions. The test proves that the system is stable and easy to operate, which is worth promoting. The circuit given in this paper is the most basic and simplest circuit. Its purpose is to give a control mode of a single-chip microcomputer, and more additional functions can be added according to user needs.
Previous article:Design of frequency converter structure control system based on uC/OS-II
Next article:Principle and design of voltage-balanced control system for series-connected solar cells
- Popular Resources
- Popular amplifiers
- Molex leverages SAP solutions to drive smart supply chain collaboration
- Pickering Launches New Future-Proof PXIe Single-Slot Controller for High-Performance Test and Measurement Applications
- CGD and Qorvo to jointly revolutionize motor control solutions
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Nidec Intelligent Motion is the first to launch an electric clutch ECU for two-wheeled vehicles
- Bosch and Tsinghua University renew cooperation agreement on artificial intelligence research to jointly promote the development of artificial intelligence in the industrial field
- GigaDevice unveils new MCU products, deeply unlocking industrial application scenarios with diversified products and solutions
- Advantech: Investing in Edge AI Innovation to Drive an Intelligent Future
- CGD and QORVO will revolutionize motor control solutions
- 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
- Why do DSPs with large on-chip RAM have high efficiency?
- From base stations to terminals, end-to-end 5G RF front-end solutions
- The 5G era is here. What challenges will the RF front end face?
- [HC32F460 Development Board Review] 02 Build a development environment to implement the LED marquee function
- Qorvo follows the animation to grasp the 5G RF front-end trend
- Microwave Technology and Antennas (4th Edition)
- [AutoChips AC7801x motor demo board review] + unboxing and GPIO lighting
- About the master: zhang2018yi
- Qorvo has a few things to tell you about WiFi 6
- What kind of switch is this? Where can I buy one?