A pulse width modulation signal detection device and method with isolation

By designing an isolated pulse width modulated signal detection device, using signal isolation and voltage conversion technology, the problems of interference, low accuracy and poor adaptability in traditional detection technology are solved, and high-precision detection of the frequency, duty cycle and pulse amplitude of the PWM signal is achieved.

CN110943735BActive Publication Date: 2025-04-22FUJIAN NEBULA ELECTRONICS CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN201911139425.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-11-20
Publication Date
2025-04-22
Estimated Expiration
2039-11-20

AI Technical Summary

Technical Problem

Traditional pulse width modulated signal detection technology has problems such as interference, low detection accuracy, poor adaptability and inability to detect pulse amplitude, which affects the MCU detection accuracy and system stability.

Method used

An isolated pulse width modulated signal detection device is designed, including a signal isolation circuit, a communication isolation circuit, a voltage conversion circuit, a signal attenuation circuit and a high-speed ADC acquisition circuit to detect the frequency, duty cycle and pulse amplitude of the PWM signal.

Benefits of technology

Through signal isolation and voltage conversion, the detection accuracy and voltage range are improved, PWM signal interference is avoided, and comprehensive detection of pulse width modulated signals is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110943735B_ABST
    Figure CN110943735B_ABST
Patent Text Reader

Abstract

The present invention provides a pulse width modulation signal detection device with isolation in the field of pulse width modulation signal detection technology, including an MCU, a signal isolation circuit, a communication isolation circuit and a PWM signal input module; the PWM signal input module includes a voltage conversion circuit, a signal attenuation circuit and a high-speed ADC acquisition circuit; the input end of the signal isolation circuit is connected to the output end of the voltage conversion circuit, and the output end is connected to the MCU; one end of the communication isolation circuit is connected to the high-speed ADC acquisition circuit, and the other end is connected to the MCU; the signal attenuation circuit is connected to the high-speed ADC acquisition circuit; the present invention also provides a pulse width modulation signal detection method with isolation. The advantages of the present invention are: it can realize the detection of the frequency, duty cycle and pulse amplitude of the pulse width modulation signal at the same time, and improve the detection accuracy and voltage range.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of pulse width modulation signal detection, and in particular to an isolated pulse width modulation signal detection device and method. Background Art

[0002] Pulse width modulation (PWM) signals are commonly used control signals in motor control of new energy vehicles and industrial control, and are key control signals. If the pulse width modulation signal output by the controller does not match the controlled signal, the controlled signal will not work as expected, which will cause damage to the controlled signal and even cause safety accidents. Therefore, it is necessary to detect the pulse width modulation signal output by the controller.

[0003] Traditionally, there are the following problems in the detection of pulse width modulation signals: 1. Since there is no isolation between the MCU and the PWM signal input circuit, the PWM signal is easily interfered, which affects the detection accuracy of the MCU and the stability of the system; 2. Since there is no high-speed ADC acquisition circuit to convert the high pulse voltage signal into a digital signal, the pulse amplitude of the PWM signal cannot be detected; 3. Since there is no voltage conversion circuit, only PWM signals with a fixed voltage amplitude can be detected, resulting in poor adaptability. When the voltage amplitude of the input PWM signal does not match the voltage of the PWM signal input circuit, it is easy to cause damage to the MCU.

[0004] Therefore, how to provide an isolated pulse width modulation signal detection device and method to simultaneously detect the frequency, duty cycle and pulse amplitude of the pulse width modulation signal and improve the detection accuracy and voltage range has become an urgent problem to be solved. Summary of the invention

[0005] The technical problem to be solved by the present invention is to provide a pulse width modulation signal detection device and method with isolation, so as to simultaneously detect the frequency, duty cycle and pulse amplitude of the pulse width modulation signal and improve the detection accuracy and voltage range.

[0006] In a first aspect, the present invention provides an isolated pulse width modulation signal detection device, comprising an MCU, a signal isolation circuit, a communication isolation circuit and a PWM signal input module; the PWM signal input module comprises a voltage conversion circuit, a signal attenuation circuit and a high-speed ADC acquisition circuit;

[0007] The input end of the signal isolation circuit is connected to the output end of the voltage conversion circuit, and the output end is connected to the MCU; one end of the communication isolation circuit is connected to the high-speed ADC acquisition circuit, and the other end is connected to the MCU; the signal attenuation circuit is connected to the high-speed ADC acquisition circuit.

