CN116931470A - MCU calibration device and MCU calibration method - Google Patents

MCU calibration device and MCU calibration method Download PDF

Info

Publication number
CN116931470A
CN116931470A CN202210365428.0A CN202210365428A CN116931470A CN 116931470 A CN116931470 A CN 116931470A CN 202210365428 A CN202210365428 A CN 202210365428A CN 116931470 A CN116931470 A CN 116931470A
Authority
CN
China
Prior art keywords
voltage
calibration
amplifier
circuit
output voltage
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.)
Pending
Application number
CN202210365428.0A
Other languages
Chinese (zh)
Inventor
石道林
赵辉
张存才
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nationz Technologies Inc
Original Assignee
Nationz Technologies Inc
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Nationz Technologies Inc filed Critical Nationz Technologies Inc
Priority to CN202210365428.0A priority Critical patent/CN116931470A/en
Publication of CN116931470A publication Critical patent/CN116931470A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0428Safety, monitoring
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/24Pc safety
    • G05B2219/24024Safety, surveillance

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Amplifiers (AREA)

Abstract

The application relates to the field of integrated circuits and discloses a device and a method for calibrating an MCU. The MCU calibration device comprises: an amplifier that amplifies based on the received input voltage, generating an output voltage; the analog-to-digital conversion circuit is connected with the amplifier, receives the input voltage and the output voltage, and samples based on the input voltage and the output voltage to obtain a voltage sampling value; and the calibration circuit is respectively connected with the amplifier and the analog-to-digital conversion circuit, receives the voltage sampling value, judges that the output voltage is not in a normal range in the calibration circuit, generates an adjustment signal based on the output voltage, and adjusts the amplification proportion of the amplifier based on the adjustment signal so that the output voltage generated by the amplifier based on the amplification of the input voltage after adjustment is in the normal range. The MCU calibration device realizes offset voltage amplification by adjusting the amplification ratio of the amplifier, and calibrates the amplifier according to the offset voltage value of the adjusted amplifier, thereby improving the calibration precision and the calibration efficiency of the amplifier.

Description

