Sewing machine electromagnet control circuit and control method

CN123018712APending Publication Date: 2026-10-30ZHEJIANG ZOBOW MECHANICAL & ELECTRICAL TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611404624.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-10
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0004]然而,电磁铁工作时间久了以后经常会出现退磁、烧坏等现象,此时电磁铁线圈失去电感特性,相当于短路状态

Benefits of technology

[0016]本发明实施例的技术方案,在正常工作状态下,控制器向第三开关的控制端持续输出高电平使其导通,从而将第一开关的控制端拉低,第一开关导通,同时控制器根据缝纫机的动作时序向第二开关的控制端输出控制信号以控制其通断,当第二开关导通时,电流从供电电压经第一开关、电磁铁、第二开关及电流采样电路流至地,供电回路电流为与电磁铁负载匹配的正常额定值,电磁铁产生电磁力驱动缝纫机执行相应动作;当第二开关关断时,供电回路电流为零,电磁铁停止工作;电流采样电路持续检测供电回路电流并反馈至控制器,控制器据此确认回路状态正常。当电磁铁发生短路故障导致供电回路电流急剧增大、第二开关因过流被烧坏而呈永久短路失效时,即使控制器关断第二控制信号也无法通过第二开关切断供电回路;此时电流采样电路检测到异常不为零的过流信号并反馈至控制器,控制器据此判定故障并随即关断第一控制信号使第三开关截止,第三开关截止后第一开关的控制端失去下拉通路而随之截止,从而从供电侧彻底切断电磁铁的供电回路,防止电磁铁长时间通电烧坏或引发安全事故。利用上述电路,通过增设由控制器经第三开关独立控制的第一开关,当第二开关因电磁铁短路损坏失效时,控制器仍可通过关断第一开关切断供电,避免电磁铁长时间导通烧坏乃至着火,提高了控制电路的可靠性与安全性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123018712A_ABST
    Figure CN123018712A_ABST
Patent Text Reader

Abstract

The application discloses a sewing machine electromagnet control circuit and a control method. The control circuit comprises a controller, a first switch, a second switch, a third switch, an electromagnet and a current sampling circuit. The first end of the first switch is connected with a power supply voltage, the second end is electrically connected with the first end of the second switch through the electromagnet, and the second end of the second switch is grounded through the current sampling circuit. The control end of the third switch is connected with the first control signal output end of the controller, the first end is electrically connected with the control end of the first switch, and the second end is grounded. The control end of the second switch is electrically connected with the second control signal output end of the controller. The controller is also electrically connected with the current sampling circuit. When the second switch is damaged and fails due to the short circuit of the electromagnet, the controller can still cut off the power supply by turning off the first switch, so that the electromagnet is prevented from being burned out or even catching fire for a long time, and the reliability and safety of the control circuit are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of sewing machine electromagnet control, and more particularly to a sewing machine electromagnet control circuit and control method. Background Technology

[0002] Sewing machines typically use electromagnets to drive actuators such as electronic thread clamping, electronic thread loosening, and electronic thread pulling. The electromagnet control circuit is an important component of the sewing machine control system, and its reliability directly affects the safety of the entire machine.

[0003] Some existing controllers use a sampling resistor connected in series in the electromagnet drive circuit to detect overcurrent and short circuit, and the controller shuts off the switching device in the circuit to cut off the power supply. That is, the control action and the protection shutdown action depend on the same switching device to be executed.

[0004] However, electromagnets often demagnetize or burn out after prolonged use. In this case, the electromagnet coil loses its inductive properties, essentially becoming short-circuited. Once the switching device is damaged by a short circuit, even if the controller turns off the control signal, it cannot cut off the circuit in time. After powering on or replacing the electromagnet, it will still burn out due to prolonged conduction, and in severe cases, it may even cause a fire. Summary of the Invention

[0005] This invention provides a sewing machine electromagnet control circuit and control method. By adding a first switch independently controlled by the controller via a third switch, when the second switch fails due to electromagnet short circuit, the controller can still cut off the power supply by turning off the first switch, thus preventing the electromagnet from burning out or even catching fire due to prolonged conduction, thereby improving the reliability and safety of the control circuit.

[0006] In a first aspect, the present invention provides a sewing machine electromagnet control circuit, including a controller, a first switch, a second switch, a third switch, an electromagnet, and a current sampling circuit; The first terminal of the first switch is connected to the power supply voltage, and the second terminal is electrically connected to the first terminal of the second switch via an electromagnet. The second terminal of the second switch is grounded via a current sampling circuit. The control terminal of the third switch is connected to the first control signal output terminal of the controller. The first terminal is electrically connected to the control terminal of the first switch, and the second terminal is grounded. The control terminal of the second switch is electrically connected to the second control signal output terminal of the controller. The controller is also electrically connected to the current sampling circuit.

[0007] Optionally, the control circuit may also include a first switch control circuit; The first terminal of the first switch control circuit is electrically connected to the first terminal of the third switch, the second terminal is electrically connected to the power supply voltage, and the third terminal is electrically connected to the control terminal of the first switch.

[0008] Optionally, the first switch control circuit includes a first resistor and a second resistor; One end of the first resistor is electrically connected to the power supply voltage, and the other end is electrically connected to the control terminal of the first switch; one end of the second resistor is electrically connected to the first terminal of the third switch, and the other end is electrically connected to the control terminal of the first switch.

[0009] Optionally, the control circuit may also include a third switch control circuit; The first terminal of the third switch control circuit is electrically connected to the first control signal output terminal of the controller, the second terminal is electrically connected to the control terminal of the third switch, and the third terminal is electrically connected to the second terminal of the third switch.

[0010] Optionally, the third switch control circuit includes a third resistor and a fourth resistor; One end of the third resistor is electrically connected to the control terminal of the third switch, and the other end is electrically connected to the first control signal output terminal of the controller; one end of the fourth resistor is electrically connected to the control terminal of the third switch, and the other end is electrically connected to the second terminal of the third switch.

[0011] Optionally, the current sampling circuit includes a sampling resistor and a second switch control circuit; One end of the sampling resistor is electrically connected to the output terminal of the second switch and the signal input terminal of the controller, respectively, and the other end is grounded; One end of the second switch control circuit is electrically connected to the second control signal output terminal of the controller, the second end is electrically connected to the control terminal of the second switch, and the third end is electrically connected to the second terminal of the second switch.

[0012] Optionally, the second switch control circuit includes a fifth resistor and a sixth resistor; The first end of the fifth resistor is electrically connected to the second control signal input terminal of the controller, and the second end is electrically connected to the control terminal of the second switch. The first end of the sixth resistor is electrically connected to the control terminal of the second switch, and the second end is electrically connected to the second terminal of the second switch.

[0013] Optionally, the first switch includes a PMOS transistor, the second switch includes an NMOS transistor, and the third switch includes an NPN transistor.

