Circuit for converting analog signal into PWM signal

By using a precision sawtooth wave generator circuit and a signal comparison circuit, the analog signal is converted into a linearly correlated PWM signal, which solves the problems of interference and circuit complexity in analog signal transmission and realizes high-precision, low-cost signal conversion and transmission.

CN122001346APending Publication Date: 2026-05-08CHANGSHU INSTITUTE OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610108847.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-27
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Analog signals are susceptible to interference during long-distance or isolated transmission, resulting in reduced signal fidelity. Existing analog-to-digital converter solutions are complex and costly, while traditional PWM conversion circuits are complex in structure, have dead zones in duty cycle adjustment range, and have limited conversion accuracy.

Method used

A precision sawtooth wave generator circuit and a signal comparison circuit are used to convert the analog input voltage signal into a PWM signal whose duty cycle is linearly related to the input voltage amplitude. The circuit structure is simple, it is powered by a unipolar power supply, and the generated sawtooth wave has high linearity. The duty cycle can be continuously adjusted within the range of 0 to 100%.

Benefits of technology

It achieves high-precision analog signal to PWM signal conversion, simplifies circuit structure, reduces cost, improves signal transmission stability and anti-interference capability, is suitable for digital isolation components, and ensures the accuracy and dynamic range of signal conversion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122001346A_ABST
    Figure CN122001346A_ABST
Patent Text Reader

Abstract

The invention discloses a circuit for converting analog signals into PWM signals, and belongs to the technical field of signal transmission application. Comprising a precise sawtooth wave generating circuit and a signal comparison circuit, the precise sawtooth wave generating circuit provides sawtooth wave signals with accurately determined waveform amplitude, and the signal comparison circuit compares the sawtooth wave signals with analog input voltage signals and generates PWM signals with duty ratios linearly related to the amplitude of the analog voltage signals. The method has the advantages that the generated sawtooth wave is high in linearity, the amplitude variation range of the sawtooth wave can be accurately controlled between 0 and the reference voltage VREF, and a stable reference is provided for high-precision comparison; in the measuring range, the duty ratio of the output PWM signal and the amplitude of the input analog voltage are in a strict linear relationship, so that the accuracy of signal conversion is ensured; the duty ratio of the generated PWM signal can be continuously adjusted within the full range of 0-100%, no adjustment blind area exists in a traditional circuit, and the dynamic range and applicability of the signal are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of signal transmission application technology, specifically relating to a circuit for converting analog signals into PWM signals. Background Technology

[0002] Analog signals are susceptible to interference during long-distance or isolated transmission due to their continuously changing nature, leading to reduced signal fidelity and insufficient stability. Especially in practical applications of isolated analog signal transmission, directly processing and transmitting analog signals not only places stringent demands on the precision and stability of circuit components but also results in complex circuit structures and difficulties in guaranteeing the accuracy of isolated transmission.

[0003] To overcome the aforementioned shortcomings, current analog signal isolation transmission mainly employs a hybrid analog-to-digital (HADC) transmission scheme. The basic principle is to first convert the analog signal to be transmitted into a digital signal or a digitally modulated signal, then isolate and transmit it before restoring it to the original analog signal. In this process, the analog-to-digital signal conversion is a critical step, directly determining the system's transmission accuracy, anti-interference capability, and overall stability.

[0004] Existing analog-to-digital (A / D) signal conversion solutions mainly employ A / D converters or voltage-to-frequency (V / F) conversion methods. However, these methods typically suffer from circuit complexity and high cost. Pulse Width Modulation (PWM) technology offers a potential alternative, where the equivalent voltage of a fixed-frequency PWM signal is directly determined by its duty cycle and amplitude. Therefore, converting an analog signal into a precise PWM signal with a duty cycle linearly related to the input voltage can be considered an effective analog-to-digital conversion approach. However, traditional PWM-based conversion circuits still suffer from drawbacks such as complex structure, a "dead zone" in the duty cycle adjustment range, and limited conversion accuracy.

[0005] Therefore, it is necessary to develop a dedicated circuit that can convert analog voltage signals into linearly related PWM signals with variable duty cycles, and through optimized design, improve the accuracy of transmission and conversion while reducing circuit costs. The technical solution described below arose in this context. Summary of the Invention

