Driving control circuit of multi-channel electromagnetic coil driving equipment

Through the combination of the microcontroller MCU and the current sampling circuit, the problem of insufficient control accuracy and communication capabilities in the existing electromagnetic coil driving technology is solved, and accurate control and real-time monitoring of electromagnetic devices are achieved, and the stability and efficiency of the system are improved.

CN223260080UActive Publication Date: 2025-08-22WENZHOU POLYTECHNIC
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202422874747.1
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2024-11-25
Publication Date
2025-08-22
Estimated Expiration
2034-11-25

AI Technical Summary

Technical Problem

The existing electromagnetic coil drive technology has problems such as low control accuracy, unreal-time current monitoring, imperfect protection measures, weak communication capabilities, poor compatibility and insufficient multi-channel control, which affects the stability and efficiency of the system.

Method used

The microcontroller MCU, driving circuit and current sampling circuit are adopted to control the conduction and turn-off of the driver tube through PWM signals, combined with the current sampling circuit and voltage spike absorption circuit, precise control and real-time monitoring of electromagnetic devices are achieved, and interaction with external devices through I2C and UART communication is supported, multi-channel control is supported.

Benefits of technology

It realizes precise control of electromagnetic devices, improves the stability and reliability of the system, enhances communication capabilities and compatibility, supports multi-channel applications, and reduces the impact of power supply noise on the circuit.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN223260080U_ABST
    Figure CN223260080U_ABST
Patent Text Reader

Abstract

The utility model provides a driving control circuit of a multichannel electromagnetic coil driving device. The driving control circuit comprises a microcontroller MCU, a driving circuit and a current sampling circuit. According to the invention, the pull-in coil current can be reduced through pulse width modulation (PWM) after the relay is pulled in, and the requirements of saving energy, reducing contact loss and prolonging the service life of a device are met. The microcontroller has ADC, PWM generator, I2C and UART communication functions, and can selectively provide Bluetooth and WiFi functions to realize remote control. The MCU can be used as a board-level module to provide a multi-path electromagnetic coil driving control function for the circuit scheme through I2C and UART (Universal Asynchronous Receiver / Transmitter) functions; the MCU realizes the input of a level trigger signal and the response to the control and configuration functions of an upper computer, and the pull-in current is gradually reduced through PWM modulation after reliable pull-in of a relay by detecting the current of the coil until the pull-in current is reduced to a preset holding current, so that the lower holding current is realized, the power consumption is reduced, and the reliable action of the coil is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The utility model relates to the technical field of intelligent control of electromagnetic coil drive equipment, in particular to a drive control circuit of a multi-channel electromagnetic coil drive equipment. Background Art

[0002] Currently, a large number of relays, solenoid valves, and electromagnetic coil drive devices are used in industrial control and IoT intelligent systems. For example, in industrial high-power control applications, such as controlling the start and stop of three-phase motors, signal relay AC contactors can be used to open and close. In fluid control applications, solenoid valves can be used to control the opening and closing status of pipelines. Chinese utility model patent application number: CN201822121464.4 proposes an electromagnetic coil disconnection detection circuit and electromagnetic drive mechanism. The electromagnetic coil disconnection detection circuit of the utility model includes a first branch composed of a diode and a second branch composed of the primary side of an optocoupler. The first branch and the second branch are connected in parallel, then connected in series with the electromagnetic coil to be detected, and then connected to a power supply to form a circuit. The utility model also discloses an electromagnetic drive mechanism. The utility model uses the electromagnet drive signal as the power supply for the electromagnetic coil disconnection detection circuit. The detection circuit detects the electromagnetic coil disconnection when the controller issues the electromagnet drive signal.

[0003] In the industrial automation industry, electromagnets are used to automatically attract and release workpieces. The operating current of electromagnetic coil-driven devices is 5-10 times higher than the holding current, resulting in high power consumption and a reduced device lifespan due to coil heating and contact stress. Because the coil has a high inductance, the drive signal for high-frequency switching is automatically rectified. Therefore, high-frequency pulse width modulation (PWM) can be used to drive electromagnetic devices by adjusting the duty cycle and controlling the operating current below the rated current. However, the reduced pull-in current in this method results in a decrease in the coil force, which in turn reduces the device's vibration resistance and makes it prone to accidental contact disengagement in harsh environments.

