Voltage sampling device, method, controller and vehicle

CN122922501APending Publication Date: 2026-10-16BYD CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510414520.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-02
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0004]然而,各传感器模块输出的电压信号范围存在差异,采用固定的电压(如常见的5V或3.3V)作为采样芯片的参考电压,对于较小的电压信号,其电压信号变化范围只占参考电压的一小部分,有限的量化等级使得信号细分程度不足,从而导致对电压采样的精度降低

Benefits of technology

[0049]In summary, in the voltage sampling device of this application embodiment, the sampling unit first samples the voltage to be sampled based on a determined first reference voltage to obtain a first sampling result. Next, the reference adjustment unit outputs a second reference voltage based on the first sampling result. Then, the sampling unit samples the same voltage to be sampled a second time based on the second reference voltage to obtain a second sampling result. By using two sampling methods with an adjustable reference voltage, compared to single sampling using only a fixed reference voltage, the reference voltage can be dynamically adjusted according to the characteristics of the signal itself, ensuring that the reference voltage used by the sampling unit matches the voltage to be sampled, thereby improving the sampling accuracy of the voltage to be sampled.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122922501A_ABST
    Figure CN122922501A_ABST
Patent Text Reader

Abstract

The application relates to a voltage sampling device, a method, a controller and a vehicle, and relates to the technical field of signal voltage sampling. The voltage sampling device comprises a sampling unit and a reference adjustment unit. The sampling unit is used for sampling a to-be-sampled voltage according to a first reference voltage to obtain a first sampling result. The reference adjustment unit is connected with the sampling unit and is used for outputting a second reference voltage according to the first sampling result, so that the sampling unit samples the to-be-sampled voltage according to the second reference voltage to obtain a second sampling result. In this way, compared with single sampling using a fixed reference voltage, the reference voltage can be dynamically adjusted according to the characteristics of the signal itself in the manner of twice sampling, so that the reference voltage used by the sampling unit matches the to-be-sampled voltage, and the sampling precision of the to-be-sampled voltage is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of signal voltage sampling technology, and in particular to a voltage sampling device, method, controller, and vehicle. Background Technology

[0002] In the operation of complex electronic systems such as electric vehicles, accurate sampling of sensor modules is crucial. The signals from each sensor module are typically transmitted and sampled in the form of analog voltages, containing a wealth of critical information such as vehicle speed, motor torque, and battery status. These signals play a decisive role in vehicle performance optimization, safety control, and energy management. Therefore, accurate sampling of the voltages characterizing the sensor module data is necessary.

[0003] Currently, when a single sampling chip is used to sample multiple sensor modules, the sampling chip typically uses the same reference voltage source. The sampling chip sequentially selects the signal channels of each sensor module, compares its output voltage signal with the reference voltage, and performs other processing to obtain the sampling result.

[0004] However, the voltage signal ranges output by each sensor module differ. Using a fixed voltage (such as the common 5V or 3.3V) as the reference voltage for the sampling chip means that for smaller voltage signals, the voltage signal variation range only accounts for a small portion of the reference voltage. The limited quantization level results in insufficient signal subdivision, which in turn reduces the accuracy of voltage sampling. Summary of the Invention

[0005] This application provides a voltage sampling device to improve the accuracy of voltage sampling, thereby at least partially solving the above-mentioned technical problems.

[0006] To achieve the above objectives, according to a first aspect of this application, a voltage sampling device is provided, comprising:

[0007] A sampling unit is used to sample the voltage to be sampled based on a first reference voltage to obtain a first sampling result;

[0008] A reference adjustment unit, connected to the sampling unit, is used to output a second reference voltage based on the first sampling result, so that the sampling unit samples the voltage to be sampled based on the second reference voltage to obtain a second sampling result.

[0009] Optionally, the reference adjustment unit includes a control circuit and a digital-to-analog converter;

[0010] The control circuit is connected to the sampling unit and is used to generate a reference amplitude based on the first sampling result.

[0011] The digital-to-analog converter is connected to the control circuit and the sampling unit, and is used to output the second reference voltage according to the reference amplitude.

[0012] Optionally, the reference adjustment unit includes a control circuit and a reference output circuit;

[0013] The control circuit is connected to the sampling unit and is used to generate multiple level signals based on the first sampling result.

[0014] The reference output circuit is connected to the control circuit and the sampling unit, and is used to output the second reference voltage according to each of the level signals.

