Relay control circuit, method and electric appliance

文档序号:1546596 发布日期:2020-01-17 浏览:23次 中文

阅读说明:本技术 继电器控制电路、方法和电器 (Relay control circuit, method and electric appliance ) 是由 李青云 于 2019-10-11 设计创作,主要内容包括:本发明公开了一种继电器控制电路、方法和电器,继电器控制电路中的电压整形电路的输入端连接交流电源,电压整形电路的输出端连接控制模块的输入端;继电器驱动电路的第一输入端连接控制模块的输出端,继电器驱动电路的第二输入端连接继电器供电电路的输出端;继电器供电电路的输入端连接交流电源。本发明根据电压整形电路的输出电压的高电平或低电平脉宽发送不同占空比的PWM波驱动信号至继电器,以使得继电器吸合,避免高压时继电器吸合时间过长而导致的继电器损毁,继电器吸合后,再根据整形电路输出电压的高电平或低电平脉宽,调整继电器保持吸合的驱动信号的PWM占空比,降低继电器保持吸合时的功率。(The invention discloses a relay control circuit, a method and an electric appliance, wherein the input end of a voltage shaping circuit in the relay control circuit is connected with an alternating current power supply, and the output end of the voltage shaping circuit is connected with the input end of a control module; the first input end of the relay driving circuit is connected with the output end of the control module, and the second input end of the relay driving circuit is connected with the output end of the relay power supply circuit; the input end of the relay power supply circuit is connected with an alternating current power supply. The invention sends PWM wave driving signals with different duty ratios to the relay according to the high level or low level pulse width of the output voltage of the voltage shaping circuit so as to pull in the relay, thereby avoiding the damage of the relay caused by overlong pull-in time of the relay under high voltage.)

1. The relay control circuit is characterized by comprising an alternating current power supply, a voltage shaping circuit, a control module, a relay driving circuit and a relay power supply circuit;

the input end of the voltage shaping circuit is connected with the alternating current power supply, and the output end of the voltage shaping circuit is connected with the input end of the control module;

the first input end of the relay driving circuit is connected with the output end of the control module, and the second input end of the relay driving circuit is connected with the output end of the relay power supply circuit;

the input end of the relay power supply circuit is connected with the alternating current power supply;

the control module is used for outputting a high level signal with corresponding duration to the relay drive circuit according to the input voltage of the voltage shaping circuit after receiving the relay drive signal so as to pull in a relay in the relay drive circuit;

and the control module is also used for outputting a corresponding PWM signal to a relay in the relay driving circuit according to the input voltage of the voltage shaping circuit after the relay is attracted so as to enable the relay to keep an attraction state.

2. The relay control circuit of claim 1, wherein the voltage shaping circuit comprises a first transformer, a first diode, a second diode, a first resistor, a second resistor, a third resistor, a fourth resistor, a first capacitor, a second capacitor, a power supply, and a first switching tube;

the input end of the first transformer is used as the input end of the voltage shaping circuit and is connected with the alternating current power supply, and the output end of the first transformer is connected with the anode of the first diode and the cathode of the second diode;

a first end of the first resistor is connected with a cathode of the first diode, and a second end of the first resistor is connected with an anode of the second diode;

the first end of the second resistor is connected with the first end of the first resistor, and the second end of the second resistor is connected with the first end of the third resistor and the first end of the first capacitor;

the second end of the third resistor is connected with the second end of the first resistor and grounded;

the second end of the first capacitor is grounded, and the first end of the first capacitor is connected with the control electrode of the first switching tube;

the output electrode of the first switching tube is grounded, and the input electrode of the first switching tube is connected with the first end of the fourth resistor and is connected with the control module as the output end of the voltage shaping circuit;

the second end of the fourth resistor is connected with the power supply, and the first end of the fourth resistor is also connected with the first end of the second capacitor;

and the second end of the second capacitor is grounded.

3. The relay control circuit according to claim 1, wherein the voltage shaping circuit comprises a first diode, a second diode, a first resistor, a second resistor, a third resistor, a fourth resistor, a fifth resistor, a sixth resistor, a first capacitor, a second capacitor, a third capacitor, a fourth capacitor, a photocoupler, a first switching tube and a power supply;

the anode of the first diode is externally connected with an alternating current power supply, the cathode of the first diode is connected with the first end of the first resistor, the second end of the first resistor is connected with the first input end of the photoelectric coupler, and the second input end of the photoelectric coupler is externally connected with the alternating current power supply;

the first end of the second resistor is connected with the second input end of the photoelectric coupler, the second end of the second resistor is connected with the second end of the first resistor, the first end of the first capacitor is connected with the first input end of the photoelectric coupler, the second end of the first capacitor is connected with the second end of the first resistor, the anode of the second diode is connected with the first input end of the photoelectric coupler, and the cathode of the second diode is connected with the second end of the first resistor;

a first output end of the photoelectric coupler is connected with a first end of the second capacitor, and a second end of the second capacitor is grounded;

