Electromagnet expansion circuit and electromagnet control system

By combining an RS485 level conversion isolation circuit, a microcontroller unit, and a MOSFET driver unit, the problem of insufficient I/O interfaces in the main control device is solved, enabling independent control and protection of multiple electromagnets and reducing equipment maintenance costs.

CN224341877UActive Publication Date: 2026-06-09ZHEJIANG ZOBOW MECHANICAL & ELECTRICAL TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
ZHEJIANG ZOBOW MECHANICAL & ELECTRICAL TECH
Filing Date
2025-06-17
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

The number of I/O interfaces of the main control device cannot meet the control requirements of multiple electromagnets, resulting in the inability to achieve effective extended control of the electromagnets.

Method used

By combining an RS485 level conversion isolation circuit, a microcontroller unit, an electromagnet current monitoring unit, and a MOSFET drive unit, and utilizing the differential signal interface of the main control device for expansion, independent control of multiple electromagnets can be achieved, and the electromagnets can be protected through closed-loop feedback control.

Benefits of technology

This effectively reduces the number of I/O interfaces required by the main control device, enables precise control of multiple electromagnets, extends the service life of the electromagnets, and reduces equipment maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN224341877U_ABST
    Figure CN224341877U_ABST
Patent Text Reader

Abstract

This utility model discloses an electromagnet extension circuit and an electromagnet control system, relating to the field of electronic circuits. It addresses the problem that the number of reserved I / O interfaces in a main control device is often insufficient to control multiple electromagnets. The extension is achieved by using the differential signal interface typically reserved in the main control device. An RS485 level conversion isolation circuit converts the input differential signal into a single-ended digital logic level signal, which is then input to the microcontroller's port. This allows the main control device to communicate with the microcontroller using differential signals. After receiving commands, the microcontroller controls the MOSFET driver unit through its signal output. The microcontroller receives commands from the main control device and distributes them to the outputs of different MOSFET driver units to control multiple electromagnets, reducing the main control device's requirement for a large number of I / O interfaces. The electromagnet current monitoring unit then controls the output enable port of the MOSFET driver unit based on the monitoring results, forming a closed-loop feedback control to prevent electromagnet damage due to overcurrent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This utility model relates to the field of electronic circuits, and in particular to an electromagnet extension circuit and an electromagnet control system. Background Technology

[0002] In the fields of industrial automation and intelligent manufacturing, electromagnets are widely used as important actuators in various equipment and systems. For example, in machining equipment, electromagnets are used to clamp workpieces; in logistics and warehousing systems, electromagnets are used to drive the mechanical components of automated handling equipment; and in robotic systems, electromagnets are used to control the attraction and release of grippers.

[0003] However, with the expansion of industrial production scale and the improvement of automation, the main control equipment often needs to control more and more electromagnets at the same time. This requires the main control equipment to reserve enough input / output (IO) interfaces to power the magnets for extended control. Moreover, the reserved IO interfaces need to be IO interfaces controlled by the timer pulse width modulation (PWM) output channel of the main control equipment. The reserved number often cannot meet the control requirements of multiple electromagnets.

[0004] Therefore, how to expand the I / O interface of the main controller to achieve centralized control of multiple electromagnets is a technical problem that urgently needs to be solved by those in the field. Utility Model Content

[0005] The purpose of this invention is to provide an electromagnet extension circuit and an electromagnet control system, which solves the problem that the number of reserved IO interfaces in the main control equipment is often insufficient to meet the control requirements of multiple electromagnets.

[0006] To solve the above-mentioned technical problems, this utility model provides an electromagnet extension circuit, comprising:

[0007] RS485 level conversion isolation circuit, microcontroller unit, electromagnet current monitoring unit, and MOS transistor drive unit with multiple output terminals;

[0008] The differential signal output port of the main control device is connected to the input terminal of the RS485 level conversion isolation circuit. The output terminal of the RS485 level conversion isolation circuit is connected to the input terminal of the microcontroller unit. The signal output terminal of the microcontroller unit is connected to the input terminal of the MOS transistor driving unit. Each output terminal of the MOS transistor driving unit is connected to the control terminal of each electromagnet. The sampling output terminal of the MOS transistor driving unit is connected to the comparator input port of the microcontroller unit. The comparator output port of the microcontroller unit is connected to the input terminal of the electromagnet current monitoring unit. The output terminal of the electromagnet current monitoring unit is connected to the output enable port of the MOS transistor driving unit.

[0009] As an optional solution, in the above-mentioned electromagnet extension circuit, the RS485 level conversion isolation circuit includes: an RS485 level conversion circuit and an optocoupler isolation circuit;

[0010] The differential signal output port of the main control device is connected to the input terminal of the RS485 level conversion circuit, the output terminal of the RS485 level conversion circuit is connected to the input terminal of the optocoupler isolation circuit, and the output terminal of the optocoupler isolation circuit is connected to the input terminal of the microcontroller unit.

[0011] As an optional solution, in the above-mentioned electromagnet extension circuit, the RS485 level conversion circuit includes: an RS485 transceiver chip, a first resistor, a first bidirectional trigger diode, and a second bidirectional trigger diode;

[0012] The differential signal positive output port of the main control device is connected to the first end of the first resistor, the first end of the first bidirectional trigger diode, and the positive input terminal of the RS485 transceiver chip; the differential signal negative output port of the main control device is connected to the second end of the first resistor, the first end of the second bidirectional trigger diode, and the negative input terminal of the RS485 transceiver chip; the second ends of the first bidirectional trigger diode and the second ends of the second bidirectional trigger diode are grounded; the transceiver port of the RS485 transceiver chip is connected to the microcontroller unit through the optocoupler isolation circuit.