[0015] Optionally, the reference output circuit includes a voltage divider control sub-circuit and an operational amplifier sub-circuit;

[0016] The voltage divider control sub-circuit is connected to the control circuit and is connected to the first reference voltage. It is used to adjust the voltage division ratio according to each of the level signals and to divide the first reference voltage according to the voltage division ratio to obtain a voltage division signal.

[0017] The operational amplifier sub-circuit is connected to the voltage divider control sub-circuit and is used to obtain the second reference voltage based on the first reference voltage and the voltage divider signal.

[0018] Optionally, the voltage divider control sub-circuit includes several voltage divider branches;

[0019] Each of the voltage divider branches includes a control terminal that receives one of the level signals, a first terminal that receives the first reference voltage, and a second terminal that is connected to the operational amplifier sub-circuit.

[0020] Optionally, the level signal includes a first level signal, a second level signal, a third level signal, and a fourth level signal;

[0021] The voltage divider control sub-circuit includes a first voltage divider branch, a second voltage divider branch, a third voltage divider branch, and a fourth voltage divider branch;

[0022] The first voltage divider branch includes a control terminal connected to the first level signal, a first terminal connected to the first reference voltage, and a second terminal connected to the operational amplifier sub-circuit;

[0023] The second voltage divider branch includes a control terminal that receives the second level signal, a first terminal that receives the first reference voltage, and a second terminal that is connected to the operational amplifier sub-circuit.

[0024] The third voltage divider branch includes a control terminal connected to the third level signal, a first terminal connected to the first reference voltage, and a second terminal connected to the operational amplifier sub-circuit.

[0025] The fourth voltage divider branch includes a control terminal connected to the fourth level signal, a first terminal connected to the first reference voltage, and a second terminal connected to the operational amplifier sub-circuit.

[0026] Optionally, the first voltage divider branch includes a first switching device and a first resistor; the first switching device includes a control electrode connected to the first level signal, a first terminal connected to the first reference voltage, and a second terminal connected to the first terminal of the first resistor, and the second terminal of the first resistor is connected to the operational amplifier sub-circuit;

[0027] The second voltage divider branch includes a second switching device and a second resistor; the second switching device includes a control electrode connected to the second level signal, a first terminal connected to the first reference voltage, and a second terminal connected to the first terminal of the second resistor, and the second terminal of the second resistor is connected to the operational amplifier sub-circuit;

[0028] The third voltage divider branch includes a third switching device and a third resistor; the third switching device includes a control electrode connected to the third level signal, a first terminal connected to the first reference voltage, and a second terminal connected to the first terminal of the third resistor, and the second terminal of the third resistor is connected to the operational amplifier sub-circuit;

[0029] The fourth voltage divider branch includes a fourth switching device and a fourth resistor; the fourth switching device includes a control electrode connected to the fourth level signal, a first terminal connected to the first reference voltage, and a second terminal connected to the first terminal of the fourth resistor, and the second terminal of the fourth resistor is connected to the operational amplifier sub-circuit.

[0030] Optionally, the resistance values ​​of the first resistor, the second resistor, the third resistor, and the fourth resistor are different.

[0031] Optionally, a latch is further provided between the control circuit and the voltage divider control sub-circuit;

[0032] The latch is used to synchronize each of the level signals and then output them to the voltage divider control sub-circuit.

[0033] Optionally, the operational amplifier sub-circuit includes a first operational amplifier, a second operational amplifier, a fifth resistor, and a sixth resistor;

[0034] The first operational amplifier includes a grounded first input terminal, a second input terminal connected to the voltage divider control sub-circuit and the first terminal of the fifth resistor, and an output terminal connected to the second terminal of the fifth resistor and the second operational amplifier;

[0035] The second operational amplifier includes a first input terminal connected to the first operational amplifier and connected to the first reference voltage, a second input terminal connected to ground and the first end of the sixth resistor, and an output terminal connected to the second end of the sixth resistor and the sampling unit.

[0036] According to a second aspect of this application, a voltage sampling method is provided, applied to a controller, the controller being connected to the aforementioned voltage sampling device, comprising:

[0037] The sampling unit is controlled to sample the voltage to be sampled based on a first reference voltage to obtain a first sampling result;

[0038] The reference adjustment unit is controlled to output a second reference voltage based on the first sampling result;

[0039] The sampling unit is controlled to sample the voltage to be sampled based on the second reference voltage to obtain a second sampling result.

