A digital circuit acquisition circuit based on isolating switch signal input
By combining the main control circuit, drive circuit, pulse transformer circuit, and comparator circuit, the problem of requiring an additional power supply for digital circuits to acquire switching signals in the prior art is solved, thereby simplifying the circuit and improving anti-interference capability.
Patent Information
- Application Number
- CN202522213809.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-20
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2035-10-20
AI Technical Summary
Existing digital circuits require additional power for switching signal acquisition, have complex circuit structures, low isolation, and poor anti-interference capabilities.
The circuit employs a main control circuit, a drive circuit, a pulse transformer circuit, and a comparator circuit. It acquires switching signals through electromagnetic isolation, uses NPN and PNP transistors to drive the pulse transformer, and combines resistors, capacitors, and diodes for absorption and filtering to achieve a circuit structure that does not require an external power supply.
It achieves a circuit structure that does not require an external power supply, improves isolation and anti-interference capabilities, and simplifies circuit design.
Smart Images

Figure CN224985746U_ABST
Abstract
Description
Technical Field
[0001] This utility model belongs to the field of embedded digital control technology, and in particular relates to a digital circuit acquisition circuit based on the signal input of an isolating switch. Background Technology
[0002] Currently, in existing technologies, digital circuits mainly include the following for acquiring switching signals: direct non-isolated acquisition circuits, which are simple and low-cost, but lack isolation protection and have poor anti-interference capabilities. Optical isolation acquisition circuit has electrical isolation and strong anti-interference ability, but requires an external power supply to power the input side; The relay isolation acquisition circuit has physical isolation and good isolation performance, but it still requires an external power supply to drive the relay coil. Dedicated IC module acquisition circuits are highly integrated and reliable, but they also require an additional power supply. Utility Model Content
[0003] To address the aforementioned shortcomings in the existing technology, this utility model provides a digital circuit acquisition circuit based on isolating switch signal input, which solves the problems of requiring an additional power supply, complex circuit structure, low isolation, and poor anti-interference capability when acquiring single switch signals.
[0004] To achieve the above objectives, the technical solution adopted by this utility model is as follows: a digital circuit acquisition circuit based on the signal input of an isolating switch, comprising: a main control circuit, a drive circuit, a pulse transformer circuit, and a comparator circuit; The main control circuit is connected to the drive circuit and the comparator circuit respectively; the drive circuit is connected to the pulse transformer circuit; and the pulse transformer circuit is connected to the comparator circuit.
[0005] The beneficial effects of this utility model are as follows: By setting up a pulse transformer circuit and a comparator circuit, this utility model electromagnetically isolates the switch line from the control circuit, realizing that no additional power supply is required when acquiring a single switch signal, simplifying the circuit structure, and improving isolation and anti-interference capabilities.
[0006] Furthermore, the main control circuit includes: a microcontroller U1, a resistor R1, and a polarized capacitor E3; Pin 4 of the microcontroller U1 is connected to pins 5 and 6 of the microcontroller U1 and is connected to a +3.3V voltage; pin 7 of the microcontroller U1 is grounded; pin 10 of the microcontroller U1 is connected to one end of resistor R1 and the positive terminal of polarized capacitor E3; one end of resistor R1 is connected to a +3.3V voltage; the negative terminal of polarized capacitor E3 is grounded. Pin 25 of the microcontroller U1 is connected to the comparator circuit; pin 29 of the microcontroller U1 is connected to the driver circuit.
[0007] Furthermore, the driving circuit includes: an NPN transistor Q1, a PNP transistor Q2, resistors R2, R3, R4, and R5; One end of resistor R2 is connected to pin 29 of microcontroller U1; the base of NPN transistor Q1 is connected to the other end of resistor R2 and one end of resistor R3; the other end of resistor R3 is grounded; the emitter of NPN transistor Q1 is grounded; the collector of NPN transistor Q1 is connected to one end of resistor R4 and one end of resistor R5; the other end of resistor R4 is connected to a +5V voltage. The base of the PNP transistor Q2 is connected to the other end of the resistor R5; the emitter of the PNP transistor Q2 is connected to a +5V voltage; and the collector of the PNP transistor Q2 is connected to the pulse transformer circuit.
[0008] The beneficial effects of the above-mentioned further solutions are as follows: This utility model achieves efficient driving of pulse transformers by setting up the connection and application of NPN type transistors and PNP type transistors.
[0009] Furthermore, the pulse transformer circuit includes: a pulse transformer B1, an isolating switch KA, a resistor R6, a capacitor C1, and a diode D1; Pin 1 of the pulse transformer B1 is connected to one end of resistor R6, one end of capacitor C1, and the collector of PNP transistor Q2; pin 2 of the pulse transformer B1 is connected to the anode of diode D1 and the comparator circuit; the cathode of diode D1 is connected to the other end of resistor R6 and the other end of capacitor C1; pin 3 of the pulse transformer B1 is connected to one end of disconnect switch KA; and pin 4 of the pulse transformer B1 is connected to the other end of disconnect switch KA.
[0010] The beneficial effects of the above-mentioned further solutions are as follows: This utility model uses resistor R6, capacitor C1 and diode D1 to absorb the pulse transformer B1, preventing the device from being damaged due to excessive voltage and improving the reliability of the circuit. By connecting pins 3 and 4 of pulse transformer B1 to the leads of KA disconnect switch, the switch line and control circuit are electromagnetically isolated by pulse transformer B1. This achieves the goal of eliminating the need for an additional power supply, resulting in a simple circuit with strong anti-interference capabilities and significant advantages in digital circuit applications.
[0011] Furthermore, the comparator circuit includes: comparator IC1, current sampling resistor RS, resistor R7, resistor R8, resistor R9, resistor R10, diode D2, and capacitor C2; Pin 3 of comparator IC1 is connected to one end of capacitor C2, one end of resistor R7, and the cathode of diode D2; the anode of diode D2 is connected to one end of current sampling resistor RS, the anode of diode D1, and pin 4 of pulse transformer B1; the other end of capacitor C2 is grounded; the other end of resistor R7 is grounded; the other end of current sampling resistor RS is grounded. Pin 2 of comparator IC1 is connected to one end of resistor R9 and one end of resistor R8; the other end of resistor R9 is connected to +5V voltage; the other end of resistor R8 is grounded. Pin 4 of comparator IC1 is grounded; pin 8 of comparator IC1 is connected to +5V; pin 1 of comparator IC1 is connected to one end of resistor R10 and pin 25 of microcontroller U1; the other end of resistor R10 is connected to +3.3V.
[0012] The beneficial effects of the above-mentioned further solutions are: the circuit of this utility model has a small operating current and small component size, which can be directly installed on the PCB, and the overall PCB area occupied is small. Attached Figure Description
[0013] Figure 1 This is the circuit schematic diagram of this utility model.
[0014] Figure 2 This is the circuit schematic of the main control circuit in this embodiment.
[0015] Figure 3 This is a circuit diagram of the driving circuit in this embodiment.
[0016] Figure 4 This is a circuit diagram of the pulse transformer circuit in this embodiment.
[0017] Figure 5 This is the circuit schematic of the comparator circuit in this embodiment. Detailed Implementation
[0018] The specific embodiments of this utility model are described below to enable those skilled in the art to understand this utility model. However, it should be understood that this utility model is not limited to the scope of the specific embodiments. For those skilled in the art, as long as various changes are within the spirit and scope of this utility model as defined and determined by the appended claims, these changes are obvious. All utility model creations utilizing the concept of this utility model are within the scope of protection.
[0019] Before describing this embodiment, the following terms will be explained: PWM: Pulse Width Modulation.
[0020] Example like Figure 1 As shown, this utility model provides a digital circuit acquisition circuit based on the signal input of an isolating switch, including: a main control circuit, a drive circuit, a pulse transformer circuit, and a comparator circuit; The main control circuit is connected to the drive circuit and the comparator circuit respectively; the drive circuit is connected to the pulse transformer circuit; and the pulse transformer circuit is connected to the comparator circuit.
[0021] The main control circuit includes: a microcontroller U1, a resistor R1, and a polarized capacitor E3; Pin 4 of the microcontroller U1 is connected to pins 5 and 6 of the microcontroller U1 and is connected to a +3.3V voltage; pin 7 of the microcontroller U1 is grounded; pin 10 of the microcontroller U1 is connected to one end of resistor R1 and the positive terminal of polarized capacitor E3; one end of resistor R1 is connected to a +3.3V voltage; the negative terminal of polarized capacitor E3 is grounded. Pin 25 of the microcontroller U1 is connected to the comparator circuit; pin 29 of the microcontroller U1 is connected to the driver circuit.
[0022] In this embodiment, the microcontroller U1 is an STM32G030C8T6, which outputs a PWM pulse with a frequency of 40KHz and a duty cycle of 40% through pin 29 (PA9); and is reset through the RESET interface.
[0023] The driving circuit includes: an NPN transistor Q1, a PNP transistor Q2, resistors R2, R3, R4, and R5; One end of resistor R2 is connected to pin 29 of microcontroller U1; the base of NPN transistor Q1 is connected to the other end of resistor R2 and one end of resistor R3; the other end of resistor R3 is grounded; the emitter of NPN transistor Q1 is grounded; the collector of NPN transistor Q1 is connected to one end of resistor R4 and one end of resistor R5; the other end of resistor R4 is connected to a +5V voltage. The base of the PNP transistor Q2 is connected to the other end of the resistor R5; the emitter of the PNP transistor Q2 is connected to a +5V voltage; and the collector of the PNP transistor Q2 is connected to the pulse transformer circuit.
[0024] In this embodiment, the driving circuit receives the PWM pulse output from pin 29 of the microcontroller U1 and drives the pulse transformer B1.
[0025] The pulse transformer circuit includes: pulse transformer B1, disconnect switch KA, resistor R6, capacitor C1, and diode D1; Pin 1 of the pulse transformer B1 is connected to one end of resistor R6, one end of capacitor C1, and the collector of PNP transistor Q2; pin 2 of the pulse transformer B1 is connected to the anode of diode D1 and the comparator circuit; the cathode of diode D1 is connected to the other end of resistor R6 and the other end of capacitor C1; pin 3 of the pulse transformer B1 is connected to one end of disconnect switch KA; and pin 4 of the pulse transformer B1 is connected to the other end of disconnect switch KA.
[0026] In this embodiment, resistor R6, capacitor C1, and diode D1 form the absorption circuit of pulse transformer B1 for absorption and buffering.
[0027] The comparator circuit includes: comparator IC1, current sampling resistor RS, resistor R7, resistor R8, resistor R9, resistor R10, diode D2, and capacitor C2; Pin 3 of comparator IC1 is connected to one end of capacitor C2, one end of resistor R7, and the cathode of diode D2; the anode of diode D2 is connected to one end of current sampling resistor RS, the anode of diode D1, and pin 4 of pulse transformer B1; the other end of capacitor C2 is grounded; the other end of resistor R7 is grounded; the other end of current sampling resistor RS is grounded. Pin 2 of comparator IC1 is connected to one end of resistor R9 and one end of resistor R8; the other end of resistor R9 is connected to +5V voltage; the other end of resistor R8 is grounded. Pin 4 of comparator IC1 is grounded; pin 8 of comparator IC1 is connected to +5V; pin 1 of comparator IC1 is connected to one end of resistor R10 and pin 25 of microcontroller U1; the other end of resistor R10 is connected to +3.3V.
[0028] In this embodiment, the current sampling resistor RS converts the current flowing through the pulse transformer B1 into a voltage signal; The converted voltage signal is filtered by a filter circuit consisting of diode D2, resistor R7 and capacitor C2, and then input to pin 3 (non-inverting input) of comparator IC1. A voltage divider circuit is formed using resistors R8 and R9 to provide a 2.5V reference voltage to pin 2 (inverting input) of comparator IC1.
[0029] In this embodiment, when the isolating switch KA is not pressed, the sampling voltage at pin 3 of comparator IC1 is lower than the reference voltage of 2.5V at pin 2. Comparator IC1 outputs a low level input to pin 25 of microcontroller U1 (i.e., PB13 input state), and microcontroller U1 does not detect the switch signal. Conversely, when the isolating switch KA is pressed, the equivalent impedance of the pulse transformer B1 is greatly reduced due to the short circuit between pins 3 and 4. As a result, the current flowing through the pulse transformer B1 increases, and the sampling voltage RS also increases. The sampling voltage at pin 3 of comparator IC1 is greater than the reference voltage of 2.5V at pin 2. The output of comparator IC1 is high and input to pin 25 of microcontroller U1 (i.e., the input state of PB13). Microcontroller U1 will then detect the switch signal.
[0030] In this embodiment, a high-frequency PWM signal is output by a microcontroller (or other digital controller) to drive a pulse transformer (electrically isolated) through a drive circuit. Then, the current flowing through the pulse transformer is converted into a voltage signal through a sampling resistor connected in series with the pulse transformer. A stable DC signal is then obtained through a filter circuit. This signal is then compared with a reference voltage to output a switch signal that is consistent with the state of the external isolating switch and input to the microcontroller. The key wiring table is shown below.
[0031] This invention solves the problem of not needing an additional power supply when acquiring a single switch signal, simplifies the circuit structure, and achieves good isolation and strong anti-interference capability.
Claims
1. A digital circuit acquisition circuit based on isolator signal input, characterized by, include: Main control circuit, drive circuit, pulse transformer circuit, and comparator circuit; The main control circuit is connected to the drive circuit and the comparator circuit respectively; The driving circuit is connected to the pulse transformer circuit; the pulse transformer circuit is connected to the comparator circuit.
2. The disconnector signal input based digital circuit acquisition circuit according to claim 1, characterized in that, The main control circuit includes: a microcontroller U1, a resistor R1, and a polarized capacitor E3; Pin 4 of the microcontroller U1 is connected to pins 5 and 6 of the microcontroller U1 and is connected to a +3.3V voltage; pin 7 of the microcontroller U1 is grounded; pin 10 of the microcontroller U1 is connected to one end of resistor R1 and the positive terminal of polarized capacitor E3; one end of resistor R1 is connected to a +3.3V voltage; the negative terminal of polarized capacitor E3 is grounded. Pin 25 of the microcontroller U1 is connected to the comparator circuit; pin 29 of the microcontroller U1 is connected to the driver circuit.
3. The digital circuit acquisition circuit based on the signal input of the isolating switch according to claim 2, characterized in that, The driving circuit includes: an NPN transistor Q1, a PNP transistor Q2, resistors R2, R3, R4, and R5; One end of resistor R2 is connected to pin 29 of microcontroller U1; the base of NPN transistor Q1 is connected to the other end of resistor R2 and one end of resistor R3; the other end of resistor R3 is grounded; the emitter of NPN transistor Q1 is grounded; the collector of NPN transistor Q1 is connected to one end of resistor R4 and one end of resistor R5; the other end of resistor R4 is connected to a +5V voltage. The base of the PNP transistor Q2 is connected to the other end of the resistor R5; the emitter of the PNP transistor Q2 is connected to a +5V voltage; and the collector of the PNP transistor Q2 is connected to the pulse transformer circuit.
4. The digital circuit acquisition circuit based on the signal input of the isolating switch according to claim 3, characterized in that, The pulse transformer circuit includes: pulse transformer B1, disconnect switch KA, resistor R6, capacitor C1, and diode D1; Pin 1 of the pulse transformer B1 is connected to one end of resistor R6, one end of capacitor C1, and the collector of PNP transistor Q2; pin 2 of the pulse transformer B1 is connected to the anode of diode D1 and the comparator circuit; the cathode of diode D1 is connected to the other end of resistor R6 and the other end of capacitor C1; pin 3 of the pulse transformer B1 is connected to one end of disconnect switch KA; and pin 4 of the pulse transformer B1 is connected to the other end of disconnect switch KA.
5. The digital circuit acquisition circuit based on the signal input of the isolating switch according to claim 4, characterized in that, The comparator circuit includes: comparator IC1, current sampling resistor RS, resistor R7, resistor R8, resistor R9, resistor R10, diode D2, and capacitor C2; Pin 3 of comparator IC1 is connected to one end of capacitor C2, one end of resistor R7, and the cathode of diode D2; the anode of diode D2 is connected to one end of current sampling resistor RS, the anode of diode D1, and pin 4 of pulse transformer B1; the other end of capacitor C2 is grounded; the other end of resistor R7 is grounded; the other end of current sampling resistor RS is grounded. Pin 2 of comparator IC1 is connected to one end of resistor R9 and one end of resistor R8; the other end of resistor R9 is connected to +5V voltage; the other end of resistor R8 is grounded. Pin 4 of comparator IC1 is grounded; pin 8 of comparator IC1 is connected to +5V; pin 1 of comparator IC1 is connected to one end of resistor R10 and pin 25 of microcontroller U1; the other end of resistor R10 is connected to +3.3V.
