Magnetic latching relay drive circuit
By designing a combination of control module, comparison module and drive module for the magnetic latching relay drive circuit, the problem of requiring two interfaces for control of a single coil magnetic latching relay is solved, realizing multi-state control of the single coil relay and reducing resource consumption.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN KSTAR SCI & TECH
- Filing Date
- 2022-12-30
- Publication Date
- 2026-06-23
AI Technical Summary
In the prior art, the single-coil magnetic latching relay drive requires two general-purpose input/output interfaces for control, which leads to resource constraints in the control module in applications that require a large number of relays.
A magnetic latching relay drive circuit was designed. By combining a control module, a comparison module, and a drive module, a general-purpose input/output interface was used to control multiple operating states of the magnetic latching relay, including on, off, and holding states.
This invention enables single-coil magnetic latching relays to switch between different operating states with only one general-purpose input/output interface, reducing the resource consumption of the control module and making it suitable for applications requiring a large number of relays.
Smart Images

Figure CN115995359B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic technology, and in particular to a magnetic latching relay drive circuit. Background Technology
[0002] The opening and closing of a magnetic latching relay relies on the action of a permanent magnet, and its switching state transition is accomplished by triggering a pulse electrical signal. Magnetic latching relays are divided into single-coil driven and dual-coil driven types. The two control terminals for the activation and deactivation of a dual-coil magnetic latching relay are independent, but because the manufacturing process of a dual-coil relay is more complex than that of a single-coil relay, the price of a dual-coil magnetic latching relay is relatively higher. For enterprises using relays in large quantities, single-coil relays still have a significant advantage.
[0003] Applying a forward voltage, a reverse voltage, and no voltage to a single-coil magnetic latching relay corresponds to the on, off, and holding states, respectively. Since the general-purpose input / output interface (GPIO) of the control module typically outputs two states, high and low, most single-coil magnetic latching relay drivers require two GPIOs for control. In applications requiring a large number of single-coil magnetic latching relays, this makes the GPIO resources of the control module very scarce. Summary of the Invention
[0004] To address the aforementioned technical problems, this application provides a magnetic latching relay drive circuit.
[0005] This application provides a magnetic latching relay drive circuit, including:
[0006] The control module is used by the microcontroller to configure the general-purpose input / output interface according to the received configuration instructions, and to output the corresponding voltage signal through the relay control node;
[0007] The comparison module is electrically connected to the relay control node of the control module and is used to output a corresponding control signal based on the comparison result between the voltage signal and the voltage reference signal.
[0008] The driving module is electrically connected to the comparison module and the magnetic latching relay respectively, and is used to generate a corresponding driving signal according to the control signal. The driving signal is used to drive the magnetic latching relay to enter a corresponding working state, which includes an on state, an off state, and a holding state.
[0009] Optionally, the voltage signal is a first voltage signal, a second voltage signal, or a third voltage signal, wherein the first voltage signal is greater than the second voltage signal, the second voltage signal is greater than the third voltage signal, and the magnetic latching relay driving circuit drives the magnetic latching relay to enter the conducting state according to the first voltage signal, drives the magnetic latching relay to enter the holding state according to the second voltage signal, and drives the magnetic latching relay to enter the turning-off state according to the third voltage signal.
[0010] Optionally, the control module includes a microcontroller, a first resistor, and a second resistor. The general-purpose input / output interface of the microcontroller is electrically connected to the power supply via the first resistor. The general-purpose input / output interface of the microcontroller is also grounded via the second resistor. The first resistor and the second resistor are connected to the relay control node. The microcontroller configures the general-purpose input / output interface according to the received configuration instructions, and the relay control node outputs the corresponding voltage signal.
[0011] Optionally, the status attribute of the general input / output interface is configured as an output pin, and the relay control node outputs the first voltage signal and the third voltage signal;
[0012] Configure the status attribute of the general input / output interface as an input pin, and the relay control node outputs the second voltage signal.
[0013] Optionally, the comparison module includes:
[0014] The first comparison branch is electrically connected to the relay control node and is used to output a corresponding first control signal based on the comparison result between the voltage signal and the first voltage reference signal.
[0015] The second comparison branch, connected to the first comparison branch to the relay control node, is used to output a corresponding second control signal based on the comparison result between the voltage signal and the second voltage reference signal.
[0016] Optionally, the magnitude of the first voltage reference signal is between the first voltage signal and the second voltage signal, and the magnitude of the second voltage reference signal is between the second voltage signal and the third voltage signal.
[0017] Optionally, based on the first voltage signal, the first control signal is at a high level, and the second control signal is at a low level;
[0018] According to the second voltage signal, the first control signal is at a low level, and the second control signal is at a low level;
[0019] According to the third voltage signal, the first control signal is at a low level and the second control signal is at a high level.
[0020] Optionally, the driving module includes at least one half-bridge circuit, the first input terminal of the half-bridge circuit being electrically connected to the first comparison branch, and the second input terminal of the half-bridge circuit being electrically connected to the second comparison branch.
[0021] Optionally, the half-bridge circuit includes:
[0022] The first half-bridge branch is electrically connected to the first comparison branch, the positive working power supply, and the magnetic latching relay, respectively;
[0023] The second half-bridge branch is electrically connected to the second comparison branch, the negative working power supply, and the magnetic latching relay, respectively.
[0024] The first half-bridge branch and the second half-bridge branch are connected to the positive output terminal of the drive module, and the negative output terminal of the drive module is grounded.
[0025] Optionally, the drive module includes a full-bridge circuit, the full-bridge circuit comprising:
[0026] The first half-bridge branch is electrically connected to the first comparison branch, the positive working power supply, and the magnetic latching relay, respectively;
[0027] The second half-bridge branch is electrically connected to the second comparison branch, ground, and the magnetic latching relay, respectively;
[0028] The third half-bridge branch is electrically connected to the second comparison branch, the positive working power supply, and the magnetic latching relay, respectively;
[0029] The fourth half-bridge branch is electrically connected to the first comparison branch, ground, and the magnetic latching relay, respectively;
[0030] The first half-bridge branch and the second half-bridge branch are connected to the positive output terminal of the drive module, and the third half-bridge branch and the fourth half-bridge branch are connected to the negative output terminal of the drive module.
[0031] Based on the aforementioned magnetic latching relay drive circuit, the control module outputs a corresponding voltage signal according to the received configuration command. The comparison module receives the voltage signal through the general-purpose input / output interface of the control module and outputs a corresponding control signal based on the comparison result between the voltage signal and the voltage reference signal. The drive module outputs a corresponding drive signal to the magnetic latching relay according to the control signal. That is, by generating corresponding drive signals through different voltage signals, the magnetic latching relay is controlled to enter different working states. The magnetic latching relay only needs to occupy one general-purpose input / output interface of the control module to realize the switching of different working states. Compared with the prior art, in applications that require more magnetic latching relays, the control module can control more magnetic latching relays. Attached Figure Description
[0032] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0033] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0034] Figure 1 This is a schematic diagram of the magnetic latching relay drive circuit in one embodiment;
[0035] Figure 2 This is a schematic diagram of the control module in one embodiment;
[0036] Figure 3 This is a schematic diagram of the magnetic latching relay drive circuit in one embodiment;
[0037] Figure 4 This is a schematic diagram of the magnetic latching relay drive circuit in one embodiment;
[0038] Figure 5 This is a schematic diagram of the magnetic latching relay drive circuit in one embodiment;
[0039] Figure 6 This is a schematic diagram of the magnetic latching relay drive circuit in one embodiment;
[0040] Figure 7 This is a schematic diagram of the magnetic latching relay drive circuit in one embodiment;
[0041] Figure 8 This is a timing diagram of the operation of a magnetic latching relay drive circuit in one embodiment. Detailed Implementation
[0042] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0043] Figure 1 This is a schematic diagram of the magnetic latching relay drive circuit in one embodiment. (Refer to...) Figure 1 The magnetic latching relay drive circuit 100 specifically includes:
[0044] The control module 110 is used by the microcontroller to configure the general-purpose input / output interface according to the received configuration instructions, and to output corresponding voltage signals through the relay control node for the microcontroller to use according to the received configuration instructions.
[0045] Specifically, the configuration instructions are used to configure the status attributes of at least one general purpose input / output (GPIO) interface of the microcontroller unit in the control module 110. The status attributes include input pins and output pins. The GPIO interface is used as a relay control node. The control module 110 configures the GPIO interface based on different configuration instructions. In conjunction with the connected peripheral circuits, the relay control node outputs the corresponding voltage signal. That is, the control module 110 only needs to occupy one GPIO interface to control a magnetic latching relay 200, which reduces one GPIO interface compared to the prior art for controlling a magnetic latching relay 200.
[0046] For example, when the number of general-purpose input / output interfaces of the control module 110 is M, the control module 110 in this embodiment can control up to M magnetic latching relays 200, while in the prior art, the control module 110 can only control up to M / 2 magnetic latching relays 200. Therefore, the control module 110 in this embodiment can control more magnetic latching relays 200. The magnetic latching relays 200 in this embodiment are single-coil magnetic latching relays 200.
[0047] The comparison module 120 is electrically connected to the relay control node of the control module 110 and is used to output a corresponding control signal based on the comparison result between the voltage signal and the voltage reference signal.
[0048] Specifically, the comparison module 120 compares the voltage signal with the voltage reference signal and outputs control signals of different level states based on the comparison result. The level states include high level and low level.
[0049] The drive module 130 is electrically connected to the comparison module 120 and the magnetic latching relay 200, respectively. It generates a corresponding drive signal based on the control signal. This drive signal drives the magnetic latching relay 200 into a corresponding operating state, including an on state, an off state, and a holding state. The magnetic latching relay 200 includes a bidirectional Zener diode (TVS1) for absorbing stress spikes during relay operation.
[0050] Specifically, the drive module 130 generates corresponding drive signals based on control signals of different level states. Different drive signals are used to drive the magnetic latching relay 200 into different working states. That is, the magnetic latching relay 200 is controlled to enter different working states by generating corresponding drive signals through different voltage signals. The magnetic latching relay 200 only needs to occupy one general-purpose input / output interface of the control module 110 to realize the switching of different working states. Compared with the prior art, in applications that require more magnetic latching relays 200, the control module 110 can control more magnetic latching relays 200.
[0051] In one embodiment, the voltage signal is a first voltage signal, a second voltage signal, or a third voltage signal, wherein the first voltage signal is greater than the second voltage signal, the second voltage signal is greater than the third voltage signal, and the magnetic latching relay driving circuit 100 drives the magnetic latching relay 200 to enter the conducting state according to the first voltage signal, drives the magnetic latching relay 200 to enter the holding state according to the second voltage signal, and drives the magnetic latching relay 200 to enter the turning-off state according to the third voltage signal.
[0052] Specifically, the first voltage signal indicates VDD, and the third voltage signal indicates 0. The magnetic latching relay drive circuit drives the magnetic latching relay into the on state according to the first voltage signal, and drives the magnetic latching relay into the off state according to the third voltage signal. The microcontroller determines the output second voltage signal according to the peripheral circuit connected to the relay control node. The second voltage signal is less than the first voltage signal but greater than the third voltage signal. The magnetic latching relay drive circuit drives the magnetic latching relay into the holding state according to the second voltage signal.
[0053] In one embodiment, the control module 110 includes a microcontroller, a first resistor, and a second resistor. The general-purpose input / output interface of the microcontroller is electrically connected to the power supply via the first resistor. The general-purpose input / output interface of the microcontroller is also grounded via the second resistor. The first resistor and the second resistor are connected to the relay control node. The microcontroller configures the general-purpose input / output interface according to the received configuration instructions, and the relay control node outputs the corresponding voltage signal.
[0054] Specifically, such as Figure 2 As shown, the microcontroller unit is the MCU. R1 indicates the first resistor, and R2 indicates the second resistor. The MCU's general-purpose input / output interface is pulled up to VDD through resistor R1 and pulled down to GND through resistor R2. The node between the first and second resistors is the relay control node. Based on the first and second resistors connected to the relay control node, the second voltage signal output by the relay control node is determined. Therefore, 0 can be obtained through configuration commands. These three voltage signals, VDD, control the magnetic latching relay 200 to switch between three states: off, hold, and on, respectively.
[0055] In one embodiment, the status attribute of the general-purpose input / output interface is configured as an output pin, and the relay control node outputs the first voltage signal and the third voltage signal;
[0056] Configure the status attribute of the general input / output interface as an input pin, and the relay control node outputs the second voltage signal.
[0057] Specifically, when the configuration command is used to configure the status attribute of the general-purpose input / output interface of the control module 110 as an input pin, the general-purpose input / output interface is in a high-impedance state. The voltage signal at the general-purpose input / output interface is determined by the peripheral circuit connected to the general-purpose input / output interface. That is, at this time, the relay control node outputs... The second voltage signal; when the configuration instruction is used to configure the status attribute of the general input / output interface of the control module 110 as an output pin, the output of the general input / output interface can be specifically determined according to the configuration parameters in the configuration instruction, with VDD being 3.3V.
[0058] In one embodiment, such as Figure 3 As shown, the comparison module 120 includes:
[0059] The first comparison branch 121 is electrically connected to the relay control node and is used to output a corresponding first control signal based on the comparison result between the voltage signal and the first voltage reference signal.
[0060] The second comparison branch 122 is connected to the relay control node and is used to output a corresponding second control signal based on the comparison result between the voltage signal and the second voltage reference signal.
[0061] Specifically, the input terminals of the first comparison branch 121 and the second comparison branch 122 are both electrically connected to the relay control node to receive the voltage signal output by the microcontroller unit. The first comparison branch 121 and the second comparison branch 122 respectively compare the received voltage signal with different voltage reference signals. That is, the first comparison branch 121 compares the voltage signal with a first voltage reference signal, and the second comparison branch 122 compares the voltage signal with a second voltage reference signal. The first voltage reference signal indicates a first reference voltage V. ref_ The second voltage reference signal indicates the second reference voltage V. ref_ The first voltage reference signal and the second voltage reference signal indicate different reference voltages. Specifically, the first voltage reference signal and the second voltage reference signal can be customized according to the actual application scenario.
[0062] The first comparison branch 121 outputs a first control signal, and the second comparison branch 122 outputs a second control signal. That is, the control signal includes the first control signal and the second control signal. The first control signal and the second control signal are transmitted to the drive module 130, so that the drive module 130 outputs the corresponding drive signal according to the two different control signals.
[0063] In one embodiment, the magnitude of the first voltage reference signal is between the first voltage signal and the second voltage signal, and the magnitude of the second voltage reference signal is between the second voltage signal and the third voltage signal.
[0064] Specifically, since the first voltage signal is VDD and the second voltage signal is... The third voltage signal is 0, therefore the magnitude relationship between the different signals is:
[0065] In one embodiment, the first control signal is high and the second control signal is low, based on the first voltage signal;
[0066] According to the second voltage signal, the first control signal is at a low level, and the second control signal is at a low level;
[0067] According to the third voltage signal, the first control signal is at a low level and the second control signal is at a high level.
[0068] Specifically, the first comparison branch 121 compares the first voltage signal with the first voltage reference signal. Since V ref_on < VDD, the first comparison branch 121 outputs a first control signal at a high level corresponding to VDD; while the second comparison branch 122 compares the first voltage signal with the second voltage reference signal. Since V ref_off < VDD, the second comparison branch 122 outputs a second control signal at a low level corresponding to VDD.
[0069] The first comparison branch 121 compares the second voltage signal with the first voltage reference signal. Since the first comparison branch 121 outputs V ref_on corresponding to a first control signal at a low level; while the second comparison branch 122 compares the second voltage signal with the second voltage reference signal. Since the second comparison branch 122 outputs corresponding to a second control signal at a low level.
[0070] The first comparison branch 121 compares the third voltage signal with the first voltage reference signal. Since 0 < V ref_on , the first comparison branch 121 outputs V ref_on corresponding to a first control signal at a low level; while the second comparison branch 122 compares the third voltage signal with the second voltage reference signal. Since 0 < V ref_off , the second comparison branch 122 outputs V ref_off corresponding to a second control signal at a high level.
[0071] In one embodiment, the first comparison branch 121 includes a first comparator, a third resistor, a fourth resistor, and a fifth resistor. As Figure 4 shown, U1:A indicates the first comparator, R3 indicates the third resistor, R4 indicates the fourth resistor, and R5 indicates the fifth resistor. The first input terminal of the first comparator is electrically connected to the power supply (+VDD) through the third resistor. The first input terminal of the first comparator is also grounded through the fourth resistor. The second input terminal of the first comparator is electrically connected to the relay control node. The positive terminal of the first comparator is electrically connected to the positive working power supply (VCC). The working power supply VCC is also the working power supply of the relay coil, and the typical value is 12V. The negative terminal of the first comparator is electrically connected to the negative working power supply (-VCC). The output terminal of the first comparator is electrically connected to the positive working power supply through the fifth resistor. The output terminal of the first comparator is also electrically connected to the driving module 130.
[0072] The first input terminal of the first comparator is a negative input terminal, used to receive a first voltage reference signal, and the second input terminal of the first comparator is a positive input terminal, used to receive the voltage signal output by the microcontroller unit.
[0073] In one embodiment, the second comparison module 120 includes a second comparator, a tenth resistor, an eleventh resistor, and a twelfth resistor, such as... Figure 4 As shown, U1:B indicates the second comparator, R10 indicates the tenth resistor, R11 indicates the eleventh resistor, and R12 indicates the twelfth resistor. The first input terminal of the second comparator is electrically connected to the relay control node. The second input terminal of the second comparator is electrically connected to the power supply via the tenth resistor. The second input terminal of the second comparator is also grounded via the eleventh resistor. The output terminal of the second comparator is electrically connected to the positive operating power supply via the twelfth resistor. The output terminal of the second comparator is also electrically connected to the drive module 130.
[0074] The first input of the second comparator is a negative input, used to receive the voltage signal output by the microcontroller unit, and the second input of the first comparator is a positive input, used to receive the second voltage reference signal.
[0075] In summary, when the microcontroller outputs a first voltage signal, the first comparator outputs a high-level first control signal and the second comparator outputs a low-level second control signal; when the microcontroller outputs a second voltage signal, the first comparator outputs a low-level first control signal and the second comparator outputs a low-level second control signal; when the microcontroller outputs a third voltage signal, the first comparator outputs a low-level first control signal and the second comparator outputs a high-level second control signal.
[0076] In one embodiment, the driving module 130 includes at least one half-bridge circuit, the first input terminal of the half-bridge circuit being electrically connected to the first comparison branch 121, and the second input terminal of the half-bridge circuit being electrically connected to the second comparison branch 122.
[0077] Specifically, the driving module 130 may include one half-bridge circuit or two half-bridge circuits, and the two half-bridge circuits form a full-bridge circuit. That is, the driving module 130 can be a half-bridge circuit or a full-bridge circuit. When the driving module 130 is a half-bridge circuit, the first input terminal of the half-bridge circuit is connected to the output terminal of the first comparator, and the second input terminal of the half-bridge circuit is connected to the output terminal of the second comparator. The half-bridge circuit generates a driving signal according to the received first control signal and second control signal.
[0078] like Figure 5As shown, if the driving module 130 is a full-bridge circuit, the two half-bridge circuits in the full-bridge circuit are respectively referred to as the first half-bridge circuit 131 and the second half-bridge circuit 132. The electrical connection between the first half-bridge circuit 131 and the comparison module 120 is as described above for the connection of the half-bridge circuit. The first input terminal of the second half-bridge circuit 132 is electrically connected to the output terminal of the second comparator, and the second input terminal of the second half-bridge circuit 132 is electrically connected to the output terminal of the first comparator. The negative terminal of the first comparator is grounded.
[0079] Specifically, the choice between a half-bridge circuit and a full-bridge circuit as the driver module 130 depends on the power supply availability of the first comparator. If the negative terminal of the first comparator can be electrically connected to a negative power supply, a half-bridge circuit is selected as the driver module 130. If the negative terminal of the first comparator cannot be electrically connected to a negative power supply, a full-bridge circuit is selected as the driver module 130. A full-bridge circuit has more components than a half-bridge circuit, therefore its manufacturing cost is higher. When the negative terminal of the first comparator can be connected to a negative power supply, a half-bridge circuit should be selected as the driver module 130 to save manufacturing costs and simplify the circuit structure of the driver module 130.
[0080] In one embodiment, the half-bridge circuit includes:
[0081] The first half-bridge branch is electrically connected to the first comparison branch 121, the positive working power supply, and the magnetic latching relay 200, respectively;
[0082] The second half-bridge branch is electrically connected to the second comparison branch 122, the negative working power supply, and the magnetic latching relay 200, respectively;
[0083] The first half-bridge branch and the second half-bridge branch are connected to the positive output terminal of the drive module, and the negative output terminal of the drive module is grounded.
[0084] Specifically, such as Figure 6 As shown, the first half-bridge branch includes a first driving transistor Q1, a second driving transistor Q2, a first driving resistor R6, and a second driving resistor R7. The gate of the first driving transistor is electrically connected to the first comparator branch 121 and the first end of the first driving resistor, respectively. The drain of the first driving transistor is electrically connected to the positive power supply via the second driving resistor. The drain of the first driving transistor is also electrically connected to the gate of the second driving transistor. The source of the first driving transistor is grounded. The second end of the first driving resistor is electrically connected to the source of the first driving transistor. The source of the second driving transistor is electrically connected to the positive power supply. The source of the second driving transistor is also connected to the negative output terminal of the driving module 130 via the first electrolytic capacitor. The drain of the second driving transistor is connected to the positive output terminal of the driving module 130 via the second half-bridge branch.
[0085] The second half-bridge branch includes a fifth driving transistor Q5 and a thirteenth resistor R13. The gate of the fifth driving transistor is electrically connected to the output terminal of the second comparator and the first terminal of the thirteenth resistor, respectively. The source of the fifth driving transistor is electrically connected to the negative operating power supply, the second terminal of the thirteenth resistor, and the negative terminal of the second electrolytic capacitor, respectively. The drain of the fifth driving transistor and the drain of the second driving transistor are connected to the positive output terminal of the driving module 130. The positive terminal of the second electrolytic capacitor is connected to the negative output terminal of the driving module 130, and the negative output terminal of the driving module 130 is grounded.
[0086] In one embodiment, the driving module includes a full-bridge circuit, the full-bridge circuit comprising:
[0087] The first half-bridge branch is electrically connected to the first comparison branch 121, the positive working power supply, and the magnetic latching relay 200, respectively;
[0088] The second half-bridge branch is electrically connected to the second comparison branch 122, ground, and the magnetic latching relay 200, respectively;
[0089] The third half-bridge branch is electrically connected to the second comparison branch 122, the positive working power supply, and the magnetic latching relay 200, respectively;
[0090] The fourth half-bridge branch is electrically connected to the first comparison branch 121, ground, and the magnetic latching relay 200, respectively;
[0091] The first half-bridge branch and the second half-bridge branch are connected to the positive output terminal of the drive module, and the third half-bridge branch and the fourth half-bridge branch are connected to the negative output terminal of the drive module.
[0092] Specifically, the first half-bridge circuit 131 has the same circuit structure as the half-bridge circuit described above, but the source of the fifth driving transistor is not electrically connected to the negative power supply but is grounded. The second half-bridge circuit 132 includes a third half-bridge branch and a fourth half-bridge branch. The third half-bridge branch includes a third driving transistor Q3, a fourth driving transistor Q4, an eighth resistor R8, and a ninth resistor R9, as shown below. Figure 7 As shown, the connection between the third driving transistor, the fourth driving transistor, the eighth resistor, and the ninth resistor is the same as the connection between the first driving transistor, the second driving transistor, the first driving resistor, and the second driving resistor in the first half-bridge branch. However, the gate of the third driving transistor is not electrically connected to the output terminal of the first comparator, but is electrically connected to the output terminal of the second comparator. The drain of the fourth driving transistor is not electrically connected to the positive input terminal of the driving module 130, but is electrically connected to the negative input terminal of the driving module 130.
[0093] The fourth half-bridge branch includes the sixth driving transistor Q6 and the fourteenth resistor R14. The connection between the sixth driving transistor and the fourteenth resistor is the same as that between the fifth driving transistor and the thirteenth resistor. However, the gate of the sixth driving transistor is electrically connected to the output of the first comparator, and the drain of the sixth driving transistor is connected to the negative output of the driving module 130.
[0094] The first driving transistors Q1 to the sixth driving transistor Q6 are actually SOT-23 packaged MOSFETs because they are relatively inexpensive and suitable for constructing the driving module 130. The second driving transistor Q2 and the fourth driving transistor Q4 are P-channel MOSFETs, while the first driving transistor Q1, the third driving transistor Q3, the fifth driving transistor Q5, and the sixth driving transistor Q6 are N-channel MOSFETs. By using a P-channel MOSFET for the second driving transistor Q2 and an N-channel MOSFET for the first driving transistor Q1, a combined driving configuration can be achieved. Compared to using a single N-channel MOSFET, this avoids the problem of source potential fluctuation and improves driving safety. In other embodiments, to further reduce costs, a common half-bridge or full-bridge topology can be used. That is, only one N-channel MOSFET is used in each of the first and third half-bridge branches, and its gate is electrically connected to the output terminals of the first and second comparators, respectively.
[0095] like Figure 8 As shown, in summary of the above embodiments, when the drive module 130 is a half-bridge circuit, when the microcontroller outputs the third voltage signal, that is, the relay control node (RelayControl) is at level 0, the first comparator (RelayOn) outputs a low-level first control signal to turn off the first drive transistor Q1 and the second drive transistor Q2; the second comparator (RelayOff) outputs a high-level second control signal to turn on the fifth drive transistor Q5, causing the output terminal (RelayVolt) of the drive module 130 to output a -VCC drive signal, controlling the magnetic latching relay 200 to work in the off state.
[0096] When the microcontroller outputs the second voltage signal, i.e., the relay control node (RelayControl) is at the level of R2 / (R1+R2)×VDD, the first comparator (RelayOn) outputs a low-level first control signal, turning off the first drive transistor Q1 and the second drive transistor Q2; the second comparator (RelayOff) outputs a low-level second control signal, turning off the fifth drive transistor Q5, causing the output terminal (RelayVolt) of the drive module 130 to output a 0-level drive signal, controlling the magnetic latching relay 200 to work in the holding state.
[0097] When the microcontroller outputs the first voltage signal, i.e., the relay control node (RelayControl) is at the VDD level, the first comparator (RelayOn) outputs a high-level first control signal, turning on the first drive transistor Q1 and the second drive transistor Q2; the second comparator (RelayOff) outputs a low-level second control signal, turning off the fifth drive transistor Q5, causing the output terminal (RelayVolt) of the drive module 130 to output a VCC-level drive signal, controlling the magnetic latching relay 200 to work in the on state.
[0098] When the drive module 130 is a full-bridge circuit, when the microcontroller outputs the third voltage signal, i.e. the relay control node (RelayControl) is at 0 level, the first comparator (RelayOn) outputs a low-level first control signal, turning off the first drive transistor Q1, the second drive transistor Q2, and the sixth drive transistor Q6; the second comparator (RelayOff) outputs a high-level second control signal, turning on the fifth drive transistor Q5, the third drive transistor Q3, and the fourth drive transistor Q4, causing the output terminal (RelayVolt) of the drive module 130 to output a -VCC drive signal, controlling the magnetic latching relay 200 to work in the off state.
[0099] When the microcontroller outputs the second voltage signal, i.e., the relay control node (RelayControl) is at the level of R2 / (R1+R2)×VDD, the first comparator (RelayOn) outputs a low-level first control signal, turning off the first drive transistor Q1, the second drive transistor Q2, and the sixth drive transistor Q6; the second comparator (RelayOff) outputs a low-level second control signal, turning off the fifth drive transistor Q5, the third drive transistor Q3, and the fourth drive transistor Q4, causing the output terminal (RelayVolt) of the drive module 130 to output a 0-level drive signal, controlling the magnetic latching relay 200 to work in the holding state.
[0100] When the microcontroller outputs the first voltage signal, i.e., the relay control node (RelayControl) is at VDD level, the first comparator (RelayOn) outputs a high-level first control signal, turning on the first driver transistor Q1, the second driver transistor Q2, and the sixth driver transistor Q6; the second comparator (RelayOff) outputs a low-level second control signal, turning off the fifth driver transistor Q5, the third driver transistor Q3, and the fourth driver transistor Q4, i.e., providing a zero-level second branch signal to the positive input terminal of the drive module 130, controlling the magnetic latching relay 200 to operate in the on state.
[0101] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, magnetic latching relay drive circuit 100, article, or device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, magnetic latching relay drive circuit 100, article, or device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of additional identical elements in the process, magnetic latching relay drive circuit 100, article, or device that includes said element.
[0102] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A magnetic latching relay drive circuit, characterized in that, The magnetic latching relay drive circuit includes: The control module is used by the microcontroller to configure the general-purpose input / output interface according to the received configuration instructions, and to output the corresponding voltage signal through the relay control node; The comparison module is electrically connected to the relay control node of the control module and is used to output a corresponding control signal based on the comparison result between the voltage signal and the voltage reference signal. The driving module is electrically connected to the comparison module and the magnetic latching relay respectively, and is used to generate a corresponding driving signal according to the control signal. The driving signal is used to drive the magnetic latching relay to enter a corresponding working state, which includes an on state, an off state and a holding state. The voltage signal is a first voltage signal, a second voltage signal, or a third voltage signal, wherein the first voltage signal is greater than the second voltage signal, the second voltage signal is greater than the third voltage signal, and the magnetic latching relay driving circuit drives the magnetic latching relay to enter the on state according to the first voltage signal, drives the magnetic latching relay to enter the holding state according to the second voltage signal, and drives the magnetic latching relay to enter the off state according to the third voltage signal.
2. The magnetic latching relay drive circuit according to claim 1, characterized in that, The control module includes a microcontroller unit, a first resistor, and a second resistor. The general-purpose input / output interface of the microcontroller unit is electrically connected to the power supply via the first resistor. The general-purpose input / output interface of the microcontroller unit is also grounded via the second resistor. The first resistor and the second resistor are connected to the relay control node. The microcontroller unit configures the general-purpose input / output interface according to the received configuration instructions, and the relay control node outputs the corresponding voltage signal.
3. The magnetic latching relay drive circuit according to claim 2, characterized in that, Configure the status attribute of the general input / output interface as an output pin, and the relay control node outputs the first voltage signal and the third voltage signal; Configure the status attribute of the general input / output interface as an input pin, and the relay control node outputs the second voltage signal.
4. The magnetic latching relay drive circuit according to claim 1, characterized in that, The comparison module includes: The first comparison branch is electrically connected to the relay control node and is used to output a corresponding first control signal based on the comparison result between the voltage signal and the first voltage reference signal. The second comparison branch, connected to the first comparison branch to the relay control node, is used to output a corresponding second control signal based on the comparison result between the voltage signal and the second voltage reference signal.
5. The magnetic latching relay drive circuit according to claim 4, characterized in that, The magnitude of the first voltage reference signal is between the first voltage signal and the second voltage signal, and the magnitude of the second voltage reference signal is between the second voltage signal and the third voltage signal.
6. The magnetic latching relay drive circuit according to claim 5, characterized in that, Based on the first voltage signal, the first control signal is at a high level, and the second control signal is at a low level; According to the second voltage signal, the first control signal is at a low level, and the second control signal is at a low level; According to the third voltage signal, the first control signal is at a low level and the second control signal is at a high level.
7. The magnetic latching relay drive circuit according to claim 4, characterized in that, The driving module includes at least one half-bridge circuit, the first input terminal of the half-bridge circuit is electrically connected to the first comparison branch, and the second input terminal of the half-bridge circuit is electrically connected to the second comparison branch.
8. The magnetic latching relay drive circuit according to claim 7, characterized in that, The half-bridge circuit includes: The first half-bridge branch is electrically connected to the first comparison branch, the positive working power supply, and the magnetic latching relay, respectively; The second half-bridge branch is electrically connected to the second comparison branch, the negative working power supply, and the magnetic latching relay, respectively. The first half-bridge branch and the second half-bridge branch are connected to the positive output terminal of the drive module, and the negative output terminal of the drive module is grounded.
9. The magnetic latching relay drive circuit according to claim 7, characterized in that, The driving module includes a full-bridge circuit, which includes: The first half-bridge branch is electrically connected to the first comparison branch, the positive working power supply, and the magnetic latching relay, respectively; The second half-bridge branch is electrically connected to the second comparison branch, ground, and the magnetic latching relay, respectively; The third half-bridge branch is electrically connected to the second comparison branch, the positive working power supply, and the magnetic latching relay, respectively; The fourth half-bridge branch is electrically connected to the first comparison branch, ground, and the magnetic latching relay, respectively; The first half-bridge branch and the second half-bridge branch are connected to the positive output terminal of the drive module, and the third half-bridge branch and the fourth half-bridge branch are connected to the negative output terminal of the drive module.