CN-121983467-A - Processing method, circuit and device for automatically controlling on-off of relay
Abstract
The invention relates to the technical field of relay control, in particular to a processing method, a circuit and a device for automatically controlling relay on-off, which can accurately capture the critical moment of the relay on-off and record the corresponding action time length and update the next on/off time length of a self-relay by synchronously starting timing when an on-off control port outputs a preset level and automatically combining with real-time detection of the port on alternating current sine wave signal change, thereby ensuring that the relay on-off action is triggered at an alternating current zero crossing point each time, maximally reducing the damage of arc erosion to a relay contact, prolonging the service life of the relay, and improving the control precision and stability without manual calibration or additional hardware compensation, synchronously executing timing and detection operation, completing the update of the on-off time length each time in real time, greatly shortening response delay, improving the control efficiency of the relay, and improving the control precision, efficiency and stability of equipment.
Inventors
- Gong Jinbiao
- Ding Xianhe
- He Yien
Assignees
- 小熊电器股份有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20260209
Claims (10)
- 1. A processing method for automatically controlling on-off of a relay, the method comprising: when the preset level is detected to be output at this time by an on-off control port for controlling the on-off of the relay, starting timing operation at the same time, and detecting an alternating current sine wave signal at this time through a state judging port for judging the state of the relay to obtain a signal detection result; When the signal detection result is used for indicating that the state judgment port detects that the alternating current sine wave signal changes, recording the current timing time length when the alternating current sine wave signal changes, and updating the last execution time length of the relay to the current timing time length, wherein the type of the last execution time length of the relay is the same as the type of the current timing time length; When the preset level is the first level, the signal detection result is specifically used for indicating that the state judgment port starts to detect the alternating current sine wave signal, and the type of the current timing duration is the type of the closing duration of the relay; When the preset level is the second level, the signal detection result is specifically used for indicating that the state judgment port starts to detect that the alternating current sine wave signal disappears, and the type of the current timing duration is the type of the disconnection duration of the relay; wherein the first level and the second level are opposite in positive and negative.
- 2. The processing method for automatically controlling the on-off of a relay according to claim 1, wherein the method comprises: When the state key of the target equipment controlled by the relay is detected to be touched, detecting the current zero crossing point moment through a zero crossing detection port for detecting alternating current to obtain a moment 0; continuously detecting the next zero crossing point of the alternating current according to the previously acquired last action time of the relay and the preset alternating current zero crossing time to obtain an alternating current zero crossing point detection result; and controlling the on-off control port to output the preset level according to the alternating current zero crossing detection result.
- 3. The method for automatically controlling the on/off of a relay according to claim 2, wherein controlling the on/off control port to output the preset level according to the ac zero-crossing detection result comprises: When the state key of the target equipment is a start key and the alternating current zero crossing detection result is used for indicating that the alternating current zero crossing is detected next time, controlling the on-off control port to output the preset level, wherein the preset level is the first level; when the on-off control port outputs the preset level, the relay is in a closed state, and the target equipment is in a working state.
- 4. The method for automatically controlling the on/off of a relay according to claim 2, wherein controlling the on/off control port to output the preset level according to the ac zero-crossing detection result comprises: When the state key of the target equipment is a closing key and when the alternating current zero crossing detection result is used for indicating that the preset time length is continuously elapsed after the next alternating current zero crossing detection result is detected, controlling the on-off control port to output the preset level, wherein the preset level is the second level; the preset duration is equal to the difference value of the zero-crossing duration of the preset alternating current minus the last action duration of the relay; When the on-off control port outputs the preset level, the relay is in an off state, and the target equipment is in a stop working state.
- 5. A method of automatically controlling the switching of a relay according to any one of claims 2 to 4, further comprising: detecting zero crossing moment of an alternating current sine wave signal after the target equipment is detected to be electrified, so as to obtain a zero crossing detection result; Determining the interval duration of two adjacent zero crossing points of the alternating current sine wave signal according to the zero crossing point detection result; and determining the zero-crossing time length of the preset alternating current according to the average value of all the interval time lengths.
- 6. A processing device for automatically controlling on-off of a relay, the device comprising: The timing module is used for starting timing operation when detecting the preset level of the current output of the on-off control port for controlling the on-off of the relay; the detection module is used for detecting the alternating current sine wave signal through a state judging port for judging the state of the relay at the same time to obtain a signal detection result; The timing module is further configured to, when the signal detection result is used to indicate that the state judgment port detects that the ac sine wave signal changes this time, record the time duration of this time when the ac sine wave signal changes this time; the updating module is used for updating the last execution time of the relay into the current time duration, and the type of the last execution time of the relay is the same as the type of the current time duration; When the preset level is the first level, the signal detection result is specifically used for indicating that the state judgment port starts to detect the alternating current sine wave signal, and the type of the current timing duration is the type of the closing duration of the relay; When the preset level is the second level, the signal detection result is specifically used for indicating that the state judgment port starts to detect that the alternating current sine wave signal disappears, and the type of the current timing duration is the type of the disconnection duration of the relay; wherein the first level and the second level are opposite in positive and negative.
- 7. A processing device for automatically controlling on-off of a relay, the device comprising: A memory storing executable program code; A processor coupled to the memory; The processor invokes the executable program code stored in the memory to perform the processing method for automatically controlling the on-off of a relay as claimed in any one of claims 1 to 5.
- 8. A computer storage medium storing computer instructions which, when invoked, are adapted to carry out the method of processing the automatic control relay of any one of claims 1-5.
- 9. The processing circuit for automatically controlling the on-off of the relay is characterized by comprising a driving circuit, a time detection circuit and a control circuit, wherein: The on-off control port of the driving circuit is electrically connected with the control circuit, the on-off control port of the driving circuit is used for controlling the on-off of the relay, and the state judging port of the time detection circuit is used for judging the state of the relay; The load port of the driving circuit and the load port of the time detection circuit are electrically connected and are both simultaneously used for electrically connecting target equipment; The live wire port and the power supply port of the driving circuit are respectively used for electrically connecting a live wire L and a first power supply, the grounding port of the driving circuit and the grounding port of the time detection circuit are both used for grounding, and the power supply ports of the time detection circuit are both used for electrically connecting a second power supply; The control circuit is used for starting timing operation when detecting that the on-off control port of the driving circuit outputs a preset level at the time, and detecting an alternating current sine wave signal at the time through the state judgment port of the time detection circuit to obtain a signal detection result; when the signal detection result is used for indicating that the state judgment port of the time detection circuit detects that the alternating current sine wave signal changes, recording the time counting time length when the alternating current sine wave signal changes, and updating the last execution time length of the relay to the time counting time length, wherein the type of the last execution time length of the relay is the same as the type of the time counting time length; When the preset level is the first level, the signal detection result is specifically used for indicating that the state judgment port starts to detect the alternating current sine wave signal, and the type of the current timing duration is the type of the closing duration of the relay; When the preset level is the second level, the signal detection result is specifically used for indicating that the state judgment port starts to detect that the alternating current sine wave signal disappears, and the type of the current timing duration is the type of the disconnection duration of the relay; wherein the first level and the second level are opposite in positive and negative.
- 10. The processing circuit for automatically controlling the on-off of a relay according to claim 9, wherein the time detection circuit comprises a half-wave rectification module, a first voltage division module, a second voltage division module, and a clamping module, wherein: The two ends of the half-wave rectification module are respectively and electrically connected with the target equipment and one end of the first voltage division module, and the other end of the first voltage division module is simultaneously and electrically connected with one end of the second voltage division module, one end of the clamping module and the control circuit; the other end of the clamping module is used for being electrically connected with the second power supply, and the other end of the second voltage dividing module is used for being grounded; the half-wave rectification module is used for performing half-wave rectification operation on alternating current sinusoidal signals in the working process of the target equipment; The first voltage dividing module and the second voltage dividing module are both used for performing voltage dividing operation on the working voltage after half-wave rectification of the half-wave rectification module; And the clamping module is used for controlling the power supply voltage of the control circuit.
Description
Processing method, circuit and device for automatically controlling on-off of relay Technical Field The invention relates to the technical field of relay control, in particular to a processing method, a circuit and a device for automatically controlling on-off of a relay. Background Relays are widely used in driving ac electrical appliances, but their mechanical contacts are susceptible to arc erosion, resulting in limited life. The alternating current has the characteristic of zero crossing, the instantaneous voltage of zero crossing is 0, the relay contacts are closed or opened at the moment, the electric arc is greatly reduced, and the service life of the relay is effectively prolonged. However, the practice finds that the existing relay can correspond to different models because of inconsistent processes or materials, and even the difference of the closing time and the opening time of the relay can be influenced because of the use time, so that the relay contacts cannot execute actions at the zero crossing moment, and therefore certain arc erosion still exists, and the service life of the relay is further limited. Therefore, how to propose a new relay zero crossing detection mode to accurately detect the closing/opening time of the relay contacts so as to reduce the arc erosion influence, and thus the technical scheme for prolonging the service life of the relay is important. Disclosure of Invention The invention provides a processing method, a circuit and a device for automatically controlling the on-off of a relay, which can accurately detect the on/off time of a relay contact so as to reduce the arc erosion influence and further improve the service life of the relay. In order to solve the technical problem, a first aspect of the embodiment of the invention discloses a processing method for automatically controlling on-off of a relay, which comprises the following steps: when the preset level is detected to be output at this time by an on-off control port for controlling the on-off of the relay, starting timing operation at the same time, and detecting an alternating current sine wave signal at this time through a state judging port for judging the state of the relay to obtain a signal detection result; When the signal detection result is used for indicating that the state judgment port detects that the alternating current sine wave signal changes, recording the current timing time length when the alternating current sine wave signal changes, and updating the last execution time length of the relay to the current timing time length, wherein the type of the last execution time length of the relay is the same as the type of the current timing time length; When the preset level is the first level, the signal detection result is specifically used for indicating that the state judgment port starts to detect the alternating current sine wave signal, and the type of the current timing duration is the type of the closing duration of the relay; When the preset level is the second level, the signal detection result is specifically used for indicating that the state judgment port starts to detect that the alternating current sine wave signal disappears, and the type of the current timing duration is the type of the disconnection duration of the relay; wherein the first level and the second level are opposite in positive and negative. As an alternative embodiment, in the first aspect of the present invention, the method includes: When the state key of the target equipment controlled by the relay is detected to be touched, detecting the current zero crossing point moment through a zero crossing detection port for detecting alternating current to obtain a moment 0; continuously detecting the next zero crossing point of the alternating current according to the previously acquired last action time of the relay and the preset alternating current zero crossing time to obtain an alternating current zero crossing point detection result; and controlling the on-off control port to output the preset level according to the alternating current zero crossing detection result. In an optional implementation manner, in a first aspect of the present invention, the controlling the on-off control port to output the preset level according to the ac zero crossing detection result includes: When the state key of the target equipment is a start key and the alternating current zero crossing detection result is used for indicating that the alternating current zero crossing is detected next time, controlling the on-off control port to output the preset level, wherein the preset level is the first level; when the on-off control port outputs the preset level, the relay is in a closed state, and the target equipment is in a working state. In an optional implementation manner, in a first aspect of the present invention, the controlling the on-off control port to output the preset level according to the ac zero crossing detection result include