[0040] Optionally, controlling the reference adjustment unit to output a second reference voltage based on the first sampling result includes:

[0041] The reference adjustment unit is controlled to select a reference amplitude from a preset set of reference amplitudes that is greater than the first sampling result and has the smallest difference between the reference amplitude and the first sampling result.

[0042] The second reference voltage is obtained based on the reference amplitude.

[0043] Optionally, controlling the reference adjustment unit to output a second reference voltage based on the first sampling result includes:

[0044] The reference adjustment unit is controlled to select a reference amplitude from a preset set of reference amplitudes that is greater than the first sampling result and has the smallest difference between the reference amplitude and the first sampling result.

[0045] Based on the preset level combination table and the reference amplitude, multiple level signals are obtained; wherein, the preset level combination table includes the correspondence between the reference amplitude and each combination of the level signals;

[0046] The second reference voltage is obtained based on the multiple level signals.

[0047] According to a third aspect of this application, a controller is provided, on which a computer program is stored, characterized in that the computer program, when executed by a processor, implements the steps of the voltage sampling method described above.

[0048] According to a fourth aspect of this application, a vehicle is provided, including the voltage sampling device described above.

[0049] In summary, in the voltage sampling device of this application embodiment, the sampling unit first samples the voltage to be sampled based on a determined first reference voltage to obtain a first sampling result. Next, the reference adjustment unit outputs a second reference voltage based on the first sampling result. Then, the sampling unit samples the same voltage to be sampled a second time based on the second reference voltage to obtain a second sampling result. By using two sampling methods with an adjustable reference voltage, compared to single sampling using only a fixed reference voltage, the reference voltage can be dynamically adjusted according to the characteristics of the signal itself, ensuring that the reference voltage used by the sampling unit matches the voltage to be sampled, thereby improving the sampling accuracy of the voltage to be sampled.

[0050] Other features and advantages of this application will be described in detail in the following detailed description section. Attached Figure Description

[0051] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0052] To gain a more complete understanding of this application and its beneficial effects, the following description will be provided in conjunction with the accompanying drawings, wherein the same reference numerals in the following description denote the same parts.

[0053] Figure 1 This is a schematic diagram of a voltage sampling device provided in an exemplary embodiment of this disclosure;

[0054] Figure 2 This is a schematic diagram of a reference adjustment unit provided in an exemplary embodiment of this disclosure;

[0055] Figure 3 This is a schematic diagram of another reference adjustment unit provided in an exemplary embodiment of this disclosure;

[0056] Figure 4 This is a circuit connection diagram of the voltage sampling device provided in an exemplary embodiment of this disclosure;

[0057] Figure 5 This is a flowchart of a voltage sampling method provided in an exemplary embodiment of this disclosure.

[0058] Explanation of reference numerals in the attached diagram: 1. Sampling unit; 2. Reference adjustment unit; 21. Control circuit; 22. Digital-to-analog converter; 23. Reference output circuit; 231. Voltage divider control sub-circuit; 232. Operational amplifier sub-circuit; 2311. First voltage divider branch; 2312. Second voltage divider branch; 2313. Third voltage divider branch; 2314. Fourth voltage divider branch; 233. Latch. Detailed Implementation

[0059] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the protection scope of this application.

[0060] According to the first aspect of this application, referring to Figures 1 to 5 This disclosure provides a voltage sampling device, including a sampling unit 1 and a reference adjustment unit 2. The sampling unit 1 is used to sample the voltage to be sampled based on a first reference voltage to obtain a first sampling result. The reference adjustment unit 2, connected to the sampling unit 1, is used to output a second reference voltage based on the first sampling result, so that the sampling unit 1 can sample the voltage to be sampled based on the second reference voltage to obtain a second sampling result.

[0061] As an example, assuming the first reference voltage is 5V, the sampling resolution of the voltage to be sampled is: If the first reference voltage is used to sample the voltage to be sampled, the first sampling result is 2.43V. In this case, the second reference voltage can be set to 2.5V, which is closer to the first sampling result. When using the second reference voltage to sample the voltage to be sampled, the sampling resolution is: It can be seen that by adjusting the reference voltage, the sampling resolution of the voltage to be sampled is doubled, thereby improving the sampling accuracy.