[0013] As an optional solution, in the above-mentioned electromagnet extension circuit, the MOS transistor driving unit includes: a tri-state buffer and multiple driving circuits; the driving circuit includes: a first MOS transistor, a second resistor, a third resistor, and a first diode;

[0014] The multiple signal output terminals of the microcontroller are respectively connected to each input terminal of the tri-state buffer, and each output terminal of the tri-state buffer is connected to the control terminal of each of the driving circuits.

[0015] The control terminal of the first MOSFET is connected to the first terminal of the first resistor and the first terminal of the second resistor. The second terminal of the first resistor serves as the control terminal of the driving circuit. The second terminal of the second resistor is connected to the first terminal of the first MOSFET. The second terminal of the first MOSFET is connected to the anode of the first diode and the first control terminal of the electromagnet. The cathode of the first diode is connected to the second control terminal of the electromagnet and the power supply. The first terminal of the first MOSFET is grounded.

[0016] As an optional solution, the above-mentioned electromagnet extension circuit also includes: a sampling resistor;

[0017] The first terminal of the first MOS transistor in each of the driving circuits is connected to the first terminal of the sampling resistor, and the second terminal of the sampling resistor is grounded; the first terminal of the sampling resistor is connected to the comparator input port of the microcontroller unit.

[0018] As an optional solution, in the above-mentioned electromagnet extension circuit, the electromagnet current monitoring unit includes: a D-type trigger and a tenth resistor;

[0019] The comparator output port of the microcontroller unit is connected to the clock input of the D-type flip-flop, the data input of the D-type flip-flop is grounded, and the output of the D-type flip-flop is connected to the enable port of the tri-state buffer; the output of the D-type flip-flop is grounded through the tenth resistor.

[0020] The preset input terminal and the clear input terminal of the D-type trigger are connected to the microcontroller unit.

[0021] As an optional solution, the above-mentioned electromagnet extension circuit also includes: a DC voltage conversion circuit;

[0022] The input terminal of the DC-DC voltage conversion circuit is connected to a 24V power supply, the 5V output terminal of the DC-DC voltage conversion circuit is connected to the RS485 transceiver chip, and the 3.3V output terminal of the DC-DC voltage conversion circuit is connected to the microcontroller unit.

[0023] As an optional solution, in the above-mentioned electromagnet extension circuit, the number of optocoupler isolation circuits is three, including a first isolation circuit, a second isolation circuit, and a third isolation circuit;

[0024] The receiver output port of the RS485 transceiver chip is connected to the data receiving port of the microcontroller unit through the first isolation circuit.

[0025] The receiver enable port and transmit enable port of the RS485 transceiver chip are connected to the output terminal of the microcontroller unit through the second isolation circuit;

[0026] The driver input port of the RS485 transceiver chip is connected to the output of the microcontroller unit through the third isolation circuit.

[0027] As an optional solution, in the above-mentioned electromagnet extension circuit, the first isolation circuit includes: a fourth resistor, a fifth resistor, and a first optocoupler;

[0028] The anode of the first optocoupler is connected to the power supply through the fourth resistor, and the cathode of the first optocoupler is connected to the receiver output port of the RS485 transceiver chip; the emitter of the first optocoupler is grounded, the collector of the first optocoupler is grounded through the fifth resistor, and the collector of the first optocoupler is connected to the microcontroller unit as an output terminal.

[0029] The second isolation circuit includes: a sixth resistor, a seventh resistor, and a second optocoupler;

[0030] The emitter of the second optocoupler is connected to the receiver enable port of the RS485 transceiver chip and the first end of the sixth resistor, and the second end of the sixth resistor is grounded; the collector of the second optocoupler is connected to the power supply; the anode of the second optocoupler is connected to the microcontroller unit through the seventh resistor as an input terminal, and the cathode of the second optocoupler is grounded;

[0031] The third isolation circuit includes: an eighth resistor, a ninth resistor, and a third optocoupler;

[0032] The collector of the third optocoupler is connected to the driver input port of the RS485 transceiver chip and grounded through the eighth resistor; the emitter of the third optocoupler is grounded; the anode of the third optocoupler is connected to the power supply; and the cathode of the third optocoupler is connected to the microcontroller unit as an input terminal through the ninth resistor.

[0033] To solve the above-mentioned technical problems, this utility model also provides an electromagnet control system, including multiple electromagnet expansion circuits and a main control device.

[0034] The differential signal output port of the main control device is connected to the input terminal of the RS485 level conversion isolation circuit of the multiple electromagnet expansion circuits via an RS485 cascade cable.

[0035] The electromagnet expansion circuit provided by this invention expands upon the differential signal interface typically reserved in the main control device. An RS485 level conversion isolation circuit converts the input differential signal into a single-ended digital logic level signal, which is then input to the microcontroller's port. This allows the main control device to communicate with the microcontroller using the differential signal. After receiving commands, the microcontroller controls the MOSFET driver unit through its signal output. Multiple outputs of the MOSFET driver unit are connected to the control terminals of multiple electromagnets, enabling independent control of each electromagnet. Through the microcontroller and MOSFET driver units, the limited number of interfaces of the main control device is expanded into independent control ports for multiple electromagnets. The microcontroller can receive commands from the main control device and distribute them to different MOSFET driver unit outputs, thereby controlling multiple electromagnets and significantly reducing the main control device's requirement for a large number of I / O interfaces.

[0036] Meanwhile, the sampling output of the MOSFET driver unit feeds back the electromagnet current signal to the comparator input port of the microcontroller unit. After the comparator of the microcontroller unit processes the current signal, it transmits the result to the electromagnet current monitoring unit. The electromagnet current monitoring unit then controls the output enable port of the MOSFET driver unit according to the monitoring result, forming a closed-loop feedback control. This allows for timely feedback and control of the MOSFET driver unit to cut off the electromagnet power supply, preventing damage to the electromagnet due to overcurrent and other problems, extending the electromagnet's service life, and reducing equipment maintenance costs.