[0006] The purpose of this invention is to provide a circuit for converting analog signals to PWM signals that is simple in structure, reasonable in design, and low in cost. This circuit can achieve high-precision linear conversion between the duty cycle of the input analog voltage signal and the output PWM signal.

[0007] The objective of this invention is achieved by providing a circuit for converting an analog signal to a PWM signal, comprising a precision sawtooth wave generator circuit and a signal comparison circuit. The precision sawtooth wave generator circuit provides a sawtooth wave signal with a precisely determined waveform amplitude. The signal comparison circuit compares the sawtooth wave signal with an analog input voltage signal and generates a PWM signal whose duty cycle is linearly related to the amplitude of the analog voltage signal.

[0008] In a specific embodiment of the present invention, the precision sawtooth wave generating circuit includes a constant current source circuit, a voltage reference source circuit, and a sawtooth wave generating control circuit. The constant current source circuit provides current for charging the integrating capacitor. The voltage reference source provides a reference voltage for the sawtooth wave generating control circuit to limit and control the amplitude of the sawtooth wave. The sawtooth wave generating control circuit generates a sawtooth wave control signal with controlled amplitude.

[0009] In another specific embodiment of the present invention, the constant current source circuit includes diodes D1 and D2, resistors R1 and R2, and transistor Q1. The anode of diode D1 and one end of resistor R1 are connected to the DC power supply VCC. The cathode of diode D1 is connected to the anode of diode D2. The cathode of diode D2 is connected to the base of transistor Q1 and one end of resistor R2. The emitter of transistor Q1 is connected to the other end of resistor R1. The collector of transistor Q1 is connected to the integrating capacitor in the sawtooth wave generation control circuit. The other end of resistor R2 is connected to the DC power supply ground GND.

[0010] In another specific embodiment of the present invention, the voltage reference source circuit includes a resistor R4, a capacitor C5, and a parallel voltage regulator integrated chip U2. The parallel voltage regulator integrated chip U2 is a TL431. One end of the resistor R4 is connected to the DC power supply VCC, and the other end of the resistor R4 is connected to one end of the capacitor C5 and pins 1 and 2 of the parallel voltage regulator integrated chip U2, and outputs a reference voltage VREF. Pin 3 of the parallel voltage regulator integrated chip U2 and the other end of the capacitor C5 are connected to the DC power supply ground GND.

[0011] In another specific embodiment of the present invention, the sawtooth wave generation control circuit includes resistors R3 and R5, diode D3, capacitors C1, C2, C3, and C4, an analog switch chip U1, and a voltage comparator U3A. The analog switch chip U1 is an SGM3157, the voltage comparator U3A is an LM393, and capacitor C1 is the integrating capacitor. Pin 1 of the voltage comparator U3A is connected to one end of resistor R3 and the anode of diode D3. The cathode of diode D3 is connected to one end of capacitor C2, one end of resistor R5, and pin 6 of analog switch chip U1. Pin 2 of voltage comparator U3A is connected to the reference voltage VREF. Pin 3 of voltage comparator U3A is connected to pin 4 of analog switch chip U1 and one end of capacitor C1, and together they are connected to the collector of transistor Q1 in the constant current source circuit. Pin 5 of analog switch chip U1, one end of capacitor C3, one end of capacitor C4, the other end of resistor R3, and pin 8 of voltage comparator U3A are all connected to the DC power supply VCC. Pin 4 of voltage comparator U3A, pins 1 and 2 of analog switch chip U1, the other end of capacitor C4, the other end of capacitor C2, the other end of resistor R5, the other end of capacitor C3, and the other end of capacitor C1 are all grounded. Pin 3 of analog switch chip U1 is left floating.

[0012] In another specific embodiment of the present invention, the signal comparison circuit includes resistors R6 to R8, connectors H1 and H2, and a voltage comparator U3B. The voltage comparator U3B uses an LM393. Pin 5 of the voltage comparator U3B is connected to one end of resistor R7 and one end of resistor R8. The other end of resistor R7 is connected to pin 2 of connector H1 for introducing an analog input voltage signal Vin. Pin 6 of the voltage comparator U3B is connected to the collector of transistor Q1 in the constant current source circuit. Pin 7 of the voltage comparator U3B is connected to one end of resistor R6 and pin 2 of connector H2 for outputting a PWM signal after signal comparison. The other end of resistor R6 is connected to the DC power supply VCC. Pins 1 of connector H1, pin 1 of connector H2, and the other end of resistor R8 are all connected to the DC power supply ground GND.