[0014] Optionally, the control circuit may also include a freewheeling diode; The positive terminal of the freewheeling diode is electrically connected to the first terminal of the second switch, and the negative terminal is electrically connected to the second terminal of the first switch. And / or, also includes an alarm unit, and the alarm unit and controller are electrically connected.

[0015] Secondly, the present invention provides a sewing machine electromagnet control method, applied to the aforementioned sewing machine electromagnet control circuit, the method comprising: When the sewing machine is working normally, the first control signal output terminal and the second control signal output terminal output valid levels, so that the third switch and the second switch are both turned on, so that the power supply circuit is turned on, the electromagnet works, and the current signal of the power supply circuit detected by the current sampling circuit is acquired. Based on the magnitude of the current signal, the operating state of the power supply circuit is determined, and when the power supply circuit is abnormal, the first control signal output terminal is controlled to output an invalid level and the third switch is turned off to cut off the power supply circuit.

[0016] In the technical solution of this invention embodiment, under normal operating conditions, the controller continuously outputs a high level to the control terminal of the third switch to turn it on, thereby pulling down the control terminal of the first switch and turning it on. At the same time, the controller outputs a control signal to the control terminal of the second switch according to the sewing machine's operating sequence to control its on / off state. When the second switch is on, current flows from the supply voltage through the first switch, the electromagnet, the second switch, and the current sampling circuit to ground. The current in the supply circuit is the normal rated value that matches the load of the electromagnet, and the electromagnet generates electromagnetic force to drive the sewing machine to perform the corresponding action. When the second switch is off, the current in the supply circuit is zero, and the electromagnet stops working. The current sampling circuit continuously detects the current in the supply circuit and feeds it back to the controller, which then confirms that the circuit state is normal. When a short circuit fault occurs in the electromagnet, causing a sharp increase in the power supply circuit current and the second switch to burn out due to overcurrent and become permanently short-circuited, even if the controller turns off the second control signal, it cannot cut off the power supply circuit through the second switch. At this time, the current sampling circuit detects an abnormal non-zero overcurrent signal and feeds it back to the controller. Based on this, the controller determines the fault and immediately turns off the first control signal, causing the third switch to cut off. After the third switch cuts off, the control terminal of the first switch loses its pull-down path and also cuts off, thus completely cutting off the power supply circuit of the electromagnet from the power supply side, preventing the electromagnet from burning out due to prolonged energization or causing a safety accident. Using the above circuit, by adding a first switch independently controlled by the controller via the third switch, when the second switch fails due to electromagnet short circuit damage, the controller can still cut off the power supply by turning off the first switch, avoiding prolonged conduction and burnout of the electromagnet or even fire, thus improving the reliability and safety of the control circuit.

[0017] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a schematic diagram of the structure of a sewing machine electromagnet control circuit provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the circuit structure of another sewing machine electromagnet control circuit provided in an embodiment of the present invention; Figure 3 A flowchart of a sewing machine electromagnet control method provided in an embodiment of the present invention. Detailed Implementation

[0020] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0021] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0022] In one embodiment, Figure 1 This is a schematic diagram of a sewing machine electromagnet control circuit provided in an embodiment of the present invention. This embodiment can be applied to promptly shut off the power supply circuit when the second switch malfunctions, avoiding damage to the electromagnet caused by prolonged conduction. Figure 1As shown, the sewing machine electromagnet control circuit includes a controller 10, a first switch Q1, a second switch Q2, a third switch Q3, an electromagnet L, and a current sampling circuit 20. The first terminal of the first switch Q1 is connected to the power supply voltage VDD, and the second terminal is electrically connected to the first terminal of the second switch Q2 through the electromagnet L. The second terminal of the second switch Q2 is grounded through the current sampling circuit 20. The control terminal of the third switch Q3 is connected to the first control signal output terminal of the controller 10, the first terminal is electrically connected to the control terminal of the first switch Q1, and the second terminal is grounded to GND. The control terminal of the second switch Q2 is electrically connected to the second control signal output terminal of the controller 10. The controller 10 is also electrically connected to the current sampling circuit 20.

[0023] The controller 10 is the core control unit of the sewing machine's electromagnet control circuit. It outputs a first control signal and a second control signal to control the on / off state of the corresponding switching devices, and receives the detection results output by the current sampling circuit 20 to determine the operating status of the electromagnet power supply circuit. The first switch Q1 is the main power supply switch connected in series between the power supply voltage VDD and the electromagnet L. Its first terminal is connected to the power supply voltage VDD, its second terminal is connected to the second switch Q2 through the electromagnet L, and its control terminal is electrically connected to the first terminal of the third switch Q3. In this embodiment, the on / off state of the first switch Q1 determines whether the electromagnet power supply circuit is connected or disconnected from the power supply side. The second switch Q2 is the execution control switch connected in series between the electromagnet L and the current sampling circuit 20. Its first terminal is electrically connected to the electromagnet L, its second terminal is grounded to GND through the current sampling circuit 20, and its control terminal is connected to the second control signal output terminal of the controller 10. In this embodiment, the second switch Q2 is directly controlled by the controller 10 to realize the normal on / off state of the electromagnet L. The third switch Q3 is a protective control switch device used to control the on / off state of the first switch Q1. Its control terminal is connected to the first control signal output terminal of the controller 10, the first terminal is electrically connected to the control terminal of the first switch Q1, and the second terminal is grounded to GND. In this embodiment, when the third switch Q3 is on, it pulls the control terminal of the first switch Q1 low to turn the first switch Q1 on; when it is off, it causes the control terminal of the first switch Q1 to lose the pull-down path and turns off the first switch Q1. In this embodiment, the first switch Q1 includes a PMOS transistor, the second switch Q2 includes an NMOS transistor, and the third switch Q3 includes an NPN transistor. The electromagnet L is the electromagnetic actuator of the sewing machine. After being energized, it generates electromagnetic force to drive corresponding mechanical actions, such as clamping, loosening, pulling, or cutting the thread. The current sampling circuit 20 is a current detection circuit connected in series between the second switch Q2 and ground GND. It is used to detect the magnitude of the current flowing through the electromagnet power supply circuit in real time and outputs the corresponding detection signal to the controller 10 so that the controller 10 can determine whether an overcurrent or short circuit fault has occurred in the power supply circuit. The power supply voltage VDD is the power supply voltage that provides the working electrical energy for the electromagnet L.