[0062] In the above embodiment, the sampling unit 1 first samples the voltage to be sampled based on a determined first reference voltage to obtain a first sampling result. Next, the reference adjustment unit 2 outputs a second reference voltage based on the first sampling result. Then, the sampling unit 1 samples the same voltage to be sampled a second time based on the second reference voltage to obtain a second sampling result. By using two sampling methods with an adjustable reference voltage, compared to single sampling using only a fixed reference voltage, the reference voltage can be dynamically adjusted according to the characteristics of the signal itself, ensuring that the reference voltage used by the sampling unit 1 matches the voltage to be sampled, thereby improving the sampling accuracy of the voltage to be sampled.

[0063] Reference Figure 2In some embodiments, the reference adjustment unit 2 includes a control circuit 21 and a digital-to-analog converter 22. The control circuit 21 is connected to the sampling unit 1 and is used to generate a reference amplitude based on a first sampling result. The digital-to-analog converter 22 is connected to the control circuit 21 and the sampling unit 1 and is used to output a second reference voltage based on the reference amplitude.

[0064] The reference amplitude is the amplitude of the second reference voltage. The reference amplitude generated by the control circuit 21 is a digital quantity. After generating the reference amplitude, the control circuit 21 transmits the digital reference amplitude to the digital-to-analog converter 22. As an example, the digital-to-analog converter 22 typically consists of multiple parts, including a decoding network, a reference power supply, and analog switches. Based on the received reference amplitude, the digital-to-analog converter 22, through the coordinated operation of its internal decoding network and analog switches, converts the digital reference amplitude into a corresponding analog voltage at a certain ratio. This analog voltage is the second reference voltage. For example, if the reference amplitude is an 8-bit binary digital quantity, the digital-to-analog converter 22 will convert it into the corresponding analog second reference voltage according to its internal conversion rules and output it to the sampling unit 1.

[0065] As an example, for a system-on-chip (SOC) that integrates an analog-to-digital converter (ADC) and a digital-to-digital converter (DAC), the ADC can be used as sampling unit 1. After the DAC generates a second reference voltage, the second reference voltage is output to sampling unit 1 for a second sampling. In this way, the sampling accuracy can be improved by means of secondary sampling without adding any hardware.

[0066] In the above embodiment, the control circuit 21 is connected to the sampling unit 1, generates a reference amplitude based on the first sampling result, and obtains the basis for generating the second reference voltage, so that the digital-to-analog converter 22 outputs the second reference voltage based on the reference amplitude.

[0067] Reference Figure 3 In some implementations, the reference adjustment unit 2 includes a control circuit 21 and a reference output circuit 23. The control circuit 21 is connected to the sampling unit 1 and is used to generate multiple level signals based on the first sampling result. The reference output circuit 23 is connected to the control circuit 21 and the sampling unit 1 and is used to output a second reference voltage based on each level signal.

[0068] As an example, if the system-on-a-chip (SoC) itself does not include a DAC, achieving similar digital-to-analog conversion would require adding a complete DAC chip externally and making hardware connections and configurations, such as modifications to power supply, digital interface connections, and analog signal output wiring. However, by using the reference output circuit 23, in practical voltage sampling scenarios, especially for SoCs without an integrated DAC, the reference output circuit 23 can replace the DAC, dynamically outputting a second reference voltage based on the first sampling result to improve sampling accuracy. This also avoids the increased costs or extended development cycles caused by replacing or significantly modifying the SoC.

[0069] The range of the output second reference voltage can be preset. For example, the amplitude of the second reference voltage can be 0.5V, 1V, 1.5V, 2V, 2.5V, 3V, 3.5V, 4V, 4.5V, and 5V, with each 0.5V interval. The second reference voltage is selected that is closest to and greater than the first sampling result. For example, if the first sampling junction is 2.43V, then the second reference voltage is determined to be 2.5V.

[0070] In the above embodiment, the control circuit 21 is connected to the sampling unit 1 and generates multiple levels of different combinations based on the first sampling result. Different level combinations represent different control commands. This allows the reference output circuit 23 to be controlled according to the level signals, thereby outputting a second reference voltage that meets the requirements.

[0071] Reference Figure 3 In some implementations, the reference output circuit 23 includes a voltage divider control sub-circuit 231 and an operational amplifier sub-circuit 232. The voltage divider control sub-circuit 231 is connected to the control circuit 21 and is connected to a first reference voltage. It is used to adjust the voltage division ratio according to each level signal and to divide the first reference voltage according to the voltage division ratio to obtain a divided voltage signal. The operational amplifier sub-circuit 232 is connected to the voltage divider control sub-circuit 231 and is used to obtain a second reference voltage based on the first reference voltage and the divided voltage signal.