MCU calibration device and MCU calibration method
Technical Field
The present application relates to the field of integrated circuits, and in particular, to a calibration device and a calibration method for an MCU.
Background
Along with the development of integrated circuits, MCUs are widely used in the control field to realize data processing and operation, thereby providing convenience for production and research and development. The existing MCUs integrate amplifiers, and the performance index of the amplifiers affects the performance of the circuit. One of the criteria limiting the amplifier is offset voltage, which is usually caused by process deviation, and the offset voltage of the amplifier can affect the actual use of the circuit during the use.
In order to improve the performance of the circuit in actual use, the offset voltage of the amplifier needs to be calibrated. In the calibration process of the amplifier, the error of the sampling voltage is larger, so that the calibration accuracy is reduced when the circuit calibrates the amplifier.
Disclosure of Invention
The application provides a MCU calibration device and a MCU calibration method, which realize the amplification of offset voltage by adjusting the amplification proportion of an amplifier, and calibrate the amplifier according to the adjusted offset voltage value of the amplifier, thereby improving the calibration precision of the amplifier.
In order to solve the above problems, the present application provides a calibration device for an MCU, comprising:
an amplifier that amplifies based on the received input voltage, generating an output voltage;
the analog-to-digital conversion circuit is connected with the amplifier, receives the input voltage and the output voltage, and samples based on the input voltage and the output voltage to obtain a voltage sampling value;
the calibration circuit is respectively connected with the amplifier and the analog-to-digital conversion circuit, receives the voltage sampling value, judges that the output voltage is not in a normal range in the calibration circuit, and generates an adjustment signal based on the output voltage;
the adjusting signal is used for controlling the calibrating circuit to adjust the amplification proportion of the amplifier, so that the output voltage generated by the amplifier based on the input voltage amplification after adjustment is in a normal range.
Further, when the calibration circuit judges that the input voltage is in a normal range, the calibration circuit calculates an offset voltage value of the amplifier based on the voltage sampling value, and generates a calibration signal of the amplifier based on the offset voltage value; the offset voltage value is the difference between the output voltage and the input voltage divided by the amplification ratio of the amplifier, and the amplification ratio of the amplifier is the ratio of the second resistor to the first resistor in the calibration circuit.
Further, the calibration device further comprises a digital circuit, wherein the digital circuit is respectively connected with the calibration circuit and the analog-to-digital conversion circuit and is used for generating a starting instruction, the calibration circuit generates the input voltage based on the starting instruction, and the analog-to-digital conversion circuit samples the amplifier based on the starting instruction; the digital circuit is connected with the amplifier, receives the calibration signal output by the calibration circuit, and calibrates the amplifier based on the calibration signal.
In order to solve the above problems, the present application further provides a calibration method of an MCU, which is applied to the above calibration device, the calibration method includes: the amplifier amplifies based on the received input voltage to generate an output voltage; the analog-to-digital conversion circuit receives the input voltage and the output voltage and samples the input voltage and the output voltage based on the input voltage and the output voltage to obtain a voltage sampling value; the calibration circuit receives the voltage sampling value, and generates an adjustment signal based on the output voltage when the calibration circuit judges that the output voltage is not in a normal range; the calibration circuit adjusts the amplification ratio of the amplifier based on the adjustment signal, so that the output voltage generated by the amplifier based on the input voltage amplification after adjustment is in a normal range.
Further, when the calibration circuit judges that the input voltage is in a normal range, the calibration circuit calculates an offset voltage value of the amplifier based on the voltage sampling value, and generates a calibration signal of the amplifier based on the offset voltage value; the offset voltage value is the difference between the output voltage and the input voltage divided by the amplification ratio of the amplifier, and the amplification ratio of the amplifier is the ratio of the second resistor to the first resistor in the calibration circuit.
The application has the beneficial effects that: unlike the prior art, the MCU calibration device provided by the application comprises: an amplifier that amplifies based on the received input voltage, generating an output voltage; the analog-to-digital conversion circuit is connected with the amplifier, receives the input voltage and the output voltage, and samples based on the input voltage and the output voltage to obtain a voltage sampling value; the calibration circuit is respectively connected with the amplifier and the analog-to-digital conversion circuit, receives the voltage sampling value, judges that the output voltage is not in a normal range in the calibration circuit, and generates an adjustment signal based on the output voltage; the calibration circuit adjusts the amplification ratio of the amplifier based on the adjustment signal, so that the output voltage generated by the adjusted amplifier based on the input voltage amplification is in a normal range. The MCU calibration device realizes the amplification of the offset voltage by adjusting the amplification proportion of the amplifier, and calibrates the amplifier according to the offset voltage value of the adjusted amplifier, thereby improving the calibration precision of the amplifier.
Drawings
FIG. 1 is a circuit schematic of a first embodiment of the calibration device of the MCU of the present application;
FIG. 2 is a circuit diagram of a calibration device of the MCU according to a second embodiment of the present application;
FIG. 3 is a circuit diagram of a third embodiment of the calibration device of the MCU of the present application;
FIG. 4 is a circuit diagram of a fourth embodiment of the calibration device of the MCU of the present application;
FIG. 5 is a circuit schematic of a fifth embodiment of the calibration device of the MCU of the present application;
fig. 6 is a flowchart of a calibration method of the MCU according to the first embodiment of the present application.
Detailed Description
In order that the above objects, features and advantages of the application will be readily understood, a more particular description of the application will be rendered by reference to the appended drawings. It is to be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present application are shown in the drawings. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The terms "first," "second," and the like in this disclosure are used for distinguishing between different objects and not for describing a particular sequential order. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
As shown in fig. 1, fig. 1 is a circuit schematic of a first embodiment of the MCU calibration device of the present application. The calibration device of the MCU of the present embodiment includes an amplifier 10, a calibration circuit 20, an analog-to-digital conversion circuit 30, and a digital circuit 40.
The digital circuit 40 is connected to the calibration circuit 20 and the analog-to-digital conversion circuit 30, and is configured to generate a start-up command, output the start-up command to the calibration circuit 20 and the analog-to-digital conversion circuit 30, generate an input voltage by the calibration circuit 20 based on the start-up command, and sample the amplifier 10 by the analog-to-digital conversion circuit 30 based on the start-up command.
The calibration circuit 20 is connected to the digital circuit 40 and the amplifier 10, respectively, receives a start-up command output from the digital circuit 40, generates an input voltage based on the start-up command, and outputs the input voltage to the amplifier 10.
The amplifier 10 is connected to the amplifier 10 and the analog-to-digital conversion circuit 30, receives an input voltage outputted from the calibration circuit 20, and amplifies the input voltage based on the received input voltage to generate an output voltage.
The analog-to-digital conversion circuit 30 is connected to the amplifier 10 and the calibration circuit 20, respectively, receives the input voltage and the output voltage of the amplifier 10, and samples based on the input voltage and the output voltage to obtain voltage sampling values, and outputs the voltage sampling values to the calibration circuit 20.
Further, the calibration circuit 20 receives the voltage sampling value output by the analog-to-digital conversion circuit 30, and determines whether the output voltage is in the normal range based on the voltage sampling value.
When the calibration circuit 20 determines that the output voltage is in the normal range, the calibration circuit 20 calculates the offset voltage of the amplifier 10 based on the voltage sampling value, obtains an offset voltage value, and generates a calibration signal of the amplifier 10 based on the offset voltage value.
When the calibration circuit 20 determines that the output voltage is not in the normal range, the calibration circuit 20 generates an adjustment signal based on the output voltage. The calibration circuit 20 adjusts the input voltage generated by the calibration circuit 20 based on the adjustment signal, outputs the adjusted input voltage to the amplifier 10, and the calibration circuit 20 adjusts the amplification ratio of the amplifier 10 based on the adjustment signal, the adjusted amplifier 10 generates the output voltage based on the amplification of the input voltage, the analog-to-digital conversion circuit 30 receives the input voltage and the output voltage of the amplifier 10, and samples based on the input voltage and the output voltage to obtain a voltage sampling value, the output voltage sampling value is sent to the calibration circuit 20, and the calibration circuit 20 judges whether the output voltage is in a normal range based on the voltage sampling value. Until the calibration circuit 20 judges that the output voltage generated by the amplifier 10 based on the amplification of the input voltage after adjustment is in a normal range, the calibration circuit 20 stops generating the adjustment signal, calculates the offset voltage of the amplifier 10 based on the voltage sampling value, obtains an offset voltage value, and generates the calibration signal of the amplifier 10 based on the offset voltage value.
The offset voltage is the difference between the output voltage and the input voltage divided by the amplification ratio of the amplifier 10, and the amplification ratio of the amplifier 10 is the ratio of the second resistor 336 to the first resistor 335 in the calibration circuit 20.
It should be noted that, the analog-to-digital conversion circuit 30 in the calibration apparatus of the MCU converts the analog signal of the voltage into the digital signal by sampling the input voltage and the output voltage of the amplifier 10, and the readable voltage sampling value can be obtained through the processing of the analog-to-digital conversion circuit 30, and the readable voltage sampling value is output to the calibration circuit 20, so that the calibration circuit 20 can perform the related numerical value judgment and processing based on the input voltage and the output voltage of the amplifier 10. Meanwhile, the analog-to-digital conversion circuit 30 is used for sampling the amplifier 10, so that the voltage acquisition speed of the MCU calibration device can be increased, and the longer the sampling time period is, the higher the sampling precision is.
Further, the digital circuit 40 receives the calibration signal outputted from the calibration circuit 20, and the digital circuit 40 is connected to the amplifier 10 to calibrate the amplifier 10 based on the received calibration signal.
The calibration device of the MCU of the present embodiment includes: an amplifier 10 that amplifies based on the received input voltage to generate an output voltage; the analog-to-digital conversion circuit 30 is connected with the amplifier 10, receives the input voltage and the output voltage, and samples based on the input voltage and the output voltage to obtain a voltage sampling value; the calibration circuit 20 is respectively connected with the amplifier 10 and the analog-to-digital conversion circuit 30, receives the voltage sampling value, judges that the output voltage is not in a normal range in the calibration circuit 20, and generates an adjustment signal based on the output voltage; wherein, the calibration circuit 20 adjusts the amplification ratio of the amplifier 10 based on the adjustment signal, so that the output voltage generated by the amplifier 10 after adjustment based on the input voltage amplification is in a normal range. Based on the above manner, in the calibration device of the MCU, the amplifier 10 generates the output voltage based on the amplification of the input voltage, the sampling result is obtained by sampling the amplifier 10, the amplification ratio of the amplifier 10 is adjusted based on the sampling result, the amplification of the offset voltage is realized, the offset voltage of the amplifier 10 after adjustment is calculated based on the sampling result, and the calibration of the amplifier 10 is performed according to the offset voltage value, thereby improving the calibration precision and the calibration efficiency of the amplifier 10.
As shown in fig. 2, fig. 2 is a circuit schematic of a second embodiment of the MCU calibration device of the present application. In the calibration device of the MCU of the present application, the calibration circuit 20 includes a control judgment module 31, a calibration voltage generation module 32, and a calibration amplification ratio module 33.
The control judgment module 31 is connected to the digital circuit 40, receives an output start command output from the digital circuit 40, and generates a switch control signal and a voltage control signal based on the start command.
The calibration voltage generation module 32 is connected to the control judgment module 31 and the amplifier 10, respectively, receives the voltage adjustment signal outputted from the control judgment module 31, generates an input voltage based on the voltage control signal, and outputs the input voltage to the amplifier 10.
The calibration amplification proportion module 33 is respectively connected with the control judgment module 31 and the amplifier 10, receives the switch control signal output by the control judgment module 31, and controls the amplifier 10 to be connected with the calibration voltage generation module 32 based on the switch control signal so as to receive the input voltage output by the calibration voltage generation module 32. Meanwhile, the amplifier 10 amplifies the received input voltage to generate an output voltage, and the analog-to-digital conversion circuit 30 samples the output voltage based on the input voltage and the output voltage received from the amplifier 10 to obtain a voltage sampling value, and outputs the voltage sampling value to the control judgment module 31.
Further, the control judgment module 31 is connected to the analog-to-digital conversion circuit 30, receives the voltage sampling value, and judges whether the output voltage is in the normal range. In the control judgment module 31, the voltage sampling value of the output voltage received by the control judgment module 31 is near the ground or near the magnitude of the reference voltage, the output voltage is not in the normal range, at this time, the offset voltage value error of the amplifier 10 obtained by calculation is larger, it is difficult to accurately calibrate the amplifier 10, and the amplification ratio of the amplifier 10 needs to be adjusted.
When the control judgment module 31 judges that the output voltage is in the normal range, the control judgment module 31 calculates the offset voltage of the amplifier 10 based on the voltage sampling value to obtain an offset voltage value, and generates a calibration signal of the amplifier 10 based on the offset voltage value. When the control judgment module 31 judges that the output voltage is not in the normal range, the control judgment module 31 generates a voltage adjustment signal and a resistance adjustment signal based on the output voltage.
The calibration amplification proportion module 33 receives the resistance adjustment signal output by the control judgment module 31, and adjusts the amplification proportion of the amplifier 10 based on the resistance adjustment signal; the calibration voltage generation module 32 receives the voltage adjustment signal output by the control judgment module 31, adjusts the input voltage generated by the calibration voltage generation module 32 based on the voltage adjustment signal, and outputs the adjusted input voltage to the amplifier 10; the amplifier 10 receives the input voltage generated by the calibration voltage generation module 32, and generates an output voltage based on the input voltage amplification; the analog-to-digital conversion circuit 30 samples based on the input voltage and the output voltage received from the amplifier 10 to obtain a voltage sample value, and outputs the voltage sample value to the control judgment module 31.
The control judgment module 31 judges whether the output voltage is in the normal range based on the voltage sampling value. Until the control judgment module 31 judges that the output voltage generated by amplifying the input voltage of the adjusted amplifier 10 is in the normal range, the control judgment module 31 stops generating the adjustment signal, calculates the offset voltage of the amplifier 10 based on the voltage sampling value, obtains the offset voltage value, and generates the calibration signal of the amplifier 10 based on the offset voltage value.
The calibration circuit 20 in the calibration device of the MCU of the present embodiment includes: the control judging module 31 is connected with the analog-to-digital conversion circuit 30, receives the voltage sampling value, judges that the output voltage is not in a normal range in the control judging module 31, and generates a voltage adjustment signal and a resistance adjustment signal based on the output voltage; the calibration voltage generation module 32 is connected with the control judgment module 31 and the amplifier 10 respectively, receives a voltage adjustment signal, and adjusts the input voltage generated by the calibration voltage generation module 31 based on the voltage adjustment signal; the calibration amplification ratio module 33 is connected to the control judgment module 31 and the amplifier 10, respectively, receives the resistance adjustment signal, and adjusts the amplification ratio of the amplifier 10 based on the resistance adjustment signal. Based on the above manner, the calibration circuit 20 determines the sampling results of the input voltage and the output voltage of the amplifier 10, and adjusts the amplification ratio of the amplifier 10 through the calibration amplification ratio module 33, so as to amplify the offset voltage, and simultaneously calculates the offset voltage value of the adjusted amplifier 10 and generates the calibration signal of the amplifier 10 based on the sampling results, thereby improving the calibration efficiency of the offset calibration of the amplifier 10.
As shown in fig. 3, fig. 3 is a circuit schematic of a third embodiment of the MCU calibration device according to the present application. In the calibration device of the MCU of the present application, the calibration circuit 20 includes a control judgment module 31, a calibration voltage generation module 32, and a calibration amplification ratio module 33.
The calibration voltage generation module 32 is connected to the control judgment module 31 and the amplifier 10, respectively, and generates an input voltage to be output to the amplifier 10 by a resistor voltage division method or a method based on a reference current flowing through a resistor.
Specifically, as shown in fig. 4, fig. 4 is a circuit schematic diagram of a fourth embodiment of the calibration device of the MCU of the present application. When the calibration voltage generating module 32 uses the resistor voltage dividing method, the calibration voltage generating module 32 includes a plurality of voltage dividing resistors 321 and a plurality of switches 322. The plurality of voltage dividing resistors 321 includes voltage dividing resistors R1, … …, rm-1, rm, m being an integer greater than or equal to 0, and the plurality of switches 322 includes switches K1, … …, kn-1, kn, n being an integer greater than or equal to 0. The plurality of voltage dividing resistors 321 are connected in series, one ends of the plurality of voltage dividing resistors 321 receive a reference voltage, the other ends of the plurality of voltage dividing resistors 321 are grounded, each voltage dividing resistor 321 divides the input reference voltage, a first end of each switch 322 is connected to the corresponding voltage dividing resistor 321, a second end of each switch 322 is connected to the calibration amplifying proportion module 33, the calibration voltage generating module 32 controls the corresponding switch 322 to be conducted based on the voltage control signal received from the control judging module 31, so that the input voltage generated by the calibration voltage generating module 32 is the voltage dividing magnitude of the voltage dividing resistor R1 to the voltage dividing resistor 321 corresponding to the conducted switch 322, and the input voltage is output to the positive input end and the negative input end of the amplifier 10.
Specifically, as shown in fig. 5, fig. 5 is a circuit schematic diagram of a fifth embodiment of the MCU calibration device of the present application. When the calibration voltage generating module 32 uses a reference current flowing through the resistor, the calibration voltage generating module 32 includes a third resistor 324 and a current source 323. The first end of the current source 323 receives the reference voltage, the second end of the current source 323 is connected to the first ends of the calibration amplifying proportion module 33 and the third resistor 324, the second end of the third resistor 324 is grounded, the calibration voltage generating module 32 controls the current source 323 to operate based on the voltage control signal received from the control judging module 31, so that the input voltage generated by the calibration voltage generating module 32 is the reference voltage minus the divided voltage generated by the third resistor 324 based on the current output by the current source 323, and the input voltage is output to the positive input end and the negative input end of the amplifier 10.
The calibration amplification proportion module 33 is connected to the control judgment module 31 and the amplifier 10, and receives the switch control signal output by the control judgment module 31, and includes: a first switch 331, a second switch 332, a third switch 333, a fourth switch 334, a first resistor 335, and a second resistor 336. The first switch 331, the second switch 332, the third switch 333, and the fourth switch 334 in the calibration amplification module 33 are turned on based on the switch control signal received from the calibration determination module. The first end of the first switch 331 is connected with the calibration voltage generating module 32, receives input voltage, the second end of the first switch 331 is connected with the positive input end of the amplifier 10, and the input voltage generated by the calibration voltage generating module 32 is input into the positive input end of the amplifier 10 through the first switch 331; the first end of the first resistor 335 is connected to the calibration voltage generating module 32 through the second switch 332, receives an input voltage, the second end of the first resistor 335 is connected to the negative input end of the amplifier 10 through the third switch 333, and the input voltage generated by the calibration voltage generating module 32 is input to the negative input end of the amplifier 10 through the second switch 332, the first resistor 335 and the third switch 333 in sequence; the first end of the second resistor 336 is connected to the second end of the first resistor 335, and the second end of the second resistor 336 is connected to the output end of the amplifier 10 through the fourth switch 334.
It should be noted that, the calibration amplification ratio module 33 adjusts the resistance value of the first resistor 335 based on the resistance adjustment signal to adjust the amplification ratio of the amplifier 10. When the resistance of the first resistor 335 is reduced, the amplification ratio of the amplifier 10 increases because the amplification ratio of the amplifier 10 is the ratio of the second resistor 336 to the first resistor 335 in the calibration circuit 20, and the second resistor 336 is a constant resistor. The output voltage generated by the regulated amplifier 10 based on the input voltage amplification is greater than the output voltage, thereby amplifying the offset voltage of the amplifier 10.
Specifically, the control judgment module 31 receives an output start instruction output from the digital circuit 40, and generates a switch control signal and a voltage control signal based on the start instruction. The calibration voltage generating module 32 generates an input voltage based on the voltage control signal, and the first switch 331, the second switch 332, the third switch 333, and the fourth switch 334 in the calibration amplifying scale module 33 are turned on based on the switch control signal, and the control amplifier 10 is connected to the calibration voltage generating module 32. The amplifier 10 receives the input voltage input from the calibration voltage generation module 32, generates an output voltage based on the input voltage amplification, and the analog-to-digital conversion circuit 30 samples based on the input voltage and the output voltage received from the amplifier 10 to obtain a voltage sample value, which is output to the control judgment module 31. The control judgment module 31 receives the voltage sampling value and judges whether the output voltage is in a normal range.
When the control judgment module 31 judges that the output voltage is in the normal range, the control judgment module 31 calculates the offset voltage of the amplifier 10 based on the voltage sampling value to obtain an offset voltage value, and generates a calibration signal of the amplifier 10 based on the offset voltage value.
When the control judgment module 31 judges that the output voltage is not in the normal range, the control judgment module 31 generates a voltage adjustment signal and a resistance adjustment signal based on the output voltage. The calibration amplification ratio module 33 receives the resistance adjustment signal output from the control determination module 31, and decreases the resistance value of the first resistor 335 to increase the amplification ratio of the amplifier 10. The calibration voltage generation module 32 receives the voltage adjustment signal output by the control judgment module 31, adjusts the input voltage generated by the calibration voltage generation module 31 based on the voltage adjustment signal, and outputs the adjusted input voltage to the amplifier 10; the amplifier 10 receives the input voltage generated by the calibration voltage generation module 32, and the output voltage generated by the amplifier 10 after adjustment based on the amplification of the input voltage is larger than the output voltage, so that the output voltage is amplified into an offset voltage of the amplification ratio of the amplifier 10 by the difference between the output voltage and the input voltage; the analog-to-digital conversion circuit 30 samples based on the input voltage and the output voltage received from the amplifier 10 to obtain a voltage sample value, and outputs the voltage sample value to the control judgment module 31.
The control judgment module 31 judges whether the output voltage is in the normal range based on the voltage sampling value. Until the control judgment module 31 judges that the output voltage generated by amplifying the input voltage after the adjustment of the amplifier 10 is in the normal range, the control judgment module 31 stops generating the voltage adjustment signal and the resistance adjustment signal, calculates the offset voltage of the amplifier 10 based on the voltage sampling value, obtains an offset voltage value, and generates the calibration signal of the amplifier 10 based on the offset voltage value.
The calibration circuit 20 in the calibration device of the MCU of the present embodiment includes: the control judging module 31 is connected with the analog-to-digital conversion circuit 30, receives the voltage sampling value, judges that the output voltage is not in a normal range in the control judging module 31, and generates a voltage adjustment signal and a resistance adjustment signal based on the output voltage; the calibration voltage generation module 32 is connected with the control judgment module 31 and the amplifier 10 respectively, receives a voltage adjustment signal, and adjusts the input voltage generated by the calibration voltage generation module 31 based on the voltage adjustment signal; the calibration amplification ratio module 33 is connected to the control judgment module 31 and the amplifier 10, respectively, receives the resistance adjustment signal, and adjusts the amplification ratio of the amplifier 10 based on the resistance adjustment signal. Based on the above manner, the calibration circuit 20 determines the sampling result of the input voltage and the output voltage of the amplifier 10, and adjusts the resistance in the calibration amplification proportion module 33 to increase the amplification proportion of the amplifier 10, thereby amplifying the offset voltage, obtaining a more accurate calibration signal for calibrating the amplifier 10, and improving the calibration efficiency and the calibration precision for the offset calibration of the amplifier 10.
Fig. 6 is a flowchart of a calibration method of the MCU according to the first embodiment of the present application.
The amplifier 10 amplifies based on the received input voltage to generate an output voltage S101.
The calibration circuit 20 receives the start-up command output from the digital circuit 40, generates an input voltage based on the start-up command, and outputs the input voltage to the amplifier 10. The amplifier 10 receives an input voltage output from the calibration circuit 20, and amplifies the input voltage to generate an output voltage.
The analog-to-digital conversion circuit 30 receives the input voltage and the output voltage and samples based on the input voltage and the output voltage to obtain a voltage sample value.
The analog-to-digital conversion circuit 30 receives the input voltage and the output voltage of the amplifier 10, samples the input voltage and the output voltage to obtain voltage sampling values, and outputs the voltage sampling values to the calibration circuit 20.
S103, the calibration circuit 20 receives the voltage sampling value and judges whether the output voltage is in a normal range.
The calibration circuit 20 receives the voltage sampling value output from the analog-to-digital conversion circuit 30, and determines whether the output voltage is in the normal range based on the voltage sampling value.
And S104, when the calibration circuit 20 judges that the output voltage is not in the normal range, generating an adjusting signal based on the output voltage.
When the calibration circuit 20 determines that the output voltage is not in the normal range in the received voltage sampling value, the calibration circuit 20 generates an adjustment signal based on the output voltage.
S105: the calibration circuit 20 adjusts the amplification ratio of the amplifier 10 based on the adjustment signal so that the output voltage generated by the adjusted amplifier 10 based on the input voltage amplification is in the normal range.
The calibration circuit 20 generates an input voltage based on the adjustment signal, outputs the input voltage to the amplifier 10 to receive, and the calibration circuit 20 adjusts the amplification ratio of the amplifier 10 based on the adjustment signal, the adjusted amplifier 10 generates an output voltage based on the input voltage to amplify, the analog-to-digital conversion circuit 30 receives the input voltage and the output voltage of the amplifier 10 and samples based on the input voltage and the output voltage to obtain a voltage sampling value, the output voltage sampling value is sent to the calibration circuit 20, and the calibration circuit 20 determines whether the output voltage is in a normal range based on the voltage sampling value. Until the calibration circuit 20 determines that the output voltage generated by the amplifier 10 based on the amplification of the input voltage after the adjustment is in the normal range, the calibration circuit 20 stops generating the adjustment signal.
S106: when the calibration circuit 20 determines that the input voltage is in the normal range, the calibration circuit 20 calculates an offset voltage value of the amplifier 10 based on the voltage sampling value, and generates a calibration signal of the amplifier 10 based on the offset voltage value.
When the calibration circuit 20 determines that the input voltage is in the normal range from the received voltage sampling value, the calibration circuit 20 calculates an offset voltage value of the amplifier 10 based on the voltage sampling value, generates a calibration signal of the amplifier 10 based on the offset voltage value, and the digital circuit 40 calibrates the amplifier 10 based on the calibration signal.
The MCU calibration method of the embodiment comprises the following steps: the amplifier 10 amplifies based on the received input voltage, generating an output voltage; the analog-to-digital conversion circuit 30 receives the input voltage and the output voltage and samples based on the input voltage and the output voltage to obtain a voltage sampling value; the calibration circuit 20 receives the voltage sampling value, and generates an adjustment signal based on the output voltage when the calibration circuit 20 judges that the output voltage is not in a normal range; wherein, the calibration circuit 20 adjusts the amplification ratio of the amplifier 10 based on the adjustment signal, so that the output voltage generated by the amplifier 10 after adjustment based on the input voltage amplification is in a normal range. Based on the above manner, the amplifier 10 in the circuit is sampled, and the amplification ratio of the amplifier 10 is adjusted based on the sampling result, so that the amplification of the offset voltage is realized until the sampling result of the amplifier 10 is in the normal range. The calibration of the amplifier 10 is performed according to the offset voltage of the adjusted amplifier 10, thereby improving the calibration accuracy and calibration efficiency of the amplifier 10.
The foregoing description is only of embodiments of the present application, and is not intended to limit the scope of the application, and all equivalent structures or equivalent processes using the descriptions and the drawings of the present application or directly or indirectly applied to other related technical fields are included in the scope of the present application.