[0024] Specifically, when the sewing machine's electromagnet control circuit is working normally, the controller 10 outputs a first control signal (such as a high-level signal) to the control terminal of the third switch Q3 through the first control signal output terminal, causing the third switch Q3 to conduct. After the third switch Q3 conducts, it pulls the voltage at the control terminal of the first switch Q1 down to a low level, thereby turning on the first switch Q1. At the same time, the controller 10 outputs a second control signal (such as a high-level signal) to the control terminal of the second switch Q2 through the second control signal output terminal, causing the second switch Q2 to conduct. At this time, the power supply voltage VDD forms a complete power supply circuit through the first switch Q1, electromagnet L, second switch Q2, and current sampling circuit 20 to ground GND. The electromagnet L is energized to generate electromagnetic force, driving the sewing machine to perform corresponding actions such as thread clamping, thread loosening, thread pulling, or thread cutting. During this process, the controller 10 controls the on / off state of the second switch Q2 to achieve the normal on / off state of the electromagnet L. The current sampling circuit 20 detects the current in the power supply circuit in real time and outputs the detection signal to the controller 10 so that the controller 10 can understand the working status of the power supply circuit.

[0025] When electromagnet L experiences a short circuit fault (e.g., demagnetization and burnout), the current in the power supply circuit increases sharply. The second switch Q2, subjected to excessive current, may burn out and short-circuit. At this time, because the second switch Q2 has already formed a permanent low-resistance path due to overheating and melting or breakdown, the electrical isolation between its control terminal and the main path of the first and second terminals is disrupted. The second control signal output by controller 10 can no longer effectively regulate the on / off state of the second switch Q2. Therefore, even if controller 10 turns off the second control signal, it cannot cut off the circuit through the second switch Q2. At this time, the current sampling circuit 20 can detect the abnormal current signal in the power supply circuit in real time and output it to controller 10. Controller 10 determines that there is an overcurrent or short circuit fault in the power supply circuit based on the current signal, and then turns off the first control signal, causing the third switch Q3 to turn off. After the third switch Q3 turns off, the control terminal of the first switch Q1 loses its pull-down path, and the first switch Q1 also turns off, thus completely cutting off the power supply circuit of electromagnet L from the power supply side.

[0026] Since the first switch Q1 is located on the power supply side of electromagnet L and the second switch Q2 is located on the grounding side of electromagnet L, they constitute two control paths that can independently cut off the power supply to the electromagnet. Therefore, even if the second switch Q2 fails completely due to short-circuit damage, the controller 10 can still cut off the power supply by turning off the first switch Q1 through the third switch Q3, ensuring that the power supply circuit is effectively isolated under fault conditions. During this process, the controller 10 continuously determines the working status of the power supply circuit based on the detection results of the current sampling circuit 20, maintaining the first switch Q1 in the off state until the fault is eliminated, preventing repeated power-on and burnout after replacing the electromagnet, thereby avoiding prolonged conduction and burnout of the electromagnet or even causing a fire, significantly improving the reliability and safety of the sewing machine electromagnet control circuit.

[0027] Under normal operating conditions where the power supply circuit is functioning correctly, the controller 10 continuously outputs a first control signal (such as a high-level signal) to the control terminal of the third switch Q3, keeping the third switch Q3 on. This, in turn, stably pulls the voltage at the control terminal of the first switch Q1 down to a low level, ensuring that the first switch Q1 is reliably on. Simultaneously, according to the sewing machine's timing requirements, the controller 10 outputs a corresponding second control signal to the control terminal of the second switch Q2 to control its on / off state, thereby achieving normal energization and de-energization switching of the electromagnet L. At this time, the power supply voltage VDD forms a complete and stable power supply circuit to ground via the first switch Q1, electromagnet L, second switch Q2, and current sampling circuit 20. The electromagnet L generates electromagnetic force according to a preset timing sequence, driving the sewing machine to perform actions such as thread clamping, thread loosening, thread pulling, or thread cutting. The current sampling circuit 20 continuously monitors the power supply circuit current and feeds the monitoring signal back to the controller 10. Based on this, the controller 10 confirms that the circuit is functioning well, maintaining the normal control logic of the first switch Q1 and the second switch Q2. The entire circuit operates stably under fault-free conditions.

[0028] In a specific embodiment, under normal operating conditions, when the second switch Q2 is off, the current sampling circuit 20 detects zero power supply circuit current; when the second switch Q2 is on, the power supply circuit current is the normal rated value matching the electromagnet L load. However, when the aforementioned short-circuit fault occurs, the circuit current deviates significantly from the normal range, exhibiting an abnormal overcurrent state that is not zero. The current sampling circuit 20 continuously detects the power supply circuit current and feeds back the corresponding current signal to the controller 10. If the detected current is zero or within the normal rated range, the controller 10 confirms that the power supply circuit is operating normally and maintains the normal control logic of the first switch Q1 and the second switch Q2; if the detected current is abnormally non-zero and exceeds a preset threshold, the controller 10 immediately triggers the aforementioned fault protection mechanism, thereby achieving stable control during normal operation and reliable protection under fault conditions.

[0029] In the technical solution of this invention embodiment, under normal operating conditions, the controller continuously outputs a high level to the control terminal of the third switch to turn it on, thereby pulling down the control terminal of the first switch and turning it on. At the same time, the controller outputs a control signal to the control terminal of the second switch according to the sewing machine's operating sequence to control its on / off state. When the second switch is on, current flows from the supply voltage through the first switch, the electromagnet, the second switch, and the current sampling circuit to ground. The current in the supply circuit is the normal rated value that matches the load of the electromagnet, and the electromagnet generates electromagnetic force to drive the sewing machine to perform the corresponding action. When the second switch is off, the current in the supply circuit is zero, and the electromagnet stops working. The current sampling circuit continuously detects the current in the supply circuit and feeds it back to the controller, which then confirms that the circuit state is normal. When a short circuit fault occurs in the electromagnet, causing a sharp increase in the power supply circuit current and the second switch to burn out due to overcurrent and become permanently short-circuited, even if the controller turns off the second control signal, it cannot cut off the power supply circuit through the second switch. At this time, the current sampling circuit detects an abnormal non-zero overcurrent signal and feeds it back to the controller. Based on this, the controller determines the fault and immediately turns off the first control signal, causing the third switch to cut off. After the third switch cuts off, the control terminal of the first switch loses its pull-down path and also cuts off, thus completely cutting off the power supply circuit of the electromagnet from the power supply side, preventing the electromagnet from burning out due to prolonged energization or causing a safety accident. Using the above circuit, by adding a first switch independently controlled by the controller via the third switch, when the second switch fails due to electromagnet short circuit damage, the controller can still cut off the power supply by turning off the first switch, avoiding prolonged conduction and burnout of the electromagnet or even fire, thus improving the reliability and safety of the control circuit.

[0030] In another specific embodiment, optionally, Figure 2 This is a schematic diagram of the circuit structure of another sewing machine electromagnet control circuit provided in an embodiment of the present invention, for reference. Figure 2 As shown, the control circuit also includes a first switch control circuit 30; the first terminal of the first switch control circuit 30 is electrically connected to the first terminal of the third switch Q3, the second terminal is electrically connected to the power supply voltage VDD, and the third terminal is electrically connected to the control terminal of the first switch Q1.