[0008] Further, the signal isolation circuit includes a digital isolation chip U1, a capacitor C1, a capacitor C2, a capacitor C3 and a capacitor C4;

[0009] Pins 1 and 7 of the digital isolation chip U1 are respectively connected to capacitor C2 and capacitor C4, pin 2 is respectively connected to capacitor C2 and capacitor C4 and grounded, pins 3, 4, 5, 6 and 9 are respectively connected to the voltage conversion circuit, pins 10 and 11 are grounded, pins 12, 15, 16, 17 and 18 are respectively connected to the MCU, pins 14 and 20 are respectively connected to capacitor C1 and capacitor C3, and pin 19 is respectively connected to capacitor C1 and capacitor C3 and grounded.

[0010] Further, the communication isolation circuit includes a digital isolation chip U3, a capacitor C6, a capacitor C7, a capacitor C8 and a capacitor C9;

[0011] Pins 1 and 7 of the digital isolation chip U3 are respectively connected to capacitor C6 and capacitor C8, pin 2 is respectively connected to capacitor C6 and capacitor C8 and grounded, pins 3, 4, 5 and 6 are respectively connected to the MCU, pins 8 and 9 are grounded, pins 10 and 16 are respectively connected to capacitor C7 and capacitor C9, pins 11, 12, 13 and 14 are respectively connected to the high-speed ADC acquisition circuit, and pin 15 is respectively connected to capacitor C7 and capacitor C9 and grounded.

[0012] Further, the voltage conversion circuit includes a comparator U2, a resistor R1, a resistor R2, a resistor R3, a resistor R4, a resistor R5, a resistor R6, a resistor R7, a capacitor C5, a voltage stabilizing diode VD1 and a diode D1;

[0013] Pin 2 of the comparator U2 is respectively connected to capacitor C5, resistor R6 and resistor R7, pin 3 is connected to resistor R2, pin 4 is connected to capacitor C5 and resistor R6 and grounded, pin 5 is connected to resistor R1, pin 6 is connected to resistor R4, and pin 7 is connected to resistor R1; the resistor R4 is connected to the signal isolation circuit; the resistor R2 is respectively connected to resistor R3, resistor R5 and the output end of the Zener diode VD1; the resistor R5 is connected to the input end of the Zener diode VD1 and grounded; the resistor R3 is connected to the output end of the diode D1.

[0014] Further, the signal attenuation circuit includes a power amplifier N1, a resistor R8, a resistor R9, a resistor R10, a resistor R11 and a resistor R12;

[0015] Pin 1 of the power amplifier N1 is connected to resistor R9 and resistor R11 respectively, pin 3 is connected to resistor R8 and resistor R10 respectively, and pin 4 is connected to resistor R11 and resistor R12 respectively; the resistor R9 is connected to a high-speed ADC acquisition circuit; the resistor R10 and resistor R12 are both grounded.

[0016] Further, the high-speed ADC acquisition circuit includes an analog-to-digital converter U5, a reference voltage source chip U4, a resistor R13, a resistor R14, a resistor R15, a resistor R16, a capacitor C10, a capacitor C11 and a capacitor C12;

[0017] Pin 1 of the analog-to-digital converter U5 is connected to resistor R15 and a communication isolation circuit, pin 3 is connected to resistor R16 and a communication isolation circuit, pins 6, 8, 10 and 12 are all grounded, pins 7, 9, 11, 15 and 17 are respectively connected to the signal attenuation circuit, pin 13 is connected to capacitor C11 and pin 6 of the reference voltage source chip U4, pins 14, 16, 18, 19 and 20 are respectively connected to capacitor 11 and grounded, pin 23 is connected to resistor R13 and a communication isolation circuit, and pin 24 is connected to resistor R14 and a communication isolation circuit; pin 2 of the reference voltage source chip U4 is connected to capacitor C10, and pin 3 is connected to capacitor C12; capacitor C10 is connected to capacitor C12 and pin 4 of the reference voltage source chip U4 and grounded.

[0018] In a second aspect, the present invention provides a method for detecting a pulse width modulation signal with isolation, the method requiring the use of the above-mentioned detection device, comprising the following steps:

[0019] Step S1, the PWM signal input module performs voltage conversion and signal conversion on the input PWM signal, and sends the converted signal to the signal isolation circuit and the communication isolation circuit;

