Opening and closing time adjustment method, opening and closing time adjustment device, terminal and storage medium
By obtaining the zero crossing point of the AC power supply in the relay and adjusting the opening and closing time, the contact sticking problem caused by the on-off operation of the relay at a high-power point is solved, and the safety and life of the relay are achieved.
Patent Information
- Application Number
- CN202010753115.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-30
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2040-07-30
AI Technical Summary
When the relay performs on-off action at a high-power point, it is easy to cause contact sticking, which poses safety hazards, and the initial opening and closing time is biased due to aging, which cannot be effectively avoided.
By obtaining the zero crossing point of the AC power supply, timing and driving the electric on-off switch, the bidirectional optocoupler output voltage is collected within the second timing time, and the offset of the actual on-off time and the initial on-off time is determined according to the on-off action type and the output voltage. , adjust the opening and closing time to ensure that the on-off action is performed at the zero crossing point.
It effectively avoids contact sticking problems caused by the relay performing on-off action at high power points, extends the service life of the relay, and improves safety, and adapts to environmental changes and device aging by automatically adjusting the opening and closing time.
Smart Images

Figure CN114070174B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of electric on-off switch control, and in particular relates to an opening and closing time adjustment method, an electric on-off switch control device, a terminal and a storage medium. Background Art
[0002] Electromagnetic relays are commonly used to control the execution of low-power strong electricity. The loads at the strong electricity end are usually resistive loads, capacitive loads, and inductive loads. In order to deal with the surge current problem generated during the relay switching process, the relay is usually switched on and off at the voltage zero point. Even if there is a phase difference between the voltage and the current, switching at a lower voltage can reduce the switching power of the contacts, extend the life of the relay, and increase the load capacity. In order to control the relay to be able to perform on-off switching at the zero crossing point, the current mainstream method is to write the opening and closing time of the relay into the memory when the relay leaves the factory. Each time the load is turned on, the zero crossing signal is detected first, and then the relay is driven to operate according to the opening and closing time delay, thereby ensuring that the relay performs on-off actions during the zero crossing period.
[0003] However, aging problems of components such as the relay's coil, magnetic core, and spring can cause deviations in the relay's opening and closing time in specific applications. If the relay uses the initial opening and closing time, it is easy for the relay to perform on-and-off actions at a high power point, causing the relay contacts to stick, posing a safety hazard. Summary of the invention
[0004] The embodiments of the present application provide an opening and closing time adjustment method, an opening and closing time adjustment device, a terminal and a storage medium, which can avoid the situation where the relay uses the initial opening and closing time, which is prone to the relay performing on-off actions at a high power point, causing the relay contacts to stick and posing a safety hazard.
[0005] In a first aspect, an embodiment of the present application provides an opening and closing time adjustment method, which is applied to an electric on-off switch, wherein an input end of the electric on-off switch is connected to an AC power supply, and an output end of the electric on-off switch is connected to a bidirectional optical coupler, and the opening and closing time adjustment method includes:
[0006] Obtaining a zero-crossing point of the AC power source, and starting timing at the zero-crossing point to obtain a first timing time;
[0007] When the first timing time is k*(T / 2)-T0, the electric on-off switch is driven to perform the on-off action, and the second timing time is obtained by re-timing, wherein k is a positive integer, T is the cycle of the AC power supply, and T0 is the initial opening and closing time of the electric on-off switch;
[0008] The output voltage of the bidirectional optocoupler is collected during the second timing time, and the actual on-off time of the electric on-off switch and the offset value of the initial opening and closing time are determined according to the type of the on-off action, the output voltage and the preset zero-crossing pulse width, and the opening and closing time of the electric on-off switch is adjusted according to the actual on-off time and the offset value.
[0009] Optionally, determining the actual on-off time of the electric on-off switch and the offset value of the initial on-off time according to the type of the on-off action, the output voltage and a preset zero-crossing pulse width, and adjusting the on-off time of the electric on-off switch according to the actual on-off time and the offset value, includes:
[0010] Determining the on-off moment of the electric on-off switch according to the type of the on-off action, the output voltage and a preset zero-crossing pulse width;
[0011] Determining whether the on-off moment of the electric on-off switch is within the zero-crossing time period of the AC power supply;
[0012] If not, an offset value of the opening and closing time is determined according to the zero-crossing pulse width and the second timing time, and the initial opening and closing time is added to the offset value to obtain a corrected opening and closing time.
[0013] Optionally, determining the actual on-off time of the electric on-off switch and the offset value of the initial on-off time according to the type of the on-off action, the output voltage and a preset zero-crossing pulse width, and adjusting the on-off time of the electric on-off switch according to the actual on-off time and the offset value, includes:
[0014] If the on-off action is to disconnect the load, the output voltage and its rising edge are continuously monitored. If the output voltage is at a high level after the second timing time exceeds the first time threshold TH, the time T1=Tn-TH is recorded, where Tn is the timing value after the second timing time exceeds the first time threshold TH.
[0015] Determine whether T1 is less than T / 2-D, and if so, determine that the on-off moment of the electric on-off switch is not within the zero-crossing time period of the AC power supply;
[0016] The offset value of the opening and closing time is determined according to the threshold interval in which T1 is located, and the opening and closing time of the electric on-off switch is adjusted according to the actual on-off time and the offset value.
[0017] Optionally, determining the offset value of the opening and closing time according to the threshold interval in which T1 is located, and adjusting the opening and closing time of the electric on-off switch according to the actual on-off time and the offset value, includes:
[0018] If the value range of T1 is [T / 20, T / 10], the offset value Tbias1=T1; if the value range of T1 is [4T / 10-D, 9T / 20-D], Tbias1=T1-T+D; the corrected opening and closing time is Toff=T0+Tbias1, where D is the preset zero-crossing pulse width.
[0019] Optionally, determining the actual on-off time of the electric on-off switch and the offset value of the initial on-off time according to the type of the on-off action, the output voltage and a preset zero-crossing pulse width, and adjusting the on-off time of the electric on-off switch according to the actual on-off time and the offset value, includes:
[0020] If the electric on-off switch is operated to connect the load, the falling edge of the output voltage is monitored, the time T21 of the current falling edge and the time T22 of the next falling edge are recorded, and the time T2=T22-T21 is recorded;
[0021] If T2 is less than T / 2, the on-off moment of the electric on-off switch is not within the zero-crossing time period of the AC power supply;
[0022] It is determined whether T2-T0 is within a preset difference range. If so, the calibrated opening and closing time Ton=T2.
[0023] Optionally, obtaining a zero-crossing point of the AC power source and starting timing at the zero-crossing point to obtain a first timing time includes:
[0024] Converting the AC signal of the AC power supply into a square wave signal through an optical coupler;
[0025] When the square wave signal has a jumping edge, timing starts to obtain the first timing time.
[0026] Optionally, the initial opening and closing time of the electric on-off switch includes an on-opening and closing time Ton and an off-opening and closing time Toff.
[0027] A second aspect of an embodiment of the present application provides an opening and closing time adjustment device, which is applied to an electric on-off switch, wherein an input end of the electric on-off switch is connected to an AC power supply, and an output end of the electric on-off switch is connected to a bidirectional optical coupler, and the opening and closing time adjustment device comprises:
[0028] A zero-crossing detection unit, used to obtain a zero-crossing point of the AC power supply, and start timing at the zero-crossing point to obtain a first timing time;
[0029] A driving unit, configured to drive the electric on-off switch to perform an on-off action when the first timing time is k*(T / 2)-T0, and to re-timing to obtain a second timing time, wherein k is a positive integer, T is a cycle of the AC power supply, and T0 is an initial opening and closing time of the electric on-off switch;
[0030] An adjustment unit is used to collect the output voltage of the bidirectional optocoupler within the second timing time, determine the actual on-off time of the electric on-off switch and the offset value of the initial opening and closing time according to the type of the on-off action, the output voltage and a preset zero-crossing pulse width, and adjust the opening and closing time of the electric on-off switch according to the actual on-off time and the offset value.
[0031] A third aspect of an embodiment of the present application provides a terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.
[0032] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0033] The embodiments of the present application provide an opening and closing time adjustment method, an opening and closing time adjustment device, a terminal and a storage medium. First, the zero crossing point of the AC power supply is obtained, and timing is started at the zero crossing point. When the first timing time is k*(T / 2)-T0, the electric on-off switch is driven to act, and the second timing time is obtained by retiming. During the second timing time, the output voltage of the bidirectional optocoupler is collected, and the actual on-off time of the electric on-off switch and the offset value of the initial opening and closing time are determined according to the type of the on-off action, the output voltage and the preset zero-crossing pulse width. The opening and closing time of the electric on-off switch is adjusted according to the actual on-off time and the offset value, thereby realizing adaptive adjustment of the opening and closing time of the electric on-off switch. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0035] Figure 1 A schematic diagram of the implementation flow of the opening and closing time adjustment method provided in an embodiment of the present application;
[0036] Figure 2A schematic diagram of a structure in which the opening and closing time of the electric on-off switch provided in one embodiment of the present application is adaptively adjusted in a specific application when the electric on-off switch is a relay;
[0037] Figure 3 This is a schematic diagram of the implementation flow of step S10 in a method for adjusting the opening and closing time provided in an embodiment of the present application;
[0038] Figure 4 It is a schematic diagram of the implementation flow of step S30 in a method for adjusting the opening and closing time provided in an embodiment of the present application;
[0039] Figure 5 It is a schematic diagram of the implementation flow of step S30 in a method for adjusting the opening and closing time provided in an embodiment of the present application;
[0040] Figure 6 It is a schematic diagram of the implementation flow of step S30 in a method for adjusting the opening and closing time provided in an embodiment of the present application;
[0041] Figure 7 is a schematic diagram of the application structure of a multi-way electric on-off switch provided for an embodiment of the present application;
[0042] Figure 8 It is a structural schematic diagram of an electric on-off switch device provided in an embodiment of the present application;
[0043] Fig. 9 It is a schematic diagram of the structure of the terminal provided in the embodiment of the present application. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application.
[0045] In order to illustrate the technical solution of the present application, a specific embodiment is provided below for illustration.
[0046] Due to factors such as ambient temperature, operating voltage and operating current, the opening and closing time of the electric on-off switch fluctuates within a millisecond range. Therefore, in order to avoid the error in the opening and closing time causing the on-off action to occur at a non-zero point and cause contact sticking, it is necessary to adjust the opening and closing time of the electric on-off switch.
[0047] In one embodiment, the types of electric on-off switches in this embodiment include but are not limited to monostable relays, magnetic holding relays, single-contact relays, multi-contact relays, and any type of switch with electric on-off function but longer action time, such as AC contactors, electric control switches, etc.
[0048] The embodiment of the present application provides an opening and closing time adjustment method applied to an electric on-off switch, wherein the electric on-off switch is connected to an AC power supply, see Figure 1 As shown, the opening and closing time adjustment method in this embodiment includes steps S10 to S30.
[0049] Step S10: Obtain the zero-crossing point of the AC power source, and start timing at the zero-crossing point to obtain a first timing time.
[0050] In one embodiment, see Figure 2 As shown, Figure 2 When the electric on-off switch provided in one embodiment of the present application is a relay, the structural diagram of the adaptive adjustment of the opening and closing time in a specific application is shown in FIG. Figure 2 As shown, the first end of the first resistor R1 is connected to the live wire L of the AC power supply, the first end of the second resistor R2 is connected to the neutral wire N of the AC power supply, the second end of the first resistor R1 is connected to the first AC signal end of the optocoupler U1, the second end of the second resistor R2 is connected to the second AC signal end of the optocoupler U1, the first end of the third resistor R3 and the light receiver output end of the optocoupler U1 are connected to the first sampling signal end ZERO of the microcontroller, and the second end of the third resistor R3 is connected to the DC power supply end VCC.
[0051] In one embodiment, see Figure 3 As shown, in step S10, the zero-crossing point of the AC power source is obtained, and timing is started at the zero-crossing point to obtain a first timing time, including step S11 and step S12.
[0052] Step S11: converting the AC signal of the AC power supply into a square wave signal through an optical coupler.
[0053] Step S12: start timing when an edge jump occurs in the square wave signal to obtain the first timing time.
[0054] In one embodiment, the AC signal output by the AC power supply is converted into a square wave signal through the optocoupler U1 and output to the single-chip microcomputer. Specifically, through optocoupler isolation, the AC power supply is turned on when the current voltage output by the AC power supply is greater than the LED turn-on voltage in the optocoupler U1. At this time, the output voltage of the optocoupler U1 is pulled to a low level. When the AC voltage is negative or lower than the LED turn-on voltage, the output is pulled to a high level by the pull-up resistor R1. The single-chip microcomputer can detect the square wave converted from the AC signal output by the AC power supply through the ZERO pin. For example, when the AC power supply is a 50Hz mains power supply, the frequency of the square wave at the ZERO pin is 50Hz, wherein the low level time of the square wave is slightly less than the high level time, and the photoelectric conversion time of the optocoupler is less than 5 microseconds.
[0055] In this embodiment, when the circuit needs to connect or disconnect the load, the zero-crossing point of the AC power supply is first detected. The input voltage and output voltage of the zero-crossing point are both close to 0V, and the timing starts at the zero-crossing point. For example, see Figure 2 As shown, wait for the transition edge from low level to high level of ZERO pin, at this time the voltage is positive and close to 0V, after the signal arrives, the single chip microcomputer starts its internal timer to obtain the first timing time.
[0056] In one embodiment, before executing step S10, the initial opening and closing time T0 of the relay (for example, the on-time Ton and the off-time Toff) can be written into the memory in the microcontroller through the relay test results in the early stage of relay specification development.
[0057] Step S20: When the first timing time is k*(T / 2)-T0, drive the electric on-off switch to perform the on-off action, and re-time to obtain the second timing time, wherein k is a positive integer, T is the cycle of the AC power supply, and T0 is the initial opening and closing time of the electric on-off switch.
[0058] In one embodiment, see Figure 2As shown, the first contact COM of the relay K3 is connected to the live wire L of the AC power supply, the second contact ON of the relay K3 is connected to the bidirectional optical coupler U9, and the first control terminal DO1_ON and the second control terminal DO1_OFF of the relay K3 are both connected to the single-chip microcomputer. Specifically, the relay K3 can be a double-coil magnetic latching relay, and its on and off action time is about 10ms (i.e., opening and closing time). If the relay K3 is a monostable relay, the disconnection time is about 5ms. In this embodiment, the first control terminal DO1_ON continues to be low for a short period of time to make the relay energized, and the 3rd and 4th pins of the relay K3 are connected, that is, the first contact COM and the second contact ON are turned on, and then the magnetic field keeps the energized, and the first control terminal DO1_ON returns to a high level. When the relay K3 is disconnected, the second control terminal DO1_OFF continues to be low for a period of time and then pulls up.
[0059] In this embodiment, when the first timing time reaches k*(T / 2)-T0, the electric on-off switch is driven to perform the on-off action, and the second timing time is re-timed to obtain. Specifically, if the driving relay is turned on, the driving relay is actuated when the first timing time is k*(T / 2)-Ton, and if the driving relay is turned off, the driving relay is actuated when the first timing time is k*(T / 2)-Toff.
[0060] In one embodiment, k*(T / 2) is a minimum value that is greater than the initial opening and closing time T0 and equal to a multiple of T / 2. For example, the frequency of the AC power source is 50 Hz and T is 20 ms.
[0061] In one embodiment, the initial opening and closing time T0 of the electric on-off switch includes an on-opening and closing time Ton and an off-opening and closing time Toff.
[0062] Step S30: Collect the output voltage of the bidirectional optocoupler within the second timing time, determine the actual on-off time of the electric on-off switch and the offset value of the initial opening and closing time according to the type of the on-off action, the output voltage and the preset zero-crossing pulse width, and adjust the opening and closing time of the electric on-off switch according to the actual on-off time and the offset value.
[0063] In one embodiment, see Figure 2The first end of the fourth resistor R4 is connected to the second contact ON of the relay K3, the second contact ON is connected to the load as the output end Lout of the circuit, the first end of the fifth resistor R5 is connected to the neutral line N of the AC power supply, the first AC signal end of the bidirectional optocoupler U9 is connected to the second end of the fourth resistor R4, the second AC signal end of the bidirectional optocoupler U9 is connected to the second end of the fifth resistor R5, the output end of the bidirectional optocoupler U9 and the first end of the sixth resistor R6 are connected to the sampling signal end of the microcontroller, and the second end of the sixth resistor R6 is connected to the DC power supply end VCC.
[0064] In this embodiment, after the first timing time is completed, the count value of the timer is cleared and the timing is restarted to obtain the second timing time. The level of the output terminal D1 of the bidirectional optocoupler U9 is monitored in real time according to the type of on-off action of the electric on-off switch.
[0065] In this embodiment, the signal of the bidirectional optocoupler U9 is a high level with a pulse width of D in a half cycle, and the time length of the non-zero-crossing switching is tt=T / 2-D. When T=20ms and D=0.5ms, tt=9.5ms, by collecting the output voltage of the bidirectional optocoupler during the second timing time, according to the type of the on-off action, the output voltage of the bidirectional optocoupler and the preset zero-crossing pulse width D, the actual on-off time of the electric on-off switch and the offset value of the initial opening and closing time are determined, and it is judged whether the actual on-off time of the electric on-off switch is closer to the starting point or end point of the non-zero-crossing switching time length tt, and then it is judged whether the relay action time is advanced or delayed, and corresponding compensation is made based on the offset value.
[0066] For example, the electric on-off switch is relay K3. If the on-off action type of the electric on-off switch is to disconnect the load, the jumping edge of the DI pin is monitored. If the jumping edge is a rising edge, the level of the DI pin is continuously monitored. If the level is still high when the second timing time exceeds the threshold TH (TH is slightly larger than the zero-crossing pulse width D), the timer is turned off to obtain the timing value Tn, and the time T1 = timing value Tn-TH is recorded. If the jumping edge of the DI is monitored as a falling edge, the timer is cleared and the timing is restarted. Determine whether time T1 is less than 10ms-D (the frequency of the AC power supply is 50Hz). If so, it means that the on-off moment of the electric on-off switch of the current relay is not within the zero-crossing pulse width. If T1 is between 1-2ms, the offset value Tbias of the opening and closing time of the electric on-off switch is T1. If T1 is between 8ms-D and 9ms-D, the offset value Tbias is T1-10ms+D, or T1 is between tt-2ms and tt-1ms, the offset value Tbias is T1-tt. The corrected opening and closing time is Toff=T0+Tbias, and Toff is stored in the memory. If T1 does not meet the above conditions, the initial opening and closing time is not adjusted.
[0067] Furthermore, if the type of the on-off action of the electric on-off switch is to connect the load, wait for the falling edge of the DI pin, record the time T21 of the current falling edge, and the time T22 of the next falling edge, and record the time T2=T22-T21. If T2 is less than 10ms, it means that the on-off switching time of the electric on-off switch does not occur at the zero-crossing pulse width, then determine whether T21-T0 is between ±(1-2)ms, if so, assign T21 to Ton and store it in the memory, if not, do not adjust the initial opening and closing time of the electric on-off switch.
[0068] In one embodiment, see Figure 4 As shown, in step S30, the actual on-off time of the electric on-off switch and the offset value of the initial opening and closing time are determined according to the type of the on-off action, the output voltage and the preset zero-crossing pulse width, and the opening and closing time of the electric on-off switch is adjusted according to the actual on-off time and the offset value, including step S31 and step S32.
[0069] Step S31: determining the on-off moment of the electric on-off switch according to the type of the on-off action, the output voltage and a preset zero-crossing pulse width.
[0070] Step S32: Determine whether the on-off moment of the electric on-off switch is within the zero-crossing time period of the AC power supply; if not, determine the offset value of the opening and closing time according to the zero-crossing pulse width and the second timing time, and add the initial opening and closing time to the offset value to obtain the corrected opening and closing time.
[0071] In one embodiment, see Figure 5 As shown, in step S30, the actual on-off time of the electric on-off switch and the offset value of the initial opening and closing time are determined according to the type of the on-off action, the output voltage and the preset zero-crossing pulse width, and the opening and closing time of the electric on-off switch is adjusted according to the actual on-off time and the offset value, including step S311 and step S312.
[0072] Step S311: If the on-off action is to disconnect the load, the output voltage and its rising edge are continuously monitored. If the output voltage is at a high level after the second timing time exceeds the first time threshold TH, the time T1 = Tn-TH is recorded, where Tn is the timing value after the second timing time exceeds the first time threshold TH.
[0073] Step S312: Determine whether T1 is less than T / 2-D. If so, determine that the on-off time of the electric on-off switch is not within the zero-crossing time period of the AC power supply; determine the offset value of the opening and closing time according to the threshold interval in which T1 is located, and adjust the opening and closing time of the electric on-off switch according to the actual on-off time and the offset value.
[0074] In one embodiment, in step S312, the offset value of the opening and closing time is determined according to the threshold interval in which the T1 is located, and the opening and closing time of the electric on-off switch is adjusted according to the actual on-off time and the offset value, including: if the value range of T1 is [T / 20, T / 10], then the offset value Tbias1=T1, if the value range of T1 is [4T / 10-D, 9T / 20-D], then Tbias1=T1-T+D, and the corrected opening and closing time is Toff=T0+Tbias1, wherein D is the preset zero-crossing pulse width.
[0075] In one embodiment, see Figure 6 As shown, in step S30, the actual on-off time of the electric on-off switch and the offset value of the initial opening and closing time are determined according to the type of the on-off action, the output voltage and the preset zero-crossing pulse width, and the opening and closing time of the electric on-off switch is adjusted according to the actual on-off time and the offset value, including step S321 and step S322.
[0076] Step S321: If the electric on-off switch is operated to connect the load, the falling edge of the output voltage is monitored, the time T21 of the current falling edge and the time T22 of the next falling edge are recorded, and the time T2=T22-T21 is recorded.
[0077] Step S322: If T2 is less than T / 2, the on-off time of the electric on-off switch is not within the zero-crossing time period of the AC power supply; determine whether T2-T0 is within the preset difference range, and if so, the corrected opening and closing time Ton=T2.
[0078] In one embodiment, Figure 7 The schematic diagram of the application structure of a multi-way electric on-off switch provided by an embodiment of the present application, wherein A is an input bus, A1 and A2 are input branch lines, B1 and B2 are output branch lines, Figure 2 The bidirectional optocoupler U9 can be set at B1 and B2, and the zero-crossing detection circuit (i.e., optocoupler U1) can be set at A, A1, and A2. Specifically, if there are 4, 8, 12, or even more relays in the product, multiplexing can be achieved by connecting multiple-choice analog switches in series between multiple IC outputs and AD inputs.
[0079] Based on the above-mentioned opening and closing time adjustment method, the state feedback of the output end of the electric on-off switch can be added to obtain the action time of each electric on-off switch. If the deviation from the preset time exceeds a certain range, the preset time is updated to maintain the function of the electric on-off switch to switch on and off at the voltage zero position for a long time.
[0080] Furthermore, in one embodiment, Figure 2 The bidirectional optocoupler U9 can be turned on under the positive and negative voltages of the AC power supply, and will be turned off only when it is lower than the LED turn-on voltage near the zero point. Therefore, the waveform of the output terminal DI of the bidirectional optocoupler U9 is low level most of the time, but there is a high level with a small pulse width when crossing the zero point. The DI terminal is connected to the external interrupt input pin of the microcontroller. The LED turn-on voltage is very small relative to the AC 220V. Assuming that the zero-crossing pulse width is D, if the relay on-off moment happens to occur within the range of the zero-crossing pulse width D, its specific moment cannot be determined by the output signal. Therefore, in this embodiment, the on-off moment of the relay can be controlled to occur within the range of the zero-crossing pulse width D.
[0081] See also Figure 8 As shown, the embodiment of the present application further provides an opening and closing time adjustment device 500, which is applied to an electric on-off switch, the electric on-off switch is connected to an AC power supply, and the opening and closing time adjustment device 500 includes:
[0082] The zero-crossing detection unit 501 is used to obtain the zero-crossing point of the AC power supply, and start timing at the zero-crossing point to obtain a first timing time;
[0083] The driving unit 502 is used to drive the electric on-off switch to perform an on-off action when the first timing time is k*(T / 2)-T0, and re-timing to obtain a second timing time, wherein k is a positive integer, T is the cycle of the AC power supply, and T0 is the initial opening and closing time of the electric on-off switch;
[0084] The adjustment unit 503 is used to collect the output voltage of the bidirectional optocoupler within the second timing time, determine the actual on-off time of the electric on-off switch and the offset value of the initial opening and closing time according to the type of the on-off action, the output voltage and the preset zero-crossing pulse width, and adjust the opening and closing time of the electric on-off switch according to the actual on-off time and the offset value.
[0085] In this embodiment, the zero-crossing point of the AC power supply is first obtained, and timing is started at the zero-crossing point. When the first timing time is k*(T / 2)-T0, the electric on-off switch is driven to act, and the second timing time is obtained by retiming. During the second timing time, the output voltage of the bidirectional optocoupler is collected, and the actual on-off time of the electric on-off switch and the offset value of the initial opening and closing time are determined according to the type of the on-off action, the output voltage and the preset zero-crossing pulse width, and the opening and closing time of the electric on-off switch is adjusted according to the actual on-off time and the offset value, thereby realizing adaptive adjustment of the opening and closing time of the electric on-off switch.
[0086] In one embodiment, the advantages of the opening and closing time adjustment scheme in this embodiment include but are not limited to:
[0087] 1) The calculation is automatically triggered by the software, and there is no need for manual detection of the opening and closing time of the relay at the factory;
[0088] 2) Ton and Toff times will be automatically updated according to the use environment and device aging conditions, avoiding the hidden danger of high voltage point switching each time due to environmental changes and device aging when using fixed values;
[0089] 3) The output state feedback is added, an isolation solution is adopted, and the volume is kept small, and the transmission delay time is less than 5us.
[0090] It should be noted that, for the convenience and simplicity of description, the specific working process of the electric on-off switch device 500 described above can refer to Figure 1 The corresponding process of the method will not be repeated here.
[0091] like Fig. 9 As shown, it is a schematic diagram of a terminal provided in an embodiment of the present application. The terminal 6 may include: a processor 60, a memory 61, and a computer program 62 stored in the memory 61 and executable on the processor 60, such as a program for implementing the opening and closing time adjustment method. When the processor 60 executes the computer program 62, the steps in the above-mentioned opening and closing time adjustment method embodiments are implemented. Alternatively, when the processor 60 executes the computer program 62, the functions of each module / unit in the above-mentioned device embodiments are implemented, such as Figure 5 The functions of units 501 to 504 are shown.
[0092] The computer program may be divided into one or more modules / units, which are stored in the memory 61 and executed by the processor 60 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program in the terminal.
[0093] The terminal may be a humanoid robot, a desktop computer, a PDA, a cloud server or other intelligent device. The terminal may include, but is not limited to, a processor 60 and a memory 61. Those skilled in the art will appreciate that Fig. 9 It is only an example of a terminal and does not constitute a limitation on the terminal. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal may also include input and output devices, network access devices, buses, etc.
[0094] The processor 60 may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0095] The memory 61 may be an internal storage unit of the terminal, such as a hard disk or memory of the terminal. The memory 61 may also be an external storage device of the terminal, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal. Further, the memory 61 may also include both an internal storage unit of the terminal and an external storage device. The memory 61 is used to store the computer program and other programs and data required by the terminal. The memory 61 may also be used to temporarily store data that has been output or is to be output.
[0096] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0097] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0098] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0099] In the embodiments provided in the present application, it should be understood that the disclosed devices / terminals and methods can be implemented in other ways. For example, the device / terminal embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0100] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0101] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0102] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0103] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for adjusting the opening and closing time, applied to an electric on-off switch, wherein the input end of the electric on-off switch is connected to an AC power supply, and the output end of the electric on-off switch is connected to a bidirectional optical coupler, characterized in that: The opening and closing time adjustment method comprises: Obtaining a zero-crossing point of the AC power source, and starting timing at the zero-crossing point to obtain a first timing time; When the first timing time is k*(T / 2)-T0, the electric on-off switch is driven to perform the on-off action, and the second timing time is obtained by re-timing, wherein k is a positive integer, T is the cycle of the AC power supply, and T0 is the initial opening and closing time of the electric on-off switch; The output voltage of the bidirectional optocoupler is collected during the second timing time, and the actual on-off time of the electric on-off switch and the offset value of the initial opening and closing time are determined according to the type of the on-off action, the output voltage and the preset zero-crossing pulse width, and the opening and closing time of the electric on-off switch is adjusted according to the actual on-off time and the offset value.
2. The method for adjusting the opening and closing time according to claim 1, characterized in that: The method of determining the actual on-off time of the electric on-off switch and the offset value of the initial on-off time according to the type of the on-off action, the output voltage and the preset zero-crossing pulse width, and adjusting the on-off time of the electric on-off switch according to the actual on-off time and the offset value, comprises: Determining the on-off moment of the electric on-off switch according to the type of the on-off action, the output voltage and a preset zero-crossing pulse width; Determining whether the on-off moment of the electric on-off switch is within the zero-crossing time period of the AC power supply; If not, an offset value of the opening and closing time is determined according to the zero-crossing pulse width and the second timing time, and the initial opening and closing time is added to the offset value to obtain a corrected opening and closing time.
3. The method for adjusting the opening and closing time according to claim 2, characterized in that: The method of determining the actual on-off time of the electric on-off switch and the offset value of the initial on-off time according to the type of the on-off action, the output voltage and the preset zero-crossing pulse width, and adjusting the on-off time of the electric on-off switch according to the actual on-off time and the offset value, comprises: If the on-off action is to disconnect the load, the output voltage and its rising edge are continuously monitored. If the output voltage is at a high level after the second timing time exceeds the first time threshold TH, the time T1=Tn-TH is recorded, where Tn is the timing value after the second timing time exceeds the first time threshold TH. Determine whether T1 is less than T / 2-D. If so, determine that the on-off moment of the electric on-off switch is not within the zero-crossing time period of the AC power supply; wherein D is a preset zero-crossing pulse width; The offset value of the opening and closing time is determined according to the threshold interval in which T1 is located, and the opening and closing time of the electric on-off switch is adjusted according to the actual on-off time and the offset value.
4. The method for adjusting the opening and closing time according to claim 3, characterized in that: The step of determining the offset value of the on-off time according to the threshold interval in which T1 is located, and adjusting the on-off time of the electric on-off switch according to the actual on-off time and the offset value includes: If the value range of T1 is [T / 20, T / 10], the offset value Tbias1=T1; if the value range of T1 is [4T / 10-D, 9T / 20-D], Tbias1=T1-T+D; the corrected opening and closing time is Toff=T0+Tbias1, where D is the preset zero-crossing pulse width.
5. The method for adjusting the opening and closing time according to claim 2, characterized in that: The method of determining the actual on-off time of the electric on-off switch and the offset value of the initial on-off time according to the type of the on-off action, the output voltage and the preset zero-crossing pulse width, and adjusting the on-off time of the electric on-off switch according to the actual on-off time and the offset value, comprises: If the electric on-off switch is operated to connect the load, the falling edge of the output voltage is monitored, the time T21 of the current falling edge and the time T22 of the next falling edge are recorded, and the time T2=T22-T21 is recorded; If T2 is less than T / 2, the on-off moment of the electric on-off switch is not within the zero-crossing time period of the AC power supply; It is determined whether T2-T0 is within a preset difference range. If so, the calibrated opening and closing time Ton=T2.
6. The method for adjusting the opening and closing time according to claim 1, characterized in that: The step of obtaining a zero-crossing point of the AC power source and starting timing at the zero-crossing point to obtain a first timing time includes: Converting the AC signal of the AC power supply into a square wave signal through an optical coupler; When the square wave signal has a jumping edge, timing starts to obtain the first timing time.
7. The method for adjusting the opening and closing time according to claim 1, characterized in that: The initial opening and closing time of the electric on-off switch includes an on-opening and closing time Ton and an off-opening and closing time Toff.
8. An opening and closing time adjustment device, applied to an electric on-off switch, wherein the input end of the electric on-off switch is connected to an AC power supply, and the output end of the electric on-off switch is connected to a bidirectional optical coupler, characterized in that: The opening and closing time adjustment device comprises: A zero-crossing detection unit, used to obtain a zero-crossing point of the AC power supply, and start timing at the zero-crossing point to obtain a first timing time; A driving unit, configured to drive the electric on-off switch to perform an on-off action when the first timing time is k*(T / 2)-T0, and to re-timing to obtain a second timing time, wherein k is a positive integer, T is a cycle of the AC power supply, and T0 is an initial opening and closing time of the electric on-off switch; An adjustment unit is used to collect the output voltage of the bidirectional optocoupler within the second timing time, determine the actual on-off time of the electric on-off switch and the offset value of the initial opening and closing time according to the type of the on-off action, the output voltage and a preset zero-crossing pulse width, and adjust the opening and closing time of the electric on-off switch according to the actual on-off time and the offset value.
9. A terminal comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the processor implements the steps of the opening and closing time adjustment method according to any one of claims 1 to 7 to adjust the opening and closing time of the electric on-off switch.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the opening and closing time adjustment method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Voltage zero-crossing switching control verification method and switching control device
CN105098805A
A multi-channel direct current relay conduction control technology
CN108987185A
Current zero-crossing detection circuit of switching circuit
CN1321995A
A control circuit and cooking machine for control relay
CN205159219U
Zero-cross discrimination device, control device and image formation device
JP2020024177A