[0004] There are some shortcomings in the existing electromagnetic coil drive technology. In traditional electromagnetic coil drive circuits, the control accuracy of electromagnetic devices is often not high enough, making it difficult to achieve accurate current regulation, which affects the performance and working effect of the electromagnetic devices.

[0005] At the same time, existing current monitoring methods also have certain limitations and cannot accurately monitor the current passing through the coil of the electromagnetic device in real time, which brings potential risks to the stability and reliability of the system.

[0006] In addition, the protection measures in traditional circuits are not perfect for the reverse electromotive force generated by the sudden change of current in the coil of the electromagnetic device, which can easily lead to damage to the transistor components and reduce the service life and reliability of the circuit.

[0007] In terms of communication, the existing electromagnetic coil drive circuit has weak communication capabilities with external devices, making it difficult to achieve efficient data transmission and interaction, which limits the system's integration and expansion capabilities.

[0008] Moreover, the compatibility of traditional circuits needs to be improved, and they are often difficult to flexibly adapt to different types of input signals and control requirements.

[0009] In addition, the existing electromagnetic coil drive circuit also has deficiencies in multi-channel control, making it difficult to effectively control multiple electromagnetic devices at the same time, affecting the system's operating efficiency and performance.

[0010] Finally, the stability of the power supply is also an issue. Power supply noise has a significant impact on the circuit and may cause circuit malfunction. Therefore, we have made improvements to this problem and proposed a drive control circuit for a multi-channel electromagnetic coil drive device. Utility Model Content

[0011] The purpose of the present invention is to address the problems raised by the existing background technology. In order to achieve the above-mentioned purpose of the present invention, the present invention provides the following technical solutions: a driving control circuit of a multi-channel electromagnetic coil driving device, comprising a microcontroller MCU, a driving circuit and a current sampling circuit; the ADC pin of the microcontroller MCU is connected to the output of the current sampling circuit, for converting the sampled voltage signal into a digital signal; the PWM generator pin is connected to the driving circuit, for outputting a PWM signal to control the conduction and cutoff of the driving tube; the I2C and UART communication pins are used to communicate with external devices; the interrupt input pin has a level clamp, for compatibility with key input or other logic control input;

[0012] Drive circuit: Consists of multiple NMOS or NPN transistors; the gate of the NPN transistor is connected to the PWM generator pin of the microcontroller MCU, the source is grounded (for NMOS transistors) or connected to the power supply (for NPN transistors), and the drain is connected to the electromagnetic device coil; a voltage spike absorption circuit is also connected between the drain and source of the transistor to protect the transistor;

[0013] The current sampling circuit includes a sampling resistor and a sampling circuit with an operational amplifier buffer;

[0014] The sampling resistor is connected in series between the source of the transistor and the ground (for NMOS transistor) or between the collector of the transistor and the power supply (for NPN transistor), and the voltage signal across the sampling resistor is connected to the ADC pin of the microcontroller MCU;

[0015] The sampling circuit with an operational amplifier buffer has a non-inverting input terminal of the operational amplifier connected to a sampling point, an inverting input terminal connected to an output terminal, and an output terminal connected to an ADC pin of a microcontroller MCU.

[0016] As the preferred technical solution of the present invention, the microcontroller MCU adopts an STM32 single-chip microcomputer or an ESP32 SOC with wireless communication function.

[0017] As a preferred technical solution of the present invention, the driving tube is an NMOS or NPN transistor.

[0018] As a preferred technical solution of the present invention, a sampling resistor or a sampling circuit with an operational amplifier buffer can be selected for low-side current sampling.

[0019] As the preferred technical solution of the present invention, the electromagnetic device coil is driven by 5V-24V DC, one end of the electromagnetic device coil is connected to the drain (for NMOS tube) or collector (for NPN tube) of the transistor in the driving circuit, and the other end is connected to the power supply.