Claims (10)

1. A calibration device for an MCU, comprising:
an amplifier that amplifies based on the received input voltage, generating an output voltage;
the analog-to-digital conversion circuit is connected with the amplifier, receives the input voltage and the output voltage, and samples based on the input voltage and the output voltage to obtain a voltage sampling value;
the calibration circuit is respectively connected with the amplifier and the analog-to-digital conversion circuit, receives the voltage sampling value, judges that the output voltage is not in a normal range in the calibration circuit, and generates an adjustment signal based on the output voltage;
the calibration circuit adjusts the amplification ratio of the amplifier based on the adjustment signal, so that the output voltage generated by the amplifier based on the input voltage amplification after adjustment is in a normal range.
2. The calibration device of claim 1, wherein,
when the calibration circuit judges that the input voltage is in a normal range, the calibration circuit calculates an offset voltage value of the amplifier based on the voltage sampling value, and generates a calibration signal of the amplifier based on the offset voltage value;
the offset voltage value is the difference between the output voltage and the input voltage divided by the amplification ratio of the amplifier, and the amplification ratio of the amplifier is the ratio of the second resistor to the first resistor in the calibration circuit.
3. The calibration device of claim 2, further comprising a digital circuit coupled to the calibration circuit and the analog-to-digital conversion circuit, respectively, for generating a start-up command, the calibration circuit generating the input voltage based on the start-up command, the analog-to-digital conversion circuit sampling the amplifier based on the start-up command; the digital circuit is connected with the amplifier, receives the calibration signal output by the calibration circuit, and calibrates the amplifier based on the calibration signal.
4. A calibration device according to claim 3, wherein the calibration circuit comprises:
the control judgment module is connected with the analog-to-digital conversion circuit, receives the voltage sampling value, judges that the output voltage is not in a normal range, and generates a voltage adjustment signal and a resistance adjustment signal based on the output voltage;
the calibration voltage generation module is respectively connected with the control judgment module and the amplifier, receives the voltage adjustment signal and adjusts the input voltage generated by the calibration voltage generation module based on the voltage adjustment signal;
and the calibration amplification proportion module is respectively connected with the control judgment module and the amplifier, receives the resistance adjustment signal and adjusts the amplification proportion of the amplifier based on the resistance adjustment signal.
5. The calibration device according to claim 4, wherein the calibration voltage generation module includes a plurality of voltage dividing resistors and a plurality of switches, the plurality of voltage dividing resistors are connected in series, one ends of the plurality of voltage dividing resistors receive a reference voltage, the other ends of the plurality of voltage dividing resistors are grounded, a first end of each of the switches is connected to the corresponding voltage dividing resistor, a second end of each of the switches is connected to the calibration amplification module, and the calibration voltage generation module controls the corresponding switches to be turned on based on the voltage control signal to output the input voltage.
6. The calibration device of claim 4, wherein the calibration voltage generation module comprises a third resistor and a current source, a first terminal of the current source receiving a reference voltage, a second terminal of the current source being connected to the calibration amplification module and the first terminal of the third resistor, a second terminal of the third resistor being grounded, the current source operating based on the voltage control signal to output the input voltage.
7. The calibration device of claim 4, wherein the calibration amplification module comprises a first switch, a second switch, a third switch, a fourth switch, the first resistor, and the second resistor, wherein:
a first end of the first switch is connected with the calibration voltage generation module and receives the input voltage, and a second end of the first switch is connected with the positive input end of the amplifier;
the first end of the first resistor is connected with the calibration voltage generation module through the second switch and receives the input voltage, and the second end of the first resistor is connected with the negative input end of the amplifier through the third switch;
the first end of the second resistor is connected with the second end of the first resistor, and the second end of the second resistor is connected with the output end of the amplifier through the fourth switch.
8. A calibration device according to any one of claims 4 to 7,
in the calibration circuit, the calibration judgment module receives the starting instruction and generates a switch control signal and the voltage control signal based on the starting instruction; the first switch, the second switch, the third switch and the fourth switch in the calibration amplification module are turned on based on the switch control signal; the calibration voltage generation module generates the input voltage based on the voltage control signal; the calibration amplification ratio module adjusts a resistance value of the first resistor based on the resistance adjustment signal to adjust an amplification ratio of the amplifier.
9. A method of calibration of an MCU applied to a calibration device as claimed in any one of claims 1 to 8, the method comprising:
the amplifier amplifies based on the received input voltage to generate an output voltage;
the analog-to-digital conversion circuit receives the input voltage and the output voltage and samples the input voltage and the output voltage based on the input voltage and the output voltage to obtain a voltage sampling value;
the calibration circuit receives the voltage sampling value, and generates an adjustment signal based on the output voltage when the calibration circuit judges that the output voltage is not in a normal range;
the calibration circuit adjusts the amplification ratio of the amplifier based on the adjustment signal, so that the output voltage generated by the amplifier based on the input voltage amplification after adjustment is in a normal range.
10. The method of calibrating according to claim 9, wherein,
when the calibration circuit judges that the input voltage is in a normal range, the calibration circuit calculates an offset voltage value of the amplifier based on the voltage sampling value, and generates a calibration signal of the amplifier based on the offset voltage value;
the offset voltage value is the difference between the output voltage and the input voltage divided by the amplification ratio of the amplifier, and the amplification ratio of the amplifier is the ratio of the second resistor to the first resistor in the calibration circuit.
CN202210365428.0A 2022-04-07 2022-04-07 MCU calibration device and MCU calibration method Pending CN116931470A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210365428.0A CN116931470A (en) 2022-04-07 2022-04-07 MCU calibration device and MCU calibration method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210365428.0A CN116931470A (en) 2022-04-07 2022-04-07 MCU calibration device and MCU calibration method