[0072] As an example, the voltage divider control subcircuit 231 includes several voltage divider branches. Each voltage divider branch includes a control terminal that receives a level signal, a first terminal that receives a first reference voltage, and a second terminal that is connected to the operational amplifier subcircuit 232.

[0073] In the above embodiment, the voltage divider control subcircuit 231 adjusts the voltage division ratio according to the various level signals transmitted from the control circuit 21, and divides the first reference voltage to obtain a voltage-divided signal. When the control circuit 21 outputs different combinations of level signals, it controls the corresponding voltage-dividing branches in the voltage divider control subcircuit 231 to be turned on or off. Different combinations of voltage-dividing branch on / off will form different voltage division ratios, thereby obtaining different voltage-divided signals. In this way, the voltage divider control subcircuit 231 can flexibly adjust the degree of voltage division of the first reference voltage according to the level signals output by the control circuit 21, and then, through processing by the operational amplifier subcircuit 232, output the required second reference voltage.

[0074] Reference Figure 4 As an example, the voltage level signals include a first voltage level signal, a second voltage level signal, a third voltage level signal, and a fourth voltage level signal. The voltage divider control sub-circuit 231 includes a first voltage divider branch 2311, a second voltage divider branch 2312, a third voltage divider branch 2313, and a fourth voltage divider branch 2314. The first voltage divider branch 2311 includes a control terminal for receiving the first voltage level signal, a first terminal for receiving the first reference voltage, and a second terminal connected to the operational amplifier sub-circuit 232. The second voltage divider branch 2312 includes a control terminal for receiving the second voltage level signal, a first terminal for receiving the first reference voltage, and a second terminal connected to the operational amplifier sub-circuit 232. The third voltage divider branch 2313 includes a control terminal for receiving the third voltage level signal, a first terminal for receiving the first reference voltage, and a second terminal connected to the operational amplifier sub-circuit 232. The fourth voltage divider branch 2314 includes a control terminal for receiving the fourth voltage level signal, a first terminal for receiving the first reference voltage, and a second terminal connected to the operational amplifier sub-circuit 232.

[0075] As an example, the first, second, third, and fourth level signals can be output from the control voltage pins IO1-IO3, respectively. These signals can have various combinations, each corresponding to a different on / off state of the voltage divider branch in the voltage divider control sub-circuit 231. For instance, when the first level signal is high and the others are low, only the first voltage divider branch 2311 is on, and the first reference voltage is divided only through the first voltage divider branch 2311. When the first and second level signals are high, and the third and fourth level signals are low, both the first and second voltage divider branches 2311 and 2312 are on simultaneously. In this case, the first reference voltage is divided by both the first and second voltage divider branches 2311 and 2312, with a different division ratio than when only the first voltage divider branch 2311 is on. Thus, by changing the combination of level signals, the voltage divider control sub-circuit 231 can flexibly adjust the voltage divider method of the first reference voltage, thereby obtaining different voltage divider signals to provide to the operational amplifier sub-circuit 232, so that the operational amplifier sub-circuit 232 outputs the required second reference voltage according to the different voltage divider signals.

[0076] As an example, the correspondence between the amplitudes of the first level signal, the second level signal, the third level signal, and the fourth level signal and the output second reference voltage can be found in Table 1.

[0077] Table 1

[0078]

[0079]

[0080] In the above embodiments, the first voltage divider branch 2311, the second voltage divider branch 2312, the third voltage divider branch 2313, and the fourth voltage divider branch 2314 are controlled by the first level signal, the second level signal, the third level signal, and the fourth level signal, respectively. The state combination of the first level signal, the second level signal, the third level signal, and the fourth level signal provides a variety of choices for adjusting the voltage division ratio. Thus, for various required second reference voltages, the optimal voltage division ratio can be found by selecting the appropriate combination of level signals, and the most suitable second reference voltage can be generated, thereby effectively improving the sampling accuracy.