[0037] In addition, this utility model also provides an electromagnet control system, which includes the above-mentioned electromagnet extension circuit, and has the same effect. Attached Figure Description

[0038] To more clearly illustrate the embodiments of this utility model, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this utility model. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0039] Figure 1 This is a schematic diagram of an electromagnet extension circuit provided in an embodiment of this application;

[0040] Figure 2 A circuit diagram of an RS485 level conversion circuit is provided for an embodiment of this application;

[0041] Figure 3 A circuit diagram of a driving circuit is provided for an embodiment of this application;

[0042] Figure 4 A circuit diagram of a tri-state buffer is provided for an embodiment of this application;

[0043] Figure 5 A circuit diagram of an electromagnet current monitoring unit is provided in this application embodiment;

[0044] Figure 6 A circuit diagram of an optocoupler isolation circuit is provided in an embodiment of this application;

[0045] Figure 7 A circuit diagram of a microcontroller unit provided in an embodiment of this application;

[0046] Figure 8 A circuit diagram of a power supply provided in an embodiment of this application;

[0047] The attached figures are labeled as follows:

[0048] The main control device 10, RS485 level conversion isolation circuit 11, microcontroller unit 12, electromagnet current monitoring unit 13, MOS transistor drive unit with multiple output terminals 14, and electromagnet 15. Detailed Implementation

[0049] The technical solutions of the present utility model will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present utility model, and not all embodiments. Based on the embodiments of the present utility model, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of the present utility model.

[0050] The core of this utility model is to provide an electromagnet extension circuit and an electromagnet control system.

[0051] To enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0052] This application provides an electromagnet extension circuit, including:

[0053] RS485 level conversion isolation circuit 11, microcontroller unit 12, electromagnet current monitoring unit 13, and MOS transistor driving unit including multiple output terminals 14;

[0054] The differential signal output port of the main control device 10 is connected to the input terminal of the RS485 level conversion isolation circuit 11. The output terminal of the RS485 level conversion isolation circuit 11 is connected to the input terminal of the microcontroller unit 12. The signal output terminal of the microcontroller unit 12 is connected to the input terminal of the MOS transistor drive unit 14. Each output terminal of the MOS transistor drive unit 14 is connected to the control terminal of each electromagnet 15. The sampling output terminal of the MOS transistor drive unit 14 is connected to the comparator input port of the microcontroller unit 12. The comparator output port of the microcontroller unit 12 is connected to the input terminal of the electromagnet current monitoring unit 13. The output terminal of the electromagnet current monitoring unit 13 is connected to the output enable port of the MOS transistor drive unit 14.

[0055] This embodiment of the electromagnet extension circuit is a control circuit for industrial equipment (such as industrial sewing machines), designed to solve the problem of insufficient input / output (IO) interfaces or inability to directly control electromagnets 15 in the main control device 10. The circuit communicates with the main control device 10 via an RS485 communication interface, utilizes a microcontroller unit (MCU) 12 for signal processing and control, and is equipped with an electromagnet current monitoring unit 13 and a MOSFET drive unit 14 to achieve precise control and protection of multiple electromagnets 15. Of course, this application can be applied to any field requiring multi-electromagnet control, such as electronic thread clamps, thread releasers, and thread sweepers in industrial sewing machines. These devices typically require dynamic adjustment of the electromagnet 15's operating state according to different process requirements, but the main control device 10 may be unable to directly control them due to interface limitations.

[0056] The RS485 level conversion isolation circuit 11 converts the differential signal output from the main control device 10 into a single-ended TTL signal (a digital logic level signal) for processing by the microcontroller unit 12. Simultaneously, isolation technology prevents signal interference and voltage fluctuations from affecting subsequent circuits. The RS485 level conversion isolation circuit 11 is typically implemented using a dedicated RS485 transceiver chip (such as MAX485) and an optocoupler (such as TLP281). The RS485 transceiver chip handles the conversion between differential and TTL signals, while the optocoupler provides electrical isolation to ensure signal transmission stability.

[0057] RS485 communication (a serial communication standard) has the advantages of strong anti-interference capability and long transmission distance, making it suitable for industrial environments. Optical isolation can effectively prevent electrical interference between the main control device 10 and the expansion circuit, improving system reliability.

[0058] The microcontroller unit 12 receives the TTL signal output from the RS485 level conversion isolation circuit 11, parses the Modbus protocol (a serial communication protocol between industrial electronic devices), and controls the output of the MOSFET drive unit 14 based on the parsing result, while simultaneously monitoring the current state of the electromagnet 15. It should be noted that the microcontroller unit 12 needs to have a built-in hardware comparator to cooperate with the electromagnet current monitoring unit 13 to achieve real-time monitoring and overcurrent protection of the electromagnet current. Alternatively, the comparator function can be implemented through external circuitry. The MCU with a built-in hardware comparator reduces the use of external comparator chips, lowering material costs and PCB layout complexity. Furthermore, the hardware comparator has a fast response speed, enabling timely detection of overcurrent faults in the electromagnet 15.

[0059] The sampling voltage is input to the built-in hardware comparator of the MCU. When the electromagnet experiences overcurrent, the comparator output signal triggers the electromagnet current monitoring unit 13, causing the electromagnet current monitoring unit 13 to turn off the output of the MOS transistor drive unit 14 and cut off the power supply to the electromagnet 15, thus enabling timely detection of overcurrent faults in the electromagnet 15.

[0060] When an overcurrent occurs in the electromagnet, the electromagnet current monitoring unit 13 shuts off the output of the MOS transistor drive unit 14 and cuts off the power supply to the electromagnet 15. The fast response capability can cut off the power supply in time and protect the electromagnet from overcurrent damage.

