The faucet is the "conductor" of water and an indispensable water-using device in people's lives. The existing double-type faucet can connect two hot and cold pipes at the same time. The method of adjusting the water temperature is to manually adjust the mechanical position of the valve to control the water outlet ratio of the hot and cold water pipes. The adjustment is complicated, and a lot of water is wasted during the adjustment process. Even the adjusted water temperature will be affected by the change of water pressure, which reduces the comfort of use. There may even be extreme cases where the water temperature suddenly changes and the body is scalded. As an intelligent controller, the single-chip microcomputer has been widely used in various household appliances to provide users with better services. This article mainly introduces the method of using single-chip microcomputer control to achieve precise adjustment of the water outlet temperature of the faucet and avoid water waste. It is an intelligent transformation of the faucet based on the single-chip microcomputer.
1 Design and working principle
The system design and working principle are shown in Figure 1. Hot water and cold water flow in separately and mix in 0 to achieve temperature neutralization. When the mixed water temperature reaches the set value, 3 is turned on to supply water. When the water temperature does not reach the set value, 4 is turned on to discharge the water in the mixing water chamber 0 to the water inlet of the heating device (such as a gas water heater) for recycling and reducing unnecessary waste.
The water inlets 1 and 2 are controlled by electric regulating butterfly valves, and the water outlets 3 and 4 are controlled by electric quick-cut butterfly valves. DS18820 temperature monitoring points are set in the hot water inlet 1, the cold water inlet 2 and the mixing water chamber 0. The microcontroller drives the electric actuator to control the opening of the electric regulating valve according to the collected field temperature, thereby controlling the water inlet of 1 and 2, and quickly opening or cutting off the water outlet of 3 and 4.
2 Hardware Circuit Design
The faucet control is based on the STC12C5A08PWM microcontroller of Hongjing Technology. It detects the field temperature signal collected by DS18820 and makes corresponding control processing after analysis. The setting and display of water temperature are respectively input by keyboard and displayed by digital tube. The adjustment of the cold and hot water inlet is realized by the output of the microcontroller through the relay driving the regulating valve. The pulse width modulation (PWM) frequency conversion technology is used to intelligently control the water flow size to achieve accurate ratio. The system design block diagram is shown in Figure 2.
2.1 Single chip control module
It is implemented by STC12C5A08PWM single-chip microcomputer, which is a new generation of 8051 single-chip microcomputer with high speed, low power consumption and super anti-interference. The instruction code is fully compatible with the traditional 8051, but the speed is 8 to 12 times faster. It integrates MAX810 dedicated reset circuit, watchdog, two-way PWM, 8 KB FLASH ROM, 1 280 B RAM, and supports ISP.
2.2 Temperature sensor module
The single bus digital temperature sensor DS18820 produced by DALLAS is used to measure water temperature. It can directly output 9-12 bit (binary) temperature readings, which is convenient for single chip microcomputer processing. The DS18820 measurement temperature range is -55~+125℃, and the accuracy is ±0.5℃ within the range of -10~+85℃. The temperature can be converted into a 12-bit binary digital value within 750 ms (minimum value), and the temperature acquisition is accurate and timely. DS18820 adopts a single bus data transmission method. Multiple DS18820 can be connected to a bus to achieve multi-point temperature measurement and easily form a sensor network. In this system, the hot water inlet temperature T1, the cold water inlet temperature T2 and the faucet outlet temperature T3 are detected respectively.
2.3 Display module
The system is designed with two-digit eight-segment digital tubes, which are directly driven by the I/O port of the microcontroller and use a dynamic display method to display the temperature value set by the user.
2.4 Keyboard module
This system requires three buttons, using a three-button independent keyboard, directly connected to the microcontroller I/O port, and using software debounce. The functions of the three buttons are shown in Table 1.
2.5 Water flow control module
As shown in Figure 1, the hot water and cold water inlets 1 and 2 use electric regulating butterfly valves, and the microcontroller controls the amount of water inlet by controlling the opening of the regulating butterfly valve. The 2-way PWM logic inside the microcontroller is used to generate a high-frequency PWM signal, and the electric regulating butterfly valve is driven by the electric actuator, thereby reducing the work of the software and improving the efficiency of the software. The faucet outlet 3 and the circulating water outlet 4 use electric fast-cut butterfly valves to achieve fast water switching under the control of the microcontroller.
3 Software Design
This control system is a control system centered on a single-chip microcomputer. The single-chip microcomputer combines certain peripheral circuits to complete system data input, temperature acquisition, output control signals, and real-time display. It is a complete intelligent control system. Figure 3 is a system program flow chart that shows the control idea of the entire process.
The control algorithm of the electric butterfly valve according to temperature is as follows: first, the system set temperature T is compared with the cold water temperature T2 and the hot water temperature T1, which is divided into the following three cases:
The first type: If T-T2>T1-T, fully open the cold water inlet butterfly valve and half open the hot water inlet butterfly valve;
The second type: If T-T2 < T1-T, fully open the hot water inlet butterfly valve and half open the cold water inlet butterfly valve;
The third type: If T-T2=T1-T, fully open the hot water inlet butterfly valve and the cold water inlet butterfly valve;
The temperature T3 of the water outlet of the system tap gradually increases with the system working time. When T3
4 Conclusion
The system proposes a method to realize constant temperature control of faucet water outlet by using single chip microcomputer, temperature sensor, butterfly valve and other control circuits, which solves the inconvenience of traditional manual temperature adjustment and avoids water waste in the temperature adjustment process. It is convenient for users to use and realizes accurate setting of water temperature and constant temperature water use. It has high practical value.
Previous article:Design of Simulating Fully Automatic Washing Machine Based on Single Chip Microcomputer SPMC75
Next article:Design and implementation of handheld multimedia system based on ARM Linux QT
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- 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
- Some matters needing attention in the design of multi-channel output switching power supply
- In a single-chip computer, writing 1 clears it to 0, and writing 0 clears it to 0. What is the difference?
- 【Help】Sensor selection for a certain op amp circuit
- DIY thermal imaging is convenient for observing frictional heat generation
- RP2040 components purchased from element14 event
- Flushing steps (smart toilet development record)
- How to speed up MobaXterm pasting
- Award-winning live broadcast | The new Infineon MOSFET based on Source-down technology effectively improves power density, which is visible to the naked eye
- Bike modification series: Modification buttons
- Hot Questions and Answers: What else can you do besides IT?