Intelligent water meter based on opencpu
Patent Information
- Application Number
- CN202411927387.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-04-04
AI Technical Summary
所以,每来一个脉冲,mcu就需要立刻唤醒,执行一次流量采集,在用户长时间持续用水的情况下,功耗相比于静态会有显著的增大,水表电池使用年限上将降低
[0016] By setting up an opencpu module, the present invention eliminates mcu, infrared LED, hall and external flash. The overall main control circuit board has high integration, small size, reduced circuit design complexity, and fewer PCB board traces, which reduces material costs and reduces the complexity of the corresponding circuit. Moreover, opencpu is not like ordinary mcu+ modules. mcu directly participates in the measurement of traffic. Opencpu only reads the flow data of the metering module through the serial port, so opencpu only needs to wake up regularly to read the traffic data and report data to the platform, and only sleeps at other times. Opencpu sleep time is much greater than the wake-up time, and the power consumption of the whole machine is low; Opencpu's internal flash space is large, and under the premise of low cost, it can support more water meter application functions to implement. Opencpu has integrated network communication modules, which is faster to go online and lower power consumption faster to go online than external independent ones.
Smart Images

Figure CN119756495A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to an intelligent water meter, in particular to an opencpu-based intelligent water meter. Background Art
[0002] At present, most smart water meters use an independent MCU and an NB module as the core part of the main control board of the smart water meter. At the same time, after the acquisition module collects a unit of command flow, it sends a pulse to the main control board. After the main control board collects the pulse, it performs a flow measurement. In this way, an independent MCU is required. Now the market price competition is fierce, and an MCU of a few dollars makes it difficult to further reduce the production cost. Moreover, these MCUs often use the cortex-m0 core or other early cores for low power consumption. Although the power consumption is low, the chip performance is also reduced.
[0003] When the smart water meter interacts with the platform, a lot of communication is required between the MCU and the module, which takes a lot of time. The existing water meter MCU codes are basically bare metal development, and the overall operating efficiency is not as good as RTOS. The MCU clock frequency used in smart water meters is usually relatively low, and because the frequency of MCU wake-up is very high, in order to reduce overall power consumption, the maximum clock frequency will not be used. The low clock frequency leads to low efficiency of MCU code execution. Since the internal flash of the MCU is generally small, the collected flow data and some record information of the water meter operation are stored using an external flash chip. This additional storage chip will also lead to an increase in cost. Not only may the communication with the flash chip be subject to external interference, but the flash chip itself may also fail. At the same time, the small internal flash of the MCU has been occupied by most of the basic functions of the water meter such as metering, information recording, and online, making it impossible for the MCU to further add more additional features and customer customization needs. Replacing the MCU with a larger space will lead to an increase in cost. The existing smart water meter anti-tampering and button functions are generally implemented using two Hall chips with the same operating logic, which is wasteful in usage. The existing smart water meter uses an independent visible light LED for human-computer interaction, and uses invisible infrared light for external communication. The two parts are separated, which is also wasteful in usage. In the existing smart water meter, the acquisition module sends a pulse to inform the MCU that there is a new flow change of 1 unit. Therefore, for each pulse, the MCU needs to wake up immediately and perform a flow acquisition. When the user continues to use water for a long time, the power consumption will increase significantly compared to the static state, and the battery life of the water meter will be reduced. Summary of the invention
[0004] The purpose of the present invention is to provide an opencpu-based smart water meter in order to overcome the defects of the above-mentioned prior art.
[0005] The purpose of the present invention can be achieved by the following technical solutions:
[0006] A smart water meter based on OpenCPU, comprising a water meter body, a main control circuit board and a metering module; the main control circuit board comprises an OpenCPU module, a power module, a communication light module, an anti-disassembly module and a burning module; the metering module, the power module, the communication light module, the anti-disassembly module and the burning module are all connected to the OpenCPU module.
[0007] Furthermore, the opencpu module adopts the Cortex-M3 core, uses the freertos operating system internally, and uses the Yixin ec616 chip with a 4M large space flash; the opencpu module and the metering module are connected to the serial port and interact using a protocol.
[0008] Furthermore, the communication light module uses a red visible light emitting tube, and by sending specified information, the red visible light emitting tube simulates a conventional indicator light to inform the user that a key has been triggered normally.
[0009] Furthermore, the anti-disassembly module uses a single Hall element U5 to collect changes in the surrounding magnetic field and simultaneously realize the button and anti-disassembly functions.
[0010] Furthermore, the burning module is used for burning programs, and can also be used for outputting system logs during normal operation.
[0011] Furthermore, the opencpu module is also connected to a sim card and an antenna, the sim card is used to identify identity information, and the antenna is used to send and receive signals.
[0012] Furthermore, the protocols supported by the OpenCPU module include UDP, TCP, MQTT, CoAP and LWM2M. It can communicate directly with the general cloud platform through these protocols, and encapsulate the customer's private protocol based on these protocols to achieve communication with the customer's private platform, and can upgrade the system firmware through the private protocol.
[0013] Furthermore, a CLI is provided inside the opencpu module to improve debugging efficiency.
[0014] Furthermore, the system removes external flash and eeprom.
[0015] Compared with the prior art, the present invention has the following advantages:
[0016] The present invention eliminates the need for MCU, infrared LED, Hall and external flash by setting up the opencpu module. The overall main control circuit board has high integration, small size, reduced circuit design complexity, and fewer PCB board wiring, which reduces material costs and the complexity of the corresponding circuit; and unlike the common MCU+module method, the opencpu is not directly involved in the flow metering, and the opencpu only reads the flow data of the metering module through the serial port, so the opencpu only needs to wake up regularly to read the flow data and report data to the platform, and only needs to sleep at other times. The sleep time of the opencpu is much longer than the wake-up time, and the power consumption of the whole machine is low; the internal flash space of the opencpu is large, and it can support the realization of more water meter application functions under the premise of low cost, and the network communication module is integrated inside the opencpu, which is faster to go online, has lower power consumption and is faster to go online than the external independent one. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 A schematic diagram of the opencpu module structure provided by the present invention;
[0018] Figure 2 A circuit diagram of the main control circuit board provided by the present invention;
[0019] Figure 3 A circuit diagram of the anti-disassembly module provided by the present invention;
[0020] Figure 4 A circuit diagram of a metering module provided by the present invention;
[0021] Figure 5 A circuit diagram of a communication light module provided by the present invention;
[0022] Figure 6 SIM card circuit diagram provided by the present invention;
[0023] Figure 7 The antenna circuit diagram provided by the present invention;
[0024] Figure 8 This is a circuit diagram of the programming module provided by the present invention.
[0025] The numbers in the figure show:
[0026] 1. opencpu module; 2. metering module; 3. power module; 4. communication light module; 5. anti-tampering module; 6. burning module; 7. sim card; 8. antenna. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0028] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0029] Example
[0030] like Figures 1 to 8As shown, a smart water meter based on OpenCPU (open computer system), the smart water meter includes a water meter body (not shown), a main control circuit board and a metering module 2, the main control circuit board and the metering module are both located inside the water meter body; the main control circuit board includes an OpenCPU module 1, a power module 3, a communication light module 4, an anti-disassembly module 5 and a burning module 6; the metering module 2, the power module 3, the communication light module 4, the anti-disassembly module 5 and the burning module 6 are all connected to the OpenCPU module 1, the power supply voltage acquisition of the power module 3 directly uses the internal circuit of the module chip to acquire the voltage on the power supply pin of the module, and no other external circuit is required; the OpenCPU module 1 is also connected to a SIM card 7 and an antenna 8, the SIM (user identity card) card 7 is used to identify identity information, and the antenna 8 is used to send and receive signals. The opencpu module 1 adopts the Cortex-M3 (32-bit microprocessor core) core and uses the freertos (embedded real-time operating system kernel) operating system internally to realize the scheduling of internal functions and protocol stacks. Compared with bare metal programming and the cortex-m0 core, it greatly improves the system operation efficiency. In addition, the use of the Yixin ec616 chip with a 4M large space flash (non-volatile memory technology) can transfer the information originally stored externally to the opencpu internal flash, saving an external storage chip and related control circuits and wiring, eliminating the risk of communication interference with the external storage chip and the risk of the storage chip itself being damaged by moisture; compared with ordinary single-chip microcomputers, opencpu has a higher clock frequency and Larger flash space, using real-time operating system in software, the overall operation has higher operating efficiency than bare metal; after OpenCPU enters deep sleep, except for the wake-up part and RTC (real-time clock) part, all chip peripherals and RAM (storage device) are powered off, and all running data is lost. Each wake-up of OpenCPU is similar to a reset, executing the reset process, initializing all peripherals, and restoring the last working state from the internal flash; this method is equivalent to OpenCPU performing a controllable periodic reset, which significantly improves the overall stability of the system; and the sleep time of each OpenCPU corresponds to the next task trigger time. After waking up and executing the corresponding task and no new tasks are added, OpenCPU will enter sleep again. Based on this mode, the program monitors the working time of each wake-up of OpenCPU. If it does not enter sleep for a long time, a reset is performed to improve the robustness of the system.
[0031] The opencpu module 1 and the metering module 2 are connected to each other through serial ports and interact using a protocol. Compared with the previous pulse method, more information can be obtained and more control can be performed on the acquisition board. Since pulses are not used to obtain flow information, the opencpu no longer needs to wake up once for each pulse. According to the protocol, the opencpu can wake up once for a long time to obtain flow information in each period during this period, thereby reducing power consumption.
[0032] The opencpu module 1 supports protocols such as udp, tcp, mqtt, coap and lwm2m, and can communicate directly with the general cloud platform through these protocols, and encapsulate the customer's private protocol based on these protocols to achieve communication with the customer's private platform, and can upgrade the system firmware through the private protocol; the opencpu module 1 is internally provided with a CLI (command line interface) to improve debugging efficiency; the system also removes external flash and eeprom. .
[0033] The communication light module 4 uses a red visible light emitting tube. Compared with the commonly used infrared communication circuit, the infrared LED is replaced with a visible light LED, and the status indicator light is removed. When the indicator light needs to flash, the red visible light emitting tube simulates a conventional indicator light by sending specified information to inform the user that a button has been triggered normally.
[0034] The anti-disassembly module 5 uses a single Hall element U5 to collect changes in the surrounding magnetic field and realize the key and anti-disassembly functions at the same time. During daily operation, it cooperates with the magnetic steel on the base meter to realize the anti-disassembly function of the meter; during production and maintenance, a magnet is used to interfere with the magnetic field of the base meter magnetic steel to trigger the change of the Hall chip output level to realize the meter wake-up function. Specifically, when the electronic module part of the meter is on the base meter, the magnetic steel on the base meter will cover U5, causing U5 to output a high level. When the electronic module part of the meter is removed from the base meter part, U5 is not covered at this time, and it outputs a low level. Through the duration of the high and low levels, it can be judged whether the base meter is removed to realize the anti-disassembly function of the meter. Regardless of whether the electronic part is on the base meter, a strong magnet is used externally to scan the specified position of the electronic part, and U5 will output a pulse. After filtering this pulse in the program, it is used as a key signal to realize the meter wake-up function.
[0035] The burning module 6 is used for burning programs, and can also be used for outputting system logs during normal operation.
[0036] The circuit diagram of each module in the present invention is as follows Figures 2 to 8 shown.
[0037] The preferred specific embodiments of the present invention are described in detail above. It should be understood that a person skilled in the art can make many modifications and changes based on the concept of the present invention without creative work. Therefore, any technical solution that can be obtained by a person skilled in the art through logical analysis, reasoning or limited experiments based on the concept of the present invention on the basis of the prior art should be within the scope of protection determined by the claims.
Claims
1. An opencpu-based smart water meter, characterized in that: The smart water meter comprises a water meter body, a main control circuit board and a metering module (2); the main control circuit board comprises an opencpu module (1), a power module (3), a communication light module (4), an anti-disassembly module (5) and a burning module (6); the metering module (2), the power module (3), the communication light module (4), the anti-disassembly module (5) and the burning module (6) are all connected to the opencpu module (1).
2. The opencpu-based smart water meter according to claim 1, characterized in that: The opencpu module (1) adopts a Cortex-M3 core, uses a freertos operating system internally, and uses a Yixin ec616 chip with a 4M large space flash; the opencpu module (1) and the metering module (2) are connected to each other via a serial port and interact using a protocol.
3. The opencpu-based smart water meter according to claim 1, characterized in that: The communication light module (4) uses a red visible light emitting tube. By sending designated information, the red visible light emitting tube simulates a conventional indicator light to inform the user that a key has been triggered normally.
4. The opencpu-based smart water meter according to claim 1, characterized in that: The anti-disassembly module (5) uses a single Hall element U5 to collect changes in the surrounding magnetic field and simultaneously realize the key pressing and anti-disassembly functions.
5. The opencpu-based smart water meter according to claim 1, characterized in that: The burning module (6) is used to burn the program and can also be used to output the system log during normal operation.
6. The opencpu-based smart water meter according to claim 1, characterized in that: The opencpu module (1) is also connected to a sim card (7) and an antenna (8), wherein the sim card (7) is used to identify identity information, and the antenna (8) is used to send and receive signals.
7. The opencpu-based smart water meter according to claim 1, characterized in that: The protocols supported by the OpenCPU module (1) include UDP, TCP, MQTT, CoAP and LWM2M. The OpenCPU module (1) can directly communicate with the general cloud platform through these protocols, and encapsulate the customer's private protocol based on these protocols to achieve communication with the customer's private platform, and can upgrade the system firmware through the private protocol.
8. The opencpu-based smart water meter according to claim 1, characterized in that: The opencpu module (1) is internally provided with a CLI for improving debugging efficiency.
Citation Information
Patent Citations
Low-power-consumption cover opening alarm with multi-stage alarm function and control method
CN112258807A
Fault diagnosis system for rail transit vehicle-mounted controller
CN112666923A
Electronic equipment state modification method and device
CN112732069A
NB-IoT intelligent gas meter based on OpenCPU technology
CN113063471A
Automatic burning system of Internet of Things module
CN117215601A