[0061] The MOSFET driver unit 14 receives control signals from the MCU and controls the on / off state of the electromagnet 15 by switching the insulated-gate field-effect transistor (MOSFET) on and off. Simultaneously, it is also responsible for feeding back the voltage signal across the sampling resistor to the comparator input of the MCU.

[0062] The differential signal output port of the main control device 10 is connected to the input of the RS485 level conversion isolation circuit 11 for transmitting control commands. The main control device 10 sends commands such as "enable the specified channel electromagnet is on", "enable the specified channel electromagnet is off", "set the pulse width modulation (PWM) duty cycle of the specified channel electromagnet" and "set the PWM operating timer for the specified channel electromagnet" through the RS485 interface. These commands are transmitted to the RS485 level conversion isolation circuit 11 in the form of differential signals. The output of the RS485 level conversion isolation circuit 11 is connected to the input of the microcontroller unit 12, converting the differential signals into TTL signals for the MCU to parse.

[0063] For example, after the MCU parses the instruction "turn on the first electromagnet", it outputs a high-level signal through the general purpose input / output (GPIO) pin, turning on the MOSFET and energizing the electromagnet. The output terminals of the MOSFET driver unit 14 are connected to the control terminals of each electromagnet 15, directly controlling the on / off state of the electromagnet 15.

[0064] The comparator output port of the microcontroller unit 12 is connected to the input terminal of the electromagnet current monitoring unit 13, triggering a protection mechanism when an overcurrent is detected. When the electromagnet current exceeds a set threshold, the comparator outputs a high-level signal. The set threshold is the voltage signal input to the other input terminal of the comparator built into the MCU, which can be set to 1 / 4 of the MCU's core voltage.

[0065] If one module can control four electromagnets, cascading two modules allows control of eight electromagnets. In practical applications, the comparator threshold can be adjusted to accommodate different electromagnet operating current ranges, depending on the specific needs of the equipment. Furthermore, more complex control logic, such as PWM duty cycle adjustment and timing control, can be implemented via software.

[0066] The electromagnet expansion circuit provided by this utility model expands the main control device 10 using the pre-reserved differential signal interface. The RS485 level conversion isolation circuit 11 converts the input differential signal into a single-ended digital logic level signal, which is then input to the port of the microcontroller unit 12. This allows the main control device 10 to communicate with the microcontroller unit 12 using the differential signal. After receiving the command, the microcontroller unit 12 controls the MOS transistor drive unit 14 through its signal output terminal. Multiple output terminals of the MOS transistor drive unit 14 are respectively connected to the control terminals of multiple electromagnets 15, enabling independent control of the multiple electromagnets 15. Through the microcontroller unit 12 and the MOS transistor drive unit 14, the limited number of interfaces of the main control device 10 is expanded into independent control ports for multiple electromagnets 15. The microcontroller unit 12 can receive commands from the main control device 10 and distribute them to different output terminals of the MOS transistor drive unit 14, thereby controlling multiple electromagnets and significantly reducing the number of I / O interfaces required by the main control device 10.

[0067] Meanwhile, the sampling output of the MOSFET drive unit 14 feeds back the electromagnet current signal to the comparator input port of the microcontroller unit 12. After the comparator of the microcontroller unit 12 processes the current signal, it transmits the result to the electromagnet current monitoring unit 13. The electromagnet current monitoring unit 13 then controls the output enable port of the MOSFET drive unit 14 according to the monitoring result, forming a closed-loop feedback control. This allows for timely feedback and control of the MOSFET drive unit 14 to cut off the electromagnet power supply, preventing damage to the electromagnet due to overcurrent or other problems, extending the service life of the electromagnet 15, and reducing equipment maintenance costs.

[0068] Furthermore, in one specific embodiment, the RS485 level conversion isolation circuit 11 includes: an RS485 level conversion circuit and an optocoupler isolation circuit;

[0069] The differential signal output port of the main control device 10 is connected to the input terminal of the RS485 level conversion circuit, the output terminal of the RS485 level conversion circuit is connected to the input terminal of the optocoupler isolation circuit, and the output terminal of the optocoupler isolation circuit is connected to the input terminal of the microcontroller unit 12.

[0070] Since communication between the main control device 10 and the microcontroller unit 12 requires a unified signal format, and RS485 signals are differential signals, which are not suitable for direct processing by TTL level MCUs, an RS485 level conversion circuit is needed to perform signal format conversion. The RS485 level conversion circuit converts the differential signal output by the main control device 10 into a single-ended TTL signal suitable for processing by the microcontroller unit 12 (MCU).

[0071] Due to the presence of significant electromagnetic interference and voltage fluctuations in industrial environments, these interferences can affect the normal operation of the microcontroller unit 12 through signal lines, or even damage it. Optical isolation circuits can effectively prevent these interferences, ensuring the stability and reliability of signal transmission.

[0072] The main control device 10 sends differential signals via an RS485 interface. These signals contain control commands for the electromagnet 15, such as "on," "off," and "set PWM duty cycle." An RS485 level converter chip converts the differential signals into TTL signals. An optocoupler isolation circuit receives the TTL signals and converts them into isolated TTL signals via optical signal transmission. For example, when using a TLP281 optocoupler, the input signal illuminates the internal LED, and the optical signal then drives the phototransistor at the output, thus achieving electrical isolation. The microcontroller unit 12 receives the isolated TTL signals through its input and parses the Modbus RTU protocol within them. Based on the parsing result, the microcontroller unit 12 executes corresponding control commands, such as controlling the on / off state of the MOSFET.

[0073] Furthermore, in one specific embodiment, such as Figure 2 As shown, the RS485 level conversion circuit includes: RS485 transceiver chip U1, first resistor R1, first bidirectional trigger diode D1, and second bidirectional trigger diode D2;

