A measuring circuit, chip and electronic device
Through the coordination of the configuration module and the enable module, the on-time of the sensor and analog-to-digital converter is controlled, and the difference comparison and dichotomous adjustment is combined, the problems of inaccurate sensor establishment time and waste of power consumption are solved, and accurate measurement of sensor establishment time and energy efficiency are achieved.
Patent Information
- Application Number
- CN202210844466.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-18
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2042-07-18
AI Technical Summary
In the prior art, the establishment time of the pressure sensing sensor is inaccurate and power consumption is wasted, making it difficult to effectively save power consumption in system development.
Using the measurement circuit, the module control enable module is configured to enable the sensor and the analog-to-digital converter sequentially, obtain the measured value based on the reference and test setup time, and determine the target setup time through the difference value comparison. The test setup time is adjusted using the dichotomy method to accurately measure the setup time of the sensor.
Accurate measurement of sensor setup time is achieved, avoiding measurement inaccuracy and waste of power consumption, and improving the accuracy of measurement results and the energy efficiency of the system.
Smart Images

Figure CN115133931B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electronic circuits, and in particular to a measuring circuit, a chip, and an electronic device. Background Art
[0002] In pressure detection applications, one or more pressure sensors that convert pressure values into voltage values need to be connected to the outside of the chip. The voltage value of the external sensor is measured through the AFE (analog frontend) inside the chip, including analog-to-digital converter, programmable gain amplifier, etc., and the pressure value is fed back.
[0003] During the detection process, measurements are often initiated at a regular frequency to detect changes in pressure sensitivity. To reduce the pressure sensor's power consumption, the sensor is often powered only when measurements are being taken. Currently, most pressure sensors are resistive. Since these sensors are equivalent to a resistor, they require a certain amount of settling time after powering on the sensor before the AFE is activated for measurement to ensure accurate measurement results. Furthermore, the AFE also requires a certain amount of settling time after being enabled, allowing the AFE to stabilize.
[0004] The AFE's settling time is generally design-dependent and fixed once the design specifications are finalized. Similarly, the chip's internal sensor design parameters are also determined during the chip design process, and their settling time is also fixed. The settling time of external sensors depends on the sensor's equivalent resistance and the system's equivalent capacitance, resulting in different settling times for different sensors.
[0005] To better save power consumption, during system development, it is necessary to understand the exact setup time of the sensor and power on the sensor in advance so that it is just established when the AFE starts measurement. This avoids inaccurate measurements due to insufficient setup time and extra power consumption due to too long setup time. Therefore, it is necessary to measure the setup time of the external sensor to obtain the accurate setup time.
[0006] Therefore existing technology still needs to be improved and improved. Summary of the Invention
[0007] An object of the present invention is to provide a measurement circuit, a chip, and an electronic device capable of effectively measuring the settling time of a sensor.
[0008] In order to achieve the above object, the present invention adopts the following technical solutions:
[0009] An embodiment of the present application provides a measurement circuit for measuring the settling time of a sensor, wherein the output end of the sensor is connected to an analog-to-digital converter. The measurement circuit includes:
[0010] An enabling module, used to connect to the sensor and the analog-to-digital converter, and to control the sensor and the analog-to-digital converter to be turned on in sequence;
[0011] The configuration module is connected to the enabling module and is used to configure the enabling module according to the reference establishment time, so that the enabling module controls the sensor and the analog-to-digital converter to turn on in sequence according to the reference establishment time, and obtains the reference measurement value converted by the analog-to-digital converter; the configuration module is also used to determine the test establishment time according to the reference establishment time and the preset rules, and configure the enabling module according to the test establishment time, so that the enabling module controls the sensor and the analog-to-digital converter to turn on in sequence according to the test establishment time, and obtains the test measurement value converted by the analog-to-digital converter; the configuration module is also used to compare the test difference with the preset difference, and the test difference is the difference between the reference measurement value and the test measurement value; if the test difference is less than the preset difference, the test establishment time corresponding to the test measurement value is determined to be the target establishment time.
[0012] In some implementations of the measurement circuit, the test setup time includes multiple times, and the configuration module is specifically configured to multiply the reference setup time by 1 / 2 to obtain the initial test setup time.
[0013] In some implementations of the measurement circuit, the configuration module is further configured to determine a current test setup time based on a previous test setup time, a reference setup time, and a current test number.
[0014] In some embodiments of the measurement circuit, the configuration module is further configured to determine that the current test setup time is 1 / 2 the previous test setup time if the test difference corresponding to the previous test setup time is greater than the preset difference. n times the reference establishment time, where n is the current number of tests and is an integer greater than 1.
[0015] In some embodiments of the measurement circuit, the configuration module is further configured to determine that the current test setup time is reduced by 1 / 2 based on the previous test setup time if the test difference corresponding to the previous test setup time is less than the preset difference. n times the reference establishment time, where n is the current number of tests and is an integer greater than 1.
[0016] In some implementations of the measurement circuit, the configuration module is further specifically used to determine one or more target test establishment times in a preset number of tests, wherein the test difference corresponding to the target test establishment time in the preset number of tests is less than the preset difference, and the minimum value of the one or more target test establishment times is determined as the target establishment time.
[0017] In some implementations of the measurement circuit, the configuration module includes:
[0018] a first memory connected to the analog-to-digital converter and configured to store a reference measurement value;
[0019] a second memory connected to the analog-to-digital converter and configured to store test measurement values;
[0020] a subtractor connected to the first memory and the second memory, for performing a subtraction between the reference measurement value and the test measurement value and outputting a test difference value;
[0021] a comparator connected to the subtractor and used for comparing the test difference value with a preset difference value;
[0022] The configuration unit is connected to the comparator and is used to determine the test setup time corresponding to the test measurement value as the target setup time if the test difference value is less than the preset difference value.
[0023] In some implementations of the measurement circuit, the configuration module further includes a third memory connected to the comparator and configured to store a preset difference.
[0024] In some implementations of the measurement circuit, the configuration module further includes a fourth memory connected to the configuration unit and configured to store the reference setup time.
[0025] An embodiment of the present application also provides a chip, including the above-mentioned measurement circuit, analog-to-digital converter, a first switch and a second switch; the first switch is used to connect to the measurement circuit and the sensor, and the second switch is used to connect to the measurement circuit and the analog-to-digital converter.
[0026] An embodiment of the present application further provides an electronic device, comprising a sensor and the above-mentioned chip, wherein the sensor is connected to the chip.
[0027] Compared with the prior art, the present invention provides a measurement circuit, a chip and an electronic device. The measurement circuit includes a configuration module and an enable module. The configuration module is used to configure the enable module according to the reference establishment time, so that the enable module controls the sensor and the analog-to-digital converter to turn on in sequence according to the reference establishment time, and obtains the reference measurement value converted by the analog-to-digital converter; the configuration module is also used to determine the test establishment time according to the reference establishment time and preset rules, and configure the enable module according to the test establishment time, so that the enable module controls the sensor and the analog-to-digital converter to turn on in sequence according to the test establishment time, and obtains the test measurement value converted by the analog-to-digital converter; the configuration module is also used to compare the test difference with the preset difference, and the test difference is the difference between the reference measurement value and the test measurement value; if the test difference is less than the preset difference, the test establishment time corresponding to the test measurement value is determined as the target establishment time, thereby realizing effective measurement of the sensor establishment time. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 This is a structural block diagram of the measurement circuit provided by the present invention.
[0029] Figure 2This is a first structural block diagram of the configuration module in the measurement circuit provided by the present invention.
[0030] Figure 3 This is a second structural diagram of the configuration module in the measurement circuit provided by the present invention.
[0031] Figure 4 This is a third structural diagram of the configuration module in the measurement circuit provided by the present invention.
[0032] Figure 5 This is a structural block diagram of the chip provided by the present invention. DETAILED DESCRIPTION
[0033] An object of the present invention is to provide a measurement circuit, a chip, and an electronic device capable of effectively measuring the settling time of a sensor.
[0034] In order to make the purpose, technical solution and effect of the present invention clearer and more specific, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0035] See also Figure 1 The present invention provides a measurement circuit 100. In this embodiment, the measurement circuit 100 is used to measure the settling time of a sensor 200, wherein the output terminal of the sensor 200 is connected to the analog-to-digital sensor 200. Specifically, the measurement circuit 100 includes a configuration module 110 and an enabling module 120; the enabling module 120 is connected to the configuration module 110 and is also used to connect to the sensor 200.
[0036] In a specific implementation, the enabling module 120 is used to control the sequential activation of the sensor 200 and the analog-to-digital converter 300. The configuration module 110 is used to configure the enabling module 120 based on the reference setup time, so that the enabling module 120 controls the sequential activation of the sensor 200 and the analog-to-digital converter 300 according to the reference setup time and obtains a reference measurement value converted by the analog-to-digital converter 300. Specifically, the configuration module 110 first configures the enabling module 120 to control the reference setup time when the sensor 200 is powered on. The sensor acquires a first signal during this reference setup time. After the reference setup time, the configuration module 110 then configures the enabling module 120 to control the activation of the analog-to-digital converter 300. The analog-to-digital converter 300 performs analog-to-digital conversion on the first signal to obtain a first digital signal, i.e., the reference measurement value. This completes the first conversion of the analog-to-digital converter 300, equivalent to completing the initial operation of the measurement circuit 100.
[0037] After the measurement circuit 100 completes its initial operation, the configuration module 110 is further configured to determine a test setup time based on a reference setup time and preset rules, and to configure the enabling module 120 based on the test setup time, so that the enabling module 120 controls the sensor 200 and the analog-to-digital converter 300 to sequentially turn on according to the test setup time, and obtains the test measurement value converted by the analog-to-digital converter 300. Specifically, after the measurement circuit 100 completes its initial operation, the configuration module 110 determines the test setup time based on the reference setup time and preset rules. The configuration module 110 then configures the enabling module 120 to control the test setup time when the sensor 200 is powered on, and the sensor 200 collects the second signal within this test setup time. After the test setup time has elapsed, the configuration module 110 configures the enabling module 120 to control the analog-to-digital converter 300 to turn on, and the analog-to-digital converter 300 performs analog-to-digital conversion on the second signal to obtain a second digital signal, i.e., the test measurement value.
[0038] In addition, the configuration module 110 is also used to compare the test difference with the preset difference, wherein the test difference is the difference between the reference measurement value and the test measurement value; if the test difference is less than the preset difference, the test establishment time corresponding to the test measurement value is determined as the target establishment time, thereby achieving effective measurement of the establishment time of the sensor 200.
[0039] It should be noted that the measurement circuit 100 provided by the present invention can be applied to application environments such as mobile devices, handheld instruments, bioelectronics, and industrial measurements that use internal or external sensors 200 for measurement.
[0040] In some embodiments, the test establishment time includes multiple times, and the configuration module 110 configures the enabling module 120 according to each test establishment time, so that the enabling module 120 controls the sensor 200 and the analog-to-digital converter 300 to turn on in sequence according to the corresponding test establishment time. Then, the corresponding test measurement values obtained also include multiple times, which is equivalent to conducting multiple tests to improve the accuracy of the measurement results.
[0041] The configuration module 110 is specifically configured to multiply the reference settling time by 1 / 2 to obtain the initial test settling time. That is, after the measurement circuit 100 completes its initial operation, half of the reference settling time is used as the initial test settling time. Based on this initial test time, the configuration module 110 configures the enabling module 120 to control the sensor 200 and the analog-to-digital converter 300 to sequentially activate according to the initial test settling time, thereby obtaining an initial test measurement value. The test difference between the reference measurement value and the initial test measurement value is then compared with a preset difference to accurately obtain the target settling time.
[0042] In some embodiments, the configuration module 110 is further configured to determine the current test setup time based on the previous test setup time, the reference setup time, and the current test number. Specifically, if the test difference corresponding to the previous test setup time is greater than a preset difference, indicating that the previous test setup time is insufficient, the configuration module 110 is further configured to determine the current test setup time to be 1 / 2 the previous test setup time. n times the reference setup time, where n is the number of current tests and is an integer greater than 1. The configuration module 110 is further configured to determine that the current test setup time is reduced by 1 / 2 based on the previous test setup time if the test difference corresponding to the previous test setup time is less than the preset difference, indicating that the previous test setup time is sufficient. n times the reference establishment time, where n is the current number of tests and is an integer greater than 1.
[0043] For example, after the measurement circuit 100 completes the initial measurement of the initial operation and the first test measurement according to the initial test setup time, a second test measurement is required. The test setup time for the second test measurement is calculated based on the initial test setup time, the reference setup time, and the current number of tests (n = 2 times) to obtain the current test setup time. If the test difference between the reference measurement value and the initial test measurement value is greater than the preset difference, the reference setup time is T0d, the first test setup time is T1 = 1 / 2T0, and the second test setup time is T2. Then, the current test setup time (i.e., the second test setup time) of the second test measurement is T2 = T1 + 1 / 4*T0 = 3 / 4*T0. If the test difference between the reference measurement value and the initial test measurement value is less than the preset difference, then the current test setup time of the second test measurement is T2 = T1 - 1 / 4*T0 = 1 / 4*T1. Similarly, the current test establishment time of the third test measurement (i.e., the third test establishment time) is determined based on the second test establishment time, the reference establishment time, and the current number of tests (n=3 times); that is, if the test difference between the reference measurement value and the test measurement value obtained by the second test measurement is greater than the preset difference, the third test establishment time is recorded as T3, then T3=T2+1 / 8*T0; if the test difference between the reference measurement value and the test measurement value obtained by the second test measurement is less than the preset difference, then T3=T2-1 / 8*T0, and so on to obtain the test establishment time of each test measurement, so as to complete the effective measurement of the establishment time of the sensor 200.
[0044] After the measurement circuit has performed multiple test measurements, the configuration module 110 is further configured to determine one or more target test settling times within a preset number of test times, wherein the test difference corresponding to the target test settling time within the preset number of test times is less than the preset difference, and to determine the minimum of the one or more target test settling times as the target settling time. Specifically, in the process of measuring the sensor settling time, the present application employs a binary search method to gradually approximate the test settling time to the actual sensor settling time, thereby achieving a higher precision and accuracy in the final measured target settling time.
[0045] Among them, when the software is configured, it is agreed that when the test difference between the reference measurement value and the test measurement value is within the deviation code value range, that is, the test difference is less than the preset difference, it indicates that the sensor 200 is established. Then when the test difference is greater than the preset difference, it indicates that the establishment time of the sensor at this time is too small, and the corresponding sensor 200 is not established. Therefore, in this embodiment, the configuration module 110 is specifically used to increase the test establishment time when the test difference is greater than the preset difference. Specifically, when the test difference is greater than the preset difference, the test measurement value is too small at this time, and the sensor 200 is not established. That is, the enabling module 120 enables the power supply of the sensor 200 according to the current test establishment time, and the sensor 200 is not established within the current test establishment time. Therefore, the configuration module 110 will increase the current time establishment time to ensure that the sensor 200 is established according to the adjusted test establishment time.
[0046] When the test difference is less than the preset difference, it indicates that the sensor establishment time is too long at this time, and the corresponding sensor 200 has been established. In order to find a minimum test establishment time as the target establishment time, the configuration module 110 will reduce the current test establishment time to ensure that a minimum test establishment time is found while ensuring that the sensor 200 is established. The test establishment time is used as the measured establishment time, that is, the target establishment time, which is the most accurate establishment time, and effectively avoids the problem that the establishment time is too short, resulting in the sensor not being established, or the establishment time is too long, wasting power consumption.
[0047] As an example, see Figure 2 The configuration module 110 includes a first memory 111, which is connected to the analog-to-digital converter 300 and is used to store a reference measurement value; a second memory 112, which is connected to the analog-to-digital converter 300 and is used to store a test measurement value; a subtractor 113, which is connected to the first memory 111 and the second memory 112, and is used to output a test difference after subtracting the reference measurement value from the test measurement value; a comparator 114, which is connected to the subtractor 113 and is used to compare the test difference with a preset difference; and a configuration unit 115, which is connected to the comparator 114 and is used to determine that the test establishment time corresponding to the test measurement value is the target establishment time if the test difference is less than the preset difference.
[0048] In this embodiment, first memory 111 stores reference measurement values, and second memory 112 stores test measurement values during each test measurement. Subtractor 113 then subtracts the test measurement value of the current test measurement from the reference measurement value stored in first memory 111 to obtain a test difference value. Subtractor 113 outputs this difference value to comparator 114. Comparator 114 compares this test difference value with a preset difference value and outputs a comparison result to configuration unit 115. When this test difference value is greater than the preset difference value, it indicates that the test measurement value obtained at the current test setup time deviates significantly from the reference measurement value, meaning that the test setup time for the current test is less than the actual sensor setup time, indicating that the sensor has not yet completed setup. When this test difference value is less than the preset difference value, it indicates that the test measurement value obtained at the current test setup time deviates slightly from the reference measurement value, meaning that the test setup time for the current test is greater than the actual sensor setup time, indicating that the sensor has completed setup. Furthermore, after a preset number of tests, the configuration module 110 determines one or more test establishment times corresponding to a test difference value less than a preset difference value as a target test establishment time, and uses the minimum value among the one or more target test establishment times as the target establishment time of the sensor for the final measurement.
[0049] As an example, see Figure 3 The configuration module 110 further includes a third memory 116, which is connected to the comparator 114 and is configured to store a preset difference value. The preset difference value in this embodiment is pre-set through software configuration and stored in the third memory 116. The third memory 116 provides the preset difference value to the comparator 114 to facilitate the subsequent comparison process between the test measurement value and the reference measurement value.
[0050] As an example, see Figure 4 The configuration module 110 further includes a fourth memory 117 connected to the configuration unit 115 for storing the reference setup time. In this embodiment, the fourth memory 117 stores the reference setup time so that the configuration unit 115 can subsequently obtain the test setup time.
[0051] See also Figure 5 The present invention also provides a chip 10, which includes the aforementioned measurement circuit 100, an analog-to-digital converter 300, a first switch SW1, and a second switch SW2. The first switch SW1 is used to connect the measurement circuit 100 and the sensor 200, and the second switch SW2 is used to connect the measurement circuit 100 and the analog-to-digital converter 300.
[0052] Specifically, the first switch SW1 is connected to the sensor 200 and the enabling module 120, respectively, and the second switch SW2 is connected to the analog-to-digital converter 300 and the enabling module 120, respectively. The first switch SW1 serves as the power switch for the sensor 200, and the second switch SW2 serves as the enabling switch for the analog-to-digital converter 300. The enabling module 120 analog-controls the first switch SW1 and the second switch SW2, thereby controlling the power on and off of the sensor 200 and the startup of the analog-to-digital converter 300. Since the measurement circuit 100 has been described in detail above, it will not be repeated here. It should be noted that the first memory 111, the second memory 112, the third memory 116, and the fourth memory 117 in the measurement circuit 100 in this embodiment are all stored in the internal register unit of the chip 10.
[0053] The present invention incorporates a measurement circuit 100 within the chip 10. After the system is powered on, the setup time of the sensor 200 can be measured by configuring and starting the hardware. After the measurement is complete, the measured setup time is updated and stored in the relevant register. This stored setup time information can then be used when the AFE is used to measure the external sensor 200. To measure the external sensor 200, power is first supplied to the sensor 200, and the stored setup time is then activated, allowing the AFE to convert and measure data, thereby obtaining accurate sensor 200 information.
[0054] An embodiment of the present application further provides an electronic device, which includes a sensor and the above-mentioned chip, wherein the sensor is connected to the chip. Since the chip has been described in detail above, it will not be repeated here.
[0055] In summary, the present invention provides a measurement circuit, chip and electronic device, and the measurement circuit includes a configuration module and an enable module. The configuration module is used to configure the enable module according to the reference establishment time, so that the enable module controls the sensor and the analog-to-digital converter to turn on in sequence according to the reference establishment time, and obtains the reference measurement value converted by the analog-to-digital converter; the configuration module is also used to determine the test establishment time according to the reference establishment time and preset rules, and configure the enable module according to the test establishment time, so that the enable module controls the sensor and the analog-to-digital converter to turn on in sequence according to the test establishment time, and obtains the test measurement value converted by the analog-to-digital converter; the configuration module is also used to compare the test difference with the preset difference, and the test difference is the difference between the reference measurement value and the test measurement value; if the test difference is less than the preset difference, the test establishment time corresponding to the test measurement value is determined as the target establishment time, thereby realizing effective measurement of the sensor establishment time.
[0056] It is understandable that those skilled in the art can make equivalent substitutions or changes based on the technical solution and inventive concept of the present invention, and all these changes or substitutions should fall within the scope of protection of the claims attached to the present invention.
Claims
1. A measuring circuit, characterized in that: Used to measure the settling time of a sensor, the output end of which is connected to an analog-to-digital converter, and the measurement circuit includes: an enabling module, configured to be connected to the sensor and the analog-to-digital converter, and configured to control the sensor and the analog-to-digital converter to be turned on in sequence and at intervals; A configuration module is connected to the enabling module and is used to configure the enabling module according to a reference establishment time, so that the enabling module controls the sensor and the analog-to-digital converter to start up in sequence according to the reference establishment time, and obtains a reference measurement value converted by the analog-to-digital converter; the configuration module is also used to determine a test establishment time according to the reference establishment time and a preset rule, and configure the enabling module according to the test establishment time, so that the enabling module controls the sensor and the analog-to-digital converter to start up in sequence according to the test establishment time, and obtains a test measurement value converted by the analog-to-digital converter; the configuration module is also used to compare a test difference with a preset difference, where the test difference is the difference between the reference measurement value and the test measurement value; if the test difference is less than the preset difference, the test establishment time corresponding to the test measurement value is determined to be the target establishment time.
2. The measuring circuit according to claim 1, characterized in that The test establishment time includes multiple times, and the configuration module is specifically used to multiply the reference establishment time by 1 / 2 to obtain the initial test establishment time.
3. The measuring circuit according to claim 2, characterized in that The configuration module is further configured to determine a current test establishment time based on a previous test establishment time, the reference establishment time, and the current test number.
4. The measuring circuit according to claim 3, characterized in that The configuration module is further configured to determine that the current test establishment time is 1 / 2 the previous test establishment time if the test difference corresponding to the previous test establishment time is greater than the preset difference. n times the reference establishment time, where n is the current number of tests and is an integer greater than 1.
5. The measurement circuit according to claim 3, characterized in that The configuration module is further configured to determine that the current test establishment time is reduced by 1 / 2 based on the previous test establishment time if the test difference corresponding to the previous test establishment time is less than the preset difference. n times the reference establishment time, where n is the current number of tests and is an integer greater than 1.
6. The measurement circuit according to claim 1, characterized in that The configuration module is also specifically used to determine one or more target test establishment times in a preset number of tests, wherein the test difference corresponding to the target test establishment time in the preset number of tests is less than the preset difference, and the minimum value of the one or more target test establishment times is determined as the target establishment time.
7. The measuring circuit according to any one of claims 1 to 6, characterized in that: The configuration module includes: a first memory connected to the analog-to-digital converter, and configured to store the reference measurement value; a second memory connected to the analog-to-digital converter and configured to store the test measurement value; a subtractor connected to the first memory and the second memory, configured to perform a subtraction between the reference measurement value and the test measurement value and output a test difference value; a comparator, connected to the subtractor, and configured to compare the test difference with the preset difference; A configuration unit is connected to the comparator and is used to determine the test establishment time corresponding to the test measurement value as the target establishment time if the test difference is less than the preset difference.
8. The measurement circuit according to claim 7, characterized in that The configuration module further includes a third memory connected to the comparator and configured to store the preset difference.
9. The measuring circuit according to claim 7, characterized in that The configuration module further includes a fourth memory connected to the configuration unit and configured to store the reference establishment time.
10. A chip, characterized in that: The device comprises a measuring circuit according to any one of claims 1 to 9, an analog-to-digital converter, a first switch, and a second switch; the first switch is used to connect to the measuring circuit and the sensor, and the second switch is used to connect to the measuring circuit and the analog-to-digital converter.
11. An electronic device, characterized in that: The device comprises a sensor and the chip according to claim 10, wherein the sensor is connected to the chip.
Citation Information
Patent Citations
Multi-parameter sensor
CN104949711A
Sensor measurement verification in quasi real-time
CN110632525A