Disclosure of Invention
In order to overcome the problem that the service life of a storage chip is influenced by frequent erasing and writing operations in the electric quantity data storage process at least to a certain extent, and when a unit is abnormally powered down, the electric quantity data is inaccurate because the electric quantity data before the power down is not written into the storage chip in time, the application provides an electric quantity data storage device, a method, a controller and a multi-split system.
In a first aspect, the present application provides an electrical quantity data storage device, comprising:
the input end of the optical coupling detection circuit is connected with a power supply, and the output end of the optical coupling detection circuit is used for outputting a level signal which changes according to the output voltage change of the power supply;
the control module is connected with the optocoupler detection circuit and used for acquiring an output level signal of the optocoupler detection circuit and judging whether a power failure event occurs or not according to the output level signal;
and the storage module is connected with the control module and used for storing the electric quantity data when a power failure event occurs.
Further, the optical coupling detection circuit includes:
the optical coupler comprises a first optical coupler chip and a second optical coupler chip;
the input anode of the first optical coupling chip is connected with the output end of the first diode, the input end of the first diode is connected with a live wire of a power supply, the input cathode of the first optical coupling chip is connected with a zero wire of the power supply, the output end of the first optical coupling chip is connected with a first output end, when the first optical coupling chip is conducted, the first output end outputs a low level, otherwise, the first output end outputs a high level;
the second diode, the input positive pole of second opto-coupler chip with the output of second diode is connected, the input and the power supply zero line of second diode are connected, the input negative pole and the power supply live wire of second opto-coupler chip are connected, the second output is connected to the output of second opto-coupler chip when second opto-coupler chip switches on, the low level of second output, otherwise the high level of second output.
Further, the method also comprises the following steps:
the first current limiting resistor is arranged between the first optical coupler chip and the first diode;
and the second current-limiting resistor is arranged between the second optical coupler chip and the second diode.
Further, the method also comprises the following steps:
the first pull-up resistor is connected with the output end of the first optocoupler chip;
and the second pull-up resistor is connected with the output end of the second optical coupler chip.
Further, the method also comprises the following steps:
and the optical coupling detection circuit is arranged between a power supply and the alternating current filtering module.
Further, the method also comprises the following steps:
and the rectifying and filtering module is arranged between the alternating current filtering module and the load.
Further, the rectification filter module comprises:
the filter capacitor is connected in parallel with the output end of the rectifier bridge.
Further, the method also comprises the following steps:
and the negative temperature coefficient thermistor is arranged between the alternating current filtering module and the rectifying and filtering module and is used for inhibiting surge current.
In a second aspect, the present application provides an electric quantity data storage method, including:
detecting a level signal at the output end of an optical coupling detection circuit connected with a power supply;
judging whether a power failure event occurs according to a level signal at the output end of the optocoupler detection circuit;
and storing the electric quantity data when a power failure event occurs.
Further, the method also comprises the following steps:
setting a detection period, and detecting a level signal at the output end of an optical coupling detection circuit connected with a power supply according to the detection period;
the detection period T ═ T1+T2) 10, the detection period T is in seconds, wherein T1Outputting high level duration for a first optical coupler chip in an optical coupler detection circuit; t is2And outputting the low level duration for a first optical coupler chip in the optical coupler detection circuit.
Further, the judging whether a power failure event occurs according to the level signal at the output end of the optical coupling detection circuit includes:
if the output level of the output end of the first optical coupler chip is opposite to the output level of the output end of the second optical coupler chip, and the output level of the output end of the first optical coupler chip is turned over once within a first preset time, judging that the power supply is normal;
if the output level of the output end of the first optical coupling chip and the output level of the output end of the second optical coupling chip are both high levels when the second preset duration is continuous, a power failure event is considered to occur;
and if the output level of the output end of the first optical coupler chip and the output level of the output end of the second optical coupler chip are detected to be low levels or the output level of the output end of the first optical coupler chip and the output level of the output end of the second optical coupler chip are not turned over all the time in a third preset time, judging that the optical coupler detection circuit is abnormal.
Further, the method also comprises the following steps:
and sending prompt information when the optical coupling detection circuit is abnormal, wherein the prompt information comprises a push notice and early warning abnormity of electric quantity of a display page.
In a third aspect, the present application provides a controller comprising:
the charge data storage device according to the first aspect.
In a fourth aspect, the present application provides a multi-split system, including:
the system comprises an external machine, a compressor drive, a plurality of internal machines and a plurality of line controllers;
the outer machine is provided with the controller of the third aspect;
the controller is in driving connection with the compressor;
each wire controller is connected with an internal machine and is used for displaying the electric quantity of the corresponding internal machine.
The technical scheme provided by the embodiment of the application can have the following beneficial effects:
the electric quantity data storage device comprises an optical coupling detection circuit, an input end of the optical coupling detection circuit is connected with a power supply, an output end of the optical coupling detection circuit is used for outputting a level signal, the level signal changes according to the output voltage change of the power supply, a control module is connected with the optical coupling detection circuit and is used for acquiring the output level signal of the optical coupling detection circuit, the storage module is connected with the control module and is used for storing the electric quantity data when the power failure event occurs, on the premise of not frequently erasing and writing the storage chip, whether a power failure event occurs or not is detected through a hardware circuit so as to realize timely storage of electric quantity data, the service life of the storage chip is prolonged, and the accuracy of the stored electric quantity data is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail below. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the examples given herein without making any creative effort, shall fall within the protection scope of the present application.
Fig. 1 is a functional structure diagram of an electric quantity data storage device according to an embodiment of the present application, and as shown in fig. 1, the electric quantity data storage device includes:
the input end of the optical coupling detection circuit is connected with a power supply, the output end of the optical coupling detection circuit is used for outputting a level signal, and the level signal changes according to the output voltage change of the power supply;
thecontrol module 12 is connected with the optocoupler detection circuit and used for acquiring an output level signal of the optocoupler detection circuit and judging whether a power failure event occurs according to the output level signal;
and thestorage module 13 is connected with the control module and used for storing the electric quantity data when a power failure event occurs.
The traditional electric quantity data storage method needs to write electric quantity data into a chip with a storage function at regular time. But the erasing and writing of the memory chip are limited by the erasing and writing times of the memory chip, the erasing and writing cannot be performed without limit, and the service life of the memory chip is influenced by frequent erasing and writing operations; in addition, when the unit is powered off abnormally, the electric quantity data before the power failure is not written into the storage chip in time, so that the electric quantity data is inaccurate, for example, the electric quantity is stored for one time in T minutes at intervals. If the unit is abnormally powered down before the interval time, the electric quantity data in the interval time can be lost, and the stored electric quantity data is inaccurate.
In this embodiment, electric quantity data storage device includes opto-coupler detection circuitry, opto-coupler detection circuitry's input is connected with power supply, opto-coupler detection circuitry's output is used for output level signal, level signal changes according to power supply's output voltage, a control module, be connected with opto-coupler detection circuitry, an output level signal for acquireing opto-coupler detection circuitry, judge whether to take place the power failure incident according to output level signal, a storage module, be connected with a control module, be used for storing electric quantity data when taking place the power failure incident, under the prerequisite of unnecessary frequent memory chip that erases and writes, whether take place the power failure incident through hardware circuit detection in order to realize in time saving electric quantity data, extension memory chip life-span, improve the accuracy of saving electric quantity data.
An embodiment of the present invention provides another electric quantity data storage device, as shown in a circuit diagram of fig. 2, the electric quantity data storage device includes:
the input end of the optical coupling detection circuit is connected with a power supply, and the output end of the optical coupling detection circuit is used for outputting a level signal which changes according to the output voltage change of the power supply;
an opto-coupler detection circuit comprising:
the first optical coupler chip U1 and the second optical coupler chip U2;
the input anode of the first optocoupler chip U1 is connected with the output end of the first diode D3, the input end of the first diode D3 is connected with a power supply live wire L1, the input cathode of the first optocoupler chip U1 is connected with a power supply zero line N, the output end of the first optocoupler chip U1 is connected with a first output end MCU-A, when the first optocoupler chip is switched on U1, the first output end MCU-A outputs low level, otherwise, the first output end MCU-A outputs high level;
the input anode of the second optical coupling chip U2 is connected with the output end of the second diode D2, the input end of the second diode D2 is connected with a power supply zero line N, the input cathode of the second optical coupling chip U2 is connected with a power supply live line L1, the output end of the second optical coupling chip U2 is connected with a second output end MCU-B, when the second optical coupling chip U2 is switched on, the second output end MCU-B outputs low level, otherwise, the second output end MCU-B outputs high level.
Further comprising:
the first current limiting resistor R7 and the first current limiting resistor R7 are arranged between the first optical coupler chip U1 and the first diode D3 and used for controlling the current input to the first optical coupler chip U1;
and the second current limiting resistor R6 and the second current limiting resistor R6 are arranged between the second optical coupler chip U2 and the second diode D2 and are used for controlling the current input to the second optical coupler chip U2.
The first pull-up resistor R4 is connected with the output end of the first optical coupler chip U1 through the first pull-up resistor R4;
and the second pull-up resistor R1 and the second pull-up resistor R1 are connected with the output end of the second optical coupler chip U2.
The pull-up resistor is used for clamping at a high level through the pull-up resistor when an uncertain signal exists at the output end of the first optical coupler chip U1 or the output end of the second optical coupler chip U2, and the pull-up resistor plays a role in current limiting at the same time.
And the optical coupling detection circuit is arranged between the power supply and the alternating current filtering module.
The alternating current filtering module is used for filtering input alternating current, filtering harmonic waves of the alternating current and ensuring that the input current is free of noise.
And the rectifying and filtering module is arranged between the alternating current filtering module and the load.
The rectification filtering module comprises:
the rectifier bridge DB1 and the filter capacitor C4, the filter capacitor C4 is connected in parallel at the output of rectifier bridge DB 1.
The rectification filter module is used for rectifying and filtering the input alternating current to ensure the stability of the input voltage of the load.
The negative temperature coefficient thermistor R5 and the negative temperature coefficient thermistor R5 are arranged between the alternating current filter module and the rectifying filter module and used for restraining surge current.
The control module is connected with the optocoupler detection circuit and used for acquiring an output level signal of the optocoupler detection circuit and judging whether a power failure event occurs or not according to the output level signal;
and the storage module is connected with the control module and used for storing the electric quantity data when a power failure event occurs.
In some embodiments, the control module and the storage module are collectively disposed in a single controller.
In the embodiment, the optical coupling detection circuit is added on hardware, electric quantity data are stored in time before the power failure of the main chip, and the operation of writing the electric quantity data once is executed before the power failure of the unit, so that the accuracy of the stored electric quantity data is ensured.
An embodiment of the present invention provides an electric quantity data storage method, as shown in a flowchart in fig. 3, where the electric quantity data storage method includes:
s31: detecting a level signal at the output end of an optical coupling detection circuit connected with a power supply;
s32: judging whether a power failure event occurs according to a level signal at the output end of the optical coupler detection circuit;
in some embodiments, the determining whether a power down event occurs according to a level signal at an output end of the optical coupling detection circuit includes:
if the output level of the output end of the first optical coupler chip is opposite to the output level of the output end of the second optical coupler chip, and the output level of the output end of the first optical coupler chip is turned over once within a first preset time, judging that the power supply is normal;
if the output level of the output end of the first optical coupling chip and the output level of the output end of the second optical coupling chip are both high levels when the second preset duration is continuous, a power failure event is considered to occur;
and if the output level of the output end of the first optical coupler chip and the output level of the output end of the second optical coupler chip are detected to be low levels or the output level of the output end of the first optical coupler chip and the output level of the output end of the second optical coupler chip are not turned over all the time in a third preset time, judging that the optical coupler detection circuit is abnormal.
S33: and storing the electric quantity data when a power failure event occurs.
In some embodiments, further comprising:
setting a detection period, and detecting a level signal at the output end of an optical coupling detection circuit connected with a power supply according to the detection period;
detection period T ═ T1+T2) 10, the detection period T is in seconds, wherein T1Outputting high level duration for a first optical coupler chip in an optical coupler detection circuit; t is2And outputting the low level duration for a first optical coupler chip in the optical coupler detection circuit.
For example, the effective value of the power supply is U0V, frequency fhz: when the power supply normally works and the U1 is switched on, the MCU-A detects the low level, the U2 is switched off at the same time, and the MCU-B detects the high level; when U2 is turned on, MCU-B detects low, U1 is turned off, and MCU-A detects high. The MCU-A and MCU-B terminals are periodically changed at 1/fs period, as shown in FIG. 3 (T)1+T2=1/f),T1High level duration, T, for MCU-A or MCU-B output2And the low level time length is output by the MCU-A or the MCU-B. When the power is turned off, both a and B become high.
The turn-on voltage of the optocoupler chips U1 and U2 is V0, T in the figure2-T1=2t1.
Then V0=U0*sin(wt1),
wt1Arcsin (U0/V0), where w is 2 pi f.
Because the starting voltage V of the optical coupling chip0Is smaller, therefore t1Smaller, with a period T ═ T (T)1+T2) The/10 s is far greater than t1Thus, t1The duration is negligible when setting the detection period, and the detection period is set to T ═ T (T)1+T2) The/10 s can ensure the timeliness of detection.
The first preset time period is set to 10ts, for example, the second preset time period is set to 3ts, for example, and the third preset time period is set to 20ts, for example, according to the detection cycle.
In some embodiments, further comprising:
and sending prompt information when the optical coupling detection circuit is abnormal, wherein the prompt information comprises a push notice and early warning abnormity of electric quantity of a display page.
In this embodiment, through detecting the level signal of the optical coupling detection circuit output end of defeated being connected with power supply, judge whether to take place the power failure incident according to the level signal of optical coupling detection circuit output end, save electric quantity data when taking place the power failure incident, extension storage chip life-span improves the accuracy of storage electric quantity data.
An embodiment of the present invention provides a controller, including:
the electric quantity data storage device according to the above embodiment.
An embodiment of the present invention provides a multi-split system, including:
the system comprises an external machine, a compressor drive, a plurality of internal machines and a plurality of line controllers;
the controller is arranged in the outer machine;
the controller is in driving connection with the compressor;
each wire controller is connected with an internal machine and is used for displaying the electric quantity of the corresponding internal machine.
As shown in fig. 4, since the consumed power of the air conditioner is the sum of the total power of the internal unit and the external unit, the total power P of the internal unit is collected and calculated by the internal unit of the air conditionerInner partAnd the power of the compressor and the driving plate is collected and calculated by the compressor and is sent to an external machine controller by a communication network 2, and the total power P of the external machine is collected and calculated by the external machine controller of the air conditionerOuter coverTherefore, the outer unit can obtain the power of each inner unit and the total power of the outer unit. Therefore, the power consumption of each device is stored in the external machine controller in a mode that the external machine controller calculates the power consumption of each device, and the storage of the power data can be realized.
It is understood that the same or similar parts in the above embodiments may be mutually referred to, and the same or similar parts in other embodiments may be referred to for the content which is not described in detail in some embodiments.
It should be noted that, in the description of the present application, the terms "first", "second", etc. are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. Further, in the description of the present application, the meaning of "a plurality" means at least two unless otherwise specified.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and the scope of the preferred embodiments of the present application includes other implementations in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc.
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.
It should be noted that the present invention is not limited to the above-mentioned preferred embodiments, and those skilled in the art can obtain other products in various forms without departing from the spirit of the present invention, but any changes in shape or structure can be made within the scope of the present invention with the same or similar technical solutions as those of the present invention.