[0074] The differential signal positive output port 485_A of the main control device 10 is connected to the first end of the first resistor R1, the first end of the first bidirectional trigger diode D1, and the positive input terminal of the RS485 transceiver chip U1; the differential signal negative output port 485_B of the main control device 10 is connected to the second end of the first resistor R1, the first end of the second bidirectional trigger diode D2, and the negative input terminal of the RS485 transceiver chip U1; the second ends of the first bidirectional trigger diode D1 and the second ends of the second bidirectional trigger diode D2 are grounded; the transceiver port of the RS485 transceiver chip U1 is connected to the microcontroller unit 12 through an optocoupler isolation circuit.

[0075] The RS485 transceiver chip U1 enables bidirectional conversion between RS485 differential signals and TTL signals.

[0076] A first resistor R1 is connected in series at the positive and negative ports of the differential signal to limit the current and prevent overcurrent damage to the RS485 transceiver chip U1. The first bidirectional trigger diode D1 and the second bidirectional trigger diode D2 (TVS diode) provide transient voltage suppression protection to prevent voltage spikes and surges on the differential signal line from damaging the RS485 transceiver chip U1.

[0077] The main control device 10 sends a positive differential signal via the RS485 interface. The signal first passes through a first resistor R1 for current limiting, then through a first bidirectional trigger diode D1 for overvoltage protection, and finally reaches the positive input terminal of the RS485 transceiver chip U1. The main control device 10 also sends a negative differential signal via the RS485 interface. The signal first passes through a first resistor R1 for current limiting, then through a second bidirectional trigger diode D2 for overvoltage protection, and finally reaches the negative input terminal of the RS485 transceiver chip U1. After the RS485 transceiver chip converts the differential signal into a TTL signal, it transmits it to the microcontroller unit 12 through an optocoupler isolation circuit.

[0078] In this embodiment, the RS485 level conversion circuit uses the RS485 transceiver chip U1, current-limiting resistor, and bidirectional trigger diode to achieve signal conversion and protection, ensuring the stability of signal transmission.

[0079] Furthermore, in one specific embodiment, such as Figure 3 , 4 As shown, the MOS transistor driving unit 14 includes: a tri-state buffer U2 and multiple driving circuits; the driving circuits include: a first MOS transistor Q1, a second resistor R2, a third resistor R3, and a first diode D3;

[0080] The multiple signal output terminals of the microcontroller unit 12 are respectively connected to each input terminal of the tri-state buffer U2, and each output terminal of the tri-state buffer U2 is connected to the control terminal of each drive circuit.

[0081] The control terminal of the first MOSFET Q1 is connected to the first terminal of the first resistor R1 and the first terminal of the second resistor R2. The second terminal of the first resistor R1 serves as the control terminal of the drive circuit. The second terminal of the second resistor R2 is connected to the first terminal of the first MOSFET Q1. The second terminal of the first MOSFET Q1 is connected to the anode of the first diode D3 and the first control terminal of the electromagnet 15. The cathode of the first diode D3 is connected to the second control terminal of the electromagnet 15 and the power supply. The first terminal of the first MOSFET Q1 is grounded.

[0082] Figure 3 The number of MOSFET driver units 14 is 4. In practical applications, the number can be determined according to the usage requirements. MOS_G1, MOS_G2, MOS_G3, and MOS_G4 are connected accordingly. Figure 4 The output port of the tri-state buffer U2 in the middle.

[0083] Figure 4 The PWM_CH1, PWM_CH2, PWM_CH3, and PWM_CH4 of the tri-state buffer U2 are connected to the output ports of the MCU, and the drive control of the multi-channel MOS transistor drive unit 14 is realized through the MCU's IO ports.

[0084] In this embodiment, the design of the MOSFET driving unit 14 is further refined into a tri-state buffer U2 and multiple driving circuits. Each driving circuit includes a first MOSFET Q1, a second resistor R2, a third resistor R3, and a first diode D3. This design not only achieves precise control of the electromagnet 15, but also provides additional protection functions through resistors and diodes.

[0085] Tri-state buffers U2 are used to enhance signal driving capability, ensuring that MOSFETs can switch states quickly and stably. Typically, tri-state buffer U2 chips such as the 74HCT365D are used. These chips can output high, low, or high impedance states according to the state of the input signal, thereby controlling the conduction and cutoff of the MOSFET. Because MOSFETs require sufficient drive signals to switch quickly, tri-state buffers U2 can enhance driving capability, ensuring signal stability and reliability.

[0086] The third resistor R3 acts as a pull-up resistor to ensure that the gate of the MOSFET remains at a low level when no valid signal is received, thus preventing false triggering.

[0087] The first diode D3 is used to prevent the reverse electromotive force generated when the electromagnet is de-energized from damaging the MOSFET.

[0088] The microcontroller unit 12 outputs a corresponding signal to the tri-state buffer U2 according to the parsed control command. The tri-state buffer U2 outputs a high or low level signal to the control terminal of the drive circuit based on the state of the input signal. The signal output by the tri-state buffer U2 reaches the gate of the MOSFET through the first resistor R1 (current limiting resistor) and the second resistor R2 (pull-up resistor). When the MOSFET is turned on, current flows through the electromagnet, and the electromagnet operates; when the MOSFET is turned off, the electromagnet is de-energized.

[0089] In this embodiment, the MOS transistor driving unit 14 achieves precise control and protection of the electromagnet 15 through the tri-state buffer U2 and multiple driving circuits. This not only ensures signal stability and reliability but also provides additional protection through current-limiting resistors, pull-up resistors, and freewheeling diodes.

[0090] Furthermore, in one specific embodiment, such as Figure 3 As shown, it also includes: a sampling resistor;