a second output end of the photoelectric coupler is connected with a first end of a third resistor, a second end of the third resistor is connected with a first end of a fourth capacitor, a second end of the fourth capacitor is connected with a second end of a sixth resistor, the second end of the sixth resistor is used as an output end of the voltage shaping circuit and is connected with the control module, the first end of the sixth resistor is connected with a collector electrode of the first switch tube, a base electrode of the first switch tube is connected with the second end of the fourth resistor, and the first end of the fourth resistor is connected with the first end of the third resistor;

the first end of the third capacitor is connected with the base electrode of the first switch tube, the second end of the third capacitor is connected with the emitting electrode of the first switch tube, the emitting electrode of the first switch tube is grounded, the first end of the fifth resistor is connected with the power supply, and the second end of the fifth resistor is connected with the first end of the sixth resistor.

4. The relay control circuit of claim 1, further comprising a relay power supply circuit;

the relay power supply circuit comprises a second transformer and a full-bridge rectifier sub-circuit, the input end of the second transformer is used as the input end of the relay power supply circuit to be connected with the alternating current power supply, the output end of the second transformer is connected with the input end of the full-bridge rectifier sub-circuit, and the output end of the full-bridge rectifier sub-circuit is used as the output end of the relay power supply circuit to be connected with the second input end of the relay drive circuit.

5. The relay control circuit of claim 1, wherein the relay drive circuit comprises a seventh resistor, an eighth resistor, a second switching tube, a third diode, and a relay;

a first end of the seventh resistor is used as a first input end of the relay driving circuit and is connected with the control module, and a second end of the seventh resistor is connected with a first end of the eighth resistor;

a second end of the eighth resistor is grounded;

the control end of the second switching tube is connected between the seventh resistor and the eighth resistor, the output end of the second switching tube is grounded, and the input end of the second switching tube is connected between the anode of the third diode and the first end of the relay;

the cathode of the third diode is connected with the second end of the relay;

and the second end of the relay is used as the second input end of the relay driving circuit and is connected with the relay power supply circuit.

6. A relay control method applied to the relay control circuit according to claim 1, comprising the steps of:

receiving a relay driving signal and square wave voltage output by a voltage shaping circuit;

detecting the width of a high-level signal and the width of a low-level signal in the square wave voltage, and inputting the width of the high-level signal and the width of the low-level signal into a preset formula to calculate the output voltage of the relay power supply circuit;

and outputting a high level signal with corresponding duration to the relay drive circuit according to the calculated output voltage so as to pull in a relay in the relay drive circuit.

7. The relay control method according to claim 6, wherein the step of outputting a high level signal for a corresponding duration to the relay driving circuit according to the calculated output voltage to pull in a relay in the relay driving circuit comprises:

and if the output voltage is within the preset range, outputting a high level signal with preset duration to the relay drive circuit so as to pull in a relay in the relay drive circuit.

8. The relay control method according to claim 6, wherein the step of outputting a high level signal for a corresponding duration to the relay driving circuit according to the calculated output voltage to pull in a relay in the relay driving circuit is followed by:

receiving an attraction signal sent after the relay is attracted;

and after receiving the attraction signal, judging the width of the high-level signal or the width of the low-level signal and the corresponding preset value, and outputting a corresponding PWM signal to a relay in a relay driving circuit according to a judgment result so that the relay keeps the attraction state.

9. The relay control method according to claim 8, wherein the step of determining the magnitude of the high level signal width or the low level signal width and outputting a corresponding PWM signal to the relay according to the magnitude of the high level signal width or the low level signal width comprises:

if the width of the high level signal is larger than or equal to the width of a preset first high level signal, or the width of the low level signal is smaller than or equal to the width of a preset first low level signal, outputting a PWM signal with a duty ratio of a preset value to the relay;

if the high level signal width is smaller than a preset first high level signal width and is greater than or equal to a preset second high level signal width, or the low level signal width is smaller than or equal to a preset second low level signal width and is greater than a preset first low level signal width, outputting a PWM signal with a duty ratio of D1 to the relay;

and if the high level signal width is smaller than a preset second high level signal width, or the low level signal width is larger than a preset second low level signal width, outputting a PWM signal with a duty ratio of D2 to the relay, wherein D2 is larger than D1.

10. An electrical appliance comprising a relay control circuit according to any one of claims 1-5, or capable of implementing a relay control method according to any one of claims 6-9.

Technical Field

The invention relates to the technical field of relays, in particular to a relay control circuit, a relay control method and an electric appliance.

Background

The relay is a control switch for controlling a strong electric signal through a weak electric signal, the electromagnet is driven to work through a coil in the relay, and when the relay works, the coil is electrified, and the electromagnet is attracted; when the relay stops working, the coil is powered off, and the electromagnet is switched off. Relays function as automatic adjustment, safety protection, switching circuits, and the like in circuits, and are therefore widely used in various electronic power devices.