[0013] Compared with existing technologies, this invention, due to its aforementioned structure, offers the following advantages: the circuit is powered entirely by a unipolar power supply, simplifying system power supply design and improving applicability and reliability; the internally generated sawtooth wave exhibits high linearity, with its amplitude variation range precisely controlled between 0 and the reference voltage VREF, providing a stable benchmark for high-precision comparison; within the measurement range, the duty cycle of the output PWM signal exhibits a strict linear relationship with the amplitude of the input analog voltage, ensuring the accuracy of signal conversion; the duty cycle of the generated PWM signal is continuously adjustable across the entire range of 0 to 100%, eliminating the adjustment blind zone found in traditional circuits and improving the dynamic range and applicability of the signal; the circuit output is a digital PWM signal, which can be directly used with digital isolation components, facilitating the realization of high-precision, high-interference-resistant analog signal isolation transmission; the overall circuit structure is simple, requiring fewer components, effectively reducing system cost and complexity while ensuring high conversion accuracy. Attached Figure Description

[0014] Figure 1 This is a schematic diagram of the principle of the present invention;

[0015] Figure 2 The circuit diagram of the voltage reference source circuit in the precision sawtooth wave generation circuit of the present invention is shown below.

[0016] Figure 3 The circuit diagram of the constant current source circuit in the precision sawtooth wave generating circuit of the present invention is shown below.

[0017] Figure 4 This is the electrical schematic diagram of the sawtooth wave generation control circuit in the precision sawtooth wave generation circuit of the present invention.

[0018] Figure 5 This is the electrical schematic diagram of the signal comparison circuit described in this invention. Detailed Implementation

[0019] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings. However, the description of the embodiments is not a limitation on the technical solution. Any formal but not substantive changes made based on the concept of the present invention should be considered within the scope of protection of the present invention.

[0020] In the following description, all directional (or orientational) concepts involving up, down, left, right, front, and back refer to the position of the figure being described, and are intended to facilitate public understanding. Therefore, they should not be construed as a special limitation on the technical solution provided by this invention.

[0021] See Figure 1This invention relates to a circuit for converting an analog signal to a PWM signal, comprising a precision sawtooth wave generator circuit and a signal comparison circuit. The precision sawtooth wave generator circuit provides a sawtooth wave signal with precisely determined waveform amplitude for comparison with an analog input voltage signal Vin. The signal comparison circuit compares this sawtooth wave signal with the analog input voltage signal Vin to generate a PWM signal whose duty cycle is linearly related to the amplitude of the analog voltage signal.

[0022] The precision sawtooth wave generation circuit includes a constant current source circuit, a voltage reference source circuit, and a sawtooth wave generation control circuit. The constant current source circuit provides the current for charging the integrating capacitor. The voltage reference source provides a reference voltage for the sawtooth wave generation control circuit to limit the amplitude of the sawtooth wave. The sawtooth wave generation control circuit is used to generate a sawtooth wave control signal with controlled amplitude.

[0023] See Figure 2 The voltage reference source circuit includes resistor R4, capacitor C5, and parallel voltage regulator IC U2. The parallel voltage regulator IC U2 is a TL431, and its pin 2 outputs a reference voltage VREF.

[0024] See Figure 3 The constant current source circuit includes diodes D1 and D2, resistors R1 and R2, and transistor Q1. The anode of diode D1 and one end of resistor R1 are connected to the DC power supply VCC. The cathode of diode D1 is connected to the anode of diode D2. The cathode of diode D2 is connected to the base of transistor Q1 and one end of resistor R2. The emitter of transistor Q1 is connected to the other end of resistor R1. The collector of transistor Q1 is connected to the integrating capacitor in the sawtooth wave generation control circuit.