[0091] The first terminal of the first MOS transistor Q1 in each driving circuit is connected to the first terminal of the sampling resistor, and the second terminal of the sampling resistor is grounded; the first terminal of the sampling resistor is connected to the comparator input port COMP_IN_POSITIVE of the microcontroller unit 12.

[0092] The sampling resistor is typically a low-resistance resistor connected between the first terminal of the MOSFET and ground. When the electromagnet operates, the current flowing through the sampling resistor generates a voltage drop proportional to the current. The comparator in the microcontroller unit 12 can detect this voltage drop to determine whether the current in the electromagnet 15 exceeds a set threshold, thereby achieving overcurrent protection.

[0093] The voltage signal across the sampling resistor is transmitted to the comparator input port of the microcontroller unit 12. The comparator of the microcontroller unit 12 compares the voltage across the sampling resistor with a set threshold (e.g., 0.3V). If the voltage across the sampling resistor exceeds the set threshold, it indicates that the current of the electromagnet 15 is too high, and the comparator outputs a high-level signal, triggering the overcurrent protection mechanism. Through the sampling resistor and the comparator, the microcontroller unit 12 can monitor the current of the electromagnet 15 in real time to ensure that it does not exceed the set safety threshold.

[0094] Furthermore, in one specific embodiment, such as Figure 5 As shown, the electromagnet current monitoring unit 13 includes: a D-type trigger U3 and a tenth resistor R10;

[0095] The comparator output port COMP_OUT of the microcontroller unit 12 is connected to the clock input of the D-type flip-flop U3, the data input of the D-type flip-flop U3 is grounded, the output OE of the D-type flip-flop U3 is connected to the enable port of the tri-state buffer U2, and the output of the D-type flip-flop U3 is grounded through the tenth resistor R10.

[0096] The preset input terminal D_PRE and the clear input terminal D_CLR of the D-type flip-flop U3 are connected to the microcontroller unit 12.

[0097] The D-type flip-flop U3 is used to latch overcurrent signals, ensuring that the system can quickly take protective measures once an overcurrent is detected. It is typically implemented using a D-type flip-flop U3 (such as 74HC74).

[0098] When the comparator detects an overcurrent signal, the clock input of the D-type flip-flop U3 receives a rising edge signal, and the output Q of the flip-flop latches a high-level signal, thereby turning off the output of the tri-state buffer U2 and cutting off the power supply to the electromagnet 15.

[0099] When the comparator of the microcontroller unit 12 detects an overcurrent signal, it outputs a high-level signal to the clock input of the D-type flip-flop U3. The data input D is grounded to ensure that the output Q latches a low-level signal when the clock signal triggers. When the output of the D-type flip-flop U3 latches a low-level signal, the enable port of the tri-state buffer U2 receives a low-level signal and shuts down the output. The fourth resistor R4 (pull-up resistor) is connected between the output of the D-type flip-flop U3 and ground to ensure that the output maintains a stable low level when no valid signal is received. The microcontroller unit 12 can initialize or reset the D-type flip-flop U3 through the preset input (D_PRE) and clear input (D_CLR). After system power-on initialization or fault troubleshooting, the D-type flip-flop U3 needs to be cleared to restore normal control function.

[0100] Furthermore, in one specific embodiment, it further includes: a DC voltage conversion circuit;

[0101] The input terminal of the DC-DC voltage conversion circuit is connected to a 24V power supply, the 5V output terminal of the DC-DC voltage conversion circuit is connected to the RS485 transceiver chip U1, and the 3.3V output terminal of the DC-DC voltage conversion circuit is connected to the microcontroller unit.

[0102] This embodiment further introduces a DC-DC voltage conversion circuit to convert the input 24V power supply into the 5V and 3.3V power supplies required by the RS485 transceiver chip U1 and the microcontroller unit 12. This design not only ensures stable power supply for each module but also improves the system's reliability and compatibility. Voltage conversion is typically achieved using a DC-DC converter chip. 24V is a common power supply voltage in industrial environments, suitable for powering electromagnets and other equipment. The DC-DC voltage conversion circuit converts 24V to 5V and outputs it to the RS485 transceiver chip U1. The DC-DC voltage conversion circuit converts 24V to 3.3V and outputs it to the microcontroller unit 12.

[0103] Furthermore, in one specific embodiment, such as Figure 5 As shown, there are three optocoupler isolation circuits, including a first isolation circuit, a second isolation circuit, and a third isolation circuit;

[0104] The receiver output port RX_OPT of the RS485 transceiver chip U1 is connected to the receive data port UART_RX of the microcontroller unit 12 through the first isolation circuit;

[0105] The receiver enable port RE_OPT and the transmit enable port of the RS485 transceiver chip U1 are connected to the output terminal UART_RE of the microcontroller unit 12 through the second isolation circuit.

[0106] The driver input port TX_OPT of the RS485 transceiver chip U1 is connected to the output port UART_TX of the microcontroller unit 12 through a third isolation circuit.

[0107] In this embodiment, the optocoupler isolation circuit is subdivided into three independent isolation circuits, each used for different signal paths of the RS485 transceiver chip U1. This design further enhances the isolation effect of signal transmission, ensuring the stability and reliability of communication, while also improving the system's anti-interference capability.

[0108] Specifically, such as Figure 5 As shown, the first isolation circuit includes: a fourth resistor R4, a fifth resistor R5, and a first optocoupler OP1;

[0109] The anode of the first optocoupler OP1 is connected to the power supply through the fourth resistor R4, and the cathode of the first optocoupler OP1 is connected to the receiver output port of the RS485 transceiver chip U1; the emitter of the first optocoupler OP1 is grounded, the collector of the first optocoupler OP1 is grounded through the fifth resistor R5, and the collector of the first optocoupler OP1 is connected to the microcontroller unit 12 as an output terminal.

[0110] The second isolation circuit includes: a sixth resistor R6, a seventh resistor R7, and a second optocoupler OP2;

