This description relates generally to amplifiers, and more particularly to methods and apparatus to reduce offset and gain error in multistage current sense amplifiers.
In-line current sensing is commonly achieved by determining a voltage difference across a resistor in circuitry where a current measurement is to be determined. Additional circuitry, such as controller circuitry, divides the voltage difference across the resistor by the resistance of the resistor to determine the current flowing through the resistor. Typically, in-line current sensing includes a relatively small resistor and an instrumentation amplifier. The instrumentation amplifier is a difference amplifier which includes relatively large input resistances to decrease input current. In the example of in-line current sensing, the instrumentation amplifier is coupled to the relatively small resistor by a first reference input and a second reference input. The instrumentation amplifier converts a voltage difference between the reference input from a differential voltage to a single-ended voltage in reference to a common potential (e.g., ground). For example, an output of the instrumentation amplifier is five millivolts (mV) when the first reference input is sixty and five thousandths' volts (V), and the second reference input is sixty volts (V) when the gain of the instrumentation amplifier is one. In such an example, controller circuitry determines a current through the relatively small resistor is five amps (A) when a resistance of the relatively small resistance is one milliohm (mΩ), and ohms law is applied to solve for current.
For methods and apparatus to reduce offset and gain error in multistage current sense amplifiers, an example apparatus includes a transconductance stage made with a fully differential amplifier configured to generate a differential current based on a differential voltage input; and transistor's configured to be controlled by the output of the fully differential amplifier and source current from an input of the fully differential amplifier; and a transimpedance stage coupled to the transconductance stage, the transimpedance stage including: resistor circuitry configured to convert the differential current into a single ended voltage the single-ended voltage represents the voltage output.
The same reference numbers or other reference designators are used in the drawings to designate the same or similar (functionally and/or structurally) features.
The drawings are not necessarily to scale. Generally, the same reference numbers in the drawing(s) and this description refer to the same or like parts. Although the drawings show regions with clean lines and boundaries, some or all of these lines and/or boundaries may be idealized. In reality, the boundaries and/or lines may be unobservable, blended and/or irregular.
Applications which require current measurements may include a resistor at a location where current is to be measured. Such applications measure a voltage difference across the resistor to determine current flowing through the resistor. For example, Ohms law allows circuitry to calculate a current flowing through a resistor by dividing a voltage drop across the resistor by a resistance of the resistor. Such a method of current sensing may be referred to as in-line current sensing. An example implementation of in-line current sensing includes a relatively small resistor and an instrumentation amplifier. The relatively small resistor is placed between two points where current is to be measured. Such a resistor placement is referred to as in-line. The relatively small resistor includes a resistance, which is configured to be relatively small, such as to decrease any potential decrease resulting from the addition of the resistance.
The instrumentation amplifier includes a first reference input and a second reference input coupled across the relatively small resistor. The instrumentation amplifier generates an output voltage approximately equal to a gain times a voltage difference between the first reference input and the second reference input. For example, the output voltage of the instrumentation amplifier is ten volts (V) when the gain is two, the first reference input is twenty volts (V), and the second reference input is fifteen volts (V). Some applications need an instrumentation amplifier capable of bi-directional operation with relatively high bandwidth and precision, e.g., sensing current being supplied to a motor by a switching power supply.
One method of increasing a precision of current sensing using an instrumentation amplifier is to amplify an input voltage by a gain. Typically, such a method needs an instrumentation amplifier that includes resistors configured to create a closed loop gain proportional to resistances of the resistors. However, closed control loops are limited by a product of its gain and bandwidth being constant, such that, as a bandwidth of the instrumentation amplifier decreases as the gain increases. For example, an instrumentation amplifier with a closed loop gain has a response time to variations in the input voltage that increases as the gain increases. Separating the operations of an instrumentation amplifier into two-stages prevents increases in the response time as the gain increases. In two stage instrumentation amplifiers, an overall gain is equal to the product of the gain of the two stages, which allows each stage to include a relatively low closed loop gain. The relatively low closed loop gains result in a relatively high bandwidth at relatively high gains.
Typically, a first stage includes circuitry to reduce the common-mode voltage of the reference inputs. The first stage generates a differential output that is representative of the voltage difference between the reference inputs. One type of first stage implements a closed loop amplifier that is configured to use resistor pairs for voltage feedback. In such a configuration, mismatches in the resistor pairs results in offset and gain errors. Additionally, increases in the common-mode voltage of the reference inputs increases an input current of the first stage. As the input current increases, mismatches between the resistors used to amplify the voltage input increase offset and gain errors. A voltage feedback first stage may include trim circuitry for each resistor comprising the resistor pairs and trim circuitry for the output of the amplifier. Such trim circuitry reduces offset resulting from changes in the common mode. However, such trim circuitry increases the area and needs a symmetrical placement in a system on chip (SoC) design.
Typically, a second stage includes a differential-to-single-ended conversion which converts the differential voltage from the first stage into a single-ended voltage representing the voltage difference between the reference inputs. One method of implementing the second stage is to use an amplifier coupled to the output of the first stage.
The examples described herein include an instrumentation amplifier configured to include trim circuitry coupled to variable resistors configured to be set to resistances that reduce offset and gain errors. In some described examples, the instrumentation amplifier includes a first stage and a second stage that support bi-directional current sensing, such as both negative and positive voltage differences. The first stage is a transconductance stage that converts a voltage difference between two reference inputs into a differential current. The first stage includes circuitry to support differential current feedback, which allows bi-directional current sensing and a bandwidth that is proportional to current being sensed. Advantageously, the differential current, generated by the first stage, isolates the common-mode voltage of the reference inputs from the second stage without using resistor pairs for voltage feedback.
The second stage is a transimpedance stage that converts the differential current of the first stage to a single-ended voltage at a voltage output. The second stage includes input and feedback resistors which are configured to reduce offset and gain errors on the voltage output. The input and feedback resistors include variable resistances whose values may be modified by a trim process in order to increase precision by reducing gain and offset errors.
In the example of
The controller circuitry 120 reduces gain errors of the instrumentation amplifier 130 by setting trim inputs (TRIM) of the instrumentation amplifier 130. The trim inputs modify variable resistors whose resistances are determined by the trim input. The variable resistors of the instrumentation amplifier 130 are illustrated in connection with
The controller circuitry 120 includes example processor circuitry 165. The processor circuitry 165 is configured to execute and/or instantiate the instruction(s) and/or operations to implement operations of the controller circuitry 120. The processor circuitry 165 can be implemented by one or more integrated circuits, logic circuits, FPGAs, microprocessors, CPUs, GPUs, DSPs, and/or microcontrollers from any desired family or manufacturer or can even be integrated in the instrumentation amplifier 120. The processor circuitry 165 may be implemented by one or more semiconductor based (e.g., silicon based) devices. The processor circuitry 165 of the illustrated example includes a local memory 170 (e.g., a cache, registers, etc.). The local memory 170 includes example instruction(s) 175. The instruction(s) 175 are representative of machine executable operations to implement the controller circuitry 120. For example, the instruction(s) 175 may include operations representative of the operations of
The instrumentation amplifier 130 is coupled to the motor 110, the controller circuitry 120, the first transistor 140, the second transistor 150, and the resistor 160. In the example of
The transconductance stage 180 is coupled across the resistor 160, which may be more than one resistor. The transconductance stage 180 is coupled to the transimpedance stage 185. The transconductance stage 180 converts the voltage difference across the resistor 160 to a differential current using a current feedback loop (illustrated and discussed in connection with
The transimpedance stage 185 is coupled to controller circuitry 120, the transconductance stage 180, and the trim circuitry 190. The transimpedance stage 185 converts the differential current from the transconductance stage 180 into a single-ended voltage at the voltage output. The transimpedance stage 185 includes variable resistors (illustrated in
The trim circuitry 190 is coupled to the controller circuitry 120 and the transimpedance stage 185. The trim circuitry 190 stores trim codes based on the trim input from the controller circuitry 120. The trim circuitry 190 may modify the resistances of the variable resistors by modifying trim codes of the variable resistors. The controller circuitry 120 may modify resistances of the transimpedance stage 185 by modifying the trim codes of the trim circuitry 190. For example, the controller circuitry 120 may change the amplification of the voltage output from a gain of two to four by modifying the trim codes of the trim circuitry 190.
The first transistor 140 is coupled to the controller circuitry 120, the second transistor 150, the resistor 160, and a first reference potential (VDD). The first transistor 140 allows current to flow from the first reference potential towards the second transistor 150 and/or the resistor 160 when turned on (e.g., conducting) by the controller circuitry 120. The first transistor 140 prevents current from flowing from the first reference potential towards the second transistor 150 and/or the resistor 160 when turned off (e.g., not conducting) by the controller circuitry 120. The first transistor 140 is a P-channel metal oxide semiconductor field effect transistor (MOSFET). Alternatively, the first transistor 140 may be a PNP bipolar junction transistor (BJT), an N-channel field-effect transistor (FET), an N-channel insulated-gate bipolar transistor (IGBT), an N-channel junction field effect transistor (JFET), a P-channel MOSFET, a P-channel FET, a P-channel IGBT, a P-channel JFET, or an NPN BJT.
The second transistor 150 is coupled to the controller circuitry 120, the first transistor 140, the resistor 160, and a second reference potential (VSS). The second transistor 150 allows current to flow from the first transistor 140 and/or the resistor 160 towards the second reference potential when turned on (e.g., conducting) by the controller circuitry 120. The second transistor 150 prevents current from flowing from the first transistor 140 and/or the resistor 160 when turned off (e.g., not conducting) by the controller circuitry 120. The second transistor 150 is an N-channel MOSFET. Alternatively, the second transistor 150 may be a PNP BJT, an N-channel FET, an N-channel IGBT, an N-channel JFET, a P-channel MOSFET, a P-channel FET, a P-channel IGBT, a P-channel JFET, or an NPN BJT.
The resistor 160 is coupled to the motor 110, the instrumentation amplifier 130, the first transistor 140, and the second transistor 150. Current flowing through the resistor 160 may be determined by applying ohms law, such as to divide the voltage difference across the resistor 160 by its resistance RS.
In the example of
The first resistor 224 is coupled to the first reference input 204, the fully differential amplifier 232, and the first transistor 236. The first resistor 224 includes a first resistance (Rip). The first resistor 224 uses the first reference input 204 to supply current to the first transistor 236. The first resistor 224 creates a voltage difference approximately equal to the first resistance times the current flowing through the first transistor 236. The first resistor 224 supplies a voltage to the fully differential amplifier 232 equal to a voltage of the first reference input 204 minus the voltage difference generated by supplying current to the first transistor 236.
The second resistor 228 is coupled to the second reference input 208, the fully differential amplifier 232, and the third transistor 244. The second resistor 228 includes a second resistance (R1n) approximately equal to the first resistance. The second resistor 228 uses the second reference input 208 to supply current to the third transistor 244. The second resistor 228 supplies a voltage to the fully differential amplifier 232 equal to a voltage of the second reference input 208 minus a voltage difference generated by supplying current to the third transistor 244.
The fully differential amplifier 232 is coupled to the first resistor 224 and the first transistor 236 by an inverting input (−). The inverting input may be referred to as an inverting terminal. The fully differential amplifier 232 is coupled to the second resistor 228 and the third transistor 244 by a non-inverting input (+). The non-inverting input may be referred to as a non-inverting terminal. The fully differential amplifier 232 is coupled to the first transistor 236 by a non-inverting output (+). The non-inverting output may be referred to as a non-inverting terminal. The fully differential amplifier 232 is coupled to the transistors 240 and 248 by a reference rail input. The fully differential amplifier 232 is coupled to the third transistor 244 by an inverting output (−). The inverting output may be referred to as an inverting terminal.
The fully differential amplifier 232 controls an amount of current flowing through each of the transistors 236 and 244 based on the inverting and non-inverting inputs. The fully differential amplifier 232 causes the transistors 236 and 244 to individually source a current from the reference inputs 204 and 208 resulting in the resistors 224 and 228 suppling the fully differential amplifier 232 with approximately the same voltage. For example, the fully differential amplifier 232 turns on the first transistor 236 to source a first current and the third transistor 244 to source a second current, which cause potential differences across the resistors 224 and 228 to set the inverting and non-inverting inputs approximately equal to each other. In such an example, the first current and the second current are the differential current being supplied to the transimpedance stage 185. The fully differential amplifier 232 ensures the transistors 240 and 248 are on (e.g., conducting) to allow the transistors 236 and 244 to source currents from the resistors 224 and 228.
The fully differential amplifier 232 may include a bias on the inverting and non-inverting outputs to cause the transistors 236 and 244 to continue to source a bias current when the reference inputs 204 and 208 are approximately equal to each other. The bias current prevents a transconductance (gm) of the transistors 236 and 244 from approaching zero. Advantageously, biasing the transistors 236 and 244 prevents relatively low transconductance of the transistors 236 and 244 and relatively low bandwidth of the instrumentation amplifier 130.
The first transistor 236 is coupled to the first resistor 224 and the fully differential amplifier 232 by a source input. The source input may be referred to as a source terminal. The first transistor 236 is coupled to the fully differential amplifier 232 by a control input. The control input may be referred to as a gate input or a control terminal. The first transistor 236 is coupled to the second transistor 240 by a drain output. The drain output may be referred to as a drain terminal. The first transistor 236 sources current from the first resistor 224. The non-inverting output of the fully differential amplifier 232 controls the first transistor 236. The fully differential amplifier 232 may partially turn on (e.g., conducting) and/or fully turn on the first transistor 236. The first transistor 236 supplies current to the second transistor 240. The first transistor 236 is a P-channel MOSFET. Alternatively, the first transistor 236 may be a PNP BJT, an N-channel FET, an N-channel JFET, a N-channel MOSFET, a P-channel FET, a P-channel JFET, or an NPN BJT.
The second transistor 240 is coupled to the first transistor 236 by a source input. The second transistor 240 is coupled to the fully differential amplifier 232 by a control input. The second transistor 240 is coupled to the transimpedance stage 185 by a drain output. The second transistor 240 sources current from the first transistor 236. The second transistor 240 is configured to be always turned on (e.g., conducting) by the fully differential amplifier 232. The second transistor 240 includes a relatively large impedance on the drain output to allow a voltage difference between the source input and the drain output when turned on (e.g., conducting), while allowing current to flow from the source input to the drain output. Such a transistor may be referred to as a power transistor, a high-voltage transistor, and/or a drain extended transistor. Advantageously, the common-mode voltage of drain output of the first transistor 236 may be different than the common-mode voltage of the drain output of the second transistor 240. The second transistor 240 is a P-channel MOSFET. Alternatively, the second transistor 240 may be a PNP BJT, an N-channel FET, an N-channel IGBT, an N-channel JFET, an N-channel MOSFET, a P-channel FET, a P-channel IGBT, a P-channel JFET, or an NPN BJT.
The third transistor 244 is coupled to the second resistor 228 and the fully differential amplifier 232 by a source input. The third transistor 244 is coupled to the fully differential amplifier 232 by a control input. The third transistor 244 is coupled to the fourth transistor 248 by a drain output. The third transistor 244 sources current from the second resistor 228. The inverting output of the fully differential amplifier 232 controls the third transistor 244 based on a voltage of the non-inverting input of the fully differential amplifier 232. The fully differential amplifier 232 may partially turn on (e.g., conducting) and/or fully turn on the third transistor 244. The third transistor 244 supplies current to the fourth transistor 248. The third transistor 244 is a P-channel MOSFET. Alternatively, the third transistor 244 may be a PNP BJT, an N-channel FET, an N-channel JFET, a N-channel MOSFET, a P-channel FET, a P-channel JFET, or an NPN BJT.
The fourth transistor 248 is coupled to the third transistor 244 by a source input. The fourth transistor 248 is coupled to the fully differential amplifier 232 by a control input. The fourth transistor 248 is coupled to the transimpedance stage 185 by a drain output. The fourth transistor 248 sources current from the third transistor 244. The fourth transistor 248 is configured to be always turned on (e.g., conducting) by the fully differential amplifier 232. The fourth transistor 248 includes a relatively large impedance on the drain output to allow a voltage difference between the source input and the drain output when turned on (e.g., conducting), while allowing current to flow from the source input to the drain output. Such a transistor may be referred to as a power transistor, a high-voltage transistor, and/or a drain extended transistor. Advantageously, the common-mode voltage of drain output of the fourth transistor 248 may be different than the common-mode voltage of the drain output of the fourth transistor 248. The fourth transistor 248 is a P-channel MOSFET. Alternatively, the fourth transistor 248 may be a PNP BJT, an N-channel FET, an N-channel IGBT, an N-channel JFET, an N-channel MOSFET, a P-channel FET, a P-channel IGBT, a P-channel JFET, or an NPN BJT.
In an example operation, the differential current output of the transconductance stage 180 is approximately equal to the voltage difference between the reference inputs 204 and 208 divided by an average resistance of the resistors 224 and 228. For example, the differential current is approximately equal to five milliamps (mA) when the voltage difference between the reference inputs 204 and 208 is approximately five volts (V) and the average resistance of the resistors 224 and 228 is approximately one-thousand ohms (Ω). In such an example, the current flowing through the second transistor 240 is greater than the current flowing through the fourth transistor 248. In another example, the differential currents are approximately equal to negative five milliamps (mA) when the voltage difference between the reference inputs 204 and 208 is approximately negative five volts (V) and the average resistance of the resistors 224 and 228 is approximately one-thousand ohms (Ω). In such an example, the current flowing through the second transistor 240 is less than the current flowing through the fourth transistor 248. Advantageously, the transconductance stage 180 may generate a differential current representing positive and negative voltage differences between the reference inputs 204 and 208. The transconductance stage 180 allows the instrumentation amplifier 130 to be bi-directional as long as the transimpedance stage 185 is capable of representing negative voltages on the voltage output 212.
In example operation, the transistors 236 and 244 source the differential current proportional to the voltage difference of the reference inputs 204 and 208. For example, the differential current of the transistors 236 and 244 increases as the voltage difference between the reference inputs 204 and 208 increases. In such a configuration, a transconductance of the transistors 236 and 244 increases as current being sourced increases. The varying transconductance of the transistors 236 and 244 causes the bandwidth of the instrumentation amplifier 130 to be proportional to current flowing through the transistors 236 and 244. Advantageously, the transconductance and bandwidth of the instrumentation amplifier 130 increases as the differential current flowing through the transistors 236 and 244 increases.
In the example of
The amplifier 252 is coupled to the second transistor 240 and the variable resistors 260 and 264 by a non-inverting input (+). The amplifier 252 is coupled to the fourth transistor 248 and the variable resistors 256 and 268 by an inverting input (−). The amplifier is coupled to the voltage output 212 and the first variable resistor 256 by an amplifier output. The amplifier 252 is configured to modify a voltage of the inverting input by modifying a current being supplied to the first variable resistor 256. For example, the amplifier 252 increases a current output at the amplifier output to increase current supplied to the inverting input by the first variable resistor 256. In such an example, the increase in current output increases the voltage of the inverting input across a voltage divider generated by the variable resistors 256 and 268. The amplifier 252 modifies the current at the amplifier output to modify the voltage of the inverting input to be approximately equal to a voltage of the non-inverting input.
The first variable resistor 256 is coupled to the trim circuitry 190, the voltage output 212, the fourth transistor 248, the amplifier 252, and the fourth variable resistor 268. The trim circuitry 190 configures circuitry (not illustrated for simplicity) of the first variable resistor 256 to set its resistance to a first reference resistance (R3n) based on a first trim code. The first trim code is a digital value (e.g., an eight-bit value) which corresponds to a specific resistance from a range of potential resistances of the first variable resistor 256. The range of potential resistances of the first variable resistor 256 may be divided by a number of potential digital values that the first trim code can represent to determine which resistance corresponds to which first trim value. For example, the first trim code may set the resistance of the first variable resistor 256 to a value between one hundred ohms (Ω) and ten kilohms (kΩ) based on the first trim code. In the example of
The second variable resistor 260 is coupled to the trim circuitry 190, the reference voltage input 216, the second transistor 240, the amplifier 252, and the third variable resistor 264. The trim circuitry 190 configures circuitry (not illustrated for simplicity) of the second variable resistor 260 to set its resistance to a second reference resistance (R3p) based on a second trim code. Similar to how the first trim code represents the range of resistances of the first variable resistor 256, the second trim code represents a range of resistances of the second variable resistor 260, which may be the same as the range of resistances of the first variable resistor 256. In the example of
The third variable resistor 264 is coupled to the trim circuitry 190, the second transistor 240, the amplifier 252, the second variable resistor 260, and a common potential (e.g., ground). The trim circuitry 190 configures circuitry (not illustrated for simplicity) of the third variable resistor 264 to set its resistance to a second reference resistance (R2p) based on a third trim code. Similar to how the first trim code represents the range of resistances of the first variable resistor 256, the third trim code represents a range of resistances of the third variable resistor 264. In the example of
In the example of
The fourth variable resistor 268 is coupled to the trim circuitry 190, the fourth transistor 248, the amplifier 252, the first variable resistor 256, and the common potential. The trim circuitry 190 configures circuitry (not illustrated for simplicity) of the fourth variable resistor 268 to set its resistance to a fourth reference resistance (R2n) based on the third trim code. In the example of
The trim circuitry 190 is coupled to the controller circuitry 120 and the transimpedance stage 185. In the example of
The first register 272 stores a first trim code (R3n_TRIM_CODE) which configures the first reference resistance of the first variable resistor 256. The second register 276 stores the second trim code (R3p_TRIM_CODE) which configures the second reference resistance of the second variable resistor 260. The third register 280 stores the third trim code (R2_TRIM_CODE) which configures the reference resistances of the variable resistors 264 and 268. The controller circuitry 120 sets and/or modifies the trim codes stored in the registers 272-280. Although in the example of
In an example operation, the instrumentation amplifier 130 includes a positive gain (GainPos), a negative gain (GainNeg), and a reference gain (Gainref). The gain of the instrumentation amplifier 130 depends on the voltage difference between the reference inputs 204 and 208 and the resistances of the resistors 224, 228, and 256-268. A DC offset of the voltage output 212 depends on the reference voltage input 216 and the resistances of the resistors 224, 228, and 256-268. Advantageously, gain and offset errors of the instrumentation amplifier 130 may be reduced by modifying the resistances of the variable resistors 256-268, such as the methods described in
In the example of
The positive gain is equal to a voltage of the voltage output 212 divided by the voltage difference between the reference inputs 204 and 208, when the voltage difference is positive (Vdiff(+ve)). Additionally, the positive gain is equal to the second reference resistance (R3p) divided by the first resistance times one plus a division of the first reference resistance (R3n) by the fourth reference resistance (R2n) divided by one plus a division of the first reference resistance by the third reference resistance (R2p). The positive gain is determined using Equation (1), below.
In the example of
The negative gain is equal to the voltage of the voltage output 212 divided by the voltage difference between the reference inputs 204 and 208, when the voltage difference is negative (Vdiff(−ve)). Additionally, the negative gain is equal to the first reference resistance divided by the second resistance. The negative gain is determined using Equation (2), below.
The reference gain is an additional gain on the voltage output 212 dependent on the reference voltage input 216. In the example of
In example operation, offset errors resulting from the reference gain may be reduced by setting the reference gain equal to approximately one. Additionally, the positive gain of the instrumentation amplifier 130 is equal to the second reference resistance divided by the first resistance when the reference gain is approximately equal to one. In the example of
In the example of
In example operation, a designer, manufacturer, processor, etc. may use Equations (1)-(3) to determine initial resistances for the resistors 224 and 228 and trim codes for the variable resistors 256-268 which configure the positive gain and the negative gain to be equal to target values. During the operations described in
The ADC 310 is coupled to the processor circuitry 165 and the voltage output 212 of
The DAC 330 is coupled to the processor circuitry 165 and the reference voltage input 216 of
In the example of
At block 420, the controller circuitry 120 sets a trim code of the first variable resistor 256 to the determined first trim code to modify the negative gain error. For example, the controller circuitry 120 sets the first trim code of the first variable resistor 256 to the trim code determined at the block 410 by modifying the first register 272 of
At block 430, the controller circuitry 120 determines a second trim code and a third trim code of the second variable resistor 260 of
At block 440, the controller circuitry 120 sets a trim code of the second variable resistor 260 to the determined second trim code to modify the positive gain error and the reference gain error. For example, the controller circuitry 120 sets the second trim code of the second variable resistor 260 to the trim code determined at the block 430 by modifying the second register 276 of
At block 450, the controller circuitry 120 sets a trim code of the variable resistors 264 and 268 to the determined third trim code to modify the positive gain error and the reference gain error. For example, the controller circuitry 120 sets the third trim code of the variable resistors 264 and 268 to the third trim code determined at the block 430 by modifying the third register 280 of
Although example methods are described with reference to the flowchart illustrated in
At block 520, the controller circuitry 120 determines a second negative gain when the trim code of the first variable resistor 256 is at a minimum trim code (Gainneg(R3nmin)) using Equation (2), above. The controller circuitry 120 determines the second negative gain to be a division of the first reference resistance of the first variable resistor at a minimum trim code by the second resistance of the second resistor 228. As illustrated in Equation (2), above, when the first reference resistance is equal to a minimum resistance of the first variable resistor 256. The method of
At block 530, the controller circuitry 120 determines a difference in negative gain per least significant bit (LSB) of the third trim code (GEvRn) of the first variable resistor 256 based on the first negative gain and the second negative gain. The controller circuitry 120 determines the difference in negative gain per LSB of the first trim code by dividing a subtraction of the second negative gain from the first negative gain by a number of bits between the minimum and maximum trim codes (R3nrange). The controller circuitry 120 determines the difference in negative gain per LSB of the third trim code using Equation (4), below. Such a determination results in a value which represents a change in the negative gain per LSB of the first trim code. The method of
At block 540, the controller circuitry 120 measures the voltage output 212 to determine a negative gain error at a target negative gain (GEneg). The controller circuitry 120 calculates the first reference resistance using Equation (2), above, to configure the negative gain error to the target negative gain. The target negative gain is an ideal gain of the instrumentation amplifier 130 when the voltage difference between the reference inputs 204 and 208 is negative. For example, the controller circuitry 120 determines the first reference resistance should be one kiloohm (kΩ) when the second resistance is equal to three kiloohms (kΩ) and the target negative gain is one-third. In such an example, the controller circuitry 120 determines the negative gain error to be the difference between the target negative gain and a measured negative gain. The controller circuitry 120 determines the measured negative gain is the digital output of the ADC 310 divided by the potential difference between the reference inputs 204 and 208 over two measurement points. The method of
At block 550, the controller circuitry 120 determines a first trim code based on the negative gain error, determined at block 540, and the difference in the negative gain per LSB of the trim code, determined at block 530. The controller circuitry 120 determines a number of bits to change to the first trim code (TrimcodeΔ(R3n)) by dividing the negative gain error by the difference in the negative gain per LSB of the first trim code. The controller circuitry 120 determines the number of bits to change to the first trim code using Equation (5), below. The method of
Although example methods are described with reference to the flowchart illustrated in
At block 610, the controller circuitry 120 determines a second positive gain at a first minimum trim code (Gainpos(R3pmin)) of the second variable resistor 260. The second variable resistor 260 sets the second reference resistance to a minimum resistance (R3pmin) when the second trim code is equal to the first minimum trim code. The second positive gain of block 610 is determined using the minimum resistance of the second variable resistor 260 in Equation (1), above. The method of
At block 615, the controller circuitry 120 determines a difference in the positive gain per LSB of the second trim code (A) by dividing a difference between the first and the second positive gains by a range of the second trim code (R3prange). The controller circuitry 120 determines the difference in the positive gain per LSB of the first trim code of the second variable resistor 260 by dividing the positive gains determined at the blocks 605 and 610 by a number of increments between the first maximum and first minimum trim codes. The determination of the block 615 is illustrated by Equation (6), below. The method of
At block 620, the controller circuitry 120 determines a third positive gain at a second maximum trim code (Gainpos(R2max)) of the variable resistors 264 and 268 of
At block 625, the controller circuitry 120 determines a fourth positive gain at a second minimum trim code (Gainpos(R2min)) of the variable resistors 264 and 268. The variable resistors 264 and 268 set the third reference resistances to a minimum resistance (R2min) when the third trim code is equal to the second minimum trim code. The fourth positive gain of block 625 is determined using the minimum resistance of the variable resistors 264 and 268 in Equation (1), above. The method of
At block 630, the controller circuitry 120 determines a difference in the positive gain per LSB of the third trim code (B) by dividing a difference between the third and the fourth positive gains by a range of the second trim code (R2range). The controller circuitry 120 determines the difference in the positive gain per LSB of the third trim code of the variable resistors 264 and 268 by dividing the positive gains determined at the blocks 620 and 625 by a number of increments between the second maximum and second minimum trim codes. The determination of the block 630 is illustrated by Equation (7), below. The method of
At block 635, the controller circuitry 120 determines a first reference gain at the first maximum trim code (Gainref(R3pmax)) of the second variable resistor 260. The first reference gain of block 635 is determined using the maximum resistance of the second variable resistor 260 in Equation (3), above. The method of
At block 640, the controller circuitry 120 determines a second reference gain at the first minimum trim code (Gainref(R3pmin)) of the second variable resistor 260. The second reference gain of block 640 is determined using the minimum resistance of the second variable resistor 260 in Equation (3), above. The method of
At block 645, the controller circuitry 120 determines a difference in the reference gain per LSB of the second trim code (C) by dividing a difference between the first and the second reference gains by the range of the second trim code. The controller circuitry 120 determines the difference in the reference gain per LSB of the second trim code of the second variable resistor 260 by dividing the reference gains determined at the blocks 635 and 640 by the number of increments between the first maximum and first minimum trim codes. The determination of the block 645 is illustrated by Equation (8), below. The method of
At block 650, the controller circuitry 120 determines a third reference gain at a second maximum trim code (Gainref(R2max)) of the variable resistors 264 and 268. The third reference gain of block 650 is determined using the maximum resistance of the variable resistors 264 and 268 in Equation (3), above. The method of
At block 655, the controller circuitry 120 determines a fourth reference gain at a second minimum trim code (Gainref(R2 min)) of the variable resistors 264 and 268. The fourth reference gain of block 655 is determined using the minimum resistance of the variable resistors 264 and 268 in Equation (3), above. The method of
At block 660, the controller circuitry 120 determines a difference in the reference gain per LSB of the third trim code (D) by dividing a difference between the third and the fourth reference gains by the range of the third trim code. The controller circuitry 120 determines the difference in the reference gain per LSB of the third trim code of the variable resistors 264 and 268 by dividing the reference gains determined at the blocks 650 and 655 by the number of increments between the second maximum and second minimum trim codes. The determination of the block 660 is illustrated by Equation (9), below. The method of
At block 665, the controller circuitry 120 determines a positive gain error (E) of a voltage output when an input voltage is positive. For example, the controller circuitry 120 uses Equation (1), above to determine a positive gain of the instrumentation amplifier 130 by measuring the voltage output 212 of
At block 670, the controller circuitry 120 determines a reference gain error (F) of a voltage output. For example, the controller circuitry 120 uses Equation (3), above to determine a reference gain of the instrumentation amplifier 130 by measuring the voltage output 212 and using the analog voltage of the DAC 330 of
At block 675, the controller circuitry 120 determines the second trim code based on the positive gain error, the reference gain error, and the differences in the positive gain and the reference gain per LSB of the second trim code and the third trim code. The controller circuitry 120 determines a number of bits to change to the second trim code, referred to as a trim code adjustment, (TrimcodeΔ(R3p)) by dividing a multiplication of the difference in the reference gain per LSB of the third trim code (D) and the positive gain error (E) minus a multiplication of the difference in the positive gain per LSB of the third trim code (B) and the reference gain error (F) by a subtraction of a multiplication of the difference in the positive gain per LSB of the third trim code (B) and the difference in the reference gain per LSB of the second trim code (C) from a multiplication of the difference in the positive gain per LSB of the second trim code (A) and the difference in the reference gain per LSB of the third trim code (D). The controller circuitry 120 may calculate the trim code adjustment of the second trim code using Equation (10), below.
The controller circuitry 120 determines the second trim code by adding the determined number of bits to change to the initial value that was set when determining the positive and reference gain errors. The method of
At block 680, the controller circuitry 120 determines the third trim code based on the positive gain error, the reference gain error, and the differences in the positive gain and the reference gain per LSB of the second trim code and the third trim code. The controller circuitry 120 determines a number of bits to change to the third trim code (TrimcodeΔ(R2)) by dividing a multiplication of the difference in the positive gain per LSB of the second trim code (A) and the reference gain error (F) minus a multiplication of the difference in the reference gain per LSB of the second trim code (C) and the positive gain error (E) by a subtraction of a multiplication of the difference in the positive gain per LSB of the third trim code (B) and the difference in the reference gain per LSB of the second trim code (C) from a multiplication of the difference in the positive gain per LSB of the second trim code (A) and the difference in the reference gain per LSB of the third trim code (D). The controller circuitry 120 may calculate the trim code adjustment of the third trim code using Equation (11), below.
The controller circuitry 120 determines the third trim code by adding the determined number of bits to change to the initial value that was used when measuring the positive and reference gain errors. The method of
Although example methods are described with reference to the flowchart illustrated in
In this description, the term “and/or” (when used in a form such as A, B and/or C) refers to any combination or subset of A, B, C, such as: (a) A alone; (b) B alone; (c) C alone; (d) A with B; (e) A with C; (f) B with C; and (g) A with B and with C. Also, as used herein, the phrase “at least one of A or B” (or “at least one of A and B”) refers to implementations including any of: (a) at least one A; (b) at least one B; and (c) at least one A and at least one B.
The term “couple” is used throughout the specification. The term may cover connections, communications, or signal paths that enable a functional relationship consistent with this description. For example, if device A provides a signal to control device B to perform an action, in a first example device A is coupled to device B, or in a second example device A is coupled to device B through intervening component C if intervening component C does not substantially alter the functional relationship between device A and device B such that device B is controlled by device A via the control signal provided by device A.
Numerical identifiers such as “first”, “second”, “third”, etc. are used merely to distinguish between elements of substantially the same type in terms of structure and/or function. These identifiers as used in the detailed description do not necessarily align with those used in the claims.
A device that is “configured to” perform a task or function may be configured (e.g., programmed and/or hardwired) at a time of manufacturing by a manufacturer to perform the function and/or may be configurable (or re-configurable) by a user after manufacturing to perform the function and/or other additional or alternative functions. The configuring may be through firmware and/or software programming of the device, through a construction and/or layout of hardware components and interconnections of the device, or a combination thereof.
As used herein, the terms “terminal”, “node”, “interconnection”, “pin” and “lead” are used interchangeably. Unless specifically stated to the contrary, these terms are generally used to mean an interconnection between or a terminus of a device element, a circuit element, an integrated circuit, a device or other electronics or semiconductor component.
A circuit or device that is described herein as including certain components may instead be adapted to be coupled to those components to form the described circuitry or device. For example, a structure described as including one or more semiconductor elements (such as transistors), one or more passive elements (such as resistors, capacitors, and/or inductors), and/or one or more sources (such as voltage and/or current sources) may instead include only the semiconductor elements within a single physical device (e.g., a semiconductor die and/or integrated circuit (IC) package) and may be adapted to be coupled to at least some of the passive elements and/or the sources to form the described structure either at a time of manufacture or after a time of manufacture, for example, by an end-user and/or a third-party.
While the use of particular transistors are described herein, other transistors (or equivalent devices) may be used instead with little or no change to the remaining circuitry. For example, a metal-oxide-silicon FET (“MOSFET”) (such as an n-channel MOSFET, nMOSFET, or a p-channel MOSFET, pMOSFET), a bipolar junction transistor (BJT—e.g., NPN or PNP), insulated gate bipolar transistors (IGBTs), and/or junction field effect transistor (JFET) may be used in place of or in conjunction with the devices disclosed herein. The transistors may be depletion mode devices, drain-extended devices, enhancement mode devices, natural transistors or other type of device structure transistors. Furthermore, the devices may be implemented in/over a silicon substrate (Si), a silicon carbide substrate (SiC), a gallium nitride substrate (GaN) or a gallium arsenide substrate (GaAs).
Circuits described herein are reconfigurable to include the replaced components to provide functionality at least partially similar to functionality available prior to the component replacement. Components shown as resistors, unless otherwise stated, are generally representative of any one or more elements coupled in series and/or parallel to provide an amount of impedance represented by the shown resistor. For example, a resistor or capacitor shown and described herein as a single component may instead be multiple resistors or capacitors, respectively, coupled in parallel between the same nodes. For example, a resistor or capacitor shown and described herein as a single component may instead be multiple resistors or capacitors, respectively, coupled in series between the same two nodes as the single resistor or capacitor. While certain elements of the described examples are included in an integrated circuit and other elements are external to the integrated circuit, in other example embodiments, additional or fewer features may be incorporated into the integrated circuit. In addition, some or all of the features illustrated as being external to the integrated circuit may be included in the integrated circuit and/or some features illustrated as being internal to the integrated circuit may be incorporated outside of the integrated. As used herein, the term “integrated circuit” means one or more circuits that are: (i) incorporated in/over a semiconductor substrate; (ii) incorporated in a single semiconductor package; (iii) incorporated into the same module; and/or (iv) incorporated in/on the same printed circuit board.
Uses of the phrase “ground” in the foregoing description include a chassis ground, an Earth ground, a floating ground, a virtual ground, a digital ground, a common ground, and/or any other form of ground connection applicable to, or suitable for, the teachings of this description. Unless otherwise stated, “about,” “approximately,” or “substantially” preceding a value means +/−10 percent of the stated value, or, if the value is zero, a reasonable range of values around zero.
Modifications are possible in the described embodiments, and other embodiments are possible, within the scope of the claims.