The time from the power-on to the complete closing of the relay is called the pull-in time, the relay works under the voltage exceeding the rated working voltage, and the pull-in time of the relay is too long, so that the relay can be damaged. In addition, the relays of the existing air conditioners are driven, the relays are all started by the allowable working voltage of the relays, the relays are still kept in a closed state by the allowable working voltage after the relays are closed, and the relays do not need to have large holding power after being closed, so that the existing relay control mode wastes energy, the relays can generate heat, the total heat generation amount of the circuit is increased, and the service lives of other devices in the circuit are influenced.

Disclosure of Invention

The invention mainly aims to provide a relay control circuit, a relay control method and an electric appliance, and aims to solve the technical problem that the service life of other devices in a circuit is influenced due to the fact that the total heat generation amount of the circuit is increased by the existing relay control mode.

In order to achieve the purpose, the invention provides a relay control circuit, a method and an electric appliance, wherein the relay control circuit comprises an alternating current power supply, a voltage shaping circuit, a control module, a relay drive circuit and a relay power supply circuit;

the input end of the voltage shaping circuit is connected with the alternating current power supply, and the output end of the voltage shaping circuit is connected with the input end of the control module;

the first input end of the relay driving circuit is connected with the output end of the control module, and the second input end of the relay driving circuit is connected with the output end of the relay power supply circuit;

the input end of the relay power supply circuit is connected with the alternating current power supply;

the control module is used for outputting a high level signal with corresponding duration to the relay drive circuit according to the input voltage of the voltage shaping circuit after receiving the relay drive signal so as to pull in a relay in the relay drive circuit;

and the control module is also used for outputting a corresponding PWM signal to a relay in the relay driving circuit according to the input voltage of the voltage shaping circuit after the relay is attracted so as to enable the relay to keep an attraction state.

Optionally, the voltage shaping circuit includes a first transformer, a first diode, a second diode, a first resistor, a second resistor, a third resistor, a fourth resistor, a first capacitor, a second capacitor, a power supply, and a first switching tube;

the input end of the first transformer is used as the input end of the voltage shaping circuit and is connected with the alternating current power supply, and the output end of the first transformer is connected with the anode of the first diode and the cathode of the second diode;

a first end of the first resistor is connected with a cathode of the first diode, and a second end of the first resistor is connected with an anode of the second diode;

the first end of the second resistor is connected with the first end of the first resistor, and the second end of the second resistor is connected with the first end of the third resistor and the first end of the first capacitor;

the second end of the third resistor is connected with the second end of the first resistor and grounded;

the second end of the first capacitor is grounded, and the first end of the first capacitor is connected with the control electrode of the first switching tube;

the output electrode of the first switching tube is grounded, and the input electrode of the first switching tube is connected with the first end of the fourth resistor and is connected with the control module as the output end of the voltage shaping circuit;

the second end of the fourth resistor is connected with the power supply, and the first end of the fourth resistor is also connected with the first end of the second capacitor;

and the second end of the second capacitor is grounded.

Optionally, the voltage shaping circuit includes a first diode, a second diode, a first resistor, a second resistor, a third resistor, a fourth resistor, a fifth resistor, a sixth resistor, a first capacitor, a second capacitor, a third capacitor, a fourth capacitor, a photocoupler, a first switching tube, and a power supply;

the anode of the first diode is externally connected with an alternating current power supply, the cathode of the first diode is connected with the first end of the first resistor, the second end of the first resistor is connected with the first input end of the photoelectric coupler, and the second input end of the photoelectric coupler is externally connected with the alternating current power supply;

the first end of the second resistor is connected with the second input end of the photoelectric coupler, the second end of the second resistor is connected with the second end of the first resistor, the first end of the first capacitor is connected with the first input end of the photoelectric coupler, the second end of the first capacitor is connected with the second end of the first resistor, the anode of the second diode is connected with the first input end of the photoelectric coupler, and the cathode of the second diode is connected with the second end of the first resistor;

a first output end of the photoelectric coupler is connected with a first end of the second capacitor, and a second end of the second capacitor is grounded;

a second output end of the photoelectric coupler is connected with a first end of a third resistor, a second end of the third resistor is connected with a first end of a fourth capacitor, a second end of the fourth capacitor is connected with a second end of a sixth resistor, the second end of the sixth resistor is used as an output end of the voltage shaping circuit and is connected with the control module, the first end of the sixth resistor is connected with a collector electrode of the first switch tube, a base electrode of the first switch tube is connected with the second end of the fourth resistor, and the first end of the fourth resistor is connected with the first end of the third resistor;

the first end of the third capacitor is connected with the base electrode of the first switch tube, the second end of the third capacitor is connected with the emitting electrode of the first switch tube, the emitting electrode of the first switch tube is grounded, the first end of the fifth resistor is connected with the power supply, and the second end of the fifth resistor is connected with the first end of the sixth resistor.

Optionally, the relay control circuit further comprises a relay power supply circuit;

the relay power supply circuit comprises a second transformer and a full-bridge rectifier sub-circuit, the input end of the second transformer is used as the input end of the relay power supply circuit to be connected with the alternating current power supply, the output end of the second transformer is connected with the input end of the full-bridge rectifier sub-circuit, and the output end of the full-bridge rectifier sub-circuit is used as the output end of the relay power supply circuit to be connected with the second input end of the relay drive circuit.

Optionally, the relay driving circuit includes a seventh resistor, an eighth resistor, a second switching tube, a third diode, and a relay;

a first end of the seventh resistor is used as a first input end of the relay driving circuit and is connected with the control module, and a second end of the seventh resistor is connected with a first end of the eighth resistor;

a second end of the eighth resistor is grounded;

the control end of the second switching tube is connected between the seventh resistor and the eighth resistor, the output end of the second switching tube is grounded, and the input end of the second switching tube is connected between the anode of the third diode and the first end of the relay;

the cathode of the third diode is connected with the second end of the relay;

and the second end of the relay is used as the second input end of the relay driving circuit and is connected with the relay power supply circuit.

In addition, in order to achieve the above object, the present invention further provides a relay control method applied to the relay control circuit described above, the relay control method including the steps of:

receiving a relay driving signal and square wave voltage output by a voltage shaping circuit;

detecting the width of a high-level signal and the width of a low-level signal in the square wave voltage, and inputting the width of the high-level signal and the width of the low-level signal into a preset formula to calculate the output voltage of the relay power supply circuit;

and outputting a high level signal with corresponding duration to the relay drive circuit according to the calculated output voltage so as to pull in a relay in the relay drive circuit.

Optionally, the step of outputting a high level signal with a corresponding duration to the relay driving circuit according to the calculated output voltage so that a relay in the relay driving circuit is closed includes:

and if the output voltage is within the preset range, outputting a high level signal with preset duration to the relay drive circuit so as to pull in a relay in the relay drive circuit.

Optionally, the step of outputting a high level signal with a corresponding duration to the relay driving circuit according to the calculated output voltage so as to pull in a relay in the relay driving circuit includes:

receiving an attraction signal sent after the relay is attracted;

and after receiving the attraction signal, judging the width of the high-level signal or the width of the low-level signal and the corresponding preset value, and outputting a corresponding PWM signal to a relay in a relay driving circuit according to a judgment result so that the relay keeps the attraction state.

Optionally, the step of determining the width of the high level signal or the width of the low level signal, and outputting a corresponding PWM signal to the relay according to the width of the high level signal or the width of the low level signal includes:

if the width of the high level signal is larger than or equal to the width of a preset first high level signal, or the width of the low level signal is smaller than or equal to the width of a preset first low level signal, outputting a PWM signal with a duty ratio of a preset value to the relay;

if the high level signal width is smaller than a preset first high level signal width and is greater than or equal to a preset second high level signal width, or the low level signal width is smaller than or equal to a preset second low level signal width and is greater than a preset first low level signal width, outputting a PWM signal with a duty ratio of D1 to the relay;

and if the high level signal width is smaller than a preset second high level signal width, or the low level signal width is larger than a preset second low level signal width, outputting a PWM signal with a duty ratio of D2 to the relay, wherein D2 is larger than D1.

In addition, in order to achieve the above object, the present invention also provides an electric appliance including the relay control circuit or implementing the relay control method as described above.

The invention discloses a relay control circuit, a method and an electric appliance, wherein the relay control circuit comprises an alternating current power supply, a voltage shaping circuit, a control module, a relay drive circuit and a relay power supply circuit; the input end of the voltage shaping circuit is connected with an alternating current power supply, and the output end of the voltage shaping circuit is connected with the input end of the control module; the first input end of the relay driving circuit is connected with the output end of the control module, and the second input end of the relay driving circuit is connected with the output end of the relay power supply circuit; the input end of the relay power supply circuit is connected with an alternating current power supply; and the control module is used for outputting a high level signal with corresponding duration to the relay drive circuit according to the input voltage of the voltage shaping circuit after receiving the relay drive signal so as to attract the relay in the relay drive circuit, and is also used for outputting a corresponding PWM signal to the relay in the relay drive circuit according to the input voltage of the voltage shaping circuit after attracting the relay so as to keep the relay in an attraction state. The invention sends PWM wave driving signals with different duty ratios to the relay according to the high level or low level pulse width of the output voltage of the voltage shaping circuit so as to pull in the relay, thereby avoiding the damage of the relay caused by overlong pull-in time of the relay under high voltage.

Drawings

In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the structures shown in the drawings without creative efforts.

FIG. 1 is a schematic structural diagram of a relay control circuit according to an embodiment of the present invention;

FIG. 2 is a schematic diagram of the voltage shaping circuit in the relay control circuit according to the present invention;

FIG. 3 is a schematic diagram of another structure of the voltage shaping circuit in the relay control circuit according to the present invention;

FIG. 4 is a schematic diagram of the structure of the relay power supply circuit in the relay control circuit of the present invention;

