For a long time, my country has implemented "community-style collective heating" for hot water heating, and settled accounts based on the heating area, regardless of whether the user uses heat. This settlement method is a "flat fee system", which seriously affects the enthusiasm of the heating party on the one hand, and on the other hand, due to the lack of energy-saving awareness of some users, it causes waste of resources. The heat meter, as the basis and means for the heating company to charge each user, has not only been widely accepted by users, but also strengthened users' energy-saving awareness because the heat consumption is directly related to the fee.
There are many types of heat meters, but most of them have the disadvantages of complex operation and high price. This article introduces a new type of heat meter designed using Lingyang's SPCE061A single-chip microcomputer. This heat meter not only realizes household management of heat consumption, but also allows users to control each room of their home separately; the powerful voice function makes up for the monotonous defect of the human-computer interaction interface; in addition, it has the advantages of simple structure, easy operation, and high cost performance.
"Energy saving means cost saving" This heat meter divides the working time standards into: on-duty and off-duty time, business trip time, and holiday time to meet the needs of different situations; the heat meter realizes "one control five", that is, one heat meter controls five rooms; the temperature and heating control time of each room can be set separately; the eight-digit LCD can display relevant data such as calorific value, flow value, water supply temperature, return water temperature, remaining cost, accumulated working time, etc.; voice broadcasts the temperature of each room, setting time, etc.; serial communication realizes centralized meter reading for easy management.
1. System composition
As shown in Figure 1.1, we can find that this heat meter consists of several parts, such as measurement, control, display, and low voltage protection. Then we will give a detailed description of the implementation of different functional modules.
1.1 Measuring part
In general, the measurement of heat meters includes two parts: heat and cost calculation. The specific calculation formula is as follows:
Q=V*(ρin*hin-ρout*hout) (1)
Where: V is volume, ρ is water density, h is enthalpy, Q is heat
M=k*Q (2)
Among them: k is the unit price of heat, Q is the heat, and M is the cost
Water density and enthalpy can be obtained by looking up the table when the temperature is known, so the measurement is actually to detect: inlet and outlet water temperature, flow rate, etc. In the actual design, the cost and heat calculation are performed every 20 seconds. SPCE061A can support 7-way A/D conversion, and the maximum A/D conversion rate can reach 96k/s, and the conversion result is 10-bit data. In this design, due to the high requirements for the accuracy of the inlet and outlet water temperatures, 2 PT100s are selected. The flow detection can be converted into the number of pulses sent by the meter (100 pulses are 0.001 cubic meters). In this design, SPCE061A detects the flow through the external interrupt EXT2. Each time the meter sends a pulse, it generates a square wave pulse as an external interrupt signal, and the flow is calculated by counting the number of interrupts. The two timers inside SPCE061A have a wide frequency selection range, and the time base generator inside the chip can provide more abundant timing/counting frequencies. In the design, we use a 2Hz timing frequency to make a perpetual calendar. The 20s timing can be obtained by reading the time value of the perpetual calendar. Every 20s, the system refreshes the fee value in the IC card.
1.2 Control part:
The control part of this heat meter includes: setting of various time standards, setting of temperature of each room, switch of valves in each room, voice output, etc. These control operations are basically realized by remote control. SPCE061A receives remote control signals through EXT1, and makes corresponding judgments and operations after receiving each set of data. Setting time standards means setting working hours, business trip time, and holiday time. After setting, the system will operate according to the set standards: the room temperature is kept at the set low temperature during working hours, and the room temperature is kept at the set high temperature after working hours; the room temperature is kept at the set low temperature during business trips; and the room temperature is kept at the set high temperature during holidays. The temperature of each room can also be set. It is worth noting that the bottom line of the room temperature must be greater than 4℃ to prevent pipe freezing. SPCE061A has a built-in dual-channel sounder, and the output capacity of each DAC channel is 3mA. The analog current signal converted by D/A is output through the AUD1 and AUD2 pins respectively. In this design, it is used to broadcast the temperature of each room, the set date and time, and error prompts.
1.3 Display and key operation:
This heat meter has a manual button, which can be used to query: cumulative heat value J, heat, flow, cumulative flow, water supply temperature, return water temperature, cumulative working time, remaining cost, etc. When the button is pressed, the LCD will display the relevant values, and the user can read the relevant information from it. The communication between SPCE061A and LCD is realized through the IO port. [page]
1.4 Low voltage protection, low power consumption:
SPCE061A has a built-in low voltage detection module. When the system voltage is lower than the normal working voltage bottom line, the system automatically resets to prevent the system program from running in chaos. Important data information can be saved in the FLASH of SPCE061A before the system is reset. When the system is powered on again, the saved data will be read out to continue the operation. The core of SPCE061A adopts CMOS manufacturing process and has weak vibration, idle and other modes, which greatly reduces power consumption. In addition, SPCE061A usually has two states: working and sleeping. During sleep, the CPU stops running, and the power consumption of the system is about 2uA. Of course, sleep can be awakened by buttons, interrupts, etc.
2. Hardware Design
The hardware structure schematic diagram is shown in 2.1: The main part uses SPCE061A, which is a 16-bit machine. The design of the chip embodies the SOC concept, with an embedded 32K FLASH storage space, dual 16-bit counters and timers, 14 interrupt sources, A/D, D/A conversion units, 32-bit programmable multi-function IO ports, LVD/LVR, etc. The operating speed range of SPCE061A within the operating voltage range of 2.6v~3.6v is 0.32MHz~49.152MHz, and the high operating speed makes its application field extremely wide.
The system uses 7 channels of temperature detection. These 7 analog signals are input to SPCE061A through IOA0~IOA6 and converted into digital signals through the A/D conversion unit of SPCE061A itself. 2 channels are used for measurement and 5 channels are used for room temperature detection. PT100 and thermistor are used according to different accuracy requirements.
The LCD uses an 8-bit 8-segment micro-power LCD display module LCM0826B, which consumes 4uA in display mode and 1uA in power saving mode. SPCE061A is connected to the LCD through three ports IOA8~IOA10, of which IOA8 is used for chip selection, and IOA9 and IOA10 are clock and data interfaces respectively.
The IC card uses AT24C01A to store relevant data. SPCE061A reads and writes IC cards through the two ports IOB0 and IOB1.
SPCE061A controls the solenoid valves in five rooms by connecting two external CC4097s. Different combinations of IOA13~IOA15 are used to select different solenoid valves; IOA11 and IOA12 are used to output high and low levels to control the selected solenoid valves; IOB11 and IOB12 are the state input ports of the selected solenoid valves.
3. Software Design
The workflow of this system is shown in Figure 3.1:
The first thing to do is to check for faults. During this period, the main tasks are to check whether the amount on the IC card is greater than 0 yuan, the inlet and outlet temperatures, the inlet and outlet temperatures, the flow rate, etc. If there are problems such as: no money on the card, the inlet and outlet temperatures cannot be detected, or the inlet temperature is lower than the outlet temperature, the flow rate cannot be detected, etc., the system will have relevant error messages. If there is an error, all valves will be closed and will not participate in various metering operations; if there is no error, valve control will be performed according to the selected standard, and then relevant metering will be performed.
The key scan is mainly for the manual keys on the meter. If there is a key operation, the key count is stored. In the key processing part, the relevant display is based on the count. The count of 0 shows the accumulated heat, the count of 1 shows the heat, the count of 2 shows the flow, the count of 3 shows the accumulated flow, the count of 4 shows the water inlet temperature, the count of 5 shows the water outlet temperature, the count of 6 shows the accumulated working time, the count of 7 shows the power undervoltage prompt, and the count of 8 shows the remaining charge. If there is no key operation for 30 seconds, the accumulated heat will be automatically restored.
In the remote control processing part, users can use the remote control to set business trips, holidays, cycle time, high and low temperatures for each room, and instantly control the switches of each room.
Previous article:Discussion on the stability of single chip microcomputer system in the field of measurement and control
Next article:Analysis of the structure and control technology of stepper motor
Recommended ReadingLatest update time:2024-11-16 21:35
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
- Circuit diagram of car voice mobile phone call reminder
- Wireless connectivity and lighting solutions for equipment in smart buildings
- Low-power MCU system hardware and software design issues
- MSP430F5438 Research Experience
- A fire at a Huawei construction site in Songshan Lake, Dongguan killed three people? Official response: It has nothing to do with the laboratory
- Automatic focusing system based on DSP chip TMS320F206 for numerical calculation and implementation control
- NU514-RGBW four-way control constant current linear constant current IC
- Do you know the eight important knowledge points of FPGA design?
- Common usage of MSP430 watchdog and writing method of interrupt function
- MQBoard - MicroPython microframework for managing MQTT