[0031] The first switch control circuit 30 is a level conversion and drive interface circuit located between the third switch Q3 and the first switch Q1. Its first terminal is electrically connected to the first terminal of the third switch Q3 to obtain the on / off state of the third switch Q3 as an input signal. Its second terminal is electrically connected to the supply voltage VDD to obtain the operating power supply and high-side reference potential. Its third terminal is electrically connected to the control terminal of the first switch Q1 to output a drive control signal for the first switch Q1. The core function of this circuit is to convert the on / off state of the low-side circuit containing the third switch Q3 into an effective gate control level suitable for driving the high-side first switch Q1 (typically a PMOS power transistor).

[0032] Specifically, in the sewing machine electromagnet control circuit, the power supply voltage VDD passes through the first switch Q1, the electromagnet, the second switch, and the current sampling circuit to ground, forming the main power supply circuit. The first switch control circuit 30 serves as a dedicated drive unit for the first switch Q1, and its operating state is entirely determined by the on / off state of the third switch Q3. During normal operation, the controller 10 continuously outputs a high level to the control terminal of the third switch Q3, keeping the third switch Q3 on. After the third switch Q3 is on, its first terminal is pulled to a low level. After sensing this low-level input, the first switch control circuit 30 uses the power supply voltage VDD as a reference to stably pull the control terminal of the first switch Q1 down to the effective on-state potential, thereby keeping the first switch Q1 in a normally on state and providing a stable high-side power supply path for the electromagnet L. Meanwhile, controller 10 independently controls the on / off state of the second switch Q2 according to the sewing machine's operating sequence. When the second switch Q2 is on, a complete current path is formed in the main power supply circuit, and the current flows through the electromagnet L, thereby generating electromagnetic force to execute the corresponding action. At this time, the circuit current is the normal rated value matched with the load. When the second switch Q2 is off, the circuit current drops to zero, and the electromagnet L stops working. When a short circuit fault occurs in the electromagnet L, causing the second switch Q2 to burn out due to overcurrent and become permanently short-circuited, even if controller 10 turns off the control signal of the second switch Q2, it cannot cut off the main circuit. However, the current sampling circuit will immediately detect the abnormal overcurrent and feed it back to controller 10. Controller 10 then turns off the control signal of the third switch Q3. After the third switch Q3 is turned off, its first terminal returns to a high level. The first switch control circuit 30 loses its pull-down effect and releases the control terminal of the first switch Q1 to a high level. The first switch Q1 is quickly turned off, thereby completely disconnecting the power supply path of the electromagnet from the power supply head. Therefore, even under extreme conditions where the second switch Q2 fails, the system can still achieve reliable fault isolation and overcurrent protection through the linkage mechanism between the first switch control circuit 30 and the third switch Q3, ensuring circuit safety.

[0033] In another specific embodiment, reference continues... Figure 2 Optionally, the first switch control circuit 30 includes a first resistor R1 and a second resistor R2; one end of the first resistor R1 is electrically connected to the power supply voltage VDD, and the other end is electrically connected to the control terminal of the first switch Q1; one end of the second resistor R2 is electrically connected to the first terminal of the third switch Q3, and the other end is electrically connected to the control terminal of the first switch Q1.

[0034] In this circuit, the first resistor R1 is a pull-up resistor. When the third switch Q3 is in the off state, its first terminal presents a high-impedance state. At this time, the first resistor R1 pulls the potential of the control terminal (i.e., gate) of the first switch Q1 up to the supply voltage VDD, making the voltage between the control terminal and the second terminal (i.e., the gate-source voltage) of the first switch Q1 approach zero. This ensures that the first switch Q1 is reliably turned off, avoiding false turn-on or potential uncertainty caused by a floating gate. Simultaneously, the first resistor R1 also limits current, preventing excessive charging and discharging current from being generated at the gate of the first switch Q1 during switching. The second resistor R2 is a signal transmission and current-limiting resistor. When the third switch Q3 is turned on, it transmits the low-level signal from the first terminal of the third switch Q3 to the control terminal of the first switch Q1 via the second resistor R2, effectively pulling down the potential of the control terminal of the first switch Q1, thereby driving the first switch Q1 to turn on. Meanwhile, the second resistor R2 is used to limit the sink current flowing through the first terminal of the third switch Q3 when it is turned on, protecting the third switch Q3 from overcurrent damage, and forming a voltage divider relationship with the first resistor R1 to ensure that the control terminal of the first switch Q1 obtains a suitable drive level.

[0035] Specifically, under normal operating conditions, the controller 10 continuously outputs a high level to the control terminal of the third switch Q3, keeping the third switch Q3 on. After the third switch Q3 is turned on, the potential at the first terminal is pulled down to near ground level. This low-level signal is transmitted to the gate of the first switch Q1 through the second resistor R2, making the gate potential of the first switch Q1 much lower than the supply voltage VDD connected to its source. A sufficient negative voltage difference is formed between the gate and source, and the first switch Q1 (i.e., the PMOS transistor) is turned on, providing a stable high-side current path for the electromagnet power supply circuit. At this time, although the first resistor R1 is still connected between the supply voltage VDD and the gate of the first switch Q1, because the second resistor R2 clamps the gate to a low level, the current flowing through the first resistor R1 is only a small sink current through the second resistor R2 to the third switch Q3, which does not affect the normal conduction of the first switch Q1. When it is necessary to disconnect the electromagnet power supply circuit (such as when a short circuit fault is detected or the second switch Q2 fails), the controller 10 turns off the third switch Q3. After the third switch Q3 is turned off, its first terminal returns to a high-resistance state, and the second resistor R2 no longer provides a pull-down path. The supply voltage VDD pulls the gate potential of the first switch Q1 up to be equal to the source potential (i.e., the supply voltage VDD) through the first resistor R1. The gate-source voltage of the first switch Q1 approaches zero, and the first switch Q1 is quickly turned off, thus completely disconnecting the electromagnet power supply circuit from the power supply side. In this process, the resistance values ​​of the first resistor R1 and the second resistor R2 determine the charging and discharging time constant of the gate of the first switch Q1. Reasonably selecting the resistance values ​​of the two resistors can balance the turn-off speed of the first switch Q1 and the driving current carrying capacity of the third switch Q3, ensuring that the protection action is both rapid and reliable without overloading and damaging the third switch Q3. Thus, the low-side indirect drive and fault-safe shutdown of the high-side first switch Q1 can be achieved through a simple two-resistor network.