[0111] The emitter of the second optocoupler OP2 is connected to the receiver enable port of the RS485 transceiver chip U1 and the first end of the sixth resistor R6, and the second end of the sixth resistor R6 is grounded; the collector of the second optocoupler OP2 is connected to the power supply; the anode of the second optocoupler OP2 is connected to the microcontroller unit 12 through the seventh resistor R7 as the input terminal, and the cathode of the second optocoupler OP2 is grounded.

[0112] The third isolation circuit includes: the eighth resistor R8, the ninth resistor R9, and the third optocoupler OP3;

[0113] The collector of the third optocoupler OP3 is connected to the driver input port of the RS485 transceiver chip U1 and grounded through the eighth resistor R8; the emitter of the third optocoupler OP3 is grounded; the anode of the third optocoupler OP3 is connected to the power supply; and the cathode of the third optocoupler OP3 is connected to the microcontroller unit 12 through the ninth resistor R9 as the input terminal.

[0114] When there is a data signal at the receiver output port of the RS485 transceiver chip U1, the signal is input through the cathode of the first optocoupler OP1. The signal lights up the light-emitting diode of the first optocoupler OP1, and the optical signal is transmitted to the phototransistor. The phototransistor conducts, transmitting the signal to the receive data port of the microcontroller unit 12.

[0115] The microcontroller unit 12 outputs a receiver enable signal or a transmit enable signal, which is input to the anode of the second optocoupler OP2 through the seventh resistor R7. The signal lights up the light-emitting diode of the second optocoupler OP2, and the optical signal is transmitted to the phototransistor. The phototransistor conducts, transmitting the signal to the receiver enable port or transmit enable port of the RS485 transceiver chip U1.

[0116] The microcontroller unit 12 outputs a data signal, which is input to the cathode of the third optocoupler OP3 through the ninth resistor R9. The signal lights up the light-emitting diode of the third optocoupler OP3, and the optical signal is transmitted to the phototransistor. The phototransistor conducts, transmitting the signal to the driver input port of the RS485 transceiver chip U1.

[0117] In this embodiment, each part of the optocoupler isolation circuit (first isolation circuit, second isolation circuit, and third isolation circuit) is implemented through specific resistors and optocouplers to ensure stable signal transmission and electrical isolation.

[0118] Figure 7 A circuit diagram of a microcontroller provided in an embodiment of this application is shown below. Figure 7 As shown, the microcontroller unit 12 is connected to the optocoupler isolation circuit, the MOS transistor drive unit 14, and the electromagnet current monitoring unit 13.

[0119] Figure 8 A circuit diagram of a power supply provided in an embodiment of this application is shown below. Figure 8 As shown, the power supply includes: a three-terminal regulator U5, a power management chip U6, a first capacitor C1, a second capacitor C2, a third capacitor C3, a fourth capacitor C4, a fifth capacitor C5, a sixth capacitor C6, a first inductor L1, an eleventh resistor R11, and a twelfth resistor R12.

[0120] The input terminal of the three-terminal regulator U5 is grounded through the first capacitor C1; the output terminal of the three-terminal regulator U5 is grounded through the second capacitor C2 and serves as the 3.3V output terminal.

[0121] The feedback detection pin of power management chip U6 is grounded through the twelfth resistor R12. The inductor output pin of power management chip U6 is connected to the first terminal of the first inductor L1 and the first terminal of the sixth capacitor C6. The second terminal of the first inductor L1 is connected to the input terminal of the three-terminal regulator U5, the first terminal of the third capacitor C3, the first terminal of the sixth capacitor C6, the first terminal of the fourth capacitor C4, and the first terminal of the eleventh resistor R11. The second terminal of the third capacitor C3 is grounded. The second terminal of the fourth capacitor C4 is connected to the second terminal of the eleventh resistor R11 and the feedback detection pin of power management chip U6. The input voltage pin of power management chip U6 is grounded through the fifth capacitor C5 and connected to the input power supply +24V. The second terminal of the sixth capacitor C6 is connected to the boost output terminal of power management chip U6. The second terminal of the first inductor L1 serves as the +5V output terminal.

[0122] The present application provides a power supply design scheme that converts the input voltage into power supply signals of different voltage magnitudes.

[0123] Finally, in one embodiment, an electromagnet control system includes multiple electromagnet extension circuits and a main control device 10 as described above.

[0124] The differential signal output port of the main control device 10 is connected to the input terminal of the RS485 level conversion isolation circuit 11 of multiple electromagnet expansion circuits via an RS485 cascade cable.

[0125] The electromagnet extension circuit and electromagnet control system provided by this utility model have been described in detail above. The various embodiments in the specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section. It should be noted that those skilled in the art can make several improvements and modifications to this utility model without departing from the principle of this utility model, and these improvements and modifications also fall within the protection scope of the claims of this utility model.

[0126] It should also be noted that, in this specification, relational terms such as "first" and "second" are used only 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, method, article, or apparatus 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, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

Claims

1. An electromagnet extension circuit, characterized in that, include: RS485 level conversion isolation circuit (11), micro control unit (12), electromagnet current monitoring unit (13), and MOS transistor driving unit (14) including multiple output terminals. The differential signal output port of the main control device is connected to the input terminal of the RS485 level conversion isolation circuit (11). The output terminal of the RS485 level conversion isolation circuit (11) is connected to the input terminal of the microcontroller unit (12). The signal output terminal of the microcontroller unit (12) is connected to the input terminal of the MOS transistor driving unit (14). Each output terminal of the MOS transistor driving unit (14) is connected to the control terminal of each electromagnet (15). The sampling output terminal of the MOS transistor driving unit (14) is connected to the comparator input port of the microcontroller unit (12). The comparator output port of the microcontroller unit (12) is connected to the input terminal of the electromagnet current monitoring unit (13). The output terminal of the electromagnet current monitoring unit (13) is connected to the output enable port of the MOS transistor driving unit (14).

