In my country, IC card water meters appeared around the early 1990s, and have gradually matured after more than 10 years of rapid development. Especially in recent years, with the improvement of design level and the scale of production, they have been used more and more in large and medium-sized cities. IC card water meters are mechatronic products that integrate measurement and control. In addition to the basic functions required by general instruments, they also have their own characteristics. For example, waterproof and moisture-proof measures must be taken for them; for example, IC card water meters must have the characteristics of low cost, low power consumption, small size and high precision, which are the four elements of IC card water meters. In the design process, the design must be based on these four elements to meet the actual application requirements of the product.
1. Composition of measurement and control circuit and software design of IC card water meter 1.1 Composition of measurement and control circuit of IC card water meter The block diagram of measurement and control circuit is shown in Figure 1. Considering the requirement of low cost, the main chips of this system are AT89C2051-12PI, PCF8564 and AT24C01. Its basic working principle is: using event trigger mechanism, that is, it is usually not powered on, so the power consumption is only the sleep state consumption of PCF8563, about 250nA [1]. There are three types of event trigger modes, namely "counting event" when the reed switch is energized, "card insertion event" when the card operation is performed, and "timing event" when the timer alarm preset in the calendar clock chip occurs. When these three types of events occur, the measurement and control circuit automatically powers on, processes according to the preset working process, and automatically powers off after completion. According to the water consumption of residents, the time required for the measurement and control circuit to work is generally about 0.3 seconds to 1 minute per day. Considering the requirement of low power consumption, it is scientific and reasonable to adopt the event trigger mechanism. Some designs use liquid crystal long-term display. Although the power consumption requirements can be met when calculating the life theoretically, according to the actual operation situation in my country, there is no need for long-term display. Obviously, this design method is not suitable unless the battery characteristics require it, such as when using lithium thionyl chloride batteries. 1.2 Software Design The basic software function block diagram is shown in Figure 2.
According to the above three types of events, the control board is required to start the working state, help the program first determine what type of event has occurred and refine the type and then handle it separately. For example, in the case of a card operation event, it is again determined which function card requires the operation. Due to the requirements of miniaturization and low cost, the program does not use the C language with large redundancy, but is compiled in assembly language to control the program code within 2K bytes [2], so a small-sized and low-cost single-chip microcomputer can be selected. Some large and medium-sized cities have introduced tiered water prices. The calculation of tiered water prices is mainly completed by software based on calendar clock chips and memory chips. Under the current national conditions, it will take some time for it to be truly implemented on a large scale. When the implementation of tiered water prices leads to an increase in software volume, chips such as AT89C4051-12PI and AT24C16 or even AT24C256 can be used to meet the requirements, and all other hardware designs can remain unchanged. [page]
2 Working principle of sampling power supply module The circuit schematic diagram of sampling power supply module is shown in Figure 3. In Figure 3, Q1 and Q2 form a switch circuit to control the power on and off of the measurement and control board. When GHG1 is attracted by water, a sampling event occurs, and the charging process of C1 begins. The charging current turns on the switch group and powers on, completing the sampling and counting function. When GHG2 is attracted by water, C1 is discharged so that it is effective when the next sampling event occurs. This design can prevent miscounting due to frequent attraction and release of GHG1 caused by unstable water pressure. Another function of C1 is that even if GHG1 is attracted for a long time, the measurement and control board can be kept in a power-off state to ensure low power consumption performance. The function of C4 is to suppress the influence of mechanical jitter of GHG1 on counting. The function of C2 is to provide another trigger pulse when C1 is fully charged but not yet discharged and is attacked by magnetism, so that the measurement and control board can be powered on to close the valve and record the time and number of magnetic attacks. From the above analysis, it can be seen that C1 and C2 should use capacitors with small leakage current as much as possible to improve the working performance of the module.
3 Dual power supply design The so-called dual power supply means that the measurement and control circuit and valve drive each use a set of batteries. After observing the voltage waveforms of a large number of actual measurement and control boards, it was found that under the condition of single power supply, the voltage sometimes jumps at the moment of motor start-up, generally reaching 1.5V100ms, especially when the battery power is not sufficient. Due to the use of floating voltage working mode, although the system sometimes still works normally, the impact of this pulse interference input on the control system is self-evident. This not only affects the working stability of the microcontroller and other chips, but also causes serious damage to the battery. Such problems are not easy to occur when the battery power is sufficient. After a few years of large-scale installation and use, this problem will bring more serious consequences. Some representative manufacturers have adopted dual power supply design, but adopt a common ground design. This is not only difficult to completely solve the above problems, but may even cause dangerous situations due to the asynchronous voltage of the two sets of batteries. After testing after adopting optocoupler isolation, the voltage of the measurement and control board has only a small ripple superposition when the motor is driven. Even if the battery power is insufficient, there is no voltage jump phenomenon, which ensures the long-term stability of the measurement and control board. Although the material cost has increased, the after-sales service cost has been reduced and the company's credibility has been improved. The overall benefit is satisfactory.
4 Valve fuzzy controller design
4.1 Necessity of fuzzy control With the improvement of measurement accuracy, designers have begun to pay more attention to the other side of measurement and control, namely control, in recent years, such as using intelligent control technology to control valves and using soft start technology of motors to protect the battery life. Although the water meter industry stipulates six-year mandatory inspection, according to the actual operation of our country, IC card water meters should have a longer service life to reflect the value of the product. At present, power consumption is no longer the main contradiction, and the life of the battery itself basically determines the service life of the IC card water meter. What is more critical nowadays is that the corrosion of the valve causes the increase of the driving current, which in turn causes damage to the battery and failure of the valve, thus causing the failure of the IC card water meter. Because of this bottleneck problem, its service life is greatly reduced, and some IC card water meters even fail after only two years of use, which is much lower than the expected life. This fault will become more and more prominent as the service life increases. In the past 10 years, designers have used pilot valves, magnetic booster valves, stainless steel valve cores, ceramic valve cores and lubricants, but the effect is not obvious. There is also a design that uses a timed valve switch, that is, let the time interval be D. If calculated based on a six-year service life, then: D=(2190E1)/E In the formula, E is the total available power of battery pack 2; E1 is the power required to switch the valve once. Although this method can alleviate this problem to a certain extent, the valve corrosion process caused by different times and places is different. It is obviously unscientific to adapt to the complex and changing corrosion conditions with a certain rule. It is not only not conducive to the reasonable use of limited power, but also bound to cause a certain failure rate. The mathematical model of the corrosion situation is difficult or impossible to establish accurately. In this case, the use of fuzzy control theory can often achieve satisfactory results.
4.2 Determination of control variables In order to overcome the shortcoming of the large amount of calculation of fuzzy algorithm, the table lookup method is used for fuzzy control. That is, the MATLAB fuzzy logic toolbox is used for offline design to obtain a fuzzy control table that meets the control requirements and store it in the system memory. This study uses the deviation e=I-Ig between the collected driving current value I of the electric control valve and the set current value Ig and the rate of change of the deviation between two adjacent times as input variables, and the time adjustment amount U of the next switch of the electric control valve as the output variable. A typical double-input single-output PD structure fuzzy controller is established, and the control parameters are set using the fuzzy inference system editor (FIS).
4.3 The fuzzy experiment of variables shows that the safe range of the driving current is between 50 and 100 mA. Under normal circumstances, the electric control valve can be switched on and off once every 10 days to ensure that the valve will not rust. This design selects 75 mA as the given value of the driving current and selects 10 days as the given driving cycle. On this basis, adjustments are made and the adjustment range is set to 2 to 18 days. Then the basic domain of e is set to [-25, 25], the basic domain of ec is also set to [-25, 25], and the basic domain of u is set to [-8, 8]. Due to space limitations, the specific design process is omitted here.
Through the above analysis and the actual use of more than 20,000 IC card water meters in service, the following conclusions can be drawn: (1) The use of dual power supplies can significantly improve the working reliability of the measurement and control board, protect the battery, increase the service life of the IC card water meter and reduce the failure rate. (2) The use of fuzzy control technology can more effectively use limited power and avoid valve rust, completely solving the "valve bottleneck" problem of the service life of IC card water meters.
Previous article:Using infrared transceiver chip to realize communication between single chip microcomputers
Next article:Design and implementation of radio frequency communication base station based on single chip microcomputer control
- Popular Resources
- Popular amplifiers
- Capacitor-free, low-dropout linear regulator in 180nm CMOS for hearing aids
- Low-Noise, High-Precision Linear Power Supply with Thermal Foldback Protection
- Development of multi-AC/DC power supply systems for home and laboratory use
- Design and simulation of a new type of DC power supply based on dual-bridge matrix converter
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!
- 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
- [Raspberry Pi 4B Review] + Real-time status monitoring website test service resource usage
- The latency of cache in arm system refers to
- 【W806 Lianshengde Development Board】Real-time performance
- CC1352R SimpleLink High-Performance Dual-Band Wireless MCU
- Howland's improved circuit output resistance
- Ov7670 image acquisition source program based on TINYM0 LPC1114
- Pingtouge Scenario-based Bluetooth Mesh Gateway Program Burning
- How to improve the anti-interference (radiation) ability of operational amplifiers
- Embedded Systems Study Guide
- What is Zigbee technology in the Internet of Things?