Analog resistance output device
By designing an analog resistor output device including a microcontroller unit and a programmable differential gain amplifier, the problem of insufficient analog resistor accuracy in the prior art is solved, and a high-precision output of 0.01% is achieved.
Patent Information
- Application Number
- CN202411981854.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-05-02
AI Technical Summary
The existing analog resistor output is difficult to achieve 0.01% accuracy in sensor measurement and cannot meet the usage requirements.
Design an analog resistor output device, including a microcontroller unit, a sampling resistor, a programmable differential gain amplifier, a digital-to-analog converter, and a digital potentiometer. The microcontroller unit is used to digitally adjust each part of the parameters to optimize the analog resistor output process.
By continuously optimizing parameters, we ensure that the maximum accuracy of the analog resistor reaches 0.01%, meeting the high accuracy requirements of sensor measurement.
Smart Images

Figure CN119921776A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of analog resistor technology, and in particular to an analog resistor output device. Background Art
[0002] Analog resistance output is also widely used in sensor measurement. Common resistive sensors include pressure sensors, temperature sensors, and humidity sensors. These sensors reflect changes in the measured physical quantity through changes in resistance values and are used in industrial automation, manufacturing, environmental monitoring and other fields.
[0003] In the related art, the output accuracy of the analog resistor is difficult to reach 0.01%, which cannot meet the usage requirements.
[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0005] In view of at least one of the above technical problems, the present application provides an analog resistance output device.
[0006] The present application provides an analog resistance output device, comprising:
[0007] Micro control unit;
[0008] A sampling resistor, used for receiving an excitation current and generating an excitation voltage;
[0009] A programmable differential gain amplifier is connected to the sampling resistor and the microcontroller unit. The programmable differential gain amplifier is used to control the gain value by the microcontroller unit. The programmable differential gain amplifier is also used to generate a reference voltage according to the excitation voltage and the gain value. The reference voltage is close to the target reference voltage.
[0010] The digital-to-analog converter is connected to the programmable differential gain amplifier and the microcontroller unit respectively. The digital-to-analog converter is used to obtain the D value output by the microcontroller unit. The digital-to-analog converter is also used to output an output voltage according to the D value and a reference voltage.
[0011] The digital potentiometer is connected to the digital-to-analog converter. The digital potentiometer is used to obtain the voltage division ratio, divide the output voltage according to the voltage division ratio, and calculate the analog resistance.
[0012] One of the above technical solutions has at least one of the following advantages or beneficial effects: In this application, the microcontroller unit monitors and controls each part, continuously digitally adjusts the gain of the programmable differential gain amplifier, the D value of the digital-to-analog converter, and the digital voltage divider ratio of the digital potentiometer and other parameters, and continuously optimizes the entire analog resistance output process according to the feedback signal, thereby ensuring that the maximum accuracy of the analog resistance reaches 0.01%.
[0013] In a possible implementation manner, the reference voltage is less than the target reference voltage.
[0014] In a possible implementation, the gain value is 1, 2, 4, 8, 16, 32, 64 or 128.
[0015] In a possible implementation, the microcontroller unit selects a gain value according to the voltage generated by the sampling resistor, and outputs the gain value to a programmable differential gain amplifier.
[0016] In a possible implementation, the calculation formula of the reference voltage is:
[0017] V REF =I×R1×G
[0018] Among them, V REF is the reference voltage, I is the excitation current, R1 is the sampling resistor, and G is the gain value.
[0019] In one possible implementation, the output voltage is calculated as follows:
[0020]
[0021] Among them, V OUT is the output voltage, D is the D value of the digital-to-analog converter, V REF is the reference voltage.
[0022] In a possible implementation, the voltage divider ratio is calculated as:
[0023]
[0024] Among them, G1 is the voltage division ratio and G is the gain value.
[0025] In a possible implementation, the micro control unit is connected to the digital-to-analog converter via an SPI serial port.
[0026] In one possible implementation, the analog resistance output device also includes: an analog-to-digital converter, the first end of the analog-to-digital converter is connected to the programmable differential gain amplifier, the second end of the analog-to-digital converter is connected to the microcontroller unit, and the analog-to-digital converter is used to collect a reference voltage and output it to the microcontroller unit.
[0027] In a possible implementation, the analog resistance output device further includes: an amplifier connected to the digital potentiometer.
[0028] The present application is further described below in conjunction with the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0030] Figure 1 4 is a structural diagram of the analog resistance output device shown in an embodiment of the present application. DETAILED DESCRIPTION
[0031] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the specific embodiments of the present application are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present application, so the present application is not limited by the specific embodiments disclosed below.
[0032] This application is mainly used in pressure sensors and temperature and humidity sensors. For pressure sensors, they usually work based on the piezoresistive effect, that is, pressure changes will cause the resistance value of the sensitive element inside the sensor to change, and the pressure is indirectly measured by detecting the resistance change. In temperature and humidity sensors, some types also rely on the influence of humidity or temperature on the resistance characteristics of specific materials to achieve measurement functions. As a key representation form of sensor signal output, the accuracy of analog resistance directly determines the accuracy and reliability of the sensor's measurement of physical quantities such as pressure, temperature and humidity. Therefore, it is crucial to ensure the high-precision output of analog resistance.
[0033] like Figure 1 As shown, this embodiment provides an analog resistance output device, including: a micro control unit 100, a sampling resistor R1, a programmable differential gain amplifier 200, a digital-to-analog converter 300, a digital potentiometer 400, an analog-to-digital converter 500 and an amplifier 600.
[0034] A microcontrol unit 100; a sampling resistor R1, used for receiving an excitation current and generating an excitation voltage; a programmable differential gain amplifier 200, connected to the sampling resistor R1 and the microcontrol unit 100, the programmable differential gain amplifier 200 is used for the microcontrol unit 100 to control a gain value, and the programmable differential gain amplifier 200 is also used for generating a reference voltage according to the excitation voltage and the gain value, and the reference voltage is close to a target reference voltage; a digital-to-analog converter 300, respectively connected to the programmable differential gain amplifier 200 and the microcontrol unit 100, the digital-to-analog converter 300 is used for obtaining a D value output by the microcontrol unit 100, and the digital-to-analog converter 300 is also used for outputting an output voltage according to the D value and the reference voltage; a digital potentiometer 400, connected to the digital-to-analog converter 300, the digital potentiometer 400 is used for obtaining a voltage division ratio, and dividing the output voltage according to the voltage division ratio to calculate an analog resistance.
[0035] The analog resistance output device of this embodiment is composed of a microcontroller unit 100 that continuously digitally adjusts the gain of the programmable differential gain amplifier 200, the D value of the digital-to-analog converter 300, and the digital voltage divider ratio of the digital potentiometer 400 by monitoring and controlling each part, and continuously optimizes the entire analog resistance output process according to the feedback signal, thereby ensuring that the highest accuracy of the analog resistance reaches 0.01%. In other words, the microcontroller unit controls the programmable differential gain amplifier and the digital potentiometer through a digital program to achieve improved accuracy.
[0036] Specifically, the reference voltage is less than the target reference voltage. The target reference voltage is 2.5V, and the reference voltage cannot exceed the target reference voltage.
[0037] Specifically, the gain value is 1, 2, 4, 8, 16, 32, 64 or 128.
[0038] In practical applications, the microcontroller unit 100 selects a gain value according to the voltage generated by the sampling resistor R1 and outputs it to the programmable differential gain amplifier 200. It is worth noting that by selecting the gain value, the reference voltage is close to but does not exceed the target reference voltage, so that the reference voltage reaches the optimal input condition.
[0039] Exemplarily, the required range of the excitation current is 7.5uA-3.0mA, and the target reference voltage is 2.5V. Assuming that the excitation current is 200μA, the resistance of the sampling resistor R1 is 2000Ω, the voltage generated by the sampling resistor R1 is 0.2*2000=0.4V, and the microcontroller unit 100 selects the gain value G=4 based on the voltage, then the reference voltage is 4*0.4=1.6V.
[0040] Assuming that the excitation current is 3 mA, the resistance of the sampling resistor R1 is 2000Ω, the voltage generated by the sampling resistor R1 is 0.3*2000=0.6V, and the micro control unit 100 selects the gain value G=4 according to the voltage, so the reference voltage is 4*0.6=2.4V.
[0041] In addition, in this embodiment, the calculation formula of the reference voltage is:
[0042] V REF =I×R1×G
[0043] Among them, V REF is the reference voltage, I is the excitation current, R1 is the sampling resistor, and G is the gain value.
[0044] The output voltage is calculated as:
[0045]
[0046] Among them, V OUT is the output voltage, D is the D value of the digital-to-analog converter 300, V REF is the reference voltage.
[0047] The voltage divider ratio is calculated as:
[0048]
[0049] Among them, G1 is the voltage division ratio and G is the gain value.
[0050] It is worth noting that after the microcontroller 100 determines the gain value, it also determines the voltage divider ratio of the digital potentiometer 400. At the same time, the minimum resolution of the analog resistor is also determined. Because R = U / I = D*I*R1*G*G1 / 65536 / I = D*R1*G*G1 / 65536, the accuracy of the analog resistor output is related to the sampling resistor R1, the D value of the digital-to-analog converter 300, and the gain value. Therefore, after the microcontroller 100 determines the gain value, the minimum resolution of its analog resistor can also be determined at the same time.
[0051] Continuing with the example of an excitation current of 3mA, a sampling resistor R1 of 2000Ω, a gain value of G=4, and a reference voltage of 2.4V, the minimum resolution of the analog resistor is
[0052] D*R1*G*G1 / 65536=1*2000*G*G1 / 65536=1*2000*4*(1 / 8) / 65536=0.015, where D is an integer and the minimum is 1.
[0053] When the resistance input value is 50.00Ω, D=50.00 / 0.015=3333, then the actual output resistance value=3333*0.015=49.995, accuracy=0.005 / 50.00=0.01%, achieving an accuracy of 0.01%.
[0054] like Figure 1 As shown, the micro control unit 100 is connected to the digital-to-analog converter 300 via an SPI serial port, which can increase the data transmission speed, for example, the transmission speed of the D value of the digital-to-analog converter 300 .
[0055] like Figure 1 As shown, the analog resistance output device also includes: an analog-to-digital converter 500, the first end of the analog-to-digital converter 500 is connected to the programmable differential gain amplifier 200, the second end of the analog-to-digital converter 500 is connected to the microcontroller unit 100, and the analog-to-digital converter 500 is used to collect a reference voltage and output it to the microcontroller unit 100.
[0056] like Figure 1 As shown, the analog resistance output device further includes: an amplifier 600, and the amplifier 600 is connected to the digital potentiometer.
[0057] The above are only preferred embodiments of the present application, and do not constitute any formal limitation on the present application. Any technician familiar with the art can use the above disclosed methods and technical contents to make many possible changes and modifications to the technical solution of the present application without departing from the scope of the technical solution of the present application, or modify it into an equivalent embodiment of equivalent changes. Therefore, all equivalent changes made according to the shape, structure and principle of the present application without departing from the content of the technical solution of the present application should be included in the protection scope of the present application.
Claims
1. An analog resistance output device, characterized in that: include: Micro control unit; A sampling resistor, used for receiving an excitation current and generating an excitation voltage; A programmable differential gain amplifier is connected to the sampling resistor and the micro control unit, wherein the programmable differential gain amplifier is used to control the gain value by the micro control unit, and the programmable differential gain amplifier is also used to generate a reference voltage according to the excitation voltage and the gain value, and the reference voltage is close to the target reference voltage; A digital-to-analog converter, connected to the programmable differential gain amplifier and the microcontroller unit, respectively, the digital-to-analog converter is used to obtain the D value output by the microcontroller unit, and the digital-to-analog converter is also used to output an output voltage according to the D value and the reference voltage; A digital potentiometer is connected to the digital-to-analog converter, and is used to obtain a voltage division ratio, divide the output voltage according to the voltage division ratio, and calculate an analog resistance.
2. The analog resistance output device according to claim 1, characterized in that: The reference voltage is lower than the target reference voltage.
3. The analog resistance output device according to claim 1, characterized in that: The gain value is 1, 2, 4, 8, 16, 32, 64 or 128.
4. The analog resistance output device according to claim 1, characterized in that: The micro control unit selects a gain value according to the voltage generated by the sampling resistor and outputs it to the programmable differential gain amplifier.
5. The analog resistance output device according to claim 1, characterized in that: The calculation formula of the reference voltage is: In REF =I×R1×G Among them, V REF is the reference voltage, I is the excitation current, R1 is the sampling resistor, and G is the gain value.
6. The analog resistance output device according to claim 5, characterized in that: The calculation formula of the output voltage is: Among them, V OUT is the output voltage, D is the D value of the digital-to-analog converter, V REF is the reference voltage.
7. The analog resistance output device according to claim 1, characterized in that: The calculation formula of the voltage divider ratio is: Among them, G1 is the voltage division ratio and G is the gain value.
8. The analog resistance output device according to claim 1, characterized in that: The micro control unit is connected to the digital-to-analog converter via an SPI serial port.
9. The analog resistance output device according to claim 1, characterized in that: The analog resistance output device also includes: an analog-to-digital converter, a first end of the analog-to-digital converter is connected to the programmable differential gain amplifier, a second end of the analog-to-digital converter is connected to the micro control unit, and the analog-to-digital converter is used to collect a reference voltage and output it to the micro control unit.
10. The analog resistance output device according to claim 1, characterized in that: The analog resistance output device further includes: an amplifier connected to the digital potentiometer.