[0020] As the preferred technical solution of the present invention, the microcontroller MCU: PA0-PA7 pins of the STM32F103C8T6 microcontroller serve as 8-way PWM output pins, which are respectively connected to the gates of 8 driver tubes; PB0-PB7 pins serve as 8-way ADC input pins, which are respectively connected to one end of 8 current sampling resistors; PC0 and PC1 pins serve as SCL and SDA pins for I2C communication; PD0 pin serves as an external button input pin, which is connected to a 3.3V power supply through a 10kΩ pull-up resistor and is grounded through a button.

[0021] As a preferred technical solution of the present invention, the gates of the eight IRF540N NMOS transistors of the driving circuit are respectively connected to the PA0-PA7 pins of the STM32F103C8T6 microcontroller; the sources are respectively connected to one end of eight 0.1Ω current sampling resistors and grounded at the same time; and the drains are respectively connected to one end of eight 12V DC relay coils.

[0022] As a preferred technical solution of the present invention, the other ends of the eight 0.1Ω current sampling resistors in the current sampling circuit are respectively connected to the PB0-PB7 pins of the STM32F103C8T6 microcontroller.

[0023] As a preferred technical solution of the present invention, the other ends of the eight 12V DC relay coils are connected to a 12V power supply.

[0024] As a preferred technical solution of the present invention, the power supply is 12V filtered by a 100nF ceramic capacitor, and the PC0 and PC1 pins of the STM32F103C8T6 microcontroller are connected to the I2C bus through a 1kΩ current-limiting resistor respectively.

[0025] Compared with the prior art, the beneficial effects of the present invention are as follows: in the solution of the present invention, the PWM signal is outputted through the PWM generator pin of the microcontroller MCU to control the conduction and cutoff of the driving tube, which can accurately adjust the average current passing through the coil of the electromagnetic device and realize precise control of the electromagnetic device.

[0026] The current sampling circuit monitors the current flowing through the coil of an electromagnetic device in real time. A sampling resistor converts the current signal into a voltage signal, which the ADC pin of the microcontroller (MCU) converts into a digital signal, facilitating real-time analysis and processing of the current.

[0027] Connecting a voltage spike snubber between the drain and source of a transistor effectively absorbs the reverse electromotive force generated by sudden current changes in the electromagnetic device's coil, protecting the transistor from damage and improving circuit reliability and stability. The microcontroller's I2C and UART communication pins enable communication with external devices, enabling data transmission and interaction, facilitating system integration and expansion.

[0028] The interrupt input pin features a level clamp, compatible with key inputs or other logic control inputs, increasing circuit flexibility and versatility. The driver control circuit can simultaneously control multiple electromagnetic devices, meeting the needs of multi-channel applications and improving system efficiency and performance.

[0029] Power filtering through capacitors provides a stable power supply, reduces the impact of power supply noise on the circuit, and ensures normal operation. The current sampling circuit includes a sampling resistor and a sampling circuit with an operational amplifier buffer. The appropriate sampling method can be selected based on actual needs, improving the circuit's adaptability. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 MCU circuit diagram provided by the utility model;

[0031] Figure 2 This is a schematic diagram of the external control interface circuit provided by the utility model;

[0032] Figure 3 This is a schematic diagram of the current sensing resistor exclusion circuit provided by the utility model;

[0033] Figure 4 This is a schematic diagram of the programming interface circuit provided by the utility model;

[0034] Figure 5A schematic diagram of the drive tube circuit provided by the utility model;

[0035] Figure 6 A schematic diagram of a flywheel circuit provided by the utility model;

[0036] Figure 7 This is a schematic diagram of the single chip microcomputer configuration circuit provided by the utility model. DETAILED DESCRIPTION

[0037] To make the purpose, technical solutions and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be described clearly and completely in conjunction with the accompanying drawings. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of them.

[0038] Therefore, the following detailed description of the embodiments of the present invention is not intended to limit the scope of the claimed invention, but merely represents some embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention. It should be noted that, in the absence of conflict, the embodiments of the present invention and the features and technical solutions therein can be combined with each other. It should be noted that similar numbers and letters represent similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.