[0020] Step S2, the signal isolation circuit and the communication isolation circuit send the received signal to the MCU;

[0021] Step S3: The MCU detects the frequency, duty cycle and pulse amplitude of the PWM signal according to the received signal.

[0022] Furthermore, the detection of the frequency and duty cycle of the PWM signal comprises the following steps:

[0023] Step S11, the PWM signal is converted into a voltage by a voltage conversion circuit, and the PWM signal after the voltage conversion is sent to a signal isolation circuit;

[0024] Step S12: The signal isolation circuit isolates interference from the received signal and sends it to the MCU;

[0025] Step S13, the MCU uses the capture function of its own timer to capture the rising edge and falling edge of the signal, and records the clock value of the first rising edge captured as t1, the clock value of the falling edge after the first rising edge captured as t2, and the clock value of the second rising edge captured as t3;

[0026] Step S14: Calculate the frequency and duty cycle of the PWM signal using t1, t2 and t3:

[0027] Frequency of PWM signal: f = 1 / (t3-t1);

[0028] Duty cycle of PWM signal: D = (t2-t1) / (t3-t1).

[0029] Furthermore, the detection of the pulse amplitude of the PWM signal comprises the following steps:

[0030] Step S21, the PWM signal is attenuated to 1 / Gain of the original value by the signal attenuation circuit, and the attenuated PWM signal is converted into a digital signal by the high-speed ADC acquisition circuit, and the digital signal is sent to the communication isolation circuit, wherein Gain>1;

[0031] Step S22, the digital signal received by the communication isolation circuit is isolated from interference and then sent to the MCU;

[0032] Step S23, when the MCU detects the rising edge of the digital signal, the SPI communication function of the MCU is used to continuously read the level value of the PWM signal currently collected by the high-speed ADC acquisition circuit and save it until the MCU detects that the digital signal is a falling edge and stops reading;

[0033] Step S24, selecting the maximum value of the saved level value as v1;

[0034] The pulse amplitude of the PWM signal: V = v1*Gain.

[0035] The advantages of the present invention are:

[0036] 1. By setting the signal isolation circuit and the communication isolation circuit, the influence of the PWM signal with strong interference on the MCU is avoided, and the detection accuracy and stability of the detection device are greatly improved.

[0037] 2. By setting the signal attenuation circuit and the high-speed ADC acquisition circuit, the high pulse voltage signal of PWM is converted into a digital signal, and then the pulse amplitude of the PWM signal is detected.

[0038] 3. By providing the signal attenuation circuit and the voltage conversion circuit, the detection voltage range of the detection device is greatly improved.

[0039] 4. By setting the PWM signal input module to perform voltage conversion and signal conversion on the input PWM signal, and through the signal isolation of the signal isolation circuit and the communication isolation circuit, the frequency, duty cycle and pulse amplitude of the pulse width modulation signal can be detected simultaneously. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The present invention will be further described below in conjunction with embodiments with reference to the accompanying drawings.

[0041] Figure 1 The invention discloses a circuit principle block diagram of a pulse width modulation signal detection device with isolation.

[0042] Figure 2 It is a circuit diagram of the signal isolation circuit of the present invention.

[0043] Figure 3 It is a circuit diagram of the communication isolation circuit of the present invention.

[0044] Figure 4 1 is a circuit diagram of a voltage conversion circuit of the present invention.

[0045] Figure 5 1 is a circuit diagram of the signal attenuation circuit of the present invention.

[0046] Figure 6 It is a circuit diagram of the high-speed ADC acquisition circuit of the present invention.

[0047] Figure 7 The present invention is a flow chart of a pulse width modulation signal detection method with isolation. DETAILED DESCRIPTION