Publications (1)

Publication Number Publication Date
CN116931470A true CN116931470A (en) 2023-10-24

Family

ID=88377907

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210365428.0A Pending CN116931470A (en) 2022-04-07 2022-04-07 MCU calibration device and MCU calibration method

Country Status (1)

Country Link
CN (1) CN116931470A (en)

Similar Documents

Publication Publication Date Title
US5268601A (en) Logarithmic amplifier circuit with temperature compensation
CN110427067B (en) Method for improving current sampling precision by using analog circuit
US7202805B2 (en) Amplifier gain calibration system and method
AU659025B2 (en) Pulsed pressure sensor circuit and method therefor
CN116931470A (en) MCU calibration device and MCU calibration method
CN102594276B (en) Gain calibration system for instrument amplifier and gain calibration method
CN111308206B (en) Impedance detection device and detection method thereof
CN101753139A (en) Switching unit for generating an output voltage as a function of a digital data valve and method for calibrating the switching unit
CN114019339B (en) Calibration method and calibration device for programmable Josephson junction array bias driver
CN113702710A (en) Resistance test circuit and resistance test method
WO2016122913A1 (en) Correction circuits for successive-approximation-register analog-to-digital converters
GB1569390A (en) Voltmeters
KR100904225B1 (en) Apparatus for measuring water level
CN115015824B (en) Logarithmic detector calibration circuit and calibration method and logarithmic detector
CN216210708U (en) Current calibration circuit, drive amplification assembly and integrated circuit
CN220650862U (en) Current calibration circuit for current sense amplifier
CN114487984A (en) Calibration device and method for radio frequency power supply
CN220401717U (en) Adjustable amplifier structure
CN219738060U (en) uA level high-precision constant current source system
CN113110671B (en) Variable power consumption analog quantity current output circuit for control system
JP3351167B2 (en) Battery voltage measurement device
CN113849032B (en) Offset voltage correction circuit, integrated circuit, system and method
CN115685041A (en) Transmission power calibration equipment, transmission power calibration method and device
JPS60259018A (en) Calibration system of comparator
CN107846199B (en) Dual-channel power amplifier

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