[0025] See Figure 4The sawtooth wave generation control circuit includes resistors R3 and R5, diode D3, capacitors C1, C2, C3, and C4, an analog switch chip U1, and a voltage comparator U3A. The analog switch chip U1 is an SGM3157, with pin 1 being the normally open terminal, pin 4 being the common terminal, and pin 6 being the control terminal. The voltage comparator U3A is an LM393, and capacitor C1 is the integrating capacitor. Pin 1 of the voltage comparator U3A is connected to one end of resistor R3 and the anode of diode D3; resistor R3 is a pull-up resistor. The cathode of diode D3 is connected to one end of capacitor C2, one end of resistor R5, and pin 6 of the analog switch chip U1. Pin 2 of the voltage comparator U3A is connected to the reference voltage VREF. Pin 3 of the voltage comparator U3A is connected to pin 4 of the analog switch chip U1 and one end of capacitor C1, and together they are connected to the collector of transistor Q1 in the constant current source circuit. Diode D3, resistor R5, and capacitor C2 form the normally open switch closing time adjustment circuit inside the analog switch chip U1. This ensures that the energy stored in capacitor C1 is fully released within the adjustment time. Subsequently, pins 1 and 4 of the analog switch chip U1 return to the open state internally, and capacitor C1 re-enters the charging state. When pins 1 and 4 of the analog switch chip U1 are not conducting (the normally open switch is open), capacitor C1 is in the charging state, and the charging voltage will continuously increase. When the voltage across capacitor C1 reaches the reference voltage VREF, pin 1 of voltage comparator U3A outputs a high level, and the internal analog switch (equivalently short-circuited) between pins 4 and 6 of the analog switch chip U1 closes. At this time, the analog switch input terminals (pins 4 and 6) of the analog switch chip U1 and capacitor C1 form a discharge circuit, rapidly discharging the capacitor. Capacitor C1 is periodically in the charging and discharging state, generating a sawtooth wave with high linearity. Its amplitude variation range can be precisely controlled between 0 and the reference voltage VREF, providing a stable reference for high-precision comparison. The period of the sawtooth wave is mainly determined by the capacitance of capacitor C1, the output current of the constant current source, the reference voltage VREF, and the closing time of the analog switch. The output current of the constant current source is approximately...

[0026] ,

[0027] in, , These represent the forward voltages of diodes D1 and D2, respectively. This represents the static operating voltage between the emitter and base of transistor Q1.

[0028] Please see Figure 5The signal comparison circuit includes resistors R6 to R8, connectors H1 and H2, and a voltage comparator U3B, which is an LM393. In this embodiment, voltage comparators U3A and U3B are specifically LM393LV. Pin 5 of the voltage comparator U3B is connected to one end of resistor R7 and one end of resistor R8, and the other end of resistor R7 is connected to pin 2 of connector H1, for introducing the analog input voltage signal Vin. Pin 6 of the voltage comparator U3B is connected to the collector of transistor Q1 in the constant current source circuit, and pin 7 of the voltage comparator U3B is connected to one end of resistor R6 and pin 2 of connector H2, for outputting the compared PWM signal. The formula for calculating the analog input voltage signal Vin is as follows:

[0029] ,

[0030] in, This represents the duty cycle of the PWM signal. This is the reference voltage.

[0031] The analog input voltage signal Vin is divided by resistors R7 and R8 and then input to pin 5 of voltage comparator U3B. The sawtooth wave signal generated by the precision sawtooth wave generator circuit is input to pin 6 of voltage comparator U3B, and the two signals are compared. When the input voltage at pin 5 of voltage comparator U3B is greater than the current amplitude of the sawtooth wave at pin 6, pin 7 of voltage comparator U3B outputs a high level; otherwise, it outputs a low level. Since the sawtooth wave is a periodic signal, the circuit can change the duty cycle of the output PWM signal according to the change in input voltage. Within the measurement range, the duty cycle of the output PWM signal has a strictly linear relationship with the amplitude of the input analog voltage, ensuring the accuracy of signal conversion and thus achieving the purpose of the invention.

Claims

1. A circuit for converting analog signals to PWM signals, characterized in that: It includes a precision sawtooth wave generation circuit and a signal comparison circuit. The precision sawtooth wave generation circuit provides a sawtooth wave signal with a precisely determined waveform amplitude. The signal comparison circuit compares the sawtooth wave signal with an analog input voltage signal and generates a PWM signal whose duty cycle is linearly related to the amplitude of the analog voltage signal.

