Single-channel power supply control circuit and device for detecting energy consumption of electric appliance
By designing a single-channel power control circuit including a current sampling module, a voltage sampling module and an energy metering module, the difficulty of calibration of electrical parameter metering comparison and calibration in electrical energy consumption detection is solved, and efficient power control and accurate energy consumption detection are achieved.
Patent Information
- Application Number
- CN202421787524.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-25
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2034-07-25
AI Technical Summary
The prior art has difficulty in calibration of electrical parameter metering and comparison in electrical energy consumption detection, which limits the research and design of power control systems.
A single-channel power supply control circuit is designed, including load, sampling resistor, current sampling module, voltage sampling module, power metering module and main control module. It uses TM7780 power metering chip and ESP-12F module to realize power control without comparison and calibration.
It realizes simple and efficient power control, can effectively meet the market's demand for power management, solves the energy consumption detection problem of electrical appliances, and the overall working accuracy of the system can reach 2%.
Smart Images

Figure CN222926773U_ABST
Abstract
Description
Technical Field
[0001] The utility model relates to the technical field of electric energy measurement, in particular to a single-channel power control circuit and device for electrical energy consumption detection of electrical appliances. Background Art
[0002] In the current stage of development, the interaction between the APP (Application) and the communication circuit has been quite perfect. However, the design difficulty in effectively integrating the power control system with the socket still lies in the design of the electrical parameter measurement circuit. In traditional design schemes related to electric energy metering, a relatively common scheme is to use a traditional electric energy meter metering chip. Through current and voltage sampling, and then after comparison and calibration with standard parameters, accurate metering of electric energy parameters is achieved. However, in actual production, due to different industry technologies, the research technology of the power control system for electrical energy consumption detection of electrical appliances cannot be fully mastered. And due to differences in resources and production processes, and the technical threshold of comparison and calibration, there are also great difficulties in the process of comparing and calibrating electric energy parameters, which once restricted the research and design of the power control system. Therefore, it is necessary to provide a simple and efficient power control device that does not require comparison and calibration to solve the problem of electrical energy consumption detection of electrical appliances. Summary of the Utility Model
[0003] The utility model aims to solve at least one of the technical problems in the related technologies to some extent. For this reason, the first object of the utility model is to provide a single-channel power control circuit for electrical energy consumption detection of electrical appliances. The circuit provides a simple and efficient power control scheme that does not require comparison and calibration, which can effectively meet the market demand for power management and solve the problem of electrical energy consumption detection of electrical appliances.
[0004] The second object of the utility model is to provide a single-channel power control device for electrical energy consumption detection of electrical appliances.
[0005] To achieve the above object, the utility model is realized through the following technical solutions:
[0006] A single-channel power control circuit for electrical energy consumption detection of electrical appliances includes: a load, a sampling resistor, a current sampling module, a voltage sampling module, an electric energy metering module, and a main control module; wherein, the load and the sampling resistor are connected in series and then connected to the live wire input terminal and the neutral wire input terminal. The current sampling module is connected in parallel with the sampling resistor, and two output terminals of the current sampling module are used as differential input terminals and connected to the electric energy metering module. One end of the voltage sampling module is connected to the load, the other end of the voltage sampling module is connected to the electric energy metering module, and the electric energy metering module is connected to the main control module.
[0007] Preferably, the electric energy metering module includes a differential signal processing unit, a voltage input signal processing unit, and a signal processing and frequency conversion unit, and the differential signal processing unit and the voltage input signal processing unit are respectively connected to the signal processing and frequency conversion unit.
[0008] Preferably, the circuit further includes an opto-coupling module, and both the setting end and the signal output end of the electric energy metering module are connected to the main control module through the opto-coupling module.
[0009] Preferably, the current sampling module includes a first resistor, a second resistor, a first capacitor, and a second capacitor. The first resistor, the second resistor, the first capacitor, and the second capacitor are connected in series and then connected in parallel with the sampling resistor. The second end of the first capacitor and the first end of the second capacitor are both grounded, and the first end of the first capacitor and the second end of the second capacitor are respectively used as the two output ends of the current sampling module.
[0010] Preferably, the voltage sampling module includes a third resistor to a ninth resistor and a third capacitor. The third resistor to the ninth resistor are connected in series, the third capacitor is connected in parallel with the ninth resistor, the third resistor is connected to the load, one end of the ninth resistor is connected to the electric energy metering module, and the other end of the ninth resistor is grounded.
[0011] Preferably, the circuit further includes a voltage conversion module, which is respectively connected to the live wire input terminal, the neutral wire input terminal, the electric energy metering module, and the main control module.
[0012] Preferably, the circuit further includes a relay, a relay driving module, and a pulse power supply module. The relay includes five pins. Among them, the first pin and the second pin of the relay are respectively connected to the output end of the relay driving module, the third pin and the fourth pin are connected to the live wire circuit, and the fifth pin is suspended. The relay driving module is connected to the pulse power supply module, and the relay driving module and the pulse power supply module are also respectively connected to the main control module.
[0013] Preferably, the circuit further includes a wireless antenna and a remote monitoring module, and the main control module is connected to the remote monitoring module through the wireless antenna.
[0014] Preferably, the electric energy metering module is a TM7780 chip, and the main control module is an ESP-12F module.
[0015] To achieve the above object, the second aspect of the present invention provides a single-channel power control device for electrical energy consumption detection, including the single-channel power control circuit for electrical energy consumption detection described above.
[0016] The present invention has at least the following technical effects:
[0017] The utility model provides a simple and efficient power control scheme without comparison and calibration, which can effectively meet the market demand for power management and solve the problem of energy consumption detection of electrical appliances. In addition, the TM7780 electric energy metering chip adopted by the utility model can reach an accuracy of 1% in the data processing process, enabling the overall working accuracy of the system to reach 2%. Moreover, the utility model provides the current, voltage and power data of electrical appliances for users through a remote monitoring module, such as a dedicated web monitoring platform, which can facilitate users to view the electrical energy usage of electrical appliances in the circuit in real time, and reasonably allocate the usage time of electrical appliances according to needs, avoiding power loss caused by long-term power supply or circuit damage caused by overload. At the same time, it is convenient for users to view the historical data of detection, and is convenient for users to develop and utilize electrical parameter analysis, power consumption query, power consumption information tracking, etc. based on the historical database to meet the needs of users.
[0018] Additional aspects and advantages of the utility model will be given in part in the following description, become apparent in part from the following description, or be learned through the practice of the utility model. Brief Description of the Drawings
[0019] Figure 1 It is a schematic structural diagram of a single-channel power control circuit for electrical appliance energy consumption detection according to an embodiment of the utility model.
[0020] Figure 2 It is a schematic diagram of the pin positions of the electric energy metering module according to an embodiment of the utility model.
[0021] Figure 3 It is a schematic diagram of the peripheral circuit of the main control module according to an embodiment of the utility model.
[0022] Figure 4 It is a schematic diagram of the internal structure of the electric energy metering module according to an embodiment of the utility model.
[0023] Figure 5 It is a schematic diagram of the structure of the opto-coupler module according to an embodiment of the utility model.
[0024] Figure 6 It is a schematic diagram of the structure of the current sampling module according to an embodiment of the utility model.
[0025] Figure 7 It is a schematic diagram of the structure of the voltage sampling module according to an embodiment of the utility model
[0026] Figure 8 It is a schematic diagram of the connection of the switching power supply in the voltage conversion module according to an embodiment of the utility model.
[0027] Figure 9 It is a schematic diagram of the connection structure of the voltage conversion chip in the voltage conversion module according to an embodiment of the utility model.
[0028] Figure 10 Schematic diagram of pins of the relay and the relay drive module according to an embodiment of the present utility model.
[0029] Figure 11 Schematic diagram of the internal structure of the relay drive module according to an embodiment of the present utility model.
[0030] Figure 12 Schematic diagram of the peripheral circuit of the trigger according to an embodiment of the present utility model. Detailed implementation manners
[0031] The following details this embodiment. Examples of the embodiment are shown in the drawings, where the same or similar reference numerals denote the same or similar elements or elements with the same or similar functions throughout. The embodiments described below with reference to the drawings are exemplary and are intended to explain the present utility model and should not be construed as limiting the present utility model.
[0032] The following describes the single-channel power control circuit and device for electrical appliance energy consumption detection according to this embodiment with reference to the drawings.
[0033] Figure 1 Schematic diagram of the structure of the single-channel power control circuit for electrical appliance energy consumption detection according to an embodiment of the present utility model. As Figure 1 shown, the single-channel power control circuit for electrical appliance energy consumption detection includes a load, a sampling resistor, a current sampling module, a voltage sampling module, an electric energy metering module, and a main control module. Among them, the load and the sampling resistor are connected in series and then connected to the live wire input terminal L-IN and the neutral wire input terminal N-IN. The current sampling module is connected in parallel with the sampling resistor. Two output terminals IN and IP of the current sampling module are used as differential input terminals and connected to the VAN and VAP terminals of the electric energy metering module. One end of the voltage sampling module is connected to the load, and the other end of the voltage sampling module is connected to the VBP terminal of the electric energy metering module. The electric energy metering module is connected to the main control module. Among them, the sampling resistor is a constantan sampling resistor, the electric energy metering module is a TM7780 chip, and the main control module is an ESP-12F module. In addition, the circuit further includes a wireless antenna and a remote monitoring module, and the main control module is connected to the remote monitoring module through the wireless antenna.
[0034] In this embodiment, the current sampling module and the voltage sampling module collect the power parameter on the constantan sampling resistor and the load line, and then send the collected sample data to the electric energy metering module for signal processing and frequency conversion. The main control module performs data analysis after receiving the sampling data, and calculates the effective current value, effective voltage value, and effective power value of the load through a formula. Finally, the calculated data is sent to the remote monitoring module such as a web monitoring platform through a wireless antenna such as a WiFi (Wireless Fidelity) antenna, and the energy consumption situation in the circuit is monitored through data analysis.
[0035] Specifically, the hardware design of the single-channel power control circuit is as follows:
[0036] In the single-channel power control circuit, the power metering module uses the power metering chip TM7780 to process electrical parameters. It integrates a differential signal processing unit and a voltage input signal processing unit. After the collected electrical parameters are processed by the signal processing and frequency conversion unit, the power value, current effective value, and voltage effective value can be calculated by calculating the output signal period of the CF and CFA terminals of the power metering chip TM7780. Then, the analog quantities of each effective value are converted into digital quantities and output, and then communicate with the main control module through the opto-coupler circuit. In this embodiment, the main control module selects the ESP-12F module, and the core processor of this module is ESP8266, which integrates an ultra-low-power 32-bit micro MCU (microcontroller) with strong processing capabilities.
[0037] In this embodiment, ESP8266 has an independent and complete WiFi network solution. It can operate as a slave with other host MCUs or communicate with the display terminal through 2 UART (Universal Asynchronous Receiver / Transmitter) serial interfaces for independent application. ESP8266 calculates the collected power data and then sends the calculation results to the web monitoring terminal, i.e., the remote monitoring module, for analysis. The I / O (General Purpose Input / Output) ports of ESP8266 output different levels to control the suction of the relay to control the on / off of the load circuit.
[0038] The hardware design of the single-channel power control circuit includes the main control circuit design.
[0039] As Figure 2 and Figure 3 shown, the main control circuit is composed of the TM7780, i.e., the power metering module, and the ESP-12F module, i.e., the main control module. TM7780 and the ESP-12F module access 5V and 3.3V voltages from the voltage conversion module. At the same time, 100nF capacitors, i.e., capacitor C1 and GND, are connected at the VDD interface to ensure the release of stored electrical energy and the stabilization of the power supply voltage.
[0040] The VAP and VAN interfaces of TM7780 are respectively connected to the IN and IP sampling terminals of the current sampling module to collect the magnitude of the load current through the current sampling module; the VBP interface of TM7780 is connected to the voltage sampling module to collect the magnitude of the load voltage through the form of resistor voltage division; the SET terminal and the CFA terminal of TM7780 are respectively connected to the GPIO13 and GPIO14 ports in the ESP-12F module after being isolated by the opto-coupler module and communicate in a serial manner to exchange information; the RST terminal of the ESP-12F module is connected to the 3.3V power button to achieve the reset function, and the EN terminal of the ESP-12F module is connected to the 3.3V power supply as the enable terminal.
[0041] As shown Figure 4 in the figure, the electric energy metering module, i.e., TM7780, includes a differential signal processing unit (the differential signal processing part in the figure), a voltage input signal processing unit (the input signal processing part in the figure), and a signal processing and frequency conversion unit (the signal processing and frequency conversion module in the figure) as described above. The differential signal processing unit and the voltage input signal processing unit are respectively connected to the signal processing and frequency conversion unit.
[0042] In this embodiment, the electric energy metering module uses a single-phase metering chip TM7780 with high integration and high precision. This chip has rich functions, including electric energy calculation, power factor measurement, and measurement of parameters such as current and voltage. It uses a new algorithm internally. When the power of the input signal is greater than the internal noise value, the electric energy metering module starts to correctly measure. Its output terminal CF is used to calculate electric energy, and CFA is used to indicate the effective value of current or voltage. The power value, effective value of current, and effective value of voltage are calculated by calculating the output signal periods of the CF and CFA terminals, and its accuracy can reach ±0.5%. In addition, this chip is designed with a dedicated UART communication interface, using asynchronous serial communication mode, and two unidirectional pins CF and CFA for data transmission. Moreover, the internal structure of this chip is carefully optimized, adopting high-precision analog circuits and digital signal processing units, comprehensively considering factors such as anti-interference ability, stability, and reliability, to ensure that the chip can still maintain normal functions in various working environments.
[0043] In this embodiment, the current signal is sampled by a copper-nickel sampling resistor and then connected to TM7780, and the voltage signal is input to TM7780 in the form of resistor voltage division. The VAP and VAN pins of TM7780 are connected to both ends of the sampling resistor, and the VBP pin of TM7780 is connected to the output terminal of the voltage sampling module. The obtained current and voltage signals are respectively processed by the differential signal processing unit and the voltage input signal processing unit, and then the processed signals are transmitted to the signal processing and frequency conversion unit and output as digital quantities that can be read by the ESP-12F module. Then frequency calculation is performed. After the input signal passes through a series of module processes, the output frequencies of active power, effective value of current, and effective value of voltage can be calculated according to the following formulas:
[0044] Output frequency F of the effective value of voltage CFAU Calculation formula:
[0045]
[0046] Output frequency F of the effective value of current CFAI Calculation formula:
[0047]
[0048] Output frequency F of active powerCF Calculation formula:
[0049]
[0050] Among them, V1 represents the effective value of the differential input peak of VAP and VAN, V2 represents the effective value of the input peak of VBP, f CLK represents the oscillator frequency, with a typical value of about 3.579 MHz, V REF represents the reference voltage, with a typical value of 2.43 V. The chip pin functions of TM7780 are shown in Table 1.
[0051] Table 1 Chip Pin Function Table
[0052]
[0053]
[0054] In this embodiment, the main control module selected is the ESP-12F module as described above. The core processor of this module is the ESP8266, which is small in size and internally integrated with an advanced ultra-low-power 32-bit micro MCU, supporting main frequencies of 80 MHz and 160 MHz and RTOS (Real-Time Operating System). Moreover, this module is also integrated with WiFi MAC (Media Access Control) / BB (Baseband Processing) / RF (Radio Frequency Processing) / PA (Power Amplifier) / LNA (Low Noise Amplifier) and an on-board antenna, and has a complete TCP / IP (Network Communication Protocol) protocol stack. Users can use this module to build an independent network controller or add networking functions to existing devices. The core processor ESP8266 is a high-performance wireless system-on-chip. In the system solution design, by directly connecting the WiFi module to the peripheral driver module, it can provide maximum practicality for users while greatly reducing the product cost, and also opens up unlimited possibilities for embedding WiFi functions in other systems. As described above, the ESP8266 provides a complete and independent WiFi network solution, which can be either independently applied or operated as a slave of other host MCUs. This chip has powerful on-chip processing and storage capabilities, can integrate sensors and specific devices for other applications, and reduces the system resources occupied during the initial development and operation process. Since the ESP8266 is internally integrated with an antenna switch transceiver and a power management converter, only a very small number of external circuits are required, and the space occupied by the entire solution including the front-end module on the PCB (Printed Circuit Board) will be greatly reduced.
[0055] In this embodiment, GPIO0 of the ESP-12F module must be pulled up to VCC, GPIO15 must be pulled down to GND, the RST terminal is connected to a 3.3V power button to achieve the reset function, and the EN terminal is connected to a 3.3V power supply as the enable terminal. GPIO13 and GPIO14 ports in the ESP-12F module are respectively connected to the SET and CFA pins of the TM7780 through an opto-coupling module and communicate in a serial manner to exchange information. GPIO4 and GPIO5 ports of the ESP-12F module send level signals to the relay drive module SSP8023D to control the opening and closing of the magnetic latching relay.
[0056] The hardware design part of the single-channel power control circuit also includes the design of the opto-coupling isolation circuit.
[0057] In an embodiment of the present utility model, the single-channel power control circuit further includes an opto-coupling module, and both the setting end and the signal output end of the power metering module are connected to the main control module through the opto-coupling module.
[0058] In this embodiment, the opto-coupler in the opto-coupling module selects the CYPC817 linear opto-coupler, which is widely used in computer terminals. In various relatively precise functional circuits, it can be used as a coupling device, so as to achieve the effect of complete isolation between the upper and lower circuits and avoid mutual interference. In this embodiment, the front end and the load are completely isolated, aiming to improve safety, reduce circuit interference and simplify circuit design. As Figure 5 shown, the SET and CFA terminals of the TM7780 are connected to the GPIO13 and GPIO14 ports of the ESP-12F module through an opto-coupling module. When an electrical signal is received at the input end, the light emitter will emit light and irradiate on the light receiver. After the light receiver receives the light, it will change from the cut-off state to the conducting state, thereby generating a photocurrent output and completing the electro-optical-electrical conversion.
[0059] The hardware design part of the single-channel power control circuit also includes the design of the sampling circuit.
[0060] The sampling circuit adopts a resistance sampling design. The sampling resistor selects a constantan resistor with a precision of 1% and a value of 0.5mΩ / 2W to convert the voltage value between the live wire and the neutral wire into a current analog quantity. In the voltage sampling module, 6 resistors of 470kΩ with a precision of 0.1% and 1 resistor of 1kΩ are used. Using the principle of resistor voltage division, the current value is converted into a voltage analog quantity. In this embodiment, selecting a sampling resistor with a precision of 1% and a high-precision TM7780 chip can ensure that the overall precision error of the measurement scheme does not exceed 2%. And the measurement scheme has the advantage of being free of calibration, with a simple circuit and a more efficient program algorithm.
[0061] As Figure 6As shown in the figure, the current sampling module includes a first resistor R8, a second resistor R9, a first capacitor C3, and a second capacitor C4. The first resistor R8, the second resistor R9, the first capacitor C3, and the second capacitor C4 are connected in series and then connected in parallel with the sampling resistor R7. The second end of the first capacitor C3 and the first end of the second capacitor C4 are both grounded. The first end of the first capacitor C3 and the second end of the second capacitor C4, namely the IN terminal and the IP terminal, respectively serve as the two output terminals of the current sampling module. Among them, the resistance values of the first resistor R8 and the second resistor R9 are 1 kΩ, and the capacitance values of the first capacitor C3 and the second capacitor C4 are 33 nF.
[0062] In this embodiment, an RC low-pass filter is composed of a 1 kΩ resistor and a 33 nF capacitor. When the input signal contains high-frequency signal components, these high-frequency components will form a large voltage drop across the capacitor. For low-frequency signals, the voltage drop is small. The output signal will be an approximation of the low-frequency components in the input signal, while the high-frequency components are effectively filtered out or attenuated. In this embodiment, the voltages at both ends of the 0.5 mΩ constantan wire resistor, namely the sampling resistor R7, can be measured using the IN and IP terminals, and then the current at both ends can be calculated.
[0063] As Figure 7 shown in the figure, the voltage sampling module includes a third resistor R10 to a ninth resistor R16 and a third capacitor C5. The third resistor R10 to the ninth resistor R16 are connected in series. The third capacitor C5 is connected in parallel with the ninth resistor R16. The third resistor R10 is connected to the load terminal, namely the live wire output terminal L-OUT. One end of the ninth resistor R16 is connected to the VBP terminal of the power metering module, and the other end of the ninth resistor R16 is grounded.
[0064] In this embodiment, the voltage sampling module uses non-isolated sampling and is connected to the live wire output terminal L-OUT. Six 470 kΩ resistors, namely the third resistor R10 to the eighth resistor R15, are connected in series for voltage division. Since resistors have voltage withstand problems, using multiple resistors can prevent the resistors from breaking down. The voltage signal is input from the VBP terminal to the positive voltage signal input terminal of the TM7780 to obtain the voltage sampling value. At the same time, a combination of a 1 kΩ resistor, namely the ninth resistor R16, and a 100 nF capacitor, namely the third capacitor C5, can achieve a filtering effect.
[0065] The hardware design part of the single-channel power control circuit also includes the design of the voltage conversion circuit.
[0066] As Figure 1 shown in the figure, the single-channel power control circuit further includes a voltage conversion module, which is respectively connected to the live wire input terminal L-IN, the neutral wire input terminal N-IN, the power metering module, and the main control module.
[0067] As Figure 8As shown, connect the neutral wire and the live wire to the circuit and then connect to the AC / DC (alternating current / direct current) power supply module, namely LS10-13B15R3P. An electromagnetic sensitivity (EMS) level-IV protection circuit is adopted. After the fuse F2 and the varistor R18 are connected in parallel, the input terminal plug-in resistor R17 is connected in series to play an anti-interference role. After the alternating current passes through the filter circuit, it enters the rectifier circuit, which converts the negative half-cycle and the positive half-cycle of the alternating current into direct current respectively, converting the 220V alternating current into pulsating 15V direct current. After being regulated by the zener diode D1, a stable 15V direct current is obtained.
[0068] As Figure 9 shown, the voltage drop method is adopted to convert the 15V voltage into 5V voltage by connecting three 300kΩ resistors, namely resistors R19-R21, in parallel, and then the voltage is regulated by a zener diode to obtain a stable 5V voltage to supply power to TM7780. Further, the voltage is reduced to 3.3V by the low-dropout linear voltage regulator chip AMS1117 to supply power to the ESP-12F module. In this embodiment, the purpose of incorporating capacitors C10-C12 with capacitances of 22μF, 1μF, and 100nF into the circuit is to minimize the impedance between the power line and the ground line, making the power supply output closer to the ideal voltage source output.
[0069] In this embodiment, AMS1117 is a low-dropout linear voltage regulator chip that can provide an output voltage of 3.3V and an output current of up to 1A. The on-chip trimming adjusts the reference voltage within an error of ±2%, which is suitable for high-efficiency linear voltage regulators, switching power supply voltage regulators, etc. It integrates an overheat protection and a current limiting circuit inside. The main pins of this chip are the positive input VIN, the output pin VOUT, and the ground pin GND. The pins are as Figure 9 shown. During the circuit design process, a 22uF tantalum capacitor is connected to the output terminal to improve the transient response and stability, and then a 1μF and a 100nF capacitor are connected in parallel for filtering to ensure the stability of the circuit.
[0070] The hardware design part of the single-channel power control circuit also includes the relay control circuit design.
[0071] As Figure 1 shown, this single-channel power control circuit also includes a relay, a relay drive module, and a pulse power supply module. As Figure 10 shown, the relay includes five pins. Among them, the first pin and the second pin of the relay are respectively connected to the output terminals OUT-1A and OUT-1B of the relay drive module, namely SSP8023D. The third pin and the fourth pin are connected to the live wire circuit, that is, connected to the live wire input terminal L-IN and the live wire output terminal L-OUT, and the fifth pin is left floating; the relay drive module is connected to the pulse power supply module, and the relay drive module and the pulse power supply module are also respectively connected to the main control module.
[0072] In this embodiment, the relay selected is a 12V, single-pole single-throw normally open magnetic latching relay with a total of five pins. The first and second pins are respectively connected to the OB and OA ports of the relay driver module, namely SSP8023D, and the third and fourth pins are connected to the live wire circuit. In this embodiment, different level signals are output from the GPIO4 and GPIO5 ports on the ESP-12F module to the A and B ends of the relay driver module to control the opening and closing of the relay, thereby controlling the on and off of the load circuit. Among them, the functional block diagram of the relay driver module is as Figure 11 shown.
[0073] In this embodiment, the relay driver module, namely SSP8023D, is a bidirectional relay driver module used to control DC motors and magnetic latching relays. It has the characteristics of large output capacity and low static power consumption, and can be widely used in smart meters and other application fields controlled by pulses and levels. During operation, the input terminals A and B are pulse trigger terminals, directly connecting the trigger terminals to the output terminals of the ESP-12F module. When the trigger pulse triggers according to the state of the function table, the relay will make corresponding actions according to the level.
[0074] In this embodiment, the relay can specifically adopt the HFE10-2 type magnetic latching relay, which has a magnetic latching function and is commonly used for switch operations in control circuits. Its surge current resistance ability reaches 500A / 2ms, and it has a manual switch debugging function. When the relay is powered on, the electromagnetic coil generates a magnetic field to attract the iron core, causing the switch to close. When there is no power input, the relay remains in the closed state until it is forced to open. In the design of this circuit, the relay is used to control the on and off of the load terminal circuit. When the system starts, the relay remains closed and the circuit works. When there is an abnormal energy consumption situation in the circuit, the user can control the relay to disconnect the load circuit.
[0075] As Figure 12 shown, the pulse power supply module adopts the double-precision monostable multivibrator CD4538, which is composed of two high-precision retriggerable monostable flip-flops, and the Q and Q# output terminals have symmetric output characteristics. The falling-edge trigger terminal 1A# and the direct reset input terminal 1CD# of the flip-flop are connected to the 3.3V power supply through a 10kΩ pull-up resistor, namely resistor R23, to maintain a high voltage level state. The external capacitor connection terminal 1CEXT and the external capacitor / resistor connection terminal 1REXT / CEXT are externally connected with a 3kΩ resistor, namely resistor R22, and a 100μF capacitor, namely capacitor C15, to achieve a delay effect of 300ms. The rising-edge trigger input terminal 1B is connected to the GPIO12 port of the ESP-12F module.
[0076] The working principle of this circuit is as follows: Each time the input terminal 1B of the flip-flop CD4538 receives a high-level signal output by the ESP-12F module, it will provide a level pulse signal with a period of 300 ms to the relay drive module, namely SSP8023D, thereby controlling the opening and closing of the relay to ensure that the coil of the magnetic latching relay will not be damaged due to long-term voltage application. Among them, one end of the resistor R27 in the pulse power supply module circuit is connected to the VIN terminal of the relay drive module, namely SSP8023D.
[0077] In this embodiment, each multi-flip-flop has an active low trigger / retrigger input, an active high trigger / retrigger input, an overriding active low direct reset input, an output and its complement, and two pins for connecting external timing components CEXT and REXT. The multi-flip-flop can be triggered by the positive or negative edge of the input pulse and will generate an accurate output pulse with a pulse width ranging from 10 us to infinity. The duration and accuracy of the output pulse are determined by the external timing components CEXT and REXT. The output pulse width is equal to REXT×CEXT. The linear design technology in LOCMOS (local complementary metal oxide semiconductor) can ensure precise control of the output pulse width. It should be noted that when the nCD terminal of the flip-flop is at a low level, the output pulse will be terminated immediately.
[0078] The hardware design part of the single-channel power control circuit also includes the design of the PCB board.
[0079] In this embodiment, the circuit board adopts a two-layer structure. The top-layer wiring includes power lines, signal lines, ground lines, and component wiring; the bottom-layer wiring includes power lines, signal lines, and ground lines, and the copper plating layer is set as the bottom layer. Adopting a two-layer board structure in the design of the PCB board can maximize the saving of board materials while meeting the basic layout of the system circuit, and at the same time ensure that all components of the system are arranged orderly on the board surface.
[0080] In the design of the PCB board adopted in this circuit, the main principles followed are:
[0081] (1) Manual wiring is preferred. The PCB design software usually includes an automatic wiring function, but the automatic wiring function has many deficiencies. Automatic wiring can only be carried out according to the rules preset by its system and cannot be adjusted according to specific requirements, which is likely to cause wiring chaos, such as too large vias resulting in a decline in circuit performance. In the design process of the PCB board of this circuit, the wiring of the entire circuit board is completed by using an automatic + manual wiring method. First, place all components according to module classification, use the automatic wiring to check the completion rate, and then check whether there is wiring short circuit in the circuit or whether the wiring adopts the optimal route, and adjust the placement position and direction of the components to avoid the situation of line crossing as much as possible.
[0082] (2) Select an appropriate trace width. In automatic routing, the system default trace width is 0.254 mm. To ensure that the circuit can work properly under all environmental and load operating conditions and to guarantee stable signal transmission in the circuit, the widths of the power supply lines and ground lines must be adjusted to be compatible with signal transmission. In the design of the trace width of this system, based on the limitation of the available space on the PCB board and the principle of saving board material consumption, the minimum width of each trace must be determined to prevent component damage caused by overheating. For power supply lines and ground lines, a 1-mm trace width is adopted, while for signal lines, a 0.5-mm trace width is adopted. When the available space permits, the power supply lines and ground lines should be made as wide as possible to improve the thermal management and stability of the circuit board.
[0083] (3) Avoid 90° traces. Acute and right-angled traces will have problems of signal discontinuity under high-frequency signals, which will further increase signal crosstalk, continuous reflection and other reasons affecting signal integrity. During the copper plate etching process, etching solution is likely to accumulate at the right angle, causing excessive corrosion of the copper foil and resulting in broken lines. In the trace design of this PCB board, obtuse-angle traces or large-angle acute-angle traces are adopted to avoid sharp-angle or right-angle traces and ensure the stability of signal transmission in the entire power control system.
[0084] To make the working principle of the single-channel power control circuit for electrical energy consumption detection clearer, the software design part of the single-channel power control circuit is described below. The software design part of the single-channel power control circuit for electrical energy consumption detection includes five parts, namely the main program, the electrical parameter acquisition subroutine, the circuit detection subroutine, the wireless communication connection subroutine, and the relay control subroutine.
[0085] (1) Main program
[0086] When the system is started, each port is initialized, the relay is closed, and the circuit is turned on. The current sampling module and the voltage sampling module start to collect the electrical quantity parameters on the constantan sampling resistor and the load line, and then send the collected sample data to the electric energy metering module for signal processing and frequency conversion. After receiving the sampling data, the main control module performs data analysis and calculates the effective current value, the effective voltage value, and the effective power value through formulas. Finally, the data is sent to a remote monitoring module such as a web monitoring platform, and through data analysis, the energy consumption situation in the circuit is monitored. In this embodiment, it is possible to judge whether there is a phenomenon of overworking or abnormal energy consumption of electrical appliances in the circuit according to the calculated power value. If the power of the electrical appliance is greater than the set value, the relay is disconnected and the circuit is disconnected; if it is less than the set value, the relay remains, and the current sampling module and the voltage sampling module continue to collect the electrical quantity data.
[0087] (2) Electrical parameter acquisition subroutine
[0088] After the program starts, the program begins to initialize the serial port of the TM7780. Subsequently, the TM7780 starts to work, and the circuit begins to measure the current on the constantan sampling resistor and the voltage of the load on the live wire, and write them into the register. After measuring the current and voltage values, the internal signal processing and frequency conversion unit of the TM7780 starts to process the detected current and voltage values, and finally sends the measured sample data to the ESP-12F module through the CFA pin. After the processor reads the data in the TM7780 register through the serial port, it calculates the effective values of current, voltage, and power according to the formula. Finally, the data is sent to the remote monitoring module such as the web monitoring platform through the wireless antenna.
[0089] (3) Circuit detection subroutine
[0090] After the current sampling module and the voltage sampling module complete the acquisition of the current on the constantan sampling resistor and the voltage of the load on the live wire and perform signal processing, the ESP-12F module and the electric energy metering module conduct data communication through the serial port, calculate the acquired data using the formula, and judge whether there are abnormal energy consumption situations such as overcurrent, overvoltage, or overload in the circuit by comparing with the set value. If the circuit energy consumption is abnormal, a power-off command is manually issued on the web monitoring platform, the ESP-12F module sends an action signal to the relay, the relay disconnects, and the power supply is cut off. After the circuit fault is eliminated, the relay closes and the circuit resumes power supply; if there is no abnormality, the relay remains closed and the sampling continues.
[0091] (4) Wireless communication connection subroutine
[0092] The system uses WiFi communication technology for data transmission, allowing devices to transmit data within a specific range through radio waves. Before communication, we need to perform local network IP (Internet Protocol) and network configuration. First, connect the ESP8266 to the computer through a USB (Universal Serial Bus) data cable and install the corresponding driver program. Then, detect the serial port in the SSCOM (serial port debugging software) and select the correct baud rate. After opening the serial port, enter the AT (a standard instruction set) instruction in the software to test whether the development board is working properly. Then configure the wireless local area network, and let the ESP8266 connect to the corresponding WiFi hotspot and ensure the connection is successful by entering instructions in the SSCOM software. Query the IP address of the ESP8266 in the STA (a wireless network working mode) mode and set the same IP address and port number. Design a TCP web platform on the computer to receive the data sent by the ESP8266 and open the connection. After the system starts, the serial ports of the ESP8266 are initialized, and then a connection is established under the same local area network. After the connection is successful, the web monitoring platform can receive the electrical parameter data transmitted by the ESP8266.
[0093] (5) Relay control subroutine
[0094] When the system starts, manually close the relay, turn on the power supply, and after the initialization of each port is completed, the circuit starts to work. The current sampling module and the voltage sampling module start to sample the current and voltage of the load and the constantan resistor. ESP8266 receives the sample data processed by the signal and frequency conversion unit of TM7780, calculates the effective current value, the effective voltage value, and the effective power value through formulas, and finally sends the data to the web monitoring platform through the wireless antenna.
[0095] By comparing and analyzing with the set power value or historical data, it can be judged whether there is an abnormal power consumption situation in the circuit. If there is an abnormal energy consumption situation in the circuit, the user can manually cut off the power supply through the web monitoring platform. After ESP8266 receives the power-off signal sent by the web monitoring platform, it sends a high-level signal from GPIO12 to trigger the operation of the pulse power supply module. The pulse power supply module then sends a 300ms pulse signal to the relay drive module SSP8023D to control the action of the relay, and the relay disconnects, and the power supply is disconnected.
[0096] In order to test whether each sampling module in the single-channel power control circuit can accurately collect the voltage value of the load electrical appliance on the live wire and the current value on the constantan resistor, different loads with different resistance values can be connected to the live wire for testing. The true value is measured with a power quality analyzer, and the measured value is displayed through the serial port. The experimental data are shown in Table 2 and Table 3 below. Through comparative analysis, the voltage value in the measured value fluctuates slightly. The reason may be that the power supply interface is not in full contact or there are interference signals in the circuit, resulting in fluctuations in the voltage value. As the resistance value of the load on the live wire increases continuously, the current and power both increase and are relatively close to the true value. The experimental test data verify the feasibility and accuracy of the single-channel power control circuit in this embodiment for collecting power parameters, and at the same time, it also shows that the single-channel power control circuit still needs to be optimized in terms of anti-interference ability and PCB board design.
[0097] Table 2 Data table of measured values of voltage and current of different loads
[0098]
[0099] Table 3 Data table of true values of voltage and current of different loads
[0100]
[0101] Furthermore, the present invention also provides a single-channel power control device for electrical energy consumption detection, including the single-channel power control circuit for electrical energy consumption detection described above.
[0102] In summary, the present utility model provides a simple and efficient power control solution that does not require comparison and calibration, which can effectively meet the market demand for power management and solve the problem of energy consumption detection of electrical appliances. In addition, the TM7780 power metering chip adopted by the present utility model can achieve an accuracy of 1% during the data processing process, enabling the overall working accuracy of the system to reach 2%. Moreover, the present utility model provides the user with the current, voltage, and power data of the electrical appliance through a remote monitoring module, such as a dedicated web monitoring platform, which can facilitate the user to view the electrical energy usage of the electrical appliance in the circuit in real time, and reasonably allocate the usage time of the electrical appliance according to needs, avoiding power loss caused by long-term power supply or circuit damage caused by overload. At the same time, it is convenient for the user to view the historical data of the detection, and it is convenient for the user to develop and utilize the electrical parameter analysis, power consumption query, power consumption information tracking, etc. based on the historical database to meet the user's needs.
[0103] It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover a non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.
[0104] Although the content of the present utility model has been introduced in detail through the above preferred embodiments, it should be recognized that the above description should not be considered as a limitation of the present utility model. After those skilled in the art have read the above content, various modifications and substitutions of the present utility model will be obvious. Therefore, the protection scope of the present utility model should be defined by the appended claims.
Claims
1. A single-channel power supply control circuit for electrical appliance energy consumption detection, characterized in that: include: A load, a sampling resistor, a current sampling module, a voltage sampling module, an electric energy metering module and a main control module; wherein the load and the sampling resistor are connected in series and then connected to the live input terminal and the neutral input terminal, the current sampling module is connected in parallel with the sampling resistor, the two output terminals of the current sampling module are connected to the electric energy metering module as differential input terminals, one end of the voltage sampling module is connected to the load, the other end of the voltage sampling module is connected to the electric energy metering module, and the electric energy metering module is connected to the main control module.
2. The single-channel power supply control circuit for electrical appliance energy consumption detection according to claim 1, characterized in that: The electric energy metering module comprises a differential signal processing unit, a voltage input signal processing unit and a signal processing and frequency conversion unit, and the differential signal processing unit and the voltage input signal processing unit are connected to the signal processing and frequency conversion unit respectively.
3. The single-channel power supply control circuit for electrical appliance energy consumption detection according to claim 2, characterized in that: It also includes a photoelectric coupling module, and the setting end and the signal output end of the electric energy metering module are both connected to the main control module through the photoelectric coupling module.
4. The single-channel power supply control circuit for electrical appliance energy consumption detection according to claim 1, characterized in that: The current sampling module includes a first resistor, a second resistor, a first capacitor and a second capacitor. The first resistor, the second resistor, the first capacitor and the second capacitor are connected in series and in parallel with the sampling resistor. The second end of the first capacitor and the first end of the second capacitor are both grounded, and the first end of the first capacitor and the second end of the second capacitor serve as two output ends of the current sampling module respectively.
5. The single-channel power supply control circuit for electrical appliance energy consumption detection according to claim 1, characterized in that: The voltage sampling module includes a third resistor to a ninth resistor and a third capacitor; the third resistor to the ninth resistor are connected in series, the third capacitor is connected in parallel with the ninth resistor, the third resistor is connected to the load, one end of the ninth resistor is connected to the electric energy metering module, and the other end of the ninth resistor is grounded.
6. The single-channel power supply control circuit for electrical appliance energy consumption detection according to claim 1, characterized in that: It also includes a voltage conversion module, which is connected to the live wire input terminal, the neutral wire input terminal, the electric energy metering module and the main control module respectively.
7. The single-channel power supply control circuit for electrical appliance energy consumption detection according to claim 1, characterized in that: It also includes a relay, a relay driving module and a pulse power supply module, wherein the relay includes five pins, wherein the first pin and the second pin of the relay are respectively connected to the output end of the relay driving module, the third pin and the fourth pin are connected to the live wire circuit, and the fifth pin is left floating; the relay driving module is connected to the pulse power supply module, and the relay driving module and the pulse power supply module are also respectively connected to the main control module.
8. The single-channel power supply control circuit for electrical appliance energy consumption detection according to claim 1, characterized in that: It also includes a wireless antenna and a remote monitoring module, and the main control module is connected to the remote monitoring module via the wireless antenna.
9. The single-channel power supply control circuit for electrical appliance energy consumption detection according to claim 2, characterized in that: The electric energy metering module is a TM7780 chip, and the main control module is an ESP-12F module.
10. A single-channel power supply control device for detecting electrical appliance energy consumption, characterized in that: It comprises a single-channel power supply control circuit for detecting energy consumption of electrical appliances as described in any one of claims 1 to 9.