[0081] As an example, the first voltage divider branch 2311 includes a first switching device K1 and a first resistor R1. The first switching device K1 includes a control electrode connected to a first level signal, a first terminal connected to a first reference voltage, and a second terminal connected to the first terminal of the first resistor R1. The second terminal of the first resistor R1 is connected to the operational amplifier sub-circuit 232. The second voltage divider branch 2312 includes a second switching device K2 and a second resistor R2. The second switching device K2 includes a control electrode connected to a second level signal, a first terminal connected to a first reference voltage, and a second terminal connected to the first terminal of the second resistor R2. The second terminal of the second resistor R2 is connected to the operational amplifier sub-circuit 232. The third voltage divider branch 2313 includes a third switching device K3 and a third resistor R3. The third switching device K3 includes a control electrode connected to a third level signal, a first terminal connected to a first reference voltage, and a second terminal connected to the first terminal of the third resistor R3. The second terminal of the third resistor R3 is connected to the operational amplifier sub-circuit 232. The fourth voltage divider branch 2314 includes a fourth switching device K4 and a fourth resistor R4. The fourth switching device K4 includes a control electrode that receives a fourth level signal, a first terminal that receives a first reference voltage, and a second terminal that is connected to the first terminal of the fourth resistor R4. The second terminal of the fourth resistor R4 is connected to the operational amplifier sub-circuit 232.

[0082] As an example, the resistance values ​​of the first resistor R1, the second resistor R2, the third resistor R3, and the fourth resistor R4 are different to allow for more flexible adjustment of the voltage division ratio. For instance, the resistance values ​​of the first resistor R1, the second resistor R2, the third resistor R3, and the fourth resistor R4 can be set to 1.25KΩ, 2.5KΩ, 5KΩ, and 10KΩ, respectively.

[0083] As an example, when a certain level signal output by the control circuit 21 is in a first state (e.g., high level), the corresponding switching device is turned on. For instance, when the first level signal is high, the first switching device K1 is turned on, and the first reference voltage is divided by the first resistor R1. The divided signal is then transmitted to the operational amplifier sub-circuit 232. If the level signal is in a second state (e.g., low level), the switching device is turned off, and the corresponding voltage divider branch does not participate in the voltage division. By combining the on and off states of the first switching device K1, the second switching device K2, the third switching device K3, and the fourth switching device K4, various voltage division ratios can be adjusted, thereby providing different voltage division signals to the operational amplifier sub-circuit 232.

[0084] For example, pins IO0-IO3 of control circuit 21 output a combination of "1010" levels, meaning the first and third level signals are high, and the second and fourth level signals are low. At this time, the first switching device K1 and the third switching device K3 are turned on, and the first resistor R1 and the third resistor R3 are connected to the circuit. The first reference voltage is divided by the first resistor R1 and the third resistor R3, and then superimposed before being transmitted to the operational amplifier sub-circuit 232.

[0085] In some embodiments, a latch 233 is further provided between the control circuit 21 and the voltage divider control sub-circuit 231. The latch 233 is used to synchronize each level signal and then output it to the voltage divider control sub-circuit 231.

[0086] In the above embodiments, during the process of the control circuit 21 outputting various level signals, there may be delays in the transmission of each level signal, resulting in inconsistent arrival times of the level signals at the voltage divider control sub-circuit 231. The latch 233 can lock the level signal state at a specific time and synchronously output each level signal to the voltage divider control sub-circuit 231.

[0087] In some embodiments, the operational amplifier sub-circuit 232 includes a first operational amplifier U1, a second operational amplifier U2, a fifth resistor R5, and a sixth resistor R6. The first operational amplifier U1 includes a first input terminal grounded, a second input terminal connected to the voltage divider control sub-circuit 231 and the first terminal of the fifth resistor R5, and an output terminal connected to the second terminal of the fifth resistor R5 and the second operational amplifier U2. The second operational amplifier U2 includes a first input terminal connected to the first operational amplifier U1 and connected to a first reference voltage, a second input terminal connected to ground and the first terminal of the sixth resistor R6, and an output terminal connected to the second terminal of the sixth resistor R6 and the sampling unit 1.

[0088] In the above embodiment, the first operational amplifier U1 and the fifth resistor R5 form a feedback connection, and the first operational amplifier U1 adds the input voltage divider signal to the first reference signal, thus realizing the accumulation function of the input signal. The second operational amplifier U2 and the sixth resistor R6 form a feedback connection to invert the signal. In this way, the first operational amplifier U1 and the second operational amplifier U2 can accurately process the voltage divider signal output by the voltage divider control subcircuit 231 to generate a second reference voltage that meets the requirements of the sampling unit 1.

[0089] Reference Figure 5 According to a second aspect of this application, a voltage sampling method is provided, which is applied to a controller. The controller is connected to the voltage sampling device described above, and includes steps S101-S103, which will be described in detail below.