[0036] In another specific embodiment, reference continues... Figure 2 Optionally, the control circuit also includes a third switch control circuit 40; the first end of the third switch control circuit 40 is electrically connected to the first control signal output end of the controller 10, the second end is electrically connected to the control end of the third switch Q3, and the third end is electrically connected to the second end of the third switch Q3.

[0037] The third switch control circuit 40 is a drive interface circuit located between the controller 10 and the third switch Q3. Its first terminal is electrically connected to the first control signal output terminal of the controller 10 to receive low-level logic control signals from the controller 10. Its second terminal is electrically connected to the control terminal (i.e., gate) of the third switch Q3 to output a drive signal to the third switch Q3. Its third terminal is electrically connected to the second terminal (i.e., source) of the third switch Q3 to provide a reference ground potential for the drive circuit. The core function of this circuit is to convert the weak electrical signal output by the controller 10 into a strong drive signal capable of effectively driving the third switch Q3 (i.e., the NMOS transistor). On the one hand, it achieves level matching and current amplification, ensuring that the controller 10 does not need to directly bear the large current load of charging and discharging the gate of the third switch Q3. On the other hand, through the common ground connection between the third terminal and the second terminal of the third switch Q3, it provides a stable reference potential for the gate drive of the third switch Q3, avoiding misleading turn-on or incomplete turn-off problems caused by reference potential fluctuations. Simultaneously, it enhances anti-interference capabilities and ensures the reliability of the third switch Q3 in high-frequency switching or fault protection scenarios.

[0038] Specifically, the third switch control circuit 40 serves as a dedicated drive bridge between the controller 10 and the third switch Q3, and its operation is entirely controlled by the first control signal output terminal of the controller 10. When the controller 10 needs to turn on the third switch Q3 (for example, maintaining the first switch Q1 normally on under normal operating conditions), its first control signal output terminal outputs a high-level signal. Upon receiving this signal, the third switch control circuit 40 uses its internal drive structure to rapidly raise the gate potential of the third switch Q3 (i.e., the NPN transistor) relative to its second terminal (source / ground) to a sufficiently high drive voltage, enabling the third switch Q3 to reliably turn on. Its first terminal (drain) is then pulled down to near ground level, thereby pulling down the gate of the first switch Q1 through the first switch control circuit 30 and turning on the first switch Q1. During this process, the third terminal of the third switch control circuit 40 and the second terminal of the third switch Q3 maintain an equipotential connection, ensuring that the gate-source drive voltage is precisely controllable and unaffected by line voltage drop or ground bounce noise. When the controller 10 detects an anomaly (such as a short circuit in the electromagnet causing the second switch to fail) and needs to urgently cut off the power supply, its first control signal output terminal immediately outputs a low-level signal. The third switch control circuit 40 then quickly releases the gate charge of the third switch Q3 and pulls its potential down to the same ground potential as the second terminal. The third switch Q3 quickly turns off, and its first terminal returns to a high-impedance state. After the first switch control circuit 30 loses its pull-down path, it pulls the gate of the first switch Q1 up to the supply voltage VDD, and the first switch Q1 turns off, thereby cutting off the power supply to the electromagnet from the source. Throughout the process, the third switch control circuit 40 not only realizes the controller 10's fast and accurate drive of the third switch Q3, but also ensures the determinism and timeliness of the fault protection action through a common ground reference design, avoiding protection failure caused by drive signal distortion or reference potential offset, and ensuring that the system can still respond safely under extreme conditions.

[0039] In another specific embodiment, reference continues... Figure 2 Optionally, the third switch control circuit 40 includes a third resistor R3 and a fourth resistor R4; one end of the third resistor R3 is electrically connected to the control terminal of the third switch Q3, and the other end is electrically connected to the first control signal output terminal of the controller 10; one end of the fourth resistor R4 is electrically connected to the control terminal of the third switch Q3, and the other end is electrically connected to the second terminal of the third switch Q3.

[0040] The third resistor R3 is a gate series drive resistor. On one hand, it limits the transient current peak of the controller 10 during the charging and discharging process of the gate of the third switch Q3, preventing damage to the internal output stage of the controller 10 due to overcurrent or excessive voltage drop. On the other hand, it suppresses high-frequency oscillations caused by parasitic inductance and capacitance in the gate circuit, preventing false turn-on or electromagnetic interference caused by gate voltage ringing during the switching process of the third switch Q3. It also appropriately delays the rising or falling edge of the gate voltage, reducing the switching losses and voltage stress of the third switch Q3. The fourth resistor R4 is a gate pull-down resistor. In this embodiment, when the first control signal output terminal of the controller 10 is in a high-impedance state, no valid drive signal is output, or during the power-on initialization phase, the fourth resistor R4 reliably clamps the gate potential of the third switch Q3 to ground potential, ensuring that the third switch Q3 is always in a defined off state, avoiding malfunctions caused by external noise coupling due to gate floating. Simultaneously, during the turn-off process of the third switch Q3, the fourth resistor R4 provides a discharge path for residual gate charge, accelerating the turn-off process and enhancing the stability of the turn-off state.

[0041] Specifically, in the third switch control circuit 40, the third resistor R3 and the fourth resistor R4 together form a complete drive and bias network for the gate of the third switch Q3. When the controller 10 needs to turn on the third switch Q3, its first control signal output terminal outputs a high level. This high level charges the gate of the third switch Q3 through the third resistor R3. Due to the current limiting effect of the third resistor R3, the gate voltage rises at a controllable rate to a threshold sufficient to fully turn on the third switch Q3. At this time, although the fourth resistor R4 is still connected between the gate and ground, the driving capability of the controller 10 output is much stronger than the pull-down effect of the fourth resistor R4, so the gate potential is stably maintained at a high level, and the third switch Q3 is reliably turned on. During this process, the third resistor R3 effectively avoids overload of the controller 10 output stage and gate ringing. When controller 10 needs to turn off the third switch Q3, its first control signal output switches to a low level or enters a high-impedance state. The charge stored in the gate of the third switch Q3 is quickly discharged to ground through two paths: the third resistor R3 and the fourth resistor R4. The fourth resistor R4, as a fast discharge path, can independently pull the gate potential down to ground even if the controller 10 output stage response is delayed or fails, ensuring that the third switch Q3 is quickly and completely turned off. Especially during system power-on or controller 10 reset, the fourth resistor R4 always clamps the gate to ground, fundamentally eliminating the risk of the third switch Q3 accidentally turning on due to a floating gate. The resistance values ​​of the third resistor R3 and the fourth resistor R4 ensure that the third switch Q3 receives sufficient drive strength during normal operation and provide reliable bias protection during shutdown and abnormal states. This gives the entire drive circuit both dynamic performance and static safety, laying a stable foundation for the subsequent indirect control of the high-side first switch Q1 through the first switch control circuit 30.