[0039] Example 1: Please refer to Figure 1-Figure 7 A drive control circuit for a multi-channel electromagnetic coil drive device includes a microcontroller (MCU), a drive circuit, and a current sampling circuit. The ADC pin of the microcontroller (MCU) is connected to the output of the current sampling circuit to convert the sampled voltage signal into a digital signal. The PWM generator pin is connected to the drive circuit to output a PWM signal to control the on and off of the drive tube. The I2C and UART communication pins are used to communicate with external devices. The interrupt input pin has a level clamp to be compatible with key input or other logic control input.

[0040] Drive circuit: Consists of multiple NMOS or NPN transistors; the gate of the NPN transistor is connected to the PWM generator pin of the microcontroller MCU, the source is grounded (for NMOS transistors) or connected to the power supply (for NPN transistors), and the drain is connected to the electromagnetic device coil; a voltage spike absorption circuit is also connected between the drain and source of the transistor to protect the transistor;

[0041] The current sampling circuit includes a sampling resistor and a sampling circuit with an operational amplifier buffer;

[0042] The sampling resistor is connected in series between the source and ground of the transistor (for NMOS transistor) or between the collector and power supply of the transistor (for NPN transistor). The voltage signal across the sampling resistor is connected to the ADC pin of the microcontroller MCU.

[0043] A sampling circuit with an operational amplifier buffer, wherein the non-inverting input terminal of the operational amplifier is connected to the sampling point, the inverting input terminal is connected to the output terminal, and the output terminal is connected to the ADC pin of the microcontroller MCU.

[0044] The microcontroller MCU uses an STM32 microcontroller or an ESP32 SOC with wireless communication function.

[0045] The driving tube is an NMOS or NPN transistor.

[0046] Low-side current sampling can use a sampling resistor or a sampling circuit with an operational amplifier buffer.

[0047] The electromagnetic device coil is driven by 5V-24V DC. One end of the electromagnetic device coil is connected to the drain (for NMOS tube) or collector (for NPN tube) of the transistor in the driving circuit, and the other end is connected to the power supply.

[0048] Microcontroller MCU: The PA0-PA7 pins of the STM32F103C8T6 microcontroller serve as 8-channel PWM output pins, which are respectively connected to the gates of 8 driver tubes; the PB0-PB7 pins serve as 8-channel ADC input pins, which are respectively connected to one end of 8 current sampling resistors; the PC0 and PC1 pins serve as the SCL and SDA pins for I2C communication; the PD0 pin serves as an external button input pin, which is connected to a 3.3V power supply through a 10kΩ pull-up resistor and is grounded through a button.

[0049] The gates of the eight IRF540N NMOS transistors in the driver circuit are connected to the PA0-PA7 pins of the STM32F103C8T6 microcontroller; the sources are connected to one end of eight 0.1Ω current sampling resistors and grounded at the same time; and the drains are connected to one end of eight 12V DC relay coils.

[0050] The other ends of the eight 0.1Ω current sampling resistors in the current sampling circuit are connected to the PB0-PB7 pins of the STM32F103C8T6 microcontroller respectively.

[0051] The other ends of the 8 12V DC relay coils are connected to the 12V power supply.

[0052] The power supply is 12V and filtered by a 100nF ceramic capacitor. The PC0 and PC1 pins of the STM32F103C8T6 microcontroller are connected to the I2C bus through a 1kΩ current-limiting resistor.

[0053] The working principle of the drive control circuit of the multi-channel electromagnetic coil drive device is as follows:

[0054] The microcontroller (MCU) (STM32 or ESP32 SoC) serves as the core control unit. Its PWM generator pins output PWM signals that are connected to the driver circuit. The driver circuit consists of eight IRF540N NMOS transistors, whose gates are connected to the MCU's PWM generator pins (pins PA0-PA7 on the STM32F103C8T6). When the PWM signal is high, the NMOS transistors turn on; when the PWM signal is low, the NMOS transistors turn off. By controlling the duty cycle of the PWM signal, the average current flowing through the electromagnetic device coil can be controlled, thereby achieving control of the electromagnetic device.