[0090] Step S101: Control sampling unit 1 to sample the voltage to be sampled based on the first reference voltage to obtain the first sampling result.

[0091] Step S102: Control reference adjustment unit 2 to output a second reference voltage based on the first sampling result.

[0092] Step S103: Control sampling unit 1 to sample the voltage to be sampled according to the second reference voltage, and obtain the second sampling result.

[0093] In one embodiment, step S102 may include steps S1021-S1023, which will be described in detail below.

[0094] Step S1021: Control the reference adjustment unit 2 to select a reference amplitude that is greater than the first sampling result and has the smallest difference between the reference amplitude and the first sampling result from the preset reference amplitude.

[0095] Step S1022: Obtain the second reference voltage based on the reference amplitude.

[0096] In one embodiment, step S102 may include steps S1023-S1025, which will be described in detail below.

[0097] Step S1023: Control the reference adjustment unit 2 to select a reference amplitude that is greater than the first sampling result and has the smallest difference between the reference amplitude and the first sampling result from the preset reference amplitude.

[0098] Step S1024: Obtain multiple level signals based on the preset level combination table and reference amplitude. The preset level combination table includes the correspondence between the reference amplitude and the combinations of each level signal.

[0099] Step S1025: Obtain the second reference voltage based on the multi-level signals.

[0100] The voltage sampling method includes the voltage sampling device described above. This voltage sampling method possesses all the beneficial effects of the voltage sampling device described above, which will not be elaborated further in this disclosure.

[0101] According to a third aspect of this application, a controller is provided, on which a computer program is stored, characterized in that the computer program, when executed by a processor, implements the steps of the voltage sampling method described above.

[0102] According to a fourth aspect of this application, a vehicle is provided, including the voltage sampling device described above.

[0103] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more features. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0104] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0105] The embodiments, implementation methods, and related technical features of this application can be combined and substituted for each other without conflict.

[0106] The above are merely preferred embodiments of this application and are not intended to limit this application in any way. Any simple modifications, equivalent changes, and alterations made to the above embodiments based on the technical essence of this application without departing from the scope of the technical solution of this application shall still fall within the scope of the technical solution of this application.

Claims

1. A voltage sampling device, characterized in that, include: A sampling unit is used to sample the voltage to be sampled based on a first reference voltage to obtain a first sampling result; A reference adjustment unit, connected to the sampling unit, is used to output a second reference voltage based on the first sampling result, so that the sampling unit samples the voltage to be sampled based on the second reference voltage to obtain a second sampling result.

2. The voltage sampling device according to claim 1, characterized in that, The reference adjustment unit includes a control circuit and a digital-to-analog converter; The control circuit is connected to the sampling unit and is used to generate a reference amplitude based on the first sampling result. The digital-to-analog converter is connected to the control circuit and the sampling unit, and is used to output the second reference voltage according to the reference amplitude.

3. The voltage sampling device according to claim 1, characterized in that, The reference adjustment unit includes a control circuit and a reference output circuit; The control circuit is connected to the sampling unit and is used to generate multiple level signals based on the first sampling result. The reference output circuit is connected to the control circuit and the sampling unit, and is used to output the second reference voltage according to each of the level signals.

4. The voltage sampling device according to claim 3, characterized in that, The reference output circuit includes a voltage divider control sub-circuit and an operational amplifier sub-circuit. The voltage divider control sub-circuit is connected to the control circuit and is connected to the first reference voltage. It is used to adjust the voltage division ratio according to each of the level signals and to divide the first reference voltage according to the voltage division ratio to obtain a voltage division signal. The operational amplifier sub-circuit is connected to the voltage divider control sub-circuit and is used to obtain the second reference voltage based on the first reference voltage and the voltage divider signal.

5. The voltage sampling device according to claim 4, characterized in that, The voltage divider control sub-circuit includes several voltage divider branches; Each of the voltage divider branches includes a control terminal that receives one of the level signals, a first terminal that receives the first reference voltage, and a second terminal that is connected to the operational amplifier sub-circuit.