[0042] In another specific embodiment, reference continues... Figure 2 Optionally, the current sampling circuit 20 includes a sampling resistor R7 and a second switch control circuit 201; one end of the sampling resistor R7 is electrically connected to the output terminal of the second switch Q2 and the signal input terminal of the controller 10, respectively, and the other end is grounded; one end of the second switch control circuit 201 is electrically connected to the second control signal output terminal of the controller 10, the second end is electrically connected to the control terminal of the second switch Q2, and the third end is electrically connected to the second terminal of the second switch Q2.

[0043] The sampling resistor R7 is a current sensing element. One end is connected to the output terminal of the second switch Q2 and the signal input terminal of the controller 10, and the other end is grounded. It is used to convert the power supply circuit current into a proportional voltage signal for the controller 10 to collect in real time for overcurrent or short-circuit fault detection. A low-resistance design is used to reduce the voltage drop and power consumption of the power supply circuit. The second switch control circuit 201 is a drive interface circuit used to convert the weak electrical signal from the controller 10 into a level signal that effectively drives the second switch Q2, achieving level matching and current amplification. Through a common reference connection with the second terminal of the second switch Q2, it ensures a stable and reliable gate-source drive voltage and prevents malfunctions.

[0044] Specifically, in the sewing machine electromagnet control circuit, the sampling resistor R7 and the second switch control circuit 201 respectively undertake the two key functions of current detection and switch drive. Working together, they enable the controller 10 to simultaneously achieve real-time monitoring of the main circuit current and precise on / off control of the second switch Q2. Specifically, under normal operating conditions, the controller 10 outputs a high-level drive signal to the second switch control circuit 201 through the second control signal output terminal. The second switch control circuit 201 converts this signal into a drive level adapted to the gate of the second switch Q2, ensuring reliable conduction of the second switch Q2. The power supply circuit current flows sequentially through the supply voltage VDD, the first switch Q1, the electromagnet, the second switch Q2, and the sampling resistor R7 to ground. At this time, a small voltage drop proportional to the load current is generated across the sampling resistor R7. This voltage drop is collected in real-time through the signal input terminal of the controller 10. The controller 10 compares the collected voltage value with the preset normal operating current threshold to confirm that the current is within a safe range, and the system maintains normal electromagnet L drive. When the sewing machine needs to stop the operation of electromagnet L, the controller 10 switches the second control signal output terminal to a low level. The second switch control circuit 201 then releases the gate charge of the second switch Q2, and the second switch Q2 quickly turns off. The current in the power supply circuit drops to zero, and the voltage drop across the sampling resistor R7 also returns to zero. The controller 10 confirms that the power supply circuit has been safely disconnected. When a short circuit fault occurs in electromagnet L, the current in the power supply circuit rises sharply, and the voltage drop across the sampling resistor R7 exceeds the preset protection threshold. The controller 10 detects the abnormal overcurrent signal in a very short time and immediately turns off the second switch Q2 through the second control signal output terminal. At the same time, it triggers the third switch control circuit 40 to turn off the third switch Q3, and then turns off the high-side first switch Q1 through the first switch control circuit 30, completely cutting off the electromagnet circuit from the power supply head, thus achieving fast and reliable overcurrent protection. During this process, the low resistance of the sampling resistor R7 ensures that it will not become a bottleneck when subjected to transient large currents, while the fast response capability of the second switch control circuit 201 ensures that the protection command of the controller 10 can be executed in time. Together, they constitute the core link of current closed-loop monitoring and switch execution, providing a solid guarantee for the safe operation of the entire control circuit.

[0045] In another specific embodiment, reference continues... Figure 2 Optionally, the second switch control circuit 201 includes a fifth resistor R5 and a sixth resistor R6; the first end of the fifth resistor R5 is electrically connected to the second control signal input terminal of the controller, and the second end is electrically connected to the control terminal of the second switch Q2; the first end of the sixth resistor R6 is electrically connected to the control terminal of the second switch Q2, and the second end is electrically connected to the second terminal of the second switch Q2.

[0046] The fifth resistor, R5, is a gate series drive resistor used to limit transient current during gate charging and discharging to protect the output stage of controller 10 and suppress high-frequency oscillations in the gate circuit, preventing ringing-induced false turn-on during the switching process of the second switch Q2. The sixth resistor, R6, is a gate pull-down resistor used to reliably clamp the gate of the second switch Q2 to ground potential when controller 10 outputs a high-impedance state or during power-on initialization, ensuring that it is in a deterministic off state, and providing a charge discharge path for the turn-off process, accelerating turn-off and enhancing stability.

[0047] Specifically, in the second switch control circuit 201, the fifth resistor R5 and the sixth resistor R6 together form a complete drive and bias network for the gate of the second switch Q2. Their operation closely coordinates with the monitoring function of the current sampling circuit 20 to achieve precise on / off control and rapid fault response of the electromagnet power supply circuit. Specifically, when the controller 10 confirms that the system is normal based on the current signal fed back by the sampling resistor R7 and needs to turn on the second switch Q2, its second control signal output terminal outputs a high level. This high level charges the gate of the second switch Q2 through the fifth resistor R5. The current-limiting effect of the fifth resistor R5 causes the gate voltage to rise at a controllable rate above the full conduction threshold. At this time, although the sixth resistor R6 is still connected between the gate and ground, because the driving capability of the controller 10 is much stronger than the pull-down effect of the sixth resistor R6, the gate potential is stably maintained at a high level. The second switch Q2 is reliably turned on, the power supply circuit current is established, and the sampling resistor R7 synchronously generates a detection voltage proportional to the load current for continuous monitoring by the controller 10. During this process, the fifth resistor R5 effectively prevents overload of the controller 10 output stage and gate ringing, ensuring the electromagnetic compatibility of the switching action.

[0048] When the controller 10 needs to normally turn off the second switch Q2, its second control signal output terminal switches to a low level. The charge stored in the gate of the second switch Q2 is quickly discharged to ground through two paths: the fifth resistor R5 and the sixth resistor R6. The sixth resistor R6 serves as a fast discharge path, and can still independently pull the gate potential down to ground even if the controller 10 output stage response is delayed, ensuring that the second switch Q2 is quickly and completely turned off. The power supply circuit current drops to zero quickly, and the voltage drop of the sampling resistor R7 returns to zero synchronously. Based on this, the controller 10 confirms that the power supply circuit has been safely disconnected. More importantly, when the sampling resistor R7 detects an abnormal increase in the main power supply circuit current exceeding the preset short-circuit protection threshold, the controller 10 identifies the fault signal within microseconds and immediately forces the second control signal output terminal low or sets it to a high-impedance state. At this time, because the sixth resistor R6 is directly connected to the gate and the second terminal of the second switch Q2, the sixth resistor R6 does not need to rely on the active pull-down capability of the controller 10 output stage to discharge the residual charge on the gate in the shortest possible time, so that the second switch Q2 turns off at the fastest possible speed, minimizing the duration of the fault current and reducing the risk of thermal stress damage to the electromagnet and power devices. At the same time, when the system is powered on, during the controller 10 reset, or when the second control signal output terminal is in an uncertain state due to communication abnormalities, the sixth resistor R6 always clamps the gate of the second switch Q2 to ground potential, fundamentally eliminating the possibility of accidental conduction due to noise coupling caused by gate floating, ensuring that the second switch Q2 remains safely off under any unexpected operating conditions. The matching values ​​of the fifth resistor R5 and the sixth resistor R6 ensure that the second switch Q2 obtains sufficient driving strength and switching speed during normal operation, and also provide multiple redundant bias protections under off, fault and abnormal conditions. This makes the entire driving circuit have both dynamic performance and static safety, providing a reliable execution basis for the real-time monitoring of the current sampling circuit 20 and the protection decision of the controller 10, and together they form an indispensable safety closed loop in the sewing machine electromagnet control circuit.