[0055] The electromagnetic device coil is driven by a 12V DC power supply. One end of the coil is connected to the drain of an NMOS transistor in the drive circuit, and the other end is connected to a 12V power supply. A 0.1Ω current sampling resistor is connected in series between the source of the NMOS transistor and ground to sample the current flowing through the electromagnetic device coil. When current flows through the sampling resistor, a voltage drop is generated. This voltage signal is connected to an ADC pin of the microcontroller (MCU) (pins PB0-PB7 of the STM32F103C8T6). The ADC pin of the MCU converts the sampled voltage signal into a digital signal. By analyzing and processing this digital signal, the current flowing through the electromagnetic device coil can be monitored in real time.

[0056] In order to protect the NMOS transistor, a voltage spike absorption circuit is connected between the drain and source of the transistor.

[0057] In the sampling circuit with an operational amplifier buffer, the non-inverting input of the operational amplifier is connected to the sampling point, and the inverting input is connected to the output, forming a voltage follower structure that plays a buffering and isolation role. Its output is connected to the ADC pin of the microcontroller MCU for current sampling.

[0058] The I2C and UART communication pins of the microcontroller MCU are used to communicate with external devices, enabling data transmission and interaction. The interrupt input pins have level clamps to accommodate key inputs or other logic control inputs. When an external interrupt signal is input, the microcontroller MCU can respond promptly and perform appropriate processing.

[0059] The power supply is 12V, filtered by a 100nF ceramic capacitor to provide a stable power supply. The PC0 and PC1 pins of the STM32F103C8T6 microcontroller serve as the SCL and SDA pins for I2C communication. They are connected to the I2C bus through a 1kΩ current-limiting resistor, enabling communication with external I2C devices. The PD0 pin, serving as an external key input pin, is connected to the 3.3V power supply through a 10kΩ pull-up resistor and grounded via a button to receive external key input signals.

[0060] Example 2: A drive control circuit for a multi-channel electromagnetic coil drive device. The microcontroller includes an ADC, PWM generator, I2C, and UART communication capabilities, and optionally provides Bluetooth and WiFi functionality for remote control. The interrupt inputs of the microcontroller MCU are level-clamped to facilitate compatibility with key inputs or other logic control inputs, enabling direct compatibility when replacing existing devices. Furthermore, the microcontroller MCU can provide multi-channel electromagnetic coil drive control functionality as a board-level module for the circuit solution through I2C and UART functionality.

[0061] The coil current is sampled by a resistor and converted into a voltage signal, which is then sampled by the microcontroller. Current sampling can also be buffered using an op amp, enabling accurate current sampling with a smaller sampling resistor. The sampled current is then converted into a digital signal via the ADC of the microcontroller (MCU) for program processing.

[0062] The coil is driven by multiple NMOS or NPN transistors, which switch on and off. When switching, the transistors should operate in their saturation region. Their maximum operating voltage should be less than the relay's supply voltage. The circuit also includes a voltage spike absorption circuit to prevent high voltage breakdown caused by the coil's inductance when switching the transistors. A current sampling circuit is connected to the transistor's low-side to monitor the coil current.

[0063] The microcontroller MCU uses an STM32 microcontroller or an ESP32 SoC with wireless communication capabilities. The MCU's ADC pin is connected to the output of the current sampling circuit to convert the sampled voltage signal into a digital signal. The PWM generator pin is connected to the driver circuit to output a PWM signal to control the on and off state of the driver transistor. I2C and UART communication pins are used for communication with external devices. The interrupt input pin has a level clamp to accommodate key input or other logic control inputs.

[0064] The driver circuit consists of multiple NMOS or NPN transistors. The gates of the transistors are connected to the PWM generator pins of the microcontroller (MCU), the sources are connected to ground (for NMOS transistors) or to the power supply (for NPN transistors), and the drains are connected to the coil of the electromagnetic device. A voltage spike snubber circuit is also connected between the drain and source of the transistors to protect the transistors.