[0048] Please refer to Figures 1 to 7As shown in the figure, a preferred embodiment of a pulse width modulation signal detection device with isolation of the present invention comprises an MCU, a signal isolation circuit, a communication isolation circuit and a PWM signal input module; the PWM signal input module comprises a voltage conversion circuit, a signal attenuation circuit and a high-speed ADC acquisition circuit; the MCU is used to calculate the frequency, duty cycle and pulse amplitude of the pulse width modulation signal. In the specific implementation, it is sufficient to select an MCU that can realize this function from the prior art, and it is not limited to any model, such as the MCU of the LPC5500 series, which can be obtained by those skilled in the art without creative labor; the signal isolation circuit is used to isolate the signal. The voltage conversion circuit is used to isolate the interference of the PWM signal output by the high-speed ADC acquisition circuit to the MCU; the communication isolation circuit is used to isolate the interference of the PWM signal output by the high-speed ADC acquisition circuit to the MCU; the voltage conversion circuit is used to convert the PWM signal with a wide voltage range into a PWM signal with a fixed voltage that can be normally acquired by the MCU, so as to ensure compatibility with the PWM signal with a larger voltage range; the signal attenuation circuit is used to attenuate the PWM signal with a wide voltage range, so that the attenuated PWM signal can be normally acquired and converted by the high-speed ADC acquisition circuit, so as to ensure compatibility with the PWM signal with a larger voltage range; the high-speed ADC acquisition circuit is used to convert the high pulse voltage signal of the PWM signal into a digital signal.

[0049] The input end of the signal isolation circuit is connected to the output end of the voltage conversion circuit, and the output end is connected to the MCU; one end of the communication isolation circuit is connected to the high-speed ADC acquisition circuit, and the other end is connected to the MCU; the signal attenuation circuit is connected to the high-speed ADC acquisition circuit. The positive input signal and the negative input signal of PWM are respectively connected to the voltage conversion circuit and the signal attenuation circuit, so as to simultaneously detect the frequency, duty cycle and pulse amplitude of the pulse width modulation signal.

[0050] The signal isolation circuit includes a digital isolation chip U1, a capacitor C1, a capacitor C2, a capacitor C3 and a capacitor C4; the model of the digital isolation chip U1 is ADUM7641, which is used to isolate the interference of the PWM signal output by the voltage conversion circuit to the MCU;

[0051] Pins 1 and 7 of the digital isolation chip U1 are connected to capacitors C2 and C4 respectively, pin 2 is connected to capacitors C2 and C4 respectively and grounded, pins 3, 4, 5, 6 and 9 are connected to the voltage conversion circuit respectively, pins 10 and 11 are grounded, pins 12, 15, 16, 17 and 18 are connected to the MCU respectively, pins 14 and 20 are connected to capacitors C1 and C3 respectively, and pin 19 is connected to capacitors C1 and C3 respectively and grounded. Pins 3, 4, 5, 6 and 9 of the digital isolation chip U1 are connected to resistor R4 respectively.

[0052] The communication isolation circuit includes a digital isolation chip U3, a capacitor C6, a capacitor C7, a capacitor C8 and a capacitor C9; the model of the digital isolation chip U3 is ADUM1411, which is used to isolate the interference of the PWM signal output by the high-speed ADC acquisition circuit to the MCU;

[0053] Pins 1 and 7 of the digital isolation chip U3 are connected to capacitors C6 and C8 respectively, pin 2 is connected to capacitors C6 and C8 and grounded, pins 3, 4, 5 and 6 are connected to MCU respectively, pins 8 and 9 are grounded, pins 10 and 16 are connected to capacitors C7 and C9 respectively, pins 11, 12, 13 and 14 are connected to high-speed ADC acquisition circuits respectively, and pin 15 is connected to capacitors C7 and C9 and grounded. Pin 11 of the digital isolation chip U3 is connected to resistor R15 and pin 1 of analog-to-digital converter U5; pin 12 of the digital isolation chip U3 is connected to resistor R14 and pin 24 of analog-to-digital converter U5; pin 13 of the digital isolation chip U3 is connected to resistor R16 and pin 3 of analog-to-digital converter U5; pin 14 of the digital isolation chip U3 is connected to resistor R13 and pin 23 of analog-to-digital converter U5.

[0054] The voltage conversion circuit includes a comparator U2, a resistor R1, a resistor R2, a resistor R3, a resistor R4, a resistor R5, a resistor R6, a resistor R7, a capacitor C5, a voltage regulator diode VD1 and a diode D1; the comparator U2 is of model LMV761MA, which is used to convert a PWM signal with a wide voltage range into a PWM signal with a fixed voltage that can be normally collected by the MCU to ensure compatibility with PWM signals with a larger voltage range; the voltage regulator diode VD1 is of model BZT52C5V1W; the diode D1 is of model MBRS3200T3G;

