Distributed management and control heat meter

Publisher:qiuxubiaoLatest update time:2012-07-06 Source: mcu99 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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.

Reference address:Distributed management and control heat meter

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

The minimum system and development of Lingyang 16-bit single-chip microcomputer SPCE061A
1 Main features of SPCE061A SPCE061A is another 16-bit microcontroller chip launched by Lingyang Technology Co., Ltd. after the μ'nSPTM (Microcontroller and Signal Processor) series products SPCE500A and others. Unlike SPCE500A, SPCE061A has only 32k flash memory FLASH built in. Its high processing speed enables SPC
[Microcontroller]
The minimum system and development of Lingyang 16-bit single-chip microcomputer SPCE061A
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号