Abstract: A fully automatic solar water heater controller is designed. The system uses a low-power, 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 and other functions. It uses E2PROM 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 is easy to use, high stability, energy-saving, and has high practicality.
Keywords: engineering water heater; controller; AVR; control circuit
0 Introduction
With the improvement of people's living standards, the use of various water heaters has become quite popular, and the corresponding controllers 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 "full automatic" control to achieve the simplest use, just like home TVs and refrigerators, just turn on the power, set it up and don't worry about it anymore. In view of the fact that the domestic solar water heater market is constantly expanding, and the corresponding controller is in urgent need of improvement, this solar water heater controller was developed. The solar water heater designed in this paper uses AVR Mega 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 temperature setting and control functions. 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 instruments, 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 in the field 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 a water level sensor (pressure type), including T2; T1 is a collector top temperature sensor; T2 is a water tank temperature sensor, integrated with the water level W; T3 is an antifreeze circulation temperature sensor (installed at the lowest temperature point of the collector circulation pipeline); T4 is a water pipe temperature sensor (installed at the lowest temperature point of the water circulation pipeline); T5 is a 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 a collector pipeline circulation pump, which is also used as an antifreeze circulation pump; P2 is a water pipe circulation pump (it can also be used in the form of a solenoid valve + automatic booster pump); E1 is a water supply solenoid valve (tap water directly enters the water tank for water replenishment); E2 is a top water solenoid valve (tap water enters the collector, and top water enters the water tank); EH1 is an electric heater; EH2 is an electric heating belt (optional).
1.2 Main functions and descriptions
In the solar water heating project control system, the following functions need to be realized: 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 anti-freeze electric heating, water pipe anti-freeze, 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 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 of Atmel Company, which has the advantages of high performance, high confidentiality and low power consumption. The program memory and data memory are independently accessible Harvard structures with high code execution efficiency. The AVR Mega 32 processor used in the system includes 32 KB on-chip programmable FLASH program memory; 1 KB E2PROM and 2 KB RAM; watchdog integrated on the chip; 8-way 10-bit ADC; 3-way programmable PWM output; 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 working contents of the single-chip microcomputer. When the single-chip microcomputer is busy with various work 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 the key operation can be responded to in time without wasting too much CPU working time. Usually, there are three working modes of keyboards, namely programmed scanning, timed scanning and interrupt scanning. In order to further improve the working efficiency of scanning keyboards, interrupt scanning 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, ..., OFH, 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 anti-freeze electric heating, water pipe anti-freeze and other functions are to detect water temperature and water level in multiple places of the system, that is, the analog quantity of the sensor is converted into A/D through the 8-channel 10-bit ADC built into the AVR Mega 32.
PT100 sensor is now mostly used to detect water temperature, and the circuit diagram is shown in Figure 2.
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 microcontroller. 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 will be sampled for temperature, that is, A/D conversion will be performed.
After filtering the numerical 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 a 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 the number of days in leap years can be automatically adjusted. The clock operation can determine the 24-hour or 12-hour time format through the AM/PM flag. The DS1302 and the microcontroller can simply communicate in a synchronous serial manner, requiring only 3 lines: reset (RST), I/O data line, and serial clock (SC-LK). DS1302 has very low working power consumption. When data and clock information are maintained, the power consumption is less than 1mW. It is easy to use it to realize automatic water supply, automatic heating control and time display. Assuming that the single chip microcomputer here sets the alarm to 3 o'clock in the morning, the electric heating is started. When the CPU reads the DS1302 time as 3 o'clock, the corresponding I/O pin can output a high level, turn on the relay to start the heater, and the timed water supply function is the same. 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 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 74HC164 and 3 digital numbers. Each digital tube is connected to 8 1 kΩ 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.
1.2.5 Other parts
Except for the reset button, manual water filling 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, and the setting value will increase by 1. Press the "-" button once, and the setting value will decrease 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 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:Application of observer-based method in three-phase inverter fault diagnosis
Next article:Principle of color display energy-saving control circuit
- 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!
- 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
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- TMS320F28335 SVPWM source program
- 【RPi PICO】CircuitPython Firmware
- Microwave Circuit Appreciation
- Microcontroller learning notes, teach you how to learn in three steps!
- msp430f5529 uart pwm adc
- WiFi NeoPixel Cube
- [Help] In the design of lithium battery power modules, why is every 1V of lithium battery voltage very valuable?
- [DIY Bing Dun Dun] + Limited Edition Homemade Dun Dun is here
- EEWORLD University Hall----Live Replay: Unlocking New Possibilities of TI Sitara AM2x MCU in Motor Drive
- 02.USART routines and tests