[0055] Pin 2 of the comparator U2 is respectively connected to capacitor C5, resistor R6 and resistor R7, pin 3 is connected to resistor R2, pin 4 is connected to capacitor C5 and resistor R6 and grounded, pin 5 is connected to resistor R1, pin 6 is connected to resistor R4, and pin 7 is connected to resistor R1; the resistor R4 is connected to the signal isolation circuit; the resistor R2 is respectively connected to resistor R3, resistor R5 and the output end of the Zener diode VD1; the resistor R5 is connected to the input end of the Zener diode VD1 and grounded; the resistor R3 is connected to the output end of the diode D1.

[0056] The signal attenuation circuit includes a power amplifier N1, a resistor R8, a resistor R9, a resistor R10, a resistor R11 and a resistor R12; the model of the power amplifier N1 is OPA188;

[0057] Pin 1 of the power amplifier N1 is connected to resistor R9 and resistor R11 respectively, pin 3 is connected to resistor R8 and resistor R10 respectively, and pin 4 is connected to resistor R11 and resistor R12 respectively; the resistor R9 is connected to a high-speed ADC acquisition circuit; the resistor R10 and resistor R12 are both grounded.

[0058] The high-speed ADC acquisition circuit includes an analog-to-digital converter U5, a reference voltage source chip U4, a resistor R13, a resistor R14, a resistor R15, a resistor R16, a capacitor C10, a capacitor C11 and a capacitor C12; the model of the analog-to-digital converter U5 is AD7794BRUZ; the model of the reference voltage source chip U4 is AD780BR;

[0059] Pin 1 of the analog-to-digital converter U5 is connected to resistor R15 and a communication isolation circuit, pin 3 is connected to resistor R16 and a communication isolation circuit, pins 6, 8, 10 and 12 are all grounded, pins 7, 9, 11, 15 and 17 are all connected to the signal attenuation circuit, pin 13 is connected to capacitor C11 and pin 6 of the reference voltage source chip U4, pins 14, 16, 18, 19 and 20 are all connected to capacitor 11 and grounded, pin 23 is connected to resistor R13 and a communication isolation circuit, and pin 24 is connected to resistor R14 and a communication isolation circuit; pin 2 of the reference voltage source chip U4 is connected to capacitor C10, and pin 3 is connected to capacitor C12; capacitor C10 is connected to capacitor C12 and pin 4 of the reference voltage source chip U4 and grounded. Pins 7, 9, 11, 15 and 17 of the analog-to-digital converter U5 are all connected to resistor R9, respectively.

[0060] A preferred embodiment of a pulse width modulation signal detection method with isolation of the present invention comprises the following steps:

[0061] Step S1, the PWM signal input module performs voltage conversion and signal conversion on the input PWM signal, and sends the converted signal to the signal isolation circuit and the communication isolation circuit;

[0062] Step S2, the signal isolation circuit and the communication isolation circuit send the received signal to the MCU;

[0063] Step S3: The MCU detects the frequency, duty cycle and pulse amplitude of the PWM signal according to the received signal.

[0064] The detection of the frequency and duty cycle of the PWM signal comprises the following steps:

[0065] Step S11, the PWM signal is converted into a voltage by a voltage conversion circuit, and the PWM signal after the voltage conversion is sent to a signal isolation circuit;

[0066] Step S12: The signal isolation circuit isolates interference from the received signal and sends it to the MCU;

[0067] Step S13, MCU uses the capture function of its own timer to capture the rising edge and falling edge of the signal, and records the clock value of the first rising edge captured as t1, the clock value of the falling edge after the first rising edge captured as t2, and the clock value of the second rising edge captured as t3; the rising edge means the level changes from low to high, and the falling edge means the level changes from high to low;

[0068] Step S14: Calculate the frequency and duty cycle of the PWM signal using t1, t2 and t3:

[0069] Frequency of PWM signal: f = 1 / (t3-t1);

[0070] Duty cycle of PWM signal: D = (t2-t1) / (t3-t1).

[0071] Where f represents the frequency of the PWM signal, and D represents the duty cycle of the PWM signal.

[0072] The detection of the pulse amplitude of the PWM signal comprises the following steps:

[0073] Step S21, the PWM signal is attenuated to 1 / Gain of the original value by the signal attenuation circuit, and the attenuated PWM signal is converted from a voltage signal to a digital signal by the high-speed ADC acquisition circuit, and the digital signal is sent to the communication isolation circuit, wherein Gain>1;

[0074] Step S22, the digital signal received by the communication isolation circuit is isolated from interference and then sent to the MCU;