6. The voltage sampling device according to claim 5, characterized in that, The level signal includes a first level signal, a second level signal, a third level signal, and a fourth level signal; The voltage divider control sub-circuit includes a first voltage divider branch, a second voltage divider branch, a third voltage divider branch, and a fourth voltage divider branch; The first voltage divider branch includes a control terminal connected to the first level signal, a first terminal connected to the first reference voltage, and a second terminal connected to the operational amplifier sub-circuit; The second voltage divider branch includes a control terminal that receives the second level signal, a first terminal that receives the first reference voltage, and a second terminal that is connected to the operational amplifier sub-circuit. The third voltage divider branch includes a control terminal connected to the third level signal, a first terminal connected to the first reference voltage, and a second terminal connected to the operational amplifier sub-circuit. The fourth voltage divider branch includes a control terminal connected to the fourth level signal, a first terminal connected to the first reference voltage, and a second terminal connected to the operational amplifier sub-circuit.

7. The voltage sampling device according to claim 6, characterized in that, The first voltage divider branch includes a first switching device and a first resistor; the first switching device includes a control electrode connected to the first level signal, a first terminal connected to the first reference voltage, and a second terminal connected to the first terminal of the first resistor, and the second terminal of the first resistor is connected to the operational amplifier sub-circuit; The second voltage divider branch includes a second switching device and a second resistor; The second switching device includes a control electrode connected to the second level signal, a first terminal connected to the first reference voltage, and a second terminal connected to the first terminal of the second resistor, wherein the second terminal of the second resistor is connected to the operational amplifier sub-circuit. The third voltage divider branch includes a third switching device and a third resistor; The third switching device includes a control electrode connected to the third level signal, a first terminal connected to the first reference voltage, and a second terminal connected to the first terminal of the third resistor. The second terminal of the third resistor is connected to the operational amplifier sub-circuit. The fourth voltage divider branch includes a fourth switching device and a fourth resistor; The fourth switching device includes a control electrode connected to the fourth level signal, a first terminal connected to the first reference voltage, and a second terminal connected to the first terminal of the fourth resistor. The second terminal of the fourth resistor is connected to the operational amplifier sub-circuit.

8. The voltage sampling device according to claim 7, characterized in that, The resistance values ​​of the first resistor, the second resistor, the third resistor, and the fourth resistor are different.

9. The voltage sampling device according to claim 4, characterized in that, A latch is also provided between the control circuit and the voltage divider control sub-circuit; The latch is used to synchronize each of the level signals and then output them to the voltage divider control sub-circuit.

10. The voltage sampling device according to claim 4, characterized in that, The operational amplifier sub-circuit includes a first operational amplifier, a second operational amplifier, a fifth resistor, and a sixth resistor; The first operational amplifier includes a grounded first input terminal, a second input terminal connected to the voltage divider control sub-circuit and the first terminal of the fifth resistor, and an output terminal connected to the second terminal of the fifth resistor and the second operational amplifier; The second operational amplifier includes a first input terminal connected to the first operational amplifier and connected to the first reference voltage, a second input terminal connected to ground and the first end of the sixth resistor, and an output terminal connected to the second end of the sixth resistor and the sampling unit.

11. A voltage sampling method applied to a controller, wherein the controller is connected to the voltage sampling device according to any one of claims 1-10, characterized in that, include: The sampling unit is controlled to sample the voltage to be sampled based on a first reference voltage to obtain a first sampling result; The reference adjustment unit is controlled to output a second reference voltage based on the first sampling result; The sampling unit is controlled to sample the voltage to be sampled based on the second reference voltage to obtain a second sampling result.

12. The voltage sampling method according to claim 11, characterized in that, The control of the reference adjustment unit to output a second reference voltage based on the first sampling result includes: The reference adjustment unit is controlled to select a reference amplitude from a preset set of reference amplitudes that is greater than the first sampling result and has the smallest difference between the reference amplitude and the first sampling result. The second reference voltage is obtained based on the reference amplitude.

13. The voltage sampling method according to claim 11, characterized in that, The control of the reference adjustment unit to output a second reference voltage based on the first sampling result includes: The reference adjustment unit is controlled to select a reference amplitude from a preset set of reference amplitudes that is greater than the first sampling result and has the smallest difference between the reference amplitude and the first sampling result. Based on the preset level combination table and the reference amplitude, multiple level signals are obtained; wherein, the preset level combination table includes the correspondence between the reference amplitude and each combination of the level signals; The second reference voltage is obtained based on the multiple level signals.

14. A controller having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of any one of the voltage sampling methods of claims 11 to 13.

15. A vehicle, characterized in that, Includes the voltage sampling device as described in any one of claims 1 to 10.