[0049] In another specific embodiment, reference continues... Figure 2 Optionally, the control circuit also includes a freewheeling diode D1; the positive terminal of the freewheeling diode D1 is electrically connected to the first terminal of the second switch Q2, and the negative terminal is electrically connected to the second terminal of the first switch Q1; and / or, it also includes an alarm unit (not shown in the figure), which is electrically connected to the controller 10.

[0050] The freewheeling diode D1 is an energy discharge element for inductive loads. It provides a low-impedance freewheeling path for the magnetic energy stored in the electromagnet coil when the first switch Q1 or the second switch Q2 is turned off, preventing induced high voltage from damaging the power switch transistor. It also recovers some energy to reduce voltage stress and electromagnetic interference. The alarm unit is a fault indication and status feedback device. When the controller 10 detects faults such as overcurrent, short circuit, open circuit, or abnormal drive, it issues warnings to operators or the upper-level system via sound, light, communication, or level signals, assisting in quickly locating problems and improving system maintainability.

[0051] Specifically, when the first switch Q1 or the second switch Q2 is normally turned on, the main circuit current flows to ground through the supply voltage VDD, the first switch Q1, the electromagnet L, the second switch Q2, and the sampling resistor R7. The electromagnet coil establishes a magnetic field and stores energy. At this time, the freewheeling diode D1 is turned off due to reverse bias and does not participate in the main power supply circuit. The controller 10 monitors the current in real time through the sampling resistor R7 to confirm that the system is operating normally. When the controller 10 issues a shutdown command, the first switch Q1 and / or the second switch Q2 are quickly turned off, and the main power supply circuit current is forcibly interrupted. The electromagnet coil generates a reverse electromotive force due to its inductive characteristics, attempting to maintain the original current direction. At this time, the freewheeling diode D1 immediately conducts in the forward direction, forming a freewheeling circuit of "electromagnet L → freewheeling diode D1 → supply voltage VDD node". This allows the magnetic energy stored in the coil to circulate and decay in the form of current through the freewheeling diode D1, avoiding the generation of a spike voltage far exceeding the supply voltage VDD at the two ends of the switch, thereby effectively protecting the first switch Q1 and the second switch Q2 from overvoltage breakdown. This freewheeling process not only reduces the voltage stress on power devices, but also significantly suppresses voltage ringing and electromagnetic radiation during turn-off, thereby improving the electromagnetic compatibility and long-term reliability of the system.

[0052] If a short circuit fault occurs in electromagnet L, the sampling resistor R7 detects a sudden increase in current. Within microseconds, the controller 10 turns off the second switch Q2 and triggers the third switch control circuit 40 to turn off the third switch Q3, thereby disconnecting the high-side first switch Q1. During this fault turn-off process, the freewheeling diode D1 also undertakes the task of freewheeling, ensuring that the switching transistor is still protected even under large current surges, avoiding secondary damage due to overvoltage.

[0053] Meanwhile, the alarm unit continuously receives status signals from the controller 10. It remains silent during normal operation, but once the controller 10 detects a fault such as overcurrent, short circuit, drive failure, or sampling abnormality, it immediately activates the alarm unit. The alarm unit transmits fault information externally through methods such as buzzer sounding, LED flashing, serial port messages, or GPIO level changes, allowing operators to perceive the abnormality immediately and take intervention measures. Alternatively, in an automated production line, the host computer can automatically record the fault code, suspend the process, and initiate a diagnostic procedure. This mechanism transforms the protection logic, which originally existed only within the controller 10, into a perceptible and traceable external event, greatly enhancing the system's observability and operational efficiency. The freewheeling diode D1 ensures the physical safety of the power stage during dynamic switching, while the alarm unit provides the control system with intelligent feedback capabilities at the human-machine interaction and system integration levels. Together with current sampling, switch drive, and multi-level shutdown protection, they form a complete control system that combines electrical robustness and information transparency, ensuring the sewing machine electromagnet operates safely, reliably, and maintainably under various working conditions.

[0054] Based on the same inventive concept Figure 3 A flowchart of a sewing machine electromagnet control method provided in this embodiment of the invention is applied to the above-mentioned sewing machine electromagnet control circuit. (Refer to...) Figure 3 As shown, the method includes: S110. When the sewing machine is working normally, the first control signal output terminal and the second control signal output terminal output valid levels, so that both the third switch and the second switch are turned on, so that the power supply circuit is turned on, the electromagnet works, and the current signal of the power supply circuit detected by the current sampling circuit is acquired.

[0055] Specifically, during normal operation of the sewing machine, by synchronously outputting effective levels (i.e., high levels) at the first and second control signal output terminals, the third and second switches are driven to fully conduct, respectively. This establishes a complete low-impedance current path (i.e., power supply circuit) from the positive terminal of the power supply voltage through the first switch, electromagnet, second switch, and sampling resistor to ground, and the electromagnet begins to operate. This operation strictly ensures the coordinated activation of high-side and low-side power devices in terms of timing, avoiding transient overvoltage or current spikes caused by a sudden increase in bus voltage to unready devices due to a single transistor conducting first. Simultaneously, it ensures that the electromagnet establishes a stable operating current within milliseconds, allowing its magnetic field strength to quickly reach the design value, providing precise and controllable electromagnetic driving force for the sewing machine's actuator. During this process, the sampling resistor continuously converts the main circuit current into a proportional voltage signal, used to verify in real time whether the conduction state is normal and whether the load is within the expected range, providing initial reference data for subsequent protection logic, ensuring that the entire startup process combines dynamic response speed and electrical safety.

[0056] S120. Determine the operating state of the power supply circuit based on the magnitude of the current signal, and when the power supply circuit is abnormal, control the first control signal output terminal to output an invalid level and turn off the third switch to cut off the power supply circuit.

