A variable gain amplification circuit, control method, and voltage measurement device
Patent Information
- Application Number
- CN202611120035.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-27
- Publication Date
- 2026-10-13
AI Technical Summary
然而,成品芯片的成本高昂且供应不稳定,电阻分压网络的增益精度受电阻器件的影响较大,且需要使用较多电阻器件,占用空间大
[0015]本申请提供的可变增益放大电路,运算放大器的反相输入端通过电阻或电容连接运算放大器的输出端,采用闭环负反馈结构,元器件精简、无需传统的多电阻分压网络,其硬件结构简单,可大幅减小印刷电路板的占用面积,便于仪器小型化集成。该放大电路不依赖精密电阻的匹配,能够消除电阻误差、温漂与老化对增益的影响,增益稳定性与可靠性更高。滤波电路能够平滑脉冲电压,在运算放大器的反相输入端形成稳定的直流反馈,使输出的信号更平滑,为后续的信号处理提供更高精度、更稳定的放大信号。
Smart Images

Figure CN122908712A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of analog signal amplification technology, specifically to a variable gain amplifier circuit, a control method, and a voltage measurement device. Background Technology
[0002] When acquiring small DC signals, such as the voltage across a resistor, the signal typically needs to be amplified first, then converted from analog to digital via analog-to-digital conversion, and finally sampled and processed by a microcontroller unit. When the range of the acquired small signal is large, the gain of the amplifier circuit needs to be adjusted to improve the accuracy of the analog-to-digital conversion. Therefore, the variable gain amplifier circuit is the core component for amplifying and processing small DC signals.
[0003] In related technologies, variable gain amplification is mainly achieved through finished chips such as PGA205P and PGA204AU, or by using resistor divider networks. However, finished chips are expensive and have unstable supply, the gain accuracy of resistor divider networks is greatly affected by the resistors, and they require a large number of resistors, thus occupying a lot of space. Summary of the Invention
[0004] In view of this, this application provides a variable gain amplifier circuit, a control method, and a voltage measurement device, which can reduce the cost of the amplifier circuit, simplify the circuit structure, and improve the gain accuracy and gain stability.
[0005] To solve the above problems, the technical solution provided in this application is as follows: In a first aspect of this application, a variable gain amplifier circuit is proposed, comprising: an operational amplifier, a filter circuit, a switching module, and a controller; The non-inverting input of the operational amplifier is used to connect to the DC analog signal to be amplified; The first terminal of the filter circuit is connected to the inverting input terminal of the operational amplifier, the second terminal of the filter circuit is connected to the output terminal of the operational amplifier, and the output terminal is used to output the amplified DC analog signal; the third terminal of the filter circuit is connected to the first terminal of the switching module. The second terminal of the switching module is connected to the output terminal of the operational amplifier, and the third terminal of the switching module is grounded. The controller is used to send a control signal to the switch module to make the switch module conduct between the first terminal and the second terminal, or to make the first terminal of the switch module conduct between the third terminal.
[0006] In one possible implementation, the control signal is a pulse width modulation signal, and the gain of the amplifier circuit is inversely proportional to the duty cycle of the pulse width modulation signal.
[0007] In one possible implementation, the filter circuit includes a capacitor and a resistor; The first terminal of the capacitor is the first terminal of the filter circuit, and the second terminal of the capacitor is the second terminal of the filter circuit; The first end of the resistor is connected to the first end of the capacitor, and the second end of the resistor is the third end of the filter circuit.
[0008] In one possible implementation, the switching module includes a single-pole double-throw analog switch; The first terminal of the single-pole double-throw analog switch is the first terminal of the switch module, the second terminal of the single-pole double-throw analog switch is the second terminal of the switch module, and the third terminal of the single-pole double-throw analog switch is the third terminal of the switch module. The controller is specifically configured to send a first level to the single-pole double-throw analog switch to make the first terminal of the single-pole double-throw switch conduction with the second terminal; and to send a second level to the single-pole double-throw analog switch to make the first terminal of the single-pole double-throw switch conduction with the third terminal.
[0009] In one possible implementation, the switch module includes a first switch and a second switch; The first end of the first switch is connected to the first end of the second switch, the first end of the first switch is the first end of the switch module, the second end of the first switch is the second end of the switch module, and the second end of the second switch is the third end of the switch module. The controller is specifically configured to send a first level to the switch module to turn on the first switch and turn off the second switch; and to send a second level to the switch module to turn on the second switch and turn off the first switch.
[0010] In a second aspect of this application, a control method for a variable gain amplifier circuit is provided. The variable gain amplifier circuit includes: an operational amplifier, a filter circuit, and a switching module; the non-inverting input terminal of the operational amplifier is used to connect to a DC analog signal to be amplified; the first terminal of the filter circuit is connected to the inverting input terminal of the operational amplifier, the second terminal of the filter circuit is connected to the output terminal of the operational amplifier, and the output terminal is used to output the amplified DC analog signal; the third terminal of the filter circuit is connected to the first terminal of the switching module; the second terminal of the switching module is connected to the output terminal of the operational amplifier, and the third terminal of the switching module is grounded. The control method includes: A control signal is sent to the switch module to make the switch module conduct between the first terminal and the second terminal, or to make the first terminal of the switch module conduct between the third terminal.
[0011] In one possible implementation, the control signal is a pulse width modulation signal, and the gain of the amplifier circuit is inversely proportional to the duty cycle of the pulse width modulation signal.
[0012] In one possible implementation, the switch module includes a single-pole double-throw analog switch; the first terminal of the single-pole double-throw analog switch is the first terminal of the switch module, the second terminal of the single-pole double-throw analog switch is the second terminal of the switch module, and the third terminal of the single-pole double-throw analog switch is the third terminal of the switch module. The control method specifically includes: A high level is provided to the single-pole double-throw analog switch to connect the first and second terminals of the single-pole double-throw switch; a low level is provided to the single-pole double-throw analog switch to connect the first and third terminals of the single-pole double-throw switch.
[0013] In one possible implementation, the switch module includes a first switch and a second switch; a first end of the first switch is connected to a first end of the second switch, the first end of the first switch is a first end of the switch module, a second end of the first switch is a second end of the switch module, and a second end of the second switch is a third end of the switch module. The control method specifically includes: A high level is provided to the switch module to turn on the first switch and turn off the second switch; a low level is provided to the switch module to turn on the second switch and turn off the first switch.
[0014] In a third aspect of this application, a voltage measuring device is provided, comprising any of the above-described variable gain amplifier circuits and an analog-to-digital converter circuit; The output terminal of the variable gain amplifier circuit is connected to the input terminal of the analog-to-digital converter circuit, which is used to convert the output signal of the variable gain amplifier circuit into a digital signal.
[0015] The variable gain amplifier circuit provided in this application connects the inverting input of the operational amplifier to its output via a resistor or capacitor. Employing a closed-loop negative feedback structure, it features simplified components and eliminates the need for traditional multi-resistor voltage divider networks. Its simple hardware structure significantly reduces the footprint of the printed circuit board, facilitating miniaturized instrument integration. This amplifier circuit does not rely on precise resistor matching, eliminating the effects of resistor errors, temperature drift, and aging on the gain, resulting in higher gain stability and reliability. The filter circuit smooths pulse voltages and forms stable DC feedback at the inverting input of the operational amplifier, making the output signal smoother and providing a more accurate and stable amplified signal for subsequent signal processing. Attached Figure Description
[0016] Figure 1 This is a schematic diagram of a variable gain amplifier circuit in related technologies; Figure 2A schematic diagram of a first type of variable gain amplifier circuit provided in an embodiment of this application; Figure 3 A schematic diagram of a second variable gain amplifier circuit provided in an embodiment of this application; Figure 4 A schematic diagram of a third variable gain amplifier circuit provided in an embodiment of this application; Figure 5 A schematic diagram of a fourth variable gain amplifier circuit provided in an embodiment of this application; Figure 6 A flowchart illustrating a control method for a variable gain amplifier circuit provided in an embodiment of this application; Figure 7 This is a schematic diagram of a voltage measuring device provided in an embodiment of this application. Detailed Implementation
[0017] See Figure 1 The figure is a schematic diagram of a variable gain amplifier circuit in the related technology.
[0018] Figure 1 The variable gain amplifier circuit shown includes an operational amplifier A1, a multiplexer analog switch S, and N precision resistors, designated as first precision resistor R1, second precision resistor R2, and so on up to the Nth precision resistor RN. The first precision resistor R1, second precision resistor R2, and so on up to the Nth precision resistor RN are connected in series to form a voltage divider resistor network. The first end of the voltage divider resistor network is connected to the output terminal of operational amplifier A1, and the second end of the voltage divider resistor network is grounded. The input terminal of the multiplexer analog switch S is connected to the inverting input terminal of operational amplifier A1. Multiple selection terminals of the multiplexer analog switch S are respectively connected to different nodes of the voltage divider resistor network. For example, the first selection terminal of the multiplexer analog switch S is connected to the first end of the voltage divider resistor network, the second selection terminal of the multiplexer analog switch S is connected to the common terminal of the first precision resistor R1 and the second precision resistor R2, and so on, until the (N+1)th selection terminal of the multiplexer analog switch S is connected to the second end of the voltage divider resistor network. The non-inverting input terminal of operational amplifier A1 is used to input the DC analog signal to be amplified. Figure 1 In this circuit, operational amplifier A1, multiplexer analog switch S, and voltage divider resistor network together form an in-phase amplification structure. By selecting different feedback voltage divider nodes through multiplexer analog switch S, the feedback voltage ratio of the voltage divider resistor network can be switched, thereby achieving different amplification gain adjustments.
[0019] However, Figure 1The amplifier circuit shown relies on the matching accuracy of precision resistors for its gain accuracy, making it susceptible to factors such as temperature changes and device aging. Furthermore, it requires a large number of precision resistors, occupying a significant area on the printed circuit board, which is detrimental to the miniaturization design of measuring instruments. Therefore, to address these issues, this application provides a variable gain amplifier circuit and control method that can reduce the cost of the amplifier circuit, simplify the circuit structure, and improve gain accuracy and stability.
[0020] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the embodiments of this application will be further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0021] See Figure 2 The figure is a schematic diagram of the first variable gain amplifier circuit provided in the embodiment of this application.
[0022] Figure 2 The variable gain amplifier circuit provided in the embodiment includes: operational amplifier A1, filter circuit 30, switching module 20 and controller 10.
[0023] The non-inverting input of operational amplifier A1 is connected to the DC analog signal to be amplified; the first terminal of filter circuit 30 is connected to the inverting input of operational amplifier A1, the second terminal of filter circuit 30 is connected to the output of operational amplifier A1, and the output is used to output the amplified DC analog signal; the third terminal of filter circuit 30 is connected to the first terminal of switch module 20. The second terminal of switch module 20 is connected to the output of operational amplifier A1, and the third terminal of switch module 20 is grounded.
[0024] The controller 10 is used to send a control signal to the switch module 20 to connect the first terminal of the switch module 20 to the second terminal, or to connect the first terminal of the switch module 20 to the third terminal. Regardless of which state the switch module 20 is in, the voltage at the output terminal of the operational amplifier A1 is fed back to the inverting input terminal of the operational amplifier A1 through the filter circuit 30, so that the output signal of the operational amplifier A1 regulates the input signal of the operational amplifier A1, i.e., the DC analog signal to be amplified. Therefore, the amplification circuit provided in this embodiment always constitutes a negative feedback amplification circuit.
[0025] When the first and second terminals of the switching module 20 are connected, it can be regarded as the inverting input terminal of the operational amplifier A1 being connected to the output terminal of the operational amplifier A1 through the filter circuit 30. The amplified DC analog signal V2 is equal to the DC analog signal V1 to be amplified, that is, the gain of the amplifier circuit is 1 at this time.
[0026] When the first and third terminals of the switching module 20 are connected, it can be regarded as the inverting input terminal of the operational amplifier A1 being grounded. Since the voltage of the inverting input terminal of the operational amplifier A1 is pulled to ground, the voltage of the output terminal of the operational amplifier A1 is also reduced accordingly.
[0027] The controller 10 outputs a control signal to control the switch module 20 to alternate between the two states mentioned above. The filter circuit 30 smooths the voltage fluctuations caused by the switching of the switch module 20's conduction state, forming a stable DC average feedback voltage at the inverting input of the operational amplifier A1. Since the operational amplifier A1 satisfies the virtual short characteristic when operating with negative feedback, the average feedback voltage at the inverting input of the operational amplifier A1 directly determines the output voltage; therefore, as long as a stable DC average feedback voltage is obtained through the filter circuit 30, a stable and constant output voltage can be obtained.
[0028] The variable gain amplifier circuit provided in this application connects the inverting input of the operational amplifier to its output via a filter circuit. Employing a closed-loop negative feedback structure, it features simplified components and eliminates the need for traditional multi-resistor voltage divider networks. Its simple hardware structure significantly reduces the footprint of the printed circuit board, facilitating miniaturized instrument integration. This amplifier circuit does not rely on precise resistor matching, eliminating the effects of resistance errors, temperature drift, and aging on the gain, resulting in higher gain stability and reliability. The filter circuit smooths pulse voltages, forming stable DC feedback at the inverting input of the operational amplifier, making the output signal smoother and providing a more accurate and stable amplified signal for subsequent signal processing.
[0029] In one possible implementation, the amplifier circuit provided in this application embodiment uses a pulse width modulation (PWM) signal as the control signal, and the gain of the amplifier circuit is inversely proportional to the duty cycle D of the PWM signal.
[0030] Specifically, within one cycle of the PWM signal, the conduction time between the first and second terminals of the switching module 20 is Ton, and the conduction time between the first and third terminals of the switching module 20 is Toff. Then, the duty cycle of the PWM signal is D = Ton / (Ton + Toff).
[0031] See also Figure 2For operational amplifier A1, the average voltage V3 at its inverting input terminal and the amplified DC analog signal V2 at its output terminal have a relationship of V3 = D × V2. Because operational amplifier A1 has a virtual short characteristic, meaning the amplified DC analog signal V1 at its non-inverting input terminal and the average voltage V3 at its inverting input terminal have a relationship of V1 = V3, the amplified DC analog signal V2 and the amplified DC analog signal V1 satisfy V1 = D × V2, i.e., V2 / V1 = 1 / D. Therefore, the gain of this amplifier circuit is inversely proportional to the duty cycle D of the PWM signal.
[0032] The amplifier circuit provided in this application uses a PWM signal to control the amplifier circuit gain, enabling continuous and high-precision gain adjustment. Since the gain of this amplifier circuit is determined solely by the duty cycle of the PWM signal and is independent of the parameters of the resistors and capacitors, it can fundamentally eliminate the influence of resistor matching errors, temperature drift, and device aging on gain accuracy, significantly reducing circuit cost and substantially improving the stability and measurement accuracy of the amplifier circuit.
[0033] The embodiments of this application do not specifically limit the structure of the filter circuit 30. In one possible implementation, the filter circuit 30 includes a resistor and a capacitor.
[0034] See Figure 3 The figure is a schematic diagram of a second variable gain amplifier circuit provided in an embodiment of this application.
[0035] Figure 3 In this embodiment, the first end of capacitor C is the first end of filter circuit 30, and the second end of capacitor C is the second end of filter circuit 30; the first end of resistor R is connected to the first end of capacitor C, and the second end of resistor R is the third end of filter circuit 30.
[0036] When the first and second terminals of the switching module 20 are connected, the inverting input terminal of the operational amplifier A1 is connected to the output terminal of the operational amplifier A1 through the resistor R; when the first and third terminals of the switching module 20 are connected, the inverting input terminal of the operational amplifier A1 is grounded through the resistor R. Since the voltage of the inverting input terminal of the operational amplifier A1 is pulled to ground, the voltage of the output terminal of the operational amplifier A1 is also reduced accordingly.
[0037] In one possible implementation, in order to suppress voltage fluctuations caused by the state switching of the switching module 20, the RC time constant of the resistor R and the capacitor C is much larger than the period of the PWM signal, for example, the RC time constant is greater than 10 times the period of the PWM signal.
[0038] The amplifier circuit and filter circuit provided in this application embodiment include resistors and capacitors, and have a simple and easy-to-implement structure. Utilizing the energy storage characteristics of the capacitor and the current-limiting characteristics of the resistor, the pulsating voltage generated by the switching module can be smoothly integrated, stabilizing to form a stable DC average feedback voltage, ensuring the normal operation of the operational amplifier's negative feedback mechanism. Simultaneously, it can effectively filter out high-frequency interference and switching ripple, suppress voltage surges, resulting in a regular output signal waveform and lower noise, ensuring smooth and continuous gain adjustment, and significantly improving signal amplification accuracy and circuit stability.
[0039] The embodiments of this application do not specifically limit the specific structure of the switch module. The following provides a detailed description of two possible switch modules.
[0040] In one possible implementation, the amplifier circuit provided in this application embodiment includes a single-pole double-throw analog switch as its switching module.
[0041] See Figure 4 The figure is a schematic diagram of the third variable gain amplifier circuit provided in the embodiment of this application.
[0042] Figure 4 In the amplifier circuit provided in the embodiment, the first terminal of the single-pole double-throw analog switch S1 is the first terminal of the switch module 20, the second terminal of the single-pole double-throw analog switch S1 is the second terminal of the switch module 20, and the third terminal of the single-pole double-throw analog switch S1 is the third terminal of the switch module 20.
[0043] The controller 10 is specifically used to send a first level to the single-pole double-throw analog switch S1 to make the first terminal of the single-pole double-throw switch S1 conduct; and to send a second level to the single-pole double-throw analog switch S1 to make the first terminal of the single-pole double-throw switch S1 conduct.
[0044] The embodiments of this application do not specifically limit the values of the first level and the second level. The following embodiments are illustrated with the first level being high and the second level being low.
[0045] When the PWM signal is high, the first and second terminals of the single-pole double-throw analog switch S1 are connected, and the second terminal of the resistor R is connected to the output terminal of the operational amplifier A1. When the PWM signal is low, the first and third terminals of the single-pole double-throw analog switch S1 are connected, and the second terminal of the resistor R is grounded. Under the control of the PWM signal, the single-pole double-throw analog switch S1 alternates between the two conduction states at high frequency according to the duty cycle D of the PWM signal. Together with the integrating filter circuit composed of resistor R and capacitor C, a stable DC average feedback voltage can be formed at the inverting input terminal of the operational amplifier A1, realizing the continuous adjustment of the amplifier circuit gain.
[0046] This application does not specifically limit the model of the single-pole double-throw analog switch S1. Various commercially available single-pole double-throw analog switch chips can be flexibly selected according to the actual circuit operating frequency, input voltage range, on-resistance parameters and hardware cost requirements.
[0047] The amplifier circuit provided in this application embodiment uses a single-pole double-throw analog switch to switch the conduction state according to the duty cycle of the PWM signal to achieve gain control. This ensures the stability of operation under high-frequency switching, reduces output signal ripple, has low hardware cost, and a compact layout, which can further reduce the area occupied by the printed circuit board. At the same time, the gain of the amplifier circuit is determined only by the PWM duty cycle and is not affected by the internal resistance of the analog switch or the parameters of resistors and capacitors, resulting in higher amplification accuracy and long-term reliability, making it suitable for high-precision DC measurement scenarios.
[0048] In one possible implementation, the amplifier circuit provided in this application embodiment includes a first switch and a second switch in its switching module.
[0049] See Figure 5 This figure is a schematic diagram of the fourth variable gain amplifier circuit provided in the embodiments of this application.
[0050] Figure 5 In the amplifier circuit provided in the embodiment, the first terminal of the first switch S2 is connected to the first terminal of the second switch S3. The first terminal of the first switch S2 is the first terminal of the switch module 20, the second terminal of the first switch S2 is the second terminal of the switch module 20, and the second terminal of the second switch S3 is the third terminal of the switch module 20. This application embodiment does not specifically limit the selection of the first switch S2 and the second switch S3. In one possible implementation, both the first switch S2 and the second switch S3 are analog switches, for example, controllable switching transistors. That is, the controller 10 can both control the first switch S2 and the second switch S3 to be turned on and off.
[0051] The controller 10 is specifically used to send a first level to the switch module 20 to turn on the first switch S2 and turn off the second switch S3; and to send a second level to the switch module 20 to turn on the second switch S3 and turn off the first switch S2.
[0052] When the PWM signal is high, the first switch S2 is on and the second switch S3 is off, with the second terminal of resistor R connected to the output of operational amplifier A1. When the PWM signal is low, the second switch S3 is on and the first switch S2 is off, with the second terminal of resistor R grounded. The first switch S2 and the second switch S3 alternately turn on and off according to the duty cycle of the PWM signal. Together with the integral filter structure formed by resistor R and capacitor C, a stable DC average feedback voltage is formed at the inverting input of operational amplifier A1, realizing the continuous adjustment of the amplifier circuit gain.
[0053] The amplifier circuit provided in this application embodiment features independently controlled first and second switches with clear switching logic, enabling stable switching between two feedback conditions. The overall architecture of this amplifier circuit is highly versatile and adaptable to various hardware design scenarios. By adjusting the gain according to the PWM signal duty cycle, it avoids the impact of component parameter deviations or temperature changes on accuracy, ensuring stable and reliable amplification performance and expanding the practical application range of the amplifier circuit.
[0054] Based on the variable gain amplifier circuit provided in the above embodiments, this application also provides a control method for the variable gain amplifier circuit. The control method for the variable gain amplifier circuit provided in this application is applied to any of the variable gain amplifier circuits provided in the above embodiments. The variable gain amplifier circuit includes: an operational amplifier, a filter circuit, and a switching module; the non-inverting input terminal of the operational amplifier is used to connect to the DC analog signal to be amplified; the first terminal of the filter circuit is connected to the inverting input terminal of the operational amplifier, the second terminal of the filter circuit is connected to the output terminal of the operational amplifier, and the third terminal of the filter circuit is connected to the first terminal of the switching module; the second terminal of the switching module is connected to the output terminal of the operational amplifier, and the third terminal of the switching module is grounded.
[0055] See Figure 6 The figure is a flowchart of a control method for a variable gain amplifier circuit provided in an embodiment of this application.
[0056] Control methods include: S101: Send a control signal to the switch module to make the first terminal of the switch module conduct between the second terminal or the third terminal.
[0057] For example, the controller sends a control signal to the switching module, causing the switching module to switch between a state where the first and second terminals are conducting and a state where the first and third terminals are conducting. The filter circuit smooths the pulse voltage generated by the switching, forming a stable DC average feedback voltage at the inverting input of the operational amplifier. Since the operational amplifier satisfies the virtual short characteristic when operating with negative feedback, the average feedback voltage at the inverting input of the operational amplifier directly determines the output voltage; therefore, as long as a stable DC average feedback voltage is obtained through the filter circuit, a stable and constant output voltage can be obtained.
[0058] The control method for the variable gain amplifier circuit provided in this application does not rely on the matching of precision resistors, and can eliminate the influence of resistance error, temperature drift and aging on the gain, resulting in higher gain stability and reliability. The amplifier circuit components are simplified and do not require traditional multi-resistor voltage divider networks. Its hardware structure is simple, which can significantly reduce the area occupied by the printed circuit board and facilitate the miniaturization and integration of instruments.
[0059] In one possible implementation, the control method provided in this application embodiment uses a pulse width modulation signal as the control signal, and the gain of the amplifier circuit is inversely proportional to the duty cycle of the pulse width modulation signal.
[0060] The control method provided in this application uses a PWM signal to control the gain of an amplifier circuit, enabling continuous and high-precision gain adjustment. Since the gain of this amplifier circuit is determined solely by the duty cycle of the PWM signal and is independent of the parameters of the filter circuit, it can fundamentally eliminate the influence of resistor matching errors, temperature drift, and device aging on gain accuracy, significantly reducing circuit costs and substantially improving the stability and measurement accuracy of the amplifier circuit.
[0061] In one possible implementation, the control method provided in this application includes a switch module comprising a single-pole double-throw analog switch; the first end of the single-pole double-throw analog switch is the first end of the switch module, the second end of the single-pole double-throw analog switch is the second end of the switch module, and the third end of the single-pole double-throw analog switch is the third end of the switch module.
[0062] The control methods specifically include: A high level is provided to the single-pole double-throw analog switch to make the first and second terminals of the single-pole double-throw switch conduct; a low level is provided to the single-pole double-throw analog switch to make the first and third terminals of the single-pole double-throw switch conduct.
[0063] When the PWM signal is high, the first and second terminals of the single-pole double-throw (SPDT) analog switch are connected, and the second terminal of the resistor is connected to the output of the operational amplifier. When the PWM signal is low, the first and third terminals of the SPDT analog switch are connected, and the second terminal of the resistor is grounded. Under the control of the PWM signal, the SPDT analog switch alternates between the two conduction states at high frequency according to the duty cycle of the PWM signal. Combined with a filter circuit, this can generate a stable DC average feedback voltage at the inverting input of the operational amplifier, enabling continuous adjustment of the amplifier gain.
[0064] The control method provided in this application embodiment achieves gain control by controlling the conduction state of a single-pole double-throw analog switch using a PWM signal. This ensures operational stability under high-frequency switching, reduces output signal ripple, has low hardware cost, and a compact layout, further reducing the footprint of the printed circuit board. Meanwhile, the gain of the amplifier circuit is determined solely by the PWM duty cycle and is not affected by the internal resistance of the analog switch or resistor and capacitor parameters, resulting in higher amplification accuracy and long-term reliability, making it suitable for high-precision DC measurement scenarios.
[0065] In one possible implementation, the control method provided in this application embodiment includes a switch module comprising a first switch and a second switch; a first end of the first switch is connected to a first end of the second switch, the first end of the first switch is a first end of the switch module, the second end of the first switch is a second end of the switch module, and the second end of the second switch is a third end of the switch module.
[0066] The control methods specifically include: A high-level signal is provided to the switch module to turn on the first switch and turn off the second switch; a low-level signal is provided to the single-pole double-throw analog switch to turn on the second switch and turn off the first switch.
[0067] The control method provided in this application independently controls the first and second switches, with clear switching logic, and can stably switch between two feedback conditions. The overall architecture of this amplifier circuit is highly versatile and adaptable to different hardware design scenarios. By adjusting the gain according to the PWM signal duty cycle, the accuracy impact caused by component parameter deviations or temperature changes can be avoided, resulting in stable and reliable amplification performance and expanding the practical application range of the amplifier circuit.
[0068] The controller provided in this application embodiment may include software to implement the control methods described above. Alternatively, the controller provided in this application embodiment may include hardware to implement the control methods described above. Or, the controller provided in this application embodiment may include both software and hardware, using a combination of software and hardware to execute the control methods described above.
[0069] Based on the variable gain amplifier circuit provided in the above embodiments, this application also provides a voltage measuring device. The voltage measuring device provided in this application includes any of the variable gain amplifier circuits provided in the above embodiments, and an analog-to-digital converter circuit.
[0070] See Figure 7 The figure is a schematic diagram of a voltage measuring device provided in an embodiment of this application.
[0071] Figure 7 In this embodiment, the output terminal of the variable gain amplifier circuit 100 is connected to the input terminal of the analog-to-digital converter circuit 200. The output terminal of the variable gain amplifier circuit 100 is the output terminal of the operational amplifier A1, and the analog-to-digital converter circuit 200 is used to convert the output signal of the variable gain amplifier circuit 100 into a digital signal.
[0072] Specifically, the non-inverting input of the variable gain amplifier circuit 100 is connected to the weak DC voltage signal to be detected, and is used to accurately and continuously amplify the DC analog voltage signal. The output of the variable gain amplifier circuit 100 is electrically connected to the input of the analog-to-digital converter circuit 200, which is used to convert the amplified analog voltage signal into a digital signal to achieve accurate measurement of the weak DC voltage.
[0073] The voltage measuring device provided in this application includes a variable gain amplifier circuit, which eliminates the need for a precision resistor voltage divider network or a dedicated programmable gain amplifier chip. Its hardware structure is simple, small in size, and low in cost, facilitating miniaturization and mass production. The gain of the voltage measuring device is determined solely by the duty cycle of the PWM signal, fundamentally eliminating measurement errors caused by parameter deviations. This significantly improves voltage measurement accuracy and long-term operational stability. Furthermore, the gain can be continuously and dynamically adapted by adjusting the PWM duty cycle through a controller. It can adapt to DC voltage detection of different amplitudes without hardware modifications, offering a wide measurement range, strong versatility and expandability, and is well-suited for various high-precision DC voltage continuous sampling scenarios.
[0074] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0075] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A variable gain amplifier circuit, characterized in that, include: Operational amplifiers, filter circuits, switching modules, and controllers; The non-inverting input of the operational amplifier is used to connect to the DC analog signal to be amplified; The first terminal of the filter circuit is connected to the inverting input terminal of the operational amplifier, the second terminal of the filter circuit is connected to the output terminal of the operational amplifier, and the output terminal is used to output the amplified DC analog signal; the third terminal of the filter circuit is connected to the first terminal of the switching module. The second terminal of the switching module is connected to the output terminal of the operational amplifier, and the third terminal of the switching module is grounded. The controller is used to send a control signal to the switch module to make the switch module conduct between the first terminal and the second terminal, or to make the first terminal of the switch module conduct between the third terminal.
2. The amplifier circuit according to claim 1, characterized in that, The control signal is a pulse width modulation signal, and the gain of the amplifier circuit is inversely proportional to the duty cycle of the pulse width modulation signal.
3. The amplifier circuit according to claim 2, characterized in that, The filter circuit includes capacitors and resistors; The first terminal of the capacitor is the first terminal of the filter circuit, and the second terminal of the capacitor is the second terminal of the filter circuit; The first end of the resistor is connected to the first end of the capacitor, and the second end of the resistor is the third end of the filter circuit.
4. The amplifier circuit according to claim 3, characterized in that, The switching module includes a single-pole double-throw analog switch; The first terminal of the single-pole double-throw analog switch is the first terminal of the switch module, the second terminal of the single-pole double-throw analog switch is the second terminal of the switch module, and the third terminal of the single-pole double-throw analog switch is the third terminal of the switch module. The controller is specifically configured to send a first level to the single-pole double-throw analog switch to make the first terminal of the single-pole double-throw switch conduction with the second terminal; and to send a second level to the single-pole double-throw analog switch to make the first terminal of the single-pole double-throw switch conduction with the third terminal.
5. The amplifier circuit according to claim 3, characterized in that, The switch module includes a first switch and a second switch; The first end of the first switch is connected to the first end of the second switch, the first end of the first switch is the first end of the switch module, the second end of the first switch is the second end of the switch module, and the second end of the second switch is the third end of the switch module. The controller is specifically used to send a first level to the switch module to turn on the first switch and turn off the second switch; A second level signal is sent to the switch module to turn on the second switch and turn off the first switch.
6. A control method for a variable gain amplifier circuit, characterized in that, The variable gain amplifier circuit includes an operational amplifier, a filter circuit, and a switching module. The non-inverting input of the operational amplifier is connected to the DC analog signal to be amplified. The first terminal of the filter circuit is connected to the inverting input of the operational amplifier, and the second terminal of the filter circuit is connected to the output of the operational amplifier, which is used to output the amplified DC analog signal. The third terminal of the filter circuit is connected to the first terminal of the switching module. The second terminal of the switching module is connected to the output of the operational amplifier, and the third terminal of the switching module is grounded. The control method includes: Send a control signal to the switch module to make the first terminal of the switch module conduct between the second terminal, or to make the first terminal of the switch module conduct between the third terminal.
7. The control method according to claim 6, characterized in that, The control signal is a pulse width modulation signal, and the gain of the amplifier circuit is inversely proportional to the duty cycle of the pulse width modulation signal.
8. The control method according to claim 7, characterized in that, The switch module includes a single-pole double-throw analog switch; the first terminal of the single-pole double-throw analog switch is the first terminal of the switch module, the second terminal of the single-pole double-throw analog switch is the second terminal of the switch module, and the third terminal of the single-pole double-throw analog switch is the third terminal of the switch module. The control method specifically includes: A high level is provided to the single-pole double-throw analog switch to connect the first and second terminals of the single-pole double-throw switch; a low level is provided to the single-pole double-throw analog switch to connect the first and third terminals of the single-pole double-throw switch.
9. The control method according to claim 7, characterized in that, The switch module includes a first switch and a second switch; a first end of the first switch is connected to a first end of the second switch, the first end of the first switch is a first end of the switch module, the second end of the first switch is a second end of the switch module, and the second end of the second switch is a third end of the switch module. The control method specifically includes: A high level is provided to the switch module to turn on the first switch and turn off the second switch; a low level is provided to the switch module to turn on the second switch and turn off the first switch.
10. A voltage measuring device, characterized in that, Includes the variable gain amplifier circuit and analog-to-digital converter circuit provided in any one of claims 1-5; The output terminal of the variable gain amplifier circuit is connected to the input terminal of the analog-to-digital converter circuit, which is used to convert the output signal of the variable gain amplifier circuit into a digital signal.