2. The electromagnet extension circuit according to claim 1, characterized in that, The RS485 level conversion isolation circuit (11) includes: an RS485 level conversion circuit and an optocoupler isolation circuit; The differential signal output port of the main control device is connected to the input terminal of the RS485 level conversion circuit, the output terminal of the RS485 level conversion circuit is connected to the input terminal of the optocoupler isolation circuit, and the output terminal of the optocoupler isolation circuit is connected to the input terminal of the microcontroller unit (12).

3. The electromagnet extension circuit according to claim 2, characterized in that, The RS485 level conversion circuit includes: an RS485 transceiver chip, a first resistor, a first bidirectional trigger diode, and a second bidirectional trigger diode; The differential signal positive output port of the main control device is connected to the first end of the first resistor, the first end of the first bidirectional trigger diode, and the positive input terminal of the RS485 transceiver chip; the differential signal negative output port of the main control device is connected to the second end of the first resistor, the first end of the second bidirectional trigger diode, and the negative input terminal of the RS485 transceiver chip; the second end of the first bidirectional trigger diode and the second end of the second bidirectional trigger diode are grounded; the transceiver port of the RS485 transceiver chip is connected to the microcontroller unit (12) through the optocoupler isolation circuit.

4. The electromagnet extension circuit according to claim 1, characterized in that, The MOS transistor driving unit (14) includes: a tri-state buffer and multiple driving circuits; the driving circuit includes: a first MOS transistor, a second resistor, a third resistor, and a first diode; The multiple signal output terminals of the microcontroller (12) are respectively connected to each input terminal of the tri-state buffer, and each output terminal of the tri-state buffer is connected to the control terminal of each of the driving circuits. The control terminal of the first MOS transistor is connected to the first terminal of the first resistor and the first terminal of the second resistor. The second terminal of the first resistor serves as the control terminal of the driving circuit. The second terminal of the second resistor is connected to the first terminal of the first MOS transistor. The second terminal of the first MOS transistor is connected to the anode of the first diode and the first control terminal of the electromagnet (15). The cathode of the first diode is connected to the second control terminal of the electromagnet (15) and the power supply. The first terminal of the first MOS transistor is grounded.

5. The electromagnet extension circuit according to claim 4, characterized in that, Also includes: Sampling resistor; The first terminal of the first MOS transistor of each driving circuit is connected to the first terminal of the sampling resistor, and the second terminal of the sampling resistor is grounded; the first terminal of the sampling resistor is connected to the comparator input port of the microcontroller unit (12).

6. The electromagnet extension circuit according to claim 4, characterized in that, The electromagnet current monitoring unit (13) includes: a D-type trigger and a tenth resistor; The comparator output port of the microcontroller unit (12) is connected to the clock input of the D-type flip-flop, the data input of the D-type flip-flop is grounded, and the output of the D-type flip-flop is connected to the enable port of the tri-state buffer; the output of the D-type flip-flop is grounded through the tenth resistor. The preset input terminal and the clear input terminal of the D-type trigger are connected to the microcontroller unit (12).

7. The electromagnet extension circuit according to claim 3, characterized in that, It also includes: DC voltage conversion circuit; The input terminal of the DC-DC voltage conversion circuit is connected to a 24V power supply, the 5V output terminal of the DC-DC voltage conversion circuit is connected to the RS485 transceiver chip, and the 3.3V output terminal of the DC-DC voltage conversion circuit is connected to the microcontroller unit.

8. The electromagnet extension circuit according to claim 3, characterized in that, The number of the optocoupler isolation circuits is three, including a first isolation circuit, a second isolation circuit, and a third isolation circuit; The receiver output port of the RS485 transceiver chip is connected to the receiving data port of the microcontroller unit (12) through the first isolation circuit; The receiver enable port and transmit enable port of the RS485 transceiver chip are connected to the output terminal of the microcontroller unit (12) through the second isolation circuit; The driver input port of the RS485 transceiver chip is connected to the output of the microcontroller unit (12) through the third isolation circuit.

9. The electromagnet extension circuit according to claim 8, characterized in that, The first isolation circuit includes: a fourth resistor, a fifth resistor, and a first optocoupler; The anode of the first optocoupler is connected to the power supply through the fourth resistor, and the cathode of the first optocoupler is connected to the receiver output port of the RS485 transceiver chip; the emitter of the first optocoupler is grounded, the collector of the first optocoupler is grounded through the fifth resistor, and the collector of the first optocoupler is connected to the microcontroller unit (12) as an output terminal. The second isolation circuit includes: a sixth resistor, a seventh resistor, and a second optocoupler; The emitter of the second optocoupler is connected to the receiver enable port of the RS485 transceiver chip and the first end of the sixth resistor, and the second end of the sixth resistor is grounded; the collector of the second optocoupler is connected to the power supply; the anode of the second optocoupler is connected to the microcontroller unit (12) through the seventh resistor as the input terminal, and the cathode of the second optocoupler is grounded; The third isolation circuit includes: an eighth resistor, a ninth resistor, and a third optocoupler; The collector of the third optocoupler is connected to the driver input port of the RS485 transceiver chip and grounded through the eighth resistor; the emitter of the third optocoupler is grounded; the anode of the third optocoupler is connected to the power supply; and the cathode of the third optocoupler is connected to the microcontroller unit (12) through the ninth resistor as the input terminal.

10. An electromagnet control system, characterized in that, Includes the electromagnet extension circuit and main control device as described in any one of claims 1-9; The differential signal output port of the main control device is connected to the input terminal of the RS485 level conversion isolation circuit (11) of the multiple electromagnet expansion circuits via an RS485 cascade cable.