FIG. 5 is a schematic diagram of a relay driver circuit in the relay control circuit of the present invention;

FIG. 6 is a schematic structural diagram of an embodiment of a relay control method according to the present invention;

fig. 7 is a schematic diagram of the output voltage of the ac power supply and the square wave voltage output by the voltage shaping circuit according to the present invention.

The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.

The reference numbers illustrate:

reference numerals Name (R) Reference numerals Name (R)
10 Relay control circuit R4 Fourth resistor
11 AC power supply C1 First capacitor
12 Voltage shaping circuit C2 Second capacitor
13 Control module Q1 First switch tube
14 Relay drive circuit VCC Power supply
15 Relay power supply circuit T2 Second transformer
T1 First transformer 151 Full-bridge rectifier sub-circuit
D1 First diode R5 Fifth resistor
D2 Second diode R6 Sixth resistor
R1 A first resistor Q2 Second switch tube
R2 Second resistance D3 Third diode
R3 Third resistance RY1 Relay with a movable contact
R7 Seventh resistor C4 Fourth capacitor
R8 Eighth resistor IC1 Photoelectric coupler
C3 Third capacitor

Detailed Description

It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

It should be noted that all the directional indicators (such as up, down, left, right, front, and rear … …) in the embodiment of the present invention are only used to explain the relative position relationship between the components, the movement situation, etc. in a specific posture (as shown in the drawing), and if the specific posture is changed, the directional indicator is changed accordingly.

In addition, the descriptions related to "first", "second", etc. in the present invention are for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present invention.

The invention discloses a relay control circuit, please refer to fig. 1, fig. 1 is a schematic structural diagram of an embodiment of the relay control circuit of the invention, the relay control circuit 10 includes an alternating current power supply 11, a voltage shaping circuit 12, a control module 13, a relay drive circuit 14 and a relay power supply circuit 15; the input end of the voltage shaping circuit 12 is connected with the alternating current power supply 11, and the output end of the voltage shaping circuit 12 is connected with the input end of the control module 13; a first input end of the relay driving circuit 14 is connected with an output end of the control module 13, and a second input end of the relay driving circuit 14 is connected with an output end of the relay power supply circuit 15; the input end of the relay power supply circuit 15 is connected with the alternating current power supply 11; the control module 13 is configured to output a high level signal with a corresponding duration to the relay driving circuit according to the input voltage of the voltage shaping circuit after receiving the relay driving signal, so that a relay in the relay driving circuit is closed; the control module 13 is further configured to output a corresponding PWM signal to the relay in the relay driving circuit 14 according to the input voltage of the voltage shaping circuit 12 after the relay is pulled in, so that the relay maintains a pulled-in state.

In this embodiment, the relay power supply circuit 15 is configured to supply power to the relay RY1, so that the relay RY1 is in an operating state, and optionally, the voltage of the relay power supply circuit 15 is 5V. It should be understood that the relay RY1 will be closed only after continuously receiving the high level signal for a certain period of time, but if the time for the relay RY1 to receive the high level signal is too long, the temperature of the coil of the relay RY1 will be too high, and the service life of the relay RY1 will be affected; if the time for receiving the high level signal by the relay RY1 is too short, the reed of the relay RY1 is not in the pull-in state.

After receiving the relay driving signal, the control module 13 outputs a high level signal with a corresponding duration to the relay driving circuit 14 according to the driving signal, so that the relay RY1 in the relay drive circuit 14 is pulled in, it should be understood that, because the relay is only attracted when receiving the high level signal, namely, the sending time of the high level signal is consistent with the attraction time of the relay, therefore, the present embodiment outputs a high level signal corresponding to the duration of time based on the square wave voltage sent from the voltage shaping circuit 12, thereby controlling the pull-in time of the relay, avoiding the damage of the relay caused by overlong pull-in time of the relay, after the relay is pulled in, and then according to the high level or low level pulse width of the output voltage of the shaping circuit, the PWM duty ratio of the drive signal for keeping the closing of the relay is adjusted, and the power of the relay for keeping the closing is reduced.

Further, referring to fig. 2, fig. 2 is a schematic structural diagram of the voltage shaping circuit in the relay control circuit according to the present invention. The voltage shaping circuit 12 comprises a first transformer T1, a first diode D1, a second diode D2, a first resistor R1, a second resistor R2, a third resistor R3, a fourth resistor R4, a first capacitor C1, a second capacitor C2, a power supply VCC and a first switch tube Q1; an input end of the first transformer T1 is connected to the alternating current power supply 11 as an input end of the voltage shaping circuit 12, and an output end of the first transformer T1 is connected to an anode of the first diode D1 and a cathode of the second diode D2; a first terminal of the first resistor R1 is connected to the cathode of the first diode D1, and a second terminal of the first resistor R1 is connected to the anode of the second diode D2; a first end of the second resistor R2 is connected with a first end of the first resistor R1, and a second end of the second resistor R2 is connected with a first end of the third resistor R3 and a first end of the first capacitor C1; a second end of the third resistor R3 is connected to a second connection of the first resistor R1 and to ground; the second end of the first capacitor C1 is grounded, and the first end of the first capacitor C1 is connected with the control electrode of the first switch tube Q1; an output electrode of the first switch tube Q1 is grounded, and an input electrode of the first switch tube Q1 is connected with a first end of a fourth resistor R4 and is connected with the control module 13 as an output end of the voltage shaping circuit 12; a second end of the fourth resistor R4 is connected to the power supply VCC, and a first end of the fourth resistor R4 is further connected to a first end of the second capacitor C2; the second end of the second capacitor C2 is grounded.

Further, referring to fig. 3, fig. 3 is another structural schematic diagram of the voltage shaping circuit in the relay control circuit of the present invention shown in fig. 3. The voltage shaping circuit in the present invention may also be configured as a circuit configuration as shown in fig. 3. The voltage shaping circuit comprises a first diode D1, a second diode D2, a first resistor R1, a second resistor R2, a third resistor R3, a fourth resistor R4, a fifth resistor R5, a sixth resistor R6, a first capacitor C1, a second capacitor C2, a third capacitor C3, a fourth capacitor C4, a photoelectric coupler IC1, a first switching tube Q1 and a power supply VCC; the anode of the first diode D1 is externally connected with an alternating current power supply, the cathode of the first diode D1 is connected with the first end of a first resistor R1, the second end of the first resistor R1 is connected with the first input end of a photoelectric coupler IC1, and the second input end of the photoelectric coupler IC1 is externally connected with the alternating current power supply; a first end of the second resistor R2 is connected with a second input end of the photocoupler IC1, a second end of the second resistor R2 is connected with a second end of the first resistor R1, a first end of the first capacitor C1 is connected with a first input end of the photocoupler IC1, a second end of the first capacitor C1 is connected with a second end of the first resistor R1, an anode of the second diode D2 is connected with a first input end of the photocoupler IC1, and a cathode of the second diode D2 is connected with a second end of the first resistor R1; a first output end of the photoelectric coupler IC1 is connected with a first end of a second capacitor C2, and a second end of the second capacitor C2 is grounded; a second output end of the photocoupler IC1 is connected with a first end of a third resistor R3, a second end of the third resistor R3 is connected with a first end of a fourth capacitor C4, a second end of the fourth capacitor C4 is connected with a second end of a sixth resistor R6, a second end of the sixth resistor R6 is connected with the control module as an output end of the voltage shaping circuit, a first end of the sixth resistor R6 is connected with a collector of a first switch tube Q1, a base of the first switch tube Q1 is connected with a second end of the fourth resistor R4, and a first end of the fourth resistor R4 is connected with a first end of the third resistor R3; a first end of the third capacitor C3 is connected to the base of the first switch Q1, a second end of the third capacitor C3 is connected to the emitter of the first switch Q1, the emitter of the first switch Q1 is grounded, a first end of the fifth resistor R5 is connected to the power supply VCC, and a second end of the fifth resistor R5 is connected to the first end of the sixth resistor R6.

In this embodiment, in order to enable the first switch Q1 in the voltage shaping circuit 12 to operate normally, the first switch Q1 is powered by a power supply VCC, and preferably, the output voltage of the power supply VCC is 5V. It is easily understood that the voltage output by the ac power source 11 is an ac voltage, the input terminal of the voltage shaping circuit 12 is connected to the ac power source 11, the ac power source 11 outputs the ac voltage to the voltage shaping circuit 12, the voltage shaping circuit 12 shapes the ac voltage input by the ac power source 11 into a square wave voltage, the square wave voltage has only 2 values of high-level voltage and low-level voltage, and the periods of the high-level voltage and the low-level voltage are also related to the voltage output by the ac power source 11. In the embodiment, the voltage shaping circuit 12 is arranged to convert the alternating-current voltage into the square-wave voltage, and since the pull-in time of the relay is also related to the voltage output by the alternating-current power supply 11, the alternating-current voltage is converted into the square-wave voltage and the square-wave voltage is output to the control module 13, so that the control module 13 adjusts the high-level signal output time required by pull-in of the relay RY1 according to the square-wave voltage.

Further, referring to fig. 4, fig. 4 is a schematic structural diagram of the relay power supply circuit in the relay control circuit of the present invention, where the relay control circuit 10 further includes a relay power supply circuit 15; the relay power supply circuit 15 includes a second transformer T2 and a full-bridge rectifier sub-circuit 151, the input terminal of the second transformer T2 serves as the input terminal of the relay power supply circuit 15 is connected to the ac power supply 11, the output terminal of the second transformer T2 is connected to the input terminal of the full-bridge rectifier sub-circuit 151, and the output terminal of the full-bridge rectifier sub-circuit 151 serves as the output terminal of the relay power supply circuit 15 is connected to the second input terminal of the relay drive circuit 14.

It is easy to understand that the input end of the relay power supply circuit 15 is connected to the ac power supply 11, and converts the ac voltage output by the ac power supply 11 to supply power to the relay RY1 in the relay driving circuit 14, generally, the specific value of the output voltage of the relay power supply circuit 15 is related to the output voltage of the ac power supply 11, the output square wave voltage of the voltage shaping circuit 12, and the parameters of the components in the circuit, and of course, the specific value output by the relay power supply circuit 15 is not specifically limited in this embodiment, and the voltage output by the ac power supply 11 is converted by providing the relay power supply circuit 15 to supply power to the relay driving circuit 14, so as to ensure that the relay in the relay driving circuit 14 can work normally.

Further, referring to fig. 5, fig. 5 is a schematic structural diagram of the relay driving circuit in the relay control circuit of the present invention. The relay driving circuit 14 comprises a seventh resistor R7, an eighth resistor R8, a second switch tube Q2, a third diode D3 and a relay RY 1; a first end of the seventh resistor R7 is connected to the control module 13 as a first input end of the relay driver circuit 14, and a second end of the seventh resistor R7 is connected to a first end of the eighth resistor R8; a second end of the eighth resistor R8 is grounded; a control end of the second switching tube Q2 is connected between the seventh resistor R7 and the eighth resistor R8, an output end of the second switching tube Q2 is grounded, and an input end of the second switching tube Q2 is connected between an anode of the third diode D3 and a first end of the relay RY 1; the cathode of the third diode D3 is connected with the second end of the relay RY 1; a second end of the relay RY1 is connected to the relay power supply circuit 15 as a second input end of the relay drive circuit 14.

A first input end of the relay driving circuit 14 receives a high level signal with a certain duration output by the control module 13, and the relay RY1 is closed by the high level signal, so that the relay RY1 is attracted; a second input terminal of relay drive circuit 14 receives the voltage output from relay power supply circuit 15, so that relay RY1 is in a normal operating state. Particularly, after the relay RY1 is pulled in, if the control module 13 continues to output a high level signal for a long time, the damage of the relay RY1 may also be caused, in this embodiment, after the relay RY1 is pulled in, the pull-in signal is sent to the control module 13 through the relay driving circuit 14, so that the control module 13 adjusts the output signal according to the working state of the relay RY1, and the service life of the relay RY1 is prevented from being influenced by outputting the high level signal for a long time.

The invention also discloses a relay control method, please refer to fig. 6, fig. 6 is a schematic structural diagram of an embodiment of the relay control method of the invention, and the relay control method includes the following steps:

step S10, receiving a relay driving signal and a square wave voltage output by a voltage shaping circuit;

step S20, detecting the width of a high-level signal and the width of a low-level signal in the square wave voltage, and inputting the width of the high-level signal and the width of the low-level signal into a preset formula to calculate the output voltage of the relay power supply circuit;

and step S30, outputting a high level signal with corresponding duration to the relay drive circuit according to the calculated output voltage, so that the relay in the relay drive circuit is closed.

The method comprises the steps of receiving a relay driving signal, and receiving square wave voltage output by a voltage shaping circuit according to the relay driving signal, wherein the square wave voltage output by the voltage shaping circuit is high voltage and low voltage with a certain period. It is easy to understand that the square wave voltage includes a high level signal width and a low level signal width, the high level signal width and the low level signal width in the square wave voltage are detected, and the obtained high level signal width and the obtained low level signal width are input into a preset formula to obtain an output voltage of the relay power supply circuit, which is an input voltage of the relay driving circuit. After the output voltage of the relay power supply circuit is obtained, a high level signal with a certain time length is output to the relay drive circuit according to the specific numerical value of the output voltage, so that the relay is closed.

According to the embodiment, the high-level signal with the corresponding duration is sent according to the voltage output by the voltage shaping circuit, so that the pull-in time of the relay is controlled, and the damage of the relay caused by the overlong pull-in time of the relay is avoided.

Further, the preset formula is as follows:

or

Wherein Vc is the output voltage of the relay power supply circuit; vx is square wave turning voltage; vac is the output voltage of the alternating current power supply; n is a transformation ratio parameter; c1 is the load parameter in the relay power supply circuit; th is high level signal width; tl is the low level signal width; t is the period of the output voltage of the alternating current power supply.

Further, the step of outputting a high level signal with a corresponding duration to the relay driving circuit according to the calculated output voltage so as to pull in a relay in the relay driving circuit includes:

and step S31, if the output voltage is within a preset range, outputting a high level signal with a preset duration to the relay drive circuit so as to pull in a relay in the relay drive circuit.

In the preset formula, Vc is the output voltage of the relay power supply circuit; vx is square wave turning voltage; vac is the output voltage of the alternating current power supply; n is a transformation ratio parameter; c1 is the load parameter in the relay power supply circuit; th is high level signal width; tl is the low level signal width; t is the period of the output voltage of the alternating current power supply.