[0075] Step S23, when the MCU detects the rising edge of the digital signal, the SPI communication function of the MCU is used to continuously read the level value of the PWM signal currently collected by the high-speed ADC acquisition circuit and save it, until the MCU detects that the digital signal is a falling edge and stops reading; SPI is the abbreviation of Serial Peripheral Interface, which is a high-speed, full-duplex, synchronous communication bus, and only occupies four wires on the chip pins, saving the chip pins and saving space on the PCB layout, providing convenience. It is precisely because of this simple and easy-to-use feature that more and more chips integrate this communication protocol;

[0076] Step S24, selecting the maximum value of the saved level value as v1;

[0077] The pulse amplitude of the PWM signal: V = v1*Gain.

[0078] Where V represents the pulse amplitude of the PWM signal, and Gain represents the multiple of the PWM signal attenuated by the signal attenuation circuit.

[0079] In summary, the advantages of the present invention are:

[0080] 1. By setting the signal isolation circuit and the communication isolation circuit, the influence of the PWM signal with strong interference on the MCU is avoided, and the detection accuracy and stability of the detection device are greatly improved.

[0081] 2. By setting the signal attenuation circuit and the high-speed ADC acquisition circuit, the high pulse voltage signal of PWM is converted into a digital signal, and then the pulse amplitude of the PWM signal is detected.

[0082] 3. By providing the signal attenuation circuit and the voltage conversion circuit, the detection voltage range of the detection device is greatly improved.

[0083] 4. The PWM signal input module is set to perform voltage conversion and signal conversion on the input PWM signal, and the signal isolation of the signal isolation circuit and the communication isolation circuit is used to simultaneously detect the frequency, duty cycle and pulse amplitude of the pulse width modulation signal.

[0084] Although the specific implementation modes of the present invention are described above, those skilled in the art should understand that the specific implementation modes described are only illustrative and are not intended to limit the scope of the present invention. Equivalent modifications and changes made by those skilled in the art in accordance with the spirit of the present invention should be included in the scope of protection of the claims of the present invention.

Claims

1. A pulse width modulation signal detection device with isolation, characterized in that: It includes an MCU, a signal isolation circuit, a communication isolation circuit and a PWM signal input module; the PWM signal input module includes a voltage conversion circuit, a signal attenuation circuit and a high-speed ADC acquisition circuit; The input end of the signal isolation circuit is connected to the output end of the voltage conversion circuit, and the output end is connected to the MCU; one end of the communication isolation circuit is connected to the high-speed ADC acquisition circuit, and the other end is connected to the MCU; the signal attenuation circuit is connected to the high-speed ADC acquisition circuit; The signal isolation circuit includes a digital isolation chip U1, a capacitor C1, a capacitor C2, a capacitor C3 and a capacitor C4; Pins 1 and 7 of the digital isolation chip U1 are connected to capacitors C2 and C4 respectively, pin 2 is connected to capacitors C2 and C4 respectively and grounded, pins 3, 4, 5, 6 and 9 are connected to the voltage conversion circuit respectively, pins 10 and 11 are grounded, pins 12, 15, 16, 17 and 18 are connected to the MCU respectively, pins 14 and 20 are connected to capacitors C1 and C3 respectively, and pin 19 is connected to capacitors C1 and C3 respectively and grounded; The communication isolation circuit includes a digital isolation chip U3, a capacitor C6, a capacitor C7, a capacitor C8 and a capacitor C9; Pins 1 and 7 of the digital isolation chip U3 are connected to capacitors C6 and C8 respectively, pin 2 is connected to capacitors C6 and C8 respectively and grounded, pins 3, 4, 5 and 6 are connected to the MCU respectively, pins 8 and 9 are grounded, pins 10 and 16 are connected to capacitors C7 and C9 respectively, pins 11, 12, 13 and 14 are connected to the high-speed ADC acquisition circuit respectively, and pin 15 is connected to capacitors C7 and C9 respectively and grounded; The voltage conversion circuit includes a comparator U2, a resistor R1, a resistor R2, a resistor R3, a resistor R4, a resistor R5, a resistor R6, a resistor R7, a capacitor C5, a voltage stabilizing diode VD1 and a diode D1; Pin 2 of the comparator U2 is respectively connected to capacitor C5, resistor R6 and resistor R7, pin 3 is connected to resistor R2, pin 4 is connected to capacitor C5 and resistor R6 and grounded, pin 5 is connected to resistor R1, pin 6 is connected to resistor R4, and pin 7 is connected to resistor R1; the resistor R4 is connected to the signal isolation circuit; the resistor R2 is respectively connected to resistor R3, resistor R5 and the output end of the voltage-stabilizing diode VD1; the resistor R5 is connected to the input end of the voltage-stabilizing diode VD1 and grounded; the resistor R3 is connected to the output end of the diode D1; The signal attenuation circuit includes a power amplifier N1, a resistor R8, a resistor R9, a resistor R10, a resistor R11 and a resistor R12; Pin 1 of the power amplifier N1 is connected to resistor R9 and resistor R11 respectively, pin 3 is connected to resistor R8 and resistor R10 respectively, and pin 4 is connected to resistor R11 and resistor R12 respectively; the resistor R9 is connected to a high-speed ADC acquisition circuit; the resistor R10 and resistor R12 are both grounded.