[0057] Specifically, upon receiving a current signal, the operating status of the power supply circuit can be determined based on the magnitude of the current signal. Specifically, upon receiving the current signal, the current amplitude is first determined in real time. If the current is zero or within a preset current range, the circuit is considered to be in normal operating condition. The high-side first control signal output terminal maintains a continuous effective level, keeping the main power supply path conductive. Furthermore, the low-side switch is independently controlled according to the action sequence to achieve precise power-on and power-off switching of the load, ensuring stable system operation according to predetermined logic.

[0058] If the received current signal significantly exceeds the rated current limit and remains non-zero, the circuit is determined to have entered an abnormal overcurrent state. This indicates that the load may be short-circuited or the low-side switch has lost its shut-off capability due to overheating and breakdown. At this time, regardless of whether the low-side drive signal is withdrawn, the first control signal output terminal is immediately forced to switch and output an invalid level, causing the third switch to quickly turn off. Consequently, the first switch on the main power supply circuit is synchronously turned off due to the loss of the pull-down path at the control terminal, completely cutting off the energy input from the power supply side and thus disconnecting the power supply circuit. This operation does not rely on the status feedback of the low-side switch; it is triggered solely based on the over-limit judgment of the current amplitude, ensuring reliable isolation through the high-side independent path even if the low-side path permanently fails.

[0059] Once an abnormal state is confirmed, the first control signal output terminal is continuously locked at an invalid level, preventing automatic recovery until external intervention completes fault diagnosis and reset. This prevents secondary damage caused by repeated power-on after load replacement and avoids the risk of heat accumulation and even fire due to prolonged overcurrent. The entire judgment and control process is driven entirely by the amplitude of the received current signal. Normal amplitude corresponds to maintaining conduction, while abnormal amplitude corresponds to forcibly shutting down the high-side pre-drive. Thus, steady-state operation and fault protection are seamlessly achieved under the same response mechanism, significantly improving the system's safety and reliability.

[0060] In the technical solution of this invention, when the sewing machine is working normally, the first control signal output terminal and the second control signal output terminal output valid levels, so that both the third switch and the second switch are turned on, thereby turning on the power supply circuit, activating the electromagnet, and acquiring the current signal of the power supply circuit detected by the current sampling circuit. Based on the magnitude of the current signal, the working state of the power supply circuit is determined, and when the power supply circuit is abnormal, the first control signal output terminal outputs an invalid level, turning off the third switch to disconnect the power supply circuit. Using the above method, by monitoring the current signal in real time and dynamically adjusting the level state of the control signal output terminal accordingly, the first switch can be reliably turned off in case of circuit abnormality, thereby disconnecting the power supply circuit and achieving dual isolation protection under fault conditions. This mechanism improves the system's response capability to short circuits and device damage without additional hardware, significantly enhancing operational safety and long-term reliability.

[0061] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0062] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A sewing machine electromagnet control circuit, characterized in that, It includes a controller, a first switch, a second switch, a third switch, an electromagnet, and a current sampling circuit; The first terminal of the first switch is connected to the power supply voltage, and the second terminal is electrically connected to the first terminal of the second switch through the electromagnet. The second terminal of the second switch is grounded through the current sampling circuit. The control terminal of the third switch is connected to the first control signal output terminal of the controller. The first terminal is electrically connected to the control terminal of the first switch, and the second terminal is grounded. The control terminal of the second switch is electrically connected to the second control signal output terminal of the controller. The controller is also electrically connected to the current sampling circuit.

2. The sewing machine electromagnet control circuit according to claim 1, characterized in that, It also includes a first switch control circuit; The first terminal of the first switch control circuit is electrically connected to the first terminal of the third switch, the second terminal is electrically connected to the power supply voltage, and the third terminal is electrically connected to the control terminal of the first switch.

3. The sewing machine electromagnet control circuit according to claim 2, characterized in that, The first switch control circuit includes a first resistor and a second resistor; One end of the first resistor is electrically connected to the power supply voltage, and the other end is electrically connected to the control terminal of the first switch; one end of the second resistor is electrically connected to the first terminal of the third switch, and the other end is electrically connected to the control terminal of the first switch.

4. The sewing machine electromagnet control circuit according to claim 1, characterized in that, It also includes a third switch control circuit; The first terminal of the third switch control circuit is electrically connected to the first control signal output terminal of the controller, the second terminal is electrically connected to the control terminal of the third switch, and the third terminal is electrically connected to the second terminal of the third switch.

5. The sewing machine electromagnet control circuit according to claim 4, characterized in that, The third switch control circuit includes a third resistor and a fourth resistor; One end of the third resistor is electrically connected to the control terminal of the third switch, and the other end is electrically connected to the first control signal output terminal of the controller; one end of the fourth resistor is electrically connected to the control terminal of the third switch, and the other end is electrically connected to the second terminal of the third switch.

6. The sewing machine electromagnet control circuit according to claim 1, characterized in that, The current sampling circuit includes a sampling resistor and a second switch control circuit. One end of the sampling resistor is electrically connected to the output terminal of the second switch and the signal input terminal of the controller, respectively, and the other end is grounded; One end of the second switch control circuit is electrically connected to the second control signal output terminal of the controller, the second end is electrically connected to the control terminal of the second switch, and the third end is electrically connected to the second terminal of the second switch.

7. The sewing machine electromagnet control circuit according to claim 6, characterized in that, The second switch control circuit includes a fifth resistor and a sixth resistor; The first end of the fifth resistor is electrically connected to the second control signal input terminal of the controller, and the second end is electrically connected to the control terminal of the second switch. The first end of the sixth resistor is electrically connected to the control terminal of the second switch, and the second end is electrically connected to the second terminal of the second switch.

8. The sewing machine electromagnet control circuit according to claim 1, characterized in that, The first switch includes a PMOS transistor, the second switch includes an NMOS transistor, and the third switch includes an NPN transistor.

9. The sewing machine electromagnet control circuit according to claim 1, characterized in that, It also includes a freewheeling diode; The positive terminal of the freewheeling diode is electrically connected to the first terminal of the second switch, and the negative terminal is electrically connected to the second terminal of the first switch. And / or, it also includes an alarm unit, which is electrically connected to the controller.

10. A method for controlling an electromagnet in a sewing machine, characterized in that, The method, applied to the sewing machine electromagnet control circuit according to any one of claims 1-9, comprises: When the sewing machine is working normally, the first control signal output terminal and the second control signal output terminal output valid levels, so that the third switch and the second switch are both turned on, so that the power supply circuit is turned on, the electromagnet works, and the current signal of the power supply circuit detected by the current sampling circuit is acquired. Based on the magnitude of the current signal, the operating state of the power supply circuit is determined, and when the power supply circuit is abnormal, the first control signal output terminal is controlled to output an invalid level, and the third switch is turned off to cut off the power supply circuit.