[0065] The current sampling circuit uses either a sampling resistor or a sampling circuit with an op amp buffer. If a sampling resistor is used, it should be connected in series between the transistor's source and ground (for NMOS transistors) or between the transistor's collector and the power supply (for NPN transistors). The voltage across the sampling resistor is connected to an ADC pin on the microcontroller (MCU). If a sampling circuit with an op amp buffer is used, the op amp's non-inverting input is connected to the sampling point, its inverting input is connected to the output, and the output is connected to an ADC pin on the MCU.

[0066] The coil of the electromagnetic device is driven by 5V-24V DC. One end of the coil is connected to the drain (for NMOS tube) or collector (for NPN tube) of the transistor in the driving circuit, and the other end is connected to the power supply.

[0067] When receiving an external button command or a host computer control command, if it is detected that the average current of the coil under the same duty cycle increases by more than a certain threshold, it is determined that the current adsorption is unstable and there is a risk of contact disconnection or contact disconnection has already occurred. At this time, the microcontroller MCU will issue a command to gradually increase the duty cycle or directly use the maximum output to avoid coil attraction failure.

[0068] When the coil is not in the energized state, the main control enters sleep mode and is awakened by external input to reduce the static power consumption of this solution.

[0069] When configured in automatic recovery mode, the microcontroller MCU will periodically save the current coil activation status and automatically restore it to the last state after the next power failure and recovery.

[0070] When the difference between the coil holding current and the preset value exceeds the threshold and the difference cannot be reduced by increasing the coil duty cycle, the microcontroller MCU will set an alarm level at the alarm output port to indicate an abnormal working state.

[0071] Microcontroller (MCU): An STM32F103C8T6 single-chip microcontroller is selected. The driver transistor is an IRF540N NMOS transistor. The current sampling resistor is a 0.1Ω high-precision metal film resistor. The electromagnetic device coil is a 12V DC relay coil. A 100nF ceramic capacitor is used for power supply filtering. Resistors: Pull-up resistor: 10kΩ for key input pull-up. Current limiting resistor: 1kΩ for current limiting on the I2C bus.

[0072] Microcontroller MCU: The PA0-PA7 pins of the STM32F103C8T6 microcontroller serve as eight PWM output pins, connected to the gates of eight driver transistors. The PB0-PB7 pins serve as eight ADC input pins, connected to one end of eight current-sampling resistors. The PC0 and PC1 pins serve as the SCL and SDA pins for I2C communication. The PD0 pin serves as an external button input pin, connected to a 3.3V power supply through a 10kΩ pull-up resistor and to ground through a button.

[0073] Drive circuit: The gates of eight IRF540N NMOS transistors are connected to pins PA0-PA7 of the STM32F103C8T6 microcontroller. Their sources are connected to one end of eight 0.1Ω current-sampling resistors and grounded. Their drains are connected to one end of eight 12V DC relay coils.

[0074] Current sampling circuit: The other ends of eight 0.1Ω current sampling resistors are connected to the PB0-PB7 pins of the STM32F103C8T6 microcontroller.

[0075] Electromagnetic device coils: The other ends of the 8 12V DC relay coils are connected to a 12V power supply.

[0076] Power supply part: The 12V power supply is filtered by a 100nF ceramic capacitor.

[0077] I2C communication part: The PC0 and PC1 pins of the STM32F103C8T6 microcontroller are connected to the I2C bus through a 1kΩ current-limiting resistor.

[0078] Example 3: A drive control circuit for a multi-channel electromagnetic coil drive device, microcontroller MCU: an STM32F407ZGT6 single-chip microcomputer is selected, its PA8-PA15 pins are used as 8-channel PWM output pins, PB8-PB15 pins are used as 8-channel ADC input pins, PC10 and PC11 pins are used as SCL and SDA pins for I2C communication, and PD1 pin is used as an external button input pin, which is connected to a 3.3V power supply through a 10kΩ pull-up resistor and grounded through a button.