Specifically, the output voltage of the relay power supply circuit can be calculated by the above formula, where Vx is a square wave turning voltage, specifically, please refer to fig. 7, where fig. 7 is a schematic diagram of the output voltage of the ac power supply and the square wave voltage output by the voltage shaping circuit of the present invention, where V is0I.e. the value representing the square wave voltage output by the voltage shaping circuit 12, in the figure, T is the output period of the square wave voltage, Tl is the period of the low level signal in the square wave voltage, i.e. the width of the low level signal output by the voltage shaping circuit 12, and Th is the period of the high level signal in the square wave voltage, i.e. the width of the high level signal output by the voltage shaping circuit 12. And calculating the output voltage of the relay power supply circuit through the formula, and determining the specific time length of the output high-level signal. In addition, a certain voltage range is preset in this embodiment, after the output voltage of the ac power supply is obtained, if the output voltage is within the preset voltage range, a high level signal with a preset duration is output to the relay driving circuit, so that the relay is closed, and optionally, the preset voltage range is 210V to 230V. In the embodiment, the relay is obtained in the above mannerThe magnitude of the output voltage of the power supply circuit outputs a high level signal with preset duration when the output voltage of the relay power supply circuit is within a preset voltage range, so that the pull-in time of the relay is limited, and the relay is in a safe state in the pull-in process.

Further, the step S30 outputs a high level signal with a corresponding duration to the relay driving circuit according to the calculated output voltage, so that the method further includes the following steps after the relay in the relay driving circuit is pulled in:

step S40, receiving an attraction signal sent by the relay after attraction;

and step S50, after receiving the pull-in signal, judging the width of the high level signal or the width of the low level signal and the corresponding preset value, and outputting a corresponding PWM signal to a relay in a relay driving circuit according to the judgment result so that the relay keeps the pull-in state.

Further, the step of determining the width of the high level signal or the width of the low level signal according to the pull-in signal, and outputting a corresponding PWM signal to the relay according to the width of the high level signal or the width of the low level signal includes:

step S51, if the width of the high level signal is larger than or equal to the width of a preset first high level signal, or the width of the low level signal is smaller than or equal to the width of a preset first low level signal, outputting a PWM signal with a duty ratio of a preset value to the relay;

step S52, if the high level signal width is smaller than a preset first high level signal width and is greater than or equal to a preset second high level signal width, or the low level signal width is smaller than or equal to a preset second low level signal width and is greater than a preset first low level signal width, outputting a PWM signal with a duty ratio of D1 to the relay;

in step S53, if the high level signal width is smaller than a preset second high level signal width, or the low level signal width is greater than a preset second low level signal width, a PWM signal with a duty ratio of D2 is output to the relay, where D2 is greater than D1.

In this embodiment, after receiving the pull-in signal, in order to keep the relay in the continuous pull-in state, a corresponding PWM signal needs to be output to the relay driving circuit according to the width of the high level signal or the low level signal in the square wave voltage output by the voltage shaping circuit, so that the relay keeps pull-in. After the relay is closed, if a high level signal is still continuously output, the power consumption of the relay 1 is high, and energy waste is caused. In addition, in prior art, after the relay is driven electrically at last, because the relay is always in the actuation state, then the relay always operates with actuation voltage, and can not step down, so, also can the drive consumption after the actuation of greatly increased relay.

In order to overcome the above-mentioned defect, in this embodiment, the relay RY1 is kept in the pull-in state by determining the width of the high-level signal or the width of the low-level signal and outputting the PWM signal with different duty ratios. In this embodiment, a first high level signal width, a second high level signal width, a first low level signal width, and a second low level signal width are preset. When the width of the high-level signal is greater than or equal to the width of a preset first high-level signal, or the width of the low-level signal is less than or equal to the width of a preset first low-level signal, outputting a PWM signal with a duty ratio of a preset value, optionally, the preset value is 1, that is, under the above condition, outputting a continuous PWM signal; when the width of the level signal is smaller than the preset first high level signal width and is greater than or equal to the preset second high level signal width, or the width of the low level signal is smaller than or equal to the preset second low level signal width and is greater than the preset first low level signal width, outputting a PWM signal with a duty ratio of D1; when the high-level signal width is smaller than the preset second high-level signal width, or the low-level signal width is larger than the preset second low-level signal width, the PWM signal with the duty ratio D2 is output, and it should be understood that the value of D2 should be larger than the value of D1.

Through the mode, the PWM driving voltage duty ratio for maintaining the conduction of the relay is dynamically adjusted according to the width of the high-low level signal output by the voltage shaping module, so that the power of the relay during the holding and the suction is reduced to the maximum extent, and the energy waste is avoided.

In addition, the embodiment of the invention also provides an electric appliance, wherein the electric appliance comprises the relay control circuit or can realize the relay control method.

The specific embodiment of the electrical appliance of the invention is basically the same as the embodiments of the relay control method, and the details are not repeated herein.

It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.

The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.

The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

17页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种PWM控制型继电器

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!