2. The circuit for converting analog signals to PWM signals according to claim 1, characterized in that: The precision sawtooth wave generation circuit includes a constant current source circuit, a voltage reference source circuit, and a sawtooth wave generation control circuit. The constant current source circuit provides current for charging the integrating capacitor. The voltage reference source provides a reference voltage for the sawtooth wave generation control circuit to limit and control the amplitude of the sawtooth wave. The sawtooth wave generation control circuit is used to generate a sawtooth wave control signal with controlled amplitude.

3. The circuit for converting analog signals to PWM signals according to claim 2, characterized in that: The constant current source circuit includes diodes D1 and D2, resistors R1 and R2, and transistor Q1. The anode of diode D1 and one end of resistor R1 are connected to the DC power supply VCC. The cathode of diode D1 is connected to the anode of diode D2. The cathode of diode D2 is connected to the base of transistor Q1 and one end of resistor R2. The emitter of transistor Q1 is connected to the other end of resistor R1. The collector of transistor Q1 is connected to the integrating capacitor in the sawtooth wave generation control circuit. The other end of resistor R2 is connected to the DC power supply ground GND.

4. The circuit for converting analog signals to PWM signals according to claim 2, characterized in that: The voltage reference source circuit includes a resistor R4, a capacitor C5, and a parallel voltage regulator integrated chip U2. The parallel voltage regulator integrated chip U2 is a TL431. One end of the resistor R4 is connected to the DC power supply VCC, and the other end of the resistor R4 is connected to one end of the capacitor C5 and pins 1 and 2 of the parallel voltage regulator integrated chip U2, and outputs a reference voltage VREF. Pin 3 of the parallel voltage regulator integrated chip U2 and the other end of the capacitor C5 are connected to the DC power supply ground GND.

5. The circuit for converting an analog signal to a PWM signal according to claim 3, characterized in that: The sawtooth wave generation control circuit includes resistors R3 and R5, diode D3, capacitors C1, C2, C3, and C4, an analog switch chip U1, and a voltage comparator U3A. The analog switch chip U1 is an SGM3157, and the voltage comparator U3A is an LM393. Capacitor C1 is the integrating capacitor. Pin 1 of the voltage comparator U3A is connected to one end of resistor R3 and the anode of diode D3. The cathode of diode D3 is connected to one end of capacitor C2, one end of resistor R5, and pin 6 of the analog switch chip U1. Pin 2 of the voltage comparator U3A is connected to the reference voltage VREF. Pin 3 of voltage comparator U3A is connected to pin 4 of analog switch chip U1 and one end of capacitor C1, and together they are connected to the collector of transistor Q1 in the constant current source circuit. Pin 5 of analog switch chip U1, one end of capacitor C3, one end of capacitor C4, the other end of resistor R3, and pin 8 of voltage comparator U3A are all connected to DC power supply VCC. Pin 4 of voltage comparator U3A, pins 1 and 2 of analog switch chip U1, the other end of capacitor C4, the other end of capacitor C2, the other end of resistor R5, the other end of capacitor C3, and the other end of capacitor C1 are all grounded. Pin 3 of analog switch chip U1 is left floating.

6. The circuit for converting an analog signal to a PWM signal according to claim 3, characterized in that: The signal comparison circuit includes resistors R6 to R8, connectors H1 and H2, and a voltage comparator U3B. The voltage comparator U3B uses an LM393. Pin 5 of the voltage comparator U3B is connected to one end of resistors R7 and R8, and the other end of resistor R7 is connected to pin 2 of connector H1 to introduce the analog input voltage signal Vin. Pin 6 of the voltage comparator U3B is connected to the collector of transistor Q1 in the constant current source circuit. Pin 7 of the voltage comparator U3B is connected to one end of resistor R6 and pin 2 of connector H2 to output the PWM signal after signal comparison. The other end of resistor R6 is connected to the DC power supply VCC. Pins 1 of connector H1, pin 1 of connector H2, and the other end of resistor R8 are all connected to the DC power supply ground GND.