[0079] The drive circuit uses eight IRF3205 NMOS transistors. Their gates are connected to pins PA8-PA15 of the STM32F407ZGT6 microcontroller, their sources are connected to one end of eight 0.05Ω current sampling resistors and grounded, and their drains are connected to one end of eight 24V DC solenoid valve coils.

[0080] Current sampling circuit: The other ends of eight 0.05Ω current sampling resistors are connected to pins PB8-PB15 of the STM32F407ZGT6 microcontroller. A sampling circuit with an operational amplifier buffer is also provided as a backup sampling method. The non-inverting input of the operational amplifier is connected to the sampling point, and the inverting input is connected to the output. The output is then connected to an ADC pin of the STM32F407ZGT6 microcontroller.

[0081] Electromagnetic device coils: Select 8 24V DC solenoid valve coils, one end of which is connected to the drain of the NMOS transistor in the drive circuit, and the other end is connected to the 24V power supply.

[0082] Power supply: The 24V power supply is filtered by a 220μF electrolytic capacitor and a 100nF ceramic capacitor.

[0083] Communication interface: The PC10 and PC11 pins of the STM32F407ZGT6 microcontroller are connected to the I2C bus through a 1kΩ current-limiting resistor for communication with external devices.

[0084] The operating principle of the drive control circuit for a multi-channel electromagnetic coil drive device: The STM32F407ZGT6 microcontroller outputs PWM signals through its PWM generator pins (PA8-PA15) to control the on / off switching of the NMOS transistor. When the PWM signal is high, the NMOS transistor turns on, and the 24V power supply forms a loop through the electromagnetic device coil and the NMOS transistor, generating a magnetic field. When the PWM signal is low, the NMOS transistor turns off, breaking the loop and eliminating the magnetic field. By adjusting the duty cycle of the PWM signal, the average current flowing through the electromagnetic device coil can be controlled, thereby achieving precise control of the electromagnetic device.

[0085] When the NMOS transistor is turned on, current flows through the electromagnetic device coil and the current sampling resistor. A voltage drop is generated across the current sampling resistor, and this voltage signal is input to the STM32F407ZGT6 microcontroller via ADC input pins (PB8-PB15). The ADC module within the microcontroller converts the analog voltage signal into a digital signal. By analyzing and processing this digital signal, the current flowing through the electromagnetic device coil can be monitored in real time.

[0086] To protect the NMOS transistor, a voltage spike absorption circuit is connected between its drain and source. When the NMOS transistor is rapidly turned off, the current in the electromagnetic device's coil cannot change suddenly, generating a reverse electromotive force. This electromotive force can cause a voltage spike between the drain and source of the NMOS transistor. The voltage spike absorption circuit absorbs this voltage spike, protecting the NMOS transistor from damage.

[0087] A sampling circuit with an operational amplifier buffer serves as a backup sampling method. This circuit can be used when the current sampling resistor fails or when more accurate current sampling is required. The operational amplifier's non-inverting input is connected to the sampling point, while its inverting input is connected to the output, forming a voltage follower structure that provides buffering and isolation. Its output is connected to the ADC pin of the STM32F407ZGT6 microcontroller for current sampling.

[0088] The STM32F407ZGT6 microcontroller's I2C communication pins (PC10 and PC11) are used to communicate with external devices, enabling data transmission and interaction. For example, current sampling data and electromagnetic device operating status information can be sent to external devices, or control commands from external devices can be received to control the electromagnetic devices accordingly.

[0089] The interrupt input pin (PD1) features a level clamp to accommodate key inputs or other logic control inputs. When an external key is pressed, the voltage level on the PD1 pin changes, generating an interrupt signal. The STM32F407ZGT6 microcontroller responds to this interrupt signal and executes the appropriate interrupt service routine, such as stopping the electromagnetic device or switching operating modes.

[0090] The above embodiments are only used to illustrate the present invention and are not intended to limit the technical solutions described in the present invention. Although this specification has described the present invention in detail with reference to the above embodiments, the present invention is not limited to the above specific implementation methods. Therefore, any modification or replacement of the present invention; and all technical solutions and improvements that do not depart from the spirit and scope of the utility model are included in the scope of the claims of the present invention.

Claims

1. A driving control circuit for a multi-channel electromagnetic coil driving device, characterized in that: It includes a microcontroller MCU, a drive circuit and a current sampling circuit; the ADC pin of the microcontroller MCU is connected to the output of the current sampling circuit; the PWM generator pin is connected to the drive circuit; the I2C and UART communication pins communicate with external devices; the interrupt input pin has a level clamp; The drive circuit is composed of multiple NMOS or NPN transistors; the gate of the NPN transistor is connected to the PWM generator pin of the microcontroller MCU, the source is grounded or connected to the power supply, and the drain is connected to the coil of the electromagnetic device; a voltage spike absorption circuit is also connected between the drain and source of the transistor; The current sampling circuit includes a sampling resistor and a sampling circuit with an operational amplifier buffer; The sampling resistor is connected in series between the source of the transistor and the ground or between the collector of the transistor and the power supply, and the voltage signal at both ends of the sampling resistor is connected to the ADC pin of the microcontroller MCU; The sampling circuit with an operational amplifier buffer has a non-inverting input terminal of the operational amplifier connected to a sampling point, an inverting input terminal connected to an output terminal, and an output terminal connected to an ADC pin of a microcontroller MCU.

2. The driving control circuit of a multi-channel electromagnetic coil driving device according to claim 1, characterized in that: The microcontroller MCU adopts an STM32 single-chip microcomputer or an ESP32SOC with a wireless communication function.

3. The driving control circuit of a multi-channel electromagnetic coil driving device according to claim 1, characterized in that: It also includes a driving tube, which is an NMOS or NPN transistor.

4. The driving control circuit of a multi-channel electromagnetic coil driving device according to claim 1, characterized in that: The low-side current of the microcontroller MCU is selected from a sampling resistor or a sampling circuit with an operational amplifier buffer.

5. The driving control circuit of a multi-channel electromagnetic coil driving device according to claim 1, characterized in that: The electromagnetic device coil is driven by 5V-24V DC, one end of the electromagnetic device coil is connected to the drain or collector of the transistor in the driving circuit, and the other end is connected to the power supply.

6. The driving control circuit of a multi-channel electromagnetic coil driving device according to claim 1, characterized in that: The PA0-PA7 pins of the STM32F103C8T6 microcontroller MCU serve as 8-way PWM output pins, which are respectively connected to the gates of 8 driver tubes; the PB0-PB7 pins serve as 8-way ADC input pins, which are respectively connected to one end of 8 current sampling resistors; the PC0 and PC1 pins serve as the SCL and SDA pins for I2C communication; and the PD0 pin serves as an external button input pin, which is connected to a 3.3V power supply through a 10kΩ pull-up resistor and is grounded through a button.

7. The driving control circuit of a multi-channel electromagnetic coil driving device according to claim 1, characterized in that: The gates of the eight IRF540N NMOS transistors of the driving circuit are respectively connected to the PA0-PA7 pins of the STM32F103C8T6 single-chip microcomputer; the sources are respectively connected to one end of eight 0.1Ω current sampling resistors and grounded at the same time; and the drains are respectively connected to one end of eight 12V DC relay coils.

8. The driving control circuit of a multi-channel electromagnetic coil driving device according to claim 1, characterized in that: The other ends of the eight 0.1Ω current sampling resistors in the current sampling circuit are respectively connected to the PB0-PB7 pins of the STM32F103C8T6 single chip microcomputer.

9. The driving control circuit of a multi-channel electromagnetic coil driving device according to claim 7, characterized in that: The other end of the DC relay coil is connected to a 12V power supply.

10. The driving control circuit of a multi-channel electromagnetic coil driving device according to claim 9, characterized in that: The power supply is 12V and is filtered through a 100nF ceramic capacitor. The PC0 and PC1 pins of the STM32F103C8T6 microcontroller are connected to the I2C bus through a 1kΩ current-limiting resistor.

Citation Information

Patent Citations

  • Electromagnet coil breakage detection circuit and electromagnetic driving mechanism

    CN209231446U