2. The isolated pulse width modulation signal detection device according to claim 1, characterized in that: The high-speed ADC acquisition circuit includes an analog-to-digital converter U5, a reference voltage source chip U4, a resistor R13, a resistor R14, a resistor R15, a resistor R16, a capacitor C10, a capacitor C11 and a capacitor C12; Pin 1 of the analog-to-digital converter U5 is connected to resistor R15 and a communication isolation circuit, pin 3 is connected to resistor R16 and a communication isolation circuit, pins 6, 8, 10 and 12 are all grounded, pins 7, 9, 11, 15 and 17 are respectively connected to the signal attenuation circuit, pin 13 is connected to capacitor C11 and pin 6 of the reference voltage source chip U4, pins 14, 16, 18, 19 and 20 are respectively connected to capacitor 11 and grounded, pin 23 is connected to resistor R13 and a communication isolation circuit, and pin 24 is connected to resistor R14 and a communication isolation circuit; pin 2 of the reference voltage source chip U4 is connected to capacitor C10, and pin 3 is connected to capacitor C12; capacitor C10 is connected to capacitor C12 and pin 4 of the reference voltage source chip U4 and grounded.

3. A pulse width modulation signal detection method with isolation, characterized in that: The method requires the use of a detection device as described in any one of claims 1 to 2, comprising the following steps: Step S1, the PWM signal input module performs voltage conversion and signal conversion on the input PWM signal, and sends the converted signal to the signal isolation circuit and the communication isolation circuit; Step S2, the signal isolation circuit and the communication isolation circuit send the received signal to the MCU; Step S3, the MCU detects the frequency, duty cycle and pulse amplitude of the PWM signal according to the received signal; The detection of the frequency and duty cycle of the PWM signal comprises the following steps: Step S11, the PWM signal is converted into a voltage by a voltage conversion circuit, and the PWM signal after the voltage conversion is sent to a signal isolation circuit; Step S12: The signal isolation circuit isolates interference from the received signal and sends it to the MCU; Step S13, the MCU uses the capture function of its own timer to capture the rising edge and falling edge of the signal, and records the clock value of the first rising edge captured as t1, the clock value of the falling edge after the first rising edge captured as t2, and the clock value of the second rising edge captured as t3; Step S14: Calculate the frequency and duty cycle of the PWM signal using t1, t2 and t3: Frequency of PWM signal: f = 1 / (t3-t1); Duty cycle of PWM signal: D = (t2-t1) / (t3-t1); The detection of the pulse amplitude of the PWM signal comprises the following steps: Step S21, the PWM signal is attenuated to 1 / Gain of the original value by the signal attenuation circuit, and the attenuated PWM signal is converted into a digital signal by the high-speed ADC acquisition circuit, and the digital signal is sent to the communication isolation circuit, wherein Gain>1; Step S22, the digital signal received by the communication isolation circuit is isolated from interference and then sent to the MCU; Step S23, when the MCU detects the rising edge of the digital signal, the SPI communication function of the MCU is used to continuously read the level value of the PWM signal currently collected by the high-speed ADC acquisition circuit and save it until the MCU detects that the digital signal is a falling edge and stops reading; Step S24, selecting the maximum value of the saved level value as v1; The pulse amplitude of the PWM signal: V = v1*Gain.

Citation Information

Patent Citations

  • Pure electric vehicle controller with anti-electromagnetic interference capability

    CN102645912A

  • Test method and tester for high frequency pulse signal

    CN106771582A

  • Pulse width modulation signal detection device with isolation

    CN210986081U