CN111257641B - Wide resistance range signal acquisition circuit and corresponding acquisition method - Google Patents
Wide resistance range signal acquisition circuit and corresponding acquisition method Download PDFInfo
- Publication number
- CN111257641B CN111257641B CN202010115647.4A CN202010115647A CN111257641B CN 111257641 B CN111257641 B CN 111257641B CN 202010115647 A CN202010115647 A CN 202010115647A CN 111257641 B CN111257641 B CN 111257641B
- Authority
- CN
- China
- Prior art keywords
- resistance
- pull
- resistor
- range
- controllable switch
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01R—MEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
- G01R27/00—Arrangements for measuring resistance, reactance, impedance, or electric characteristics derived therefrom
- G01R27/02—Measuring real or complex resistance, reactance, impedance, or other two-pole characteristics derived therefrom, e.g. time constant
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B19/00—Programme-control systems
- G05B19/02—Programme-control systems electric
- G05B19/04—Programme control other than numerical control, i.e. in sequence controllers or logic controllers
- G05B19/042—Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
- G05B19/0423—Input/output
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
- Measurement Of Resistance Or Impedance (AREA)
Abstract
The invention relates to a wide resistance range signal acquisition circuit and a corresponding acquisition method, wherein the circuit is combined with the method to sample the range of a resistance signal to be detected through a range detection module, a resistance selection module determines the range of the range according to the range, and controls a pull-up resistance module to provide different resistance values according to the range of the range, so that a resistance corresponding to the range is selected for signal acquisition, and the requirement of accurately acquiring the wider resistance range signal is met. The wide resistance range signal acquisition circuit and the corresponding acquisition method have the characteristics of accurate measurement, wide application range and lower cost.
Description
Technical Field
The invention relates to the technical field of automobile electronic control, in particular to the technical field of hardware function detection of an automobile combination instrument, and specifically relates to a wide resistance range signal acquisition circuit.
Background
The vehicle-mounted instrument resistance signals are many, if the traditional signals have oil mass signals, the range of the signals is 0-180 omega, and the signals are more in the whole vehicle. The traditional method is that a pull-up resistor is used for acquiring signals, the acquisition in a wide resistor range can not be generally met, and when the signals in the wide resistor range can only accurately acquire resistance values near an alarm point, the resistance signals in a full-range can not be accurately sampled. At present, many host factories and driver clients no longer only meet the requirement that alarm lamps can give an alarm, but also require to display physical quantities of the signals on a screen, such as ambient temperature, engine oil temperature and the like, the screen display interface is shown in fig. 1, and as can be seen from the figure, the requirement of temperature display is needed, and the traditional circuit has poor resolution at the limit position of the measuring range and cannot meet the requirement of users.
Taking the ambient temperature display as an example, assuming that the customer requests to display a value in the range of-40 to 100 degrees celsius, it can be known from table 1 below that the resistance value in the corresponding range should be about 50k to 210 ohm, the first column in table 1 is the temperature, the unit is celsius, the second column is the resistance value, the third column is the lower resistance limit, and the fourth column is the upper resistance limit:
TABLE 1
And if the engine oil temperature is required to be displayed, the engine oil temperature needs to be alarmed at 100 ℃. However, both less than-40 degrees and greater than or equal to 140 degrees require diagnostics, which requires functionally defining the resistance range as 20 ohms and 36K. It can be seen that the range of required resistances is particularly large to meet the test requirements.
In the field of off-board electronics, there is a way to measure resistance values at different ranges. But often methods use dip switches or relays to implement or even select high cost electronic switches. This obviously does not meet the requirements of automation and low price of the vehicle-mounted instrument.
As shown in fig. 2, the sampling circuit in the prior art includes a resistor R104, a resistor R92 and a capacitor C45, and performs resistance signal acquisition by leading out one end of the connection between the resistor R104 and the resistor R92, and transmits the signal to an external sensor, which may be regarded as a rheostat as shown in fig. 3. If the oil quantity signal acquisition is required to be carried out by adopting the circuit, the selection of 200 ohms for the R104 is more suitable if the range of the oil quantity signal is 0-180 omega. If the sensor range is 1K to 5K. R104 may be 2K. But the range of the temperature sensor is 200 omega-50K if meeting. At this time, R104 selects the resistance value anyway, which is lost, for the following reasons:
if 200 ohms is selected, the acquisition is accurate in a small resistance range, by taking a 10-bit AD converter commonly used by a single chip as an example, 1024 AD values can be generated by the 10-bit AD converter at most, and a conversion formula between the actually measured voltage and the sampled AD value is as follows: AD (measured voltage value/AD converter reference voltage value) × 1024. In the following calculation, the "AD converter reference voltage value" is substituted with 5V, and the following calculation is performed:
Even if the resistance values at the stage differ by 1 ohm, the AD values can be distinguished;
At the moment, the difference of the resistance values of the sensors is 2K, and AD cannot be identified. At this point the minimum resolution is already greater than 5%, which is unacceptable to the customer.
If a larger value is used for the pull-up resistor, such as 10K, then it is expected that the sampling of large resistance values will be much more accurate, but the sampling resolution of small resistance values will be poor.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provide a wide resistance range signal acquisition circuit which is reliable, high in precision and capable of effectively meeting the requirements of users.
In order to achieve the above object, the wide resistance range signal acquisition circuit of the present invention has the following configuration:
the wide resistance range signal acquisition circuit is mainly characterized in that the circuit comprises a range detection module, a pull-up resistance module and a resistance selection module;
the range detection module is used for sampling the range of the resistance signal to be detected by the wide resistance range signal acquisition circuit and transmitting the sampled range to the resistance selection module, and the resistance selection module determines the range of the range according to the range and controls the pull-up resistance module to provide different resistance values according to the range of the range.
Preferably, the pull-up resistor module comprises at least two pull-up resistors with different resistance values;
the resistance selection module comprises a selection submodule and controllable switches with the same number as the pull-up resistors;
each pull-up resistor is connected with a power supply end through the corresponding controllable switch;
the selection submodule selects the pull-up resistor with the corresponding resistance value to apply by controlling the on-off of each controllable switch.
Preferably, the pull-up resistor module comprises two pull-up resistors with different resistance values, namely a first pull-up resistor and a second pull-up resistor;
the selection submodule comprises a singlechip, an inverting unit and two controllable switches, wherein the two controllable switches are respectively a first controllable switch and a second controllable switch;
the first end of the first pull-up resistor is connected with the power supply end through the first controllable switch, and the first end of the second pull-up resistor is connected with the power supply end through the second controllable switch;
the input end of the singlechip is connected with the output end of the range detection module;
the control end of the first controllable switch is directly connected with the output end of the single chip microcomputer, and the control end of the second controllable switch is connected with the output end of the single chip microcomputer through the negation unit.
Furthermore, the negation unit comprises a first resistor, a second resistor and a third controllable switch;
the output end of the singlechip is connected with the control end of the third controllable switch through the first resistor;
the first end of the third controllable switch is connected with the power supply end through the second resistor, the first end of the third controllable switch is also connected with the control end of the second controllable switch, and the second end of the third controllable switch is grounded.
Furthermore, the first controllable switch is composed of a first PNP type triode, the second controllable switch is composed of a second PNP type triode, and the third controllable switch is composed of a first NPN type triode;
the base electrode of the first PNP type triode forms the control end of the first controllable switch, the base electrode of the first PNP type triode is connected with the output end of the single chip microcomputer through a third resistor R248, the emitting electrode of the first PNP type triode is connected with the power supply end, and the collecting electrode of the first PNP type triode is connected with the first end of the first pull-up resistor;
the base electrode of the second PNP type triode forms the control end of the second controllable switch, the base electrode of the second PNP type triode is connected with the collector electrode of the first NPN type triode through a fourth resistor, the emitter electrode of the second PNP type triode is connected with the power supply end, and the collector electrode of the second PNP type triode is connected with the first end of the second pull-up resistor;
the base electrode of the first NPN type triode forms the control end of the third controllable switch, the collector electrode of the first NPN type triode forms the first end of the third controllable switch, and the emitter electrode of the first NPN type triode forms the second end of the third controllable switch.
Preferably, the circuit further comprises a fifth resistor and a capacitor;
the first end of the fifth resistor is connected with one end of each pull-up resistor, which is not connected with the controllable switch, the second end of the fifth resistor is grounded through the capacitor, one end of the fifth resistor, which is led out from the connection part of the fifth resistor and the capacitor, is connected with the measuring range detection module, and one end of the fifth resistor, which is led out from the connection part of each pull-up resistor, is connected with the resistance signal to be detected.
Furthermore, the measuring range detecting module is further connected with one end of each pre-selected pull-up resistor in the pull-up resistor module, which is connected with the controllable switch, wherein each pre-selected pull-up resistor is the pull-up resistor with a resistance value smaller than a user preset resistance value in all the pull-up resistors in the pull-up resistor module.
A method for realizing wide resistance range signal acquisition based on the circuit is mainly characterized by comprising the following steps:
(1) the range detection module samples the range of the resistance signal to be detected by the wide resistance range signal acquisition circuit and transmits the sampled range to the resistance selection module;
(2) the resistance selection module determines the range of the range according to the range;
(3) the resistance selection module controls the pull-up resistance module to provide a corresponding resistance value according to the range of the measuring range;
(4) the wide resistance range signal acquisition circuit acquires resistance signals to be detected.
Preferably, the pull-up resistor module comprises at least two pull-up resistors with different resistance values; the resistance selection module comprises a selection submodule and controllable switches with the same number as the pull-up resistors, and the step (3) comprises the following steps:
(31) the resistance selection module determines a pull-up resistance to be selected according to the range of the measuring range;
(32) the resistance selection module controls each controllable switch, so that the controllable switch connected with the pull-up resistor to be selected is switched on, and the rest controllable switches are switched off.
Preferably, the circuit further includes a fifth resistor and a capacitor, a first end of the fifth resistor is connected to one end of each of the pull-up resistors not connected to the controllable switch, a connection point between the fifth resistor and the capacitor leads to one end connected to the range detection module, the range detection module is further connected to one end of each of the pull-up resistors preselected in the pull-up resistor module connected to the controllable switch, and the step (4) further includes the following steps:
(5) if the selected pull-up resistor does not belong to any one of the preselected pull-up resistors, calculating the resistance value corresponding to the collected resistance signal to be detected by adopting a following formula 1, otherwise calculating the resistance value R corresponding to the collected resistance signal to be detected by adopting a following formula 2:
wherein, VSamplingThe range detection module is arranged between the fifth resistor and the second resistorThe voltage, R, detected at the junction of the capacitorsPulling upwardsIs the resistance value, V, of the pull-up resistor to be selectedPower supplyThe pull-up resistor to be selected passes through the voltage value of the power supply end connected with the corresponding controllable switch;
wherein, VAD_standard1The voltage detected by the connection position of the pull-up resistor to be selected and the corresponding controllable switch is detected by the range detection module.
Preferably, the pull-up resistor module comprises two pull-up resistors with different resistance values, and the step (2) comprises the following steps:
(21) the resistance selection module compares the measuring range with a first threshold value preset by a system and a second threshold value preset by the system, wherein the first threshold value preset by the system is larger than the second threshold value preset by the system;
(22) if the resistance selection module determines that the measuring range is larger than a first threshold value preset by the system, the resistance selection module determines that the measuring range to which the measuring range belongs is the measuring range of the larger resistance of the two pull-up resistors, and continues to the subsequent step (3);
(23) if the resistance selection module determines that the measuring range is smaller than a second threshold value preset by the system, the resistance selection module determines that the measuring range to which the measuring range belongs is the measuring range of the smaller resistance of the two pull-up resistors, and continues to the subsequent step (3);
(24) if the resistance selection module determines that the measuring range is between the first threshold value preset by the system and the second threshold value preset by the system, the resistance selection module determines that the range to which the measuring range belongs is the measuring range of the currently selected pull-up resistor, and continues to the subsequent step (3).
The invention relates to a wide resistance range signal acquisition circuit and a corresponding acquisition method, wherein a measuring range of a resistance signal to be detected is sampled by a measuring range detection module, a resistance selection module determines the range of the measuring range according to the measuring range, and controls a pull-up resistance module to provide different resistance values according to the range of the measuring range, so that a resistance corresponding to the measuring range is selected for signal acquisition, and the requirement of accurately acquiring a wider resistance range signal is met. The wide resistance range signal acquisition circuit and the corresponding acquisition method have the characteristics of accurate measurement, wide application range and lower cost.
Drawings
FIG. 1 is a diagram of a prior art on-screen display interface in an embodiment.
Fig. 2 is a circuit diagram of a sampling circuit in the prior art.
FIG. 3 is a schematic diagram of an external sensor connected to the circuit of FIG. 2.
Fig. 4 is a schematic structural diagram of a wide resistance range signal acquisition circuit according to an embodiment of the present invention.
Fig. 5 is a schematic structural diagram of a wide resistance range signal acquisition circuit according to another embodiment of the invention.
Detailed Description
In order to more clearly describe the technical contents of the present invention, the following further description is given in conjunction with specific embodiments.
As shown in fig. 4, the wide resistance range signal acquisition circuit disclosed by the invention comprises a range detection module, a pull-up resistance module and a resistance selection module, and can be applied to a vehicle-mounted instrument for use;
the range detection module is used for sampling the range of the resistance signal to be detected and transmitting the sampled range to the resistance selection module, and the resistance selection module determines the range of the range according to the range and controls the pull-up resistance module to provide different resistance values according to the range of the range.
In this embodiment, the voltage value obtained by detecting the voltage of the connection end of the fifth resistor R95 and the capacitor C46 in fig. 4 through the range detection module is the range of the resistance signal to be detected.
In this embodiment, the pull-up resistor module includes at least two pull-up resistors with different resistance values;
the resistance selection module comprises a selection submodule and controllable switches with the same number as the pull-up resistors;
each pull-up resistor is connected with a power supply end through the corresponding controllable switch;
the selection submodule selects the pull-up resistor with the corresponding resistance value to apply by controlling the on-off of each controllable switch.
In this embodiment, the pull-up resistor module includes two pull-up resistors with different resistance values, namely a first pull-up resistor R9 and a second pull-up resistor R112;
the selection submodule comprises a singlechip, a negation unit and two controllable switches, wherein the two controllable switches are a first controllable switch Q22 and a second controllable switch Q25 respectively;
a first terminal of the first pull-up resistor R9 is connected to the power supply terminal through the first controllable switch Q22, and a first terminal of the second pull-up resistor R112 is connected to the power supply terminal through the second controllable switch Q25;
the input end of the singlechip is connected with the output end of the range detection module;
the control end of the first controllable switch Q22 is directly connected with the output end of the single chip microcomputer, and the control end of the second controllable switch Q25 is connected with the output end of the single chip microcomputer through the negating unit.
In this embodiment, the negating unit includes a first resistor R234, a second resistor R308 and a third controllable switch Q17;
the output end of the single chip microcomputer is connected with the control end of the third controllable switch Q17 through the first resistor R234;
a first terminal of the third controllable switch Q17 is connected to the power source terminal through the second resistor R308, a first terminal of the third controllable switch Q17 is further connected to a control terminal of the second controllable switch Q25, and a second terminal of the third controllable switch Q17 is grounded.
In this embodiment, the first controllable switch Q22 is formed by a first PNP transistor, the second controllable switch Q25 is formed by a second PNP transistor, and the third controllable switch Q17 is formed by a first NPN transistor;
the base electrode of the first PNP type triode forms the control end of the first controllable switch Q22, the base electrode of the first PNP type triode is connected with the output end of the single chip microcomputer through a third resistor R248, the emitting electrode of the first PNP type triode is connected with the power supply end, and the collecting electrode of the first PNP type triode is connected with the first end of the first pull-up resistor R9;
the base electrode of the second PNP triode forms the control end of the second controllable switch Q25, the base electrode of the second PNP triode is connected to the collector electrode of the first NPN triode through a fourth resistor R87, the emitter electrode of the second PNP triode is connected to the power supply terminal, and the collector electrode of the second PNP triode is connected to the first end of the second pull-up resistor R112;
the base of the first NPN transistor forms the control terminal of the third controllable switch Q17, the collector of the first NPN transistor forms the first terminal of the third controllable switch Q17, and the emitter of the first NPN transistor forms the second terminal of the third controllable switch Q17.
In this embodiment, the circuit further includes a fifth resistor R95 and a capacitor C46;
the first end of the fifth resistor R95 is connected to one end of each pull-up resistor which is not connected to the controllable switch, the second end of the fifth resistor R95 is grounded through the capacitor C46, one end of the fifth resistor R95 connected to the capacitor C46 is connected to the span detection module, and one end of the fifth resistor R95 connected to each pull-up resistor is connected to the resistance signal to be detected.
The circuit of fig. 4 may be used for sampling when dealing with a sampling requirement such as 200 ohm-50K resistors. When the device is used, when a small-scale test is performed, the pull-up resistor with the smaller resistance value in the two pull-up resistors is selected for detection, namely the first pull-up resistor R9 in fig. 4, and after the scale of the resistance signal to be detected by the equivalent range detection module is enlarged, the pull-up resistor with the larger resistance value in the two pull-up resistors is selected for detection, namely the second pull-up resistor R112 in fig. 4, and when the measured scale of the resistance signal to be detected is reduced, the first pull-up resistor R9 can be switched back to be used as the pull-up resistor to be selected; the switching control is controlled by a single chip microcomputer. In order to ensure that the two pull-up resistors in the above embodiments cannot function simultaneously, the control can be performed by using an IO of the single chip as an output terminal of the single chip. The devices in the dashed box in fig. 4 form an inverting unit, which is similar to a not gate, the control of the circuit switching is the IO selection pin (i.e. the output end of the single chip) of the single chip, the execution devices are two PNP triacs forming the first controllable switch Q22 and the second controllable switch Q25, the use of a dial switch can be effectively avoided by using the two triacs as switches, and the size of a pull-up resistor can be automatically switched to measure a resistance signal through the control of the single chip. In this embodiment, the switching selection of the two pull-up resistors is realized by outputting a high level (5V) or a low level (0V) through an IO selection pin for the single chip microcomputer.
When the circuit is adopted to calculate the resistance value corresponding to the collected resistance signal to be detected, the following formula 1 can be adopted to calculate:
wherein, VSamplingThe measuring range detection module is arranged between the fifth resistor R95 and the second resistor R95The voltage, R, detected at the junction of the capacitor C46Pulling upwardsIs the resistance value, V, of the pull-up resistor to be selectedPower supplyThe pull-up resistor to be selected passes through the voltage value of the power supply end connected with the corresponding controllable switch;
for better illustration, specific values are introduced below for the calculation of the relevant parameters, wherein the voltage value at the power supply terminal is selected to be 5V:
for example, the signal is sampled when a 1K pull-up resistor is used:
Through the calculation, the difference of 1 ohm can be identified when the measuring range is detected;
if the pull-up resistor with fixed resistance value in the prior art is adopted for detection, the voltage value sampled by the sensor signal of 50K is
It can be seen that the 1K deviation cannot be identified by using the conventional method, which is a disadvantage of the conventional circuit, and the 1K resistor is optimally designed but cannot meet the measurement requirement in the large resistance range.
The circuit in the invention is adopted for measurement, and at the moment, the pull-up resistor is only required to be switched to a 10K pull-up resistor mode, so that the test requirement can be met:
Therefore, the 300-ohm resolution singlechip can recognize that the resolution has reached 0.4%, and the resistance values of the two pull-up resistors can be optimized:
when the calculation of the resistance value R is performed using the first pull-up resistor R9 in fig. 4:
when the calculation of the resistance value R is performed using the second pull-up resistor R112 in fig. 4:
as shown in fig. 5, in other embodiments, the range detection module is further connected to one end of each pre-selected pull-up resistor in the pull-up resistor module, which is connected to the controllable switch, wherein the pre-selected pull-up resistors are pull-up resistors with a resistance value smaller than a user preset resistance value among all the pull-up resistors in the pull-up resistor module.
If the resistance value of the smaller one of the two pull-up resistors in the double pull-up resistor scheme is larger than or equal to a certain value, the reference voltage does not need to be collected, the circuit in fig. 4 is directly adopted for connection, and the voltage at the point marked with the AD sampling in fig. 4 and 5 is sent to the single chip microcomputer AD (namely, an analog-to-digital conversion module in the single chip microcomputer), otherwise, the technical scheme in the embodiment needs to be used. Such as: when the method is used for realizing the collection of the numerical values of the environmental temperature collection, the minimum resistance value is about 200 ohms, and the maximum resistance value is 50K, so that a 1K and 10K double pull-up resistance scheme is required (namely, a reference voltage collection point is not required to be added); instead, a dual pull-up resistor retrofit scheme using 200 and 2K resistors (since the span minimum resistance is 20 ohms) is required for oil temperature collection (i.e., an increased reference voltage collection point is required).
When the circuit is adopted to calculate the resistance value corresponding to the collected resistance signal to be detected,
if the selected pull-up resistor does not belong to any one of the preselected pull-up resistors, calculating the resistance value corresponding to the collected resistance signal to be detected by adopting a following formula 1, otherwise calculating the resistance value R corresponding to the collected resistance signal to be detected by adopting a following formula 2:
wherein, VSamplingThe voltage detected by the range detection module at the connection position of the fifth resistor R95 and the capacitor C46, RPulling upwardsIs the resistance value, V, of the pull-up resistor to be selectedPower supplyThe pull-up resistor to be selected passes through the voltage value of the power supply end connected with the corresponding controllable switch;
wherein, VAD_standard1The voltage detected by the connection position of the pull-up resistor to be selected and the corresponding controllable switch is detected by the range detection module.
The circuit in the above embodiment is to take into account that the external sensors are not all 200 Ω to 50K. And sometimes 20 omega-30K. This time again presents a new problem that can be solved by this two pull-up resistor configuration in fig. 5.
The VCE of the first controllable switch Q22 becomes larger with a voltage of 0.4V when the first pull-up resistor R9 selects a sensor resistance of 20 Ω of 200 ohms. But this voltage also changes as the resistance of the sensor resistor changes. The software will now also calculate (ignore VCE) at 5V with a large error. Moreover, the value of VCE is a variable value, and the error cannot be uniformly cut off by using a calibration method.
In view of this, in this embodiment, a reference voltage acquisition is added to the first pull-up resistor R9 (i.e., the first pull-up resistor R9 is a preselected pull-up resistor), which can be used directly to calculate when acquiring the signal, ignoring the error caused by the voltage VCE across the first controllable switch Q22.
When the first pull-up resistor R9 is used as the pull-up resistor, the related resistance value R can be calculated according to the following formula
And after the pull-up resistor selected during measurement is larger than or equal to 1K, the error caused by VCE can be ignored, so that the reference voltage does not need to be acquired when the second pull-up resistor R112 in the circuit is selected as the pull-up resistor (namely, the second pull-up resistor R112 is not a preselected pull-up resistor), namely, the reference voltage does not need to be acquired at the position of the connection between the second pull-up resistor R112 and the corresponding controllable switch. If the circuit is used for detection, the detection process is similar to the processing mode of the circuit in the figure 4, and a signal is sampled when a small pull-up resistor is usedUsing V when post-calculating resistanceAD_standard1(i.e., voltage circled in fig. 5, and additional reference voltage acquisition). The resistance value designs of the two pull-up resistors in the dual pull-up resistor circuits of fig. 4 and 5 are typically 10 times larger. Therefore, the full-range of the conventional vehicle-mounted sensor can be considered, and more pull-up resistors are required to be used if the difference value between the minimum and maximum resistance signals of the sensor signal becomes larger.
By the double pull-up resistor circuit and the improved double pull-up resistor circuit in the embodiment, measurement in a wide resistor range can be realized, and the resolution in the whole measuring range is improved.
The method for realizing the wide resistance range signal acquisition by adopting the wide resistance range signal acquisition circuit in the embodiment comprises the following steps:
(1) the range detection module samples the range of the resistance signal to be detected by the wide resistance range signal acquisition circuit and transmits the sampled range to the resistance selection module;
(2) the resistance selection module determines the range of the measuring range according to the measuring range, and specifically comprises the following steps:
(21) the resistance selection module compares the measuring range with a first threshold value preset by a system and a second threshold value preset by the system, wherein the first threshold value preset by the system is larger than the second threshold value preset by the system;
(22) if the resistance selection module determines that the measuring range is larger than a first threshold value preset by the system, the resistance selection module determines that the measuring range to which the measuring range belongs is the measuring range of the larger resistance of the two pull-up resistors, and continues to the subsequent step (3);
(23) if the resistance selection module determines that the measuring range is smaller than a second threshold value preset by the system, the resistance selection module determines that the measuring range to which the measuring range belongs is the measuring range of the smaller resistance of the two pull-up resistors, and continues to the subsequent step (3);
(24) if the resistance selection module determines that the measuring range is between a first threshold value preset by a system and a second threshold value preset by the system, the resistance selection module determines that the range to which the measuring range belongs is the measuring range of the currently selected pull-up resistor, and continues to the subsequent step (3);
typically, during the measurement, a small resistance is used by default to collect the signal. If the collected voltage is found to be larger than a certain nominal threshold value (namely a first threshold value preset by the system), the large pull-up resistor is switched to be used. The threshold value is generally selected to be between 4V and 4.9V;
if the sampling state of the large pull-up resistor shows that the acquired voltage is smaller than a certain threshold value (namely a second threshold value preset by the system), the sampling mode is switched back to the sampling mode of the small pull-up resistor, and the threshold value is generally selected to be between 0.1V and 1V.
The key to the threshold setting is not to allow frequent repeated switching during actual use. The establishment of the threshold value is related to the resistance values of the two pull-up resistors and the range of the sensor resistor, and the singlechip can be told uniformly through calibration
For example, the 1K, 10K dual pull-up resistor circuit exemplified above, assuming the rising threshold is scaled at 4V and the falling threshold is scaled at 1V. When a 1K pull-up resistor is used and the external resistor sensor resistance is 4K. And calculating the voltage collected by the singlechip to be 4V according to an ohm law formula. The switching pull-up resistance condition is satisfied at this time. When the external 4K resistor is unchanged, the voltage collected by the singlechip at the moment is calculated to be 1.428V according to an ohm law formula when a 10K pull-up resistor is used. Much larger than the 1V threshold, so it will not switch back to the 1K pull-up resistance due to a small amount of resistance fluctuation. Only after the resistance of the resistance sensor is reduced to 2.5K at this time will the switch back to a small pull-up resistance of 1K.
(3) The resistance selection module controls the pull-up resistance module to provide a corresponding resistance value according to the range of the measuring range, and the method specifically comprises the following steps:
(31) the resistance selection module determines a pull-up resistance to be selected according to the range of the measuring range;
(32) the resistance selection module controls each controllable switch, so that the controllable switch connected with the pull-up resistor to be selected is switched on, and the rest controllable switches are switched off;
(4) the wide resistance range signal acquisition circuit acquires resistance signals to be detected;
(5) if the selected pull-up resistor does not belong to any one of the preselected pull-up resistors, calculating the resistance value corresponding to the collected resistance signal to be detected by adopting a following formula 1, otherwise calculating the resistance value R corresponding to the collected resistance signal to be detected by adopting a following formula 2:
wherein, VSamplingThe voltage detected by the range detection module at the connection position of the fifth resistor R95 and the capacitor C46, RPulling upwardsIs the resistance value, V, of the pull-up resistor to be selectedPower supplyThe pull-up resistor to be selected passes through the voltage value of the power supply end connected with the corresponding controllable switch;
wherein, VAD_standard1The voltage detected by the connection position of the pull-up resistor to be selected and the corresponding controllable switch is detected by the range detection module.
The invention relates to a wide resistance range signal acquisition circuit and a corresponding acquisition method, wherein a measuring range of a resistance signal to be detected is sampled by a measuring range detection module, a resistance selection module determines the range of the measuring range according to the measuring range, and controls a pull-up resistance module to provide different resistance values according to the range of the measuring range, so that a resistance corresponding to the measuring range is selected for signal acquisition, and the requirement of accurately acquiring a wider resistance range signal is met. The wide resistance range signal acquisition circuit and the corresponding acquisition method have the characteristics of accurate measurement, wide application range and lower cost.
In this specification, the invention has been described with reference to specific embodiments thereof. It will, however, be evident that various modifications and changes may be made thereto without departing from the broader spirit and scope of the invention. The specification and drawings are, accordingly, to be regarded in an illustrative rather than a restrictive sense.
Claims (7)
1. A wide resistance range signal acquisition circuit is characterized by comprising a range detection module, a pull-up resistance module and a resistance selection module;
the range detection module is used for sampling the range of the resistance signal to be detected and transmitting the sampled range to the resistance selection module, and the resistance selection module determines the range of the range according to the range and controls the pull-up resistance module to provide different resistance values according to the range of the range;
the pull-up resistor module comprises at least two pull-up resistors with different resistance values;
the resistance selection module comprises a selection submodule and controllable switches with the same number as the pull-up resistors;
each pull-up resistor is connected with a power supply end through the corresponding controllable switch;
the selection submodule selects the pull-up resistor with corresponding resistance value to apply by controlling the on-off of each controllable switch;
the circuit also comprises a fifth resistor and a capacitor;
the first end of the fifth resistor is connected with one end of each pull-up resistor, which is not connected with the controllable switch, the second end of the fifth resistor is grounded through the capacitor, one end of the fifth resistor, which is led out from the connection part of the fifth resistor and the capacitor, is connected with the range detection module, and one end of the fifth resistor, which is led out from the connection part of each pull-up resistor, is connected with the resistance signal to be detected;
if the selected pull-up resistor does not belong to any one of the preselected pull-up resistors, calculating the resistance value corresponding to the collected resistance signal to be detected by adopting the following formula:
wherein, VSamplingThe voltage, R, detected by the range detection module at the connection of the fifth resistor and the capacitorPulling upwardsIs the resistance value, V, of the pull-up resistor to be selectedPower supplyThe pull-up resistor to be selected passes through the voltage value of the power supply end connected with the corresponding controllable switch;
otherwise, calculating the resistance value R corresponding to the acquired resistance signal to be detected by adopting the following formula:
wherein, VAD_The voltage detected by the connection position of the pull-up resistor to be selected and detected by the measuring range detection module and the corresponding controllable switch is used as the voltage;
the pull-up resistor module comprises two pull-up resistors with different resistance values, namely a first pull-up resistor and a second pull-up resistor;
the selection submodule comprises a singlechip, an inverting unit and two controllable switches, wherein the two controllable switches are respectively a first controllable switch and a second controllable switch;
the first end of the first pull-up resistor is connected with the power supply end through the first controllable switch, and the first end of the second pull-up resistor is connected with the power supply end through the second controllable switch;
the input end of the singlechip is connected with the output end of the range detection module;
the control end of the first controllable switch is directly connected with the output end of the single chip microcomputer, and the control end of the second controllable switch is connected with the output end of the single chip microcomputer through the negation unit.
2. The wide resistance range signal acquisition circuit of claim 1, wherein the inverting unit comprises a first resistor, a second resistor, and a third controllable switch;
the output end of the singlechip is connected with the control end of the third controllable switch through the first resistor;
the first end of the third controllable switch is connected with the power supply end through the second resistor, the first end of the third controllable switch is also connected with the control end of the second controllable switch, and the second end of the third controllable switch is grounded.
3. The wide resistance range signal acquisition circuit of claim 2,
the first controllable switch is composed of a first PNP type triode, the second controllable switch is composed of a second PNP type triode, and the third controllable switch is composed of a first NPN type triode;
the base electrode of the first PNP type triode forms the control end of the first controllable switch, the base electrode of the first PNP type triode is connected with the output end of the single chip microcomputer through a third resistor R248, the emitting electrode of the first PNP type triode is connected with the power supply end, and the collecting electrode of the first PNP type triode is connected with the first end of the first pull-up resistor;
the base electrode of the second PNP type triode forms the control end of the second controllable switch, the base electrode of the second PNP type triode is connected with the collector electrode of the first NPN type triode through a fourth resistor, the emitter electrode of the second PNP type triode is connected with the power supply end, and the collector electrode of the second PNP type triode is connected with the first end of the second pull-up resistor;
the base electrode of the first NPN type triode forms the control end of the third controllable switch, the collector electrode of the first NPN type triode forms the first end of the third controllable switch, and the emitter electrode of the first NPN type triode forms the second end of the third controllable switch.
4. The wide resistance range signal acquisition circuit of claim 1, wherein the range detection module is further connected to one end of each pre-selected pull-up resistor in the pull-up resistor module, which is connected to the controllable switch, wherein the pre-selected pull-up resistors are pull-up resistors having a resistance value smaller than a user preset resistance value among all the pull-up resistors in the pull-up resistor module.
5. A method for realizing wide resistance range signal acquisition based on the circuit of any one of claims 1 to 4, wherein the method comprises the following steps:
(1) the range detection module samples the range of the resistance signal to be detected by the wide resistance range signal acquisition circuit and transmits the sampled range to the resistance selection module;
(2) the resistance selection module determines the range of the range according to the range;
(3) the resistance selection module controls the pull-up resistance module to provide a corresponding resistance value according to the range of the measuring range;
(4) the wide resistance range signal acquisition circuit acquires resistance signals to be detected.
6. The wide resistance range signal acquisition circuit of claim 5, wherein said step (3) comprises the steps of:
(31) the resistance selection module determines a pull-up resistance to be selected according to the range of the measuring range;
(32) the resistance selection module controls each controllable switch, so that the controllable switch connected with the pull-up resistor to be selected is switched on, and the rest controllable switches are switched off.
7. The wide resistance range signal acquisition circuit of claim 6, wherein the pull-up resistor module comprises two pull-up resistors with different resistances, and the step (2) comprises the steps of:
(21) the resistance selection module compares the measuring range with a first threshold value preset by a system and a second threshold value preset by the system, wherein the first threshold value preset by the system is larger than the second threshold value preset by the system;
(22) if the resistance selection module determines that the measuring range is larger than a first threshold value preset by the system, the resistance selection module determines that the measuring range to which the measuring range belongs is the measuring range of the larger resistance of the two pull-up resistors, and continues to the subsequent step (3);
(23) if the resistance selection module determines that the measuring range is smaller than a second threshold value preset by the system, the resistance selection module determines that the measuring range to which the measuring range belongs is the measuring range of the smaller resistance of the two pull-up resistors, and continues to the subsequent step (3);
(24) if the resistance selection module determines that the measuring range is between the first threshold value preset by the system and the second threshold value preset by the system, the resistance selection module determines that the range to which the measuring range belongs is the measuring range of the currently selected pull-up resistor, and continues to the subsequent step (3).
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010115647.4A CN111257641B (en) | 2020-02-25 | 2020-02-25 | Wide resistance range signal acquisition circuit and corresponding acquisition method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010115647.4A CN111257641B (en) | 2020-02-25 | 2020-02-25 | Wide resistance range signal acquisition circuit and corresponding acquisition method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111257641A CN111257641A (en) | 2020-06-09 |
CN111257641B true CN111257641B (en) | 2022-03-04 |
Family
ID=70947464
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010115647.4A Active CN111257641B (en) | 2020-02-25 | 2020-02-25 | Wide resistance range signal acquisition circuit and corresponding acquisition method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111257641B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112229427A (en) * | 2020-08-24 | 2021-01-15 | 东风电驱动系统有限公司 | Ultra-large range resistance signal processing system and method |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN201045624Y (en) * | 2007-04-28 | 2008-04-09 | 埃泰克汽车电子(芜湖)有限公司 | Resistor detection circuit for automobile instrument |
CN106404207A (en) * | 2016-11-08 | 2017-02-15 | 辽宁师范大学 | Platinum resistance-based wide-range high-precision temperature measuring instrument and measuring method thereof |
CN207833285U (en) * | 2018-02-01 | 2018-09-07 | 江苏利得智能监测科技有限公司 | Sample circuit based on resistive sensor |
CN109580025A (en) * | 2019-01-23 | 2019-04-05 | 无锡华宸控制技术有限公司 | A kind of wide scope platinum resistance temperature sample circuit |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE3818974A1 (en) * | 1988-06-03 | 1990-02-08 | Ruthenberg Gmbh Waermetechnik | CONTROL AND MONITORING CIRCUIT FOR ELECTRIC SEAT HEATERS, ESPECIALLY OF MOTOR VEHICLES |
CN102539924A (en) * | 2010-12-13 | 2012-07-04 | 北京中科微纳物联网技术股份有限公司 | Wide-range precise measuring circuit for resistance of nano sensor and method |
CN102680788B (en) * | 2012-05-08 | 2014-09-24 | 中国计量科学研究院 | Method for measuring current dependence of direct-current standard resistors by utilizing multiplied current |
CN108508270B (en) * | 2018-04-08 | 2023-09-08 | 佛山科学技术学院 | Resistance measuring circuit |
CN109142876A (en) * | 2018-10-31 | 2019-01-04 | 于创宇 | Resistance measuring circuit and resistivity-measuring devices |
-
2020
- 2020-02-25 CN CN202010115647.4A patent/CN111257641B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN201045624Y (en) * | 2007-04-28 | 2008-04-09 | 埃泰克汽车电子(芜湖)有限公司 | Resistor detection circuit for automobile instrument |
CN106404207A (en) * | 2016-11-08 | 2017-02-15 | 辽宁师范大学 | Platinum resistance-based wide-range high-precision temperature measuring instrument and measuring method thereof |
CN207833285U (en) * | 2018-02-01 | 2018-09-07 | 江苏利得智能监测科技有限公司 | Sample circuit based on resistive sensor |
CN109580025A (en) * | 2019-01-23 | 2019-04-05 | 无锡华宸控制技术有限公司 | A kind of wide scope platinum resistance temperature sample circuit |
Non-Patent Citations (1)
Title |
---|
《三极管设计逻辑取反电路(一)》;大话硬件;《CSDN》;20200212;正文第1页第1段,图1-2 * |
Also Published As
Publication number | Publication date |
---|---|
CN111257641A (en) | 2020-06-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5293122A (en) | Signal probe with remote control function | |
CN101937066B (en) | Self-calibrating method of internal reference resistors of multi-range digital electronic measuring instrument | |
CN106679841B (en) | A kind of temperature-detecting device and temperature checking method | |
US4068138A (en) | Signal converter | |
CN111257641B (en) | Wide resistance range signal acquisition circuit and corresponding acquisition method | |
US20120274341A1 (en) | Resistance measurement circuit and measuring method employing the same | |
JPH07107720B2 (en) | Method for determining the tap position of a resistance remote transmitter and circuit arrangement for implementing the method | |
JP2013535179A (en) | Multi-input circuit | |
CN111025008A (en) | Voltage detection method and device | |
JPH02136754A (en) | Method and apparatus for measuring fine electrical signal | |
WO2023010732A1 (en) | Temperature compensation broadband signal attenuation circuit and control method thereof | |
CN207833285U (en) | Sample circuit based on resistive sensor | |
JP2000241258A (en) | Instrument and method for temperature measurement | |
JPH04140669A (en) | Spectrum analyzer | |
CN213874701U (en) | Measuring circuit of three-wire system resistance sensor | |
CN212007579U (en) | Temperature detection circuit and device | |
CN110058082A (en) | A kind of novel resistor detection method and resistor detecting device | |
CN109270429B (en) | Method for measuring noise of multi-channel high-low temperature interface circuit board | |
CN218674001U (en) | Thermistor detection device | |
CN219714570U (en) | Temperature measuring circuit | |
CN217605973U (en) | Resistance measurement circuit and system | |
CN220122887U (en) | Radio frequency line impedance compensation circuit, radio frequency line and radio frequency test equipment | |
JPH0247505Y2 (en) | ||
CN109596981B (en) | Voltage feedback system for testing performance of motor of automobile electronic throttle valve | |
CN209181931U (en) | A kind of temperature sensor for vehicle circuit |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |