Current source circuit and control method thereof
By designing a current source circuit including an operational amplifier, MOS tube and an adjustable resistance circuit, adjusting the resistance value of the adjustable resistance circuit so that its temperature coefficient resistance is zero, the simultaneous generation of zero temperature coefficient voltage and current is solved, and the problem that traditional structures cannot achieve this goal.
Patent Information
- Application Number
- CN202411552427.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-01
- Publication Date
- 2025-03-11
AI Technical Summary
The traditional bandgap reference voltage mode structure cannot directly generate voltage with zero temperature coefficient and current with zero temperature coefficient at the same time, limiting the selection and application of current sources.
A current source circuit is designed, including an operational amplifier, MOS tube and an adjustable resistance circuit. By adjusting the resistance value of the adjustable resistance circuit, its temperature coefficient resistance is zero, thereby achieving an equivalent current output with a temperature coefficient of zero.
A current source circuit that can generate both zero temperature coefficient voltage and zero temperature coefficient current is realized, solving the problem that traditional structures cannot achieve this goal at the same time.
Smart Images

Figure CN119597097A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of circuit technology, and in particular to a current source circuit and a control method of the current source circuit. Background Art
[0002] MCU (Microcontroller Unit) has been widely used in the field of consumer electronics due to its small size, excellent performance and low power consumption. To ensure the normal operation of the MCU chip, an oscillator is required to provide an accurate reference clock. With the continuous advancement of integrated circuit technology, oscillators are gradually moving towards on-chip integration. However, on-chip integrated oscillators are susceptible to interference from multiple factors such as process angle deviation, temperature fluctuation and power supply fluctuation.
[0003] In this context, relaxation oscillators have been widely used in MCUs due to their significant advantages such as easy implementation, strong portability, small footprint and low cost. Its working principle mainly relies on the alternating charging of capacitors by current sources, which requires the current source to have high output impedance, low temperature drift coefficient and insensitivity to power supply changes.
[0004] Current sources can be subdivided into negative temperature coefficient current, positive temperature coefficient current and zero temperature coefficient current (i.e. bandgap reference current). In the field of bandgap reference generation, common structures are mainly divided into two types: voltage mode and current mode. However, although the traditional bandgap reference voltage mode structure can generate a zero temperature coefficient voltage, it cannot directly generate a zero temperature coefficient voltage and a zero temperature coefficient current at the same time. When it is necessary to directly generate a zero temperature coefficient voltage and a zero temperature coefficient current at the same time, the choice of voltage mode and current mode structures is limited. Summary of the invention
[0005] In view of the above problems, embodiments of the present invention are proposed to provide a current source circuit and a control method of the current source circuit that overcome the above problems or at least partially solve the above problems.
[0006] In order to solve the above problems, an embodiment of the present invention discloses a current source circuit, including: an operational amplifier, a MOS tube and an adjustable resistance circuit;
[0007] The positive input terminal of the operational amplifier is used to receive the bandgap reference voltage, the output terminal is connected to the first electrode of the MOS tube, and the reverse input terminal is connected to the second electrode of the MOS tube;
[0008] The third electrode of the MOS tube is connected to the current input circuit to receive the output current of the current input circuit;
[0009] One end of the adjustable resistance circuit is connected to the second electrode of the MOS tube, and the other end is grounded;
[0010] The MOS tube is turned on based on the output voltage of the output end of the operational amplifier, and the output voltage of the second electrode of the MOS tube is transmitted to the reverse input end of the operational amplifier to keep the output voltage of the operational amplifier stable; the resistance value of the adjustable resistance circuit is adjusted so that the temperature coefficient resistance of the adjustable resistance circuit is zero.
[0011] Optionally, the adjustable resistance circuit includes an adjustable resistor with a positive temperature coefficient and / or an adjustable resistor with a negative temperature coefficient.
[0012] Optionally, the adjustable resistance circuit includes a first resistor and a second resistor; the first resistor is a fixed resistor with a positive temperature coefficient, and the second resistor is an adjustable resistor with a negative temperature coefficient; the resistance value of the second resistor is adjusted so that the temperature coefficient resistance of the adjustable resistance circuit is zero.
[0013] Optionally, the MOS tube is an NMOS tube, the first electrode is a gate, the second electrode is a source, and the third electrode is a drain.
[0014] Optionally, the operational amplifier includes four MOS tubes, wherein a gate of one MOS tube is connected to the positive input terminal, and a gate of another MOS tube is connected to the reverse input terminal.
[0015] Optionally, the circuit is applied to a microcontroller, the microcontroller includes a digital register, and the digital register is used to store a target resistance value of the second resistor, the target resistance value of the second resistor is the resistance value of the second resistor when the temperature coefficient resistance of the adjustable resistance circuit is zero.
[0016] Optionally, the microcontroller is further configured to read a target resistance value of the second resistor from the digital register and adjust the resistance value of the second resistor to the target resistance value when the microcontroller is started next time.
[0017] Accordingly, an embodiment of the present invention discloses a control method for a current source circuit, which is applied to the above-mentioned current source circuit. The method includes:
[0018] The resistance value of the adjustable resistance circuit is adjusted so that the temperature coefficient resistance of the adjustable resistance circuit is zero, so that the temperature coefficient of the output current of the current input circuit is zero.
[0019] Optionally, the adjustable resistance circuit includes a first resistor and a second resistor; the first resistor is a fixed resistor with a positive temperature coefficient, and the second resistor is an adjustable resistor with a negative temperature coefficient, and adjusting the resistance value of the adjustable resistance circuit includes:
[0020] The resistance value of the second resistor is adjusted so that the temperature coefficient resistance of the adjustable resistance circuit is zero, so that the temperature coefficient of the output current of the current input circuit is zero.
[0021] Optionally, the circuit is applied to a microcontroller, the microcontroller includes a digital register, and the method further includes:
[0022] The target resistance value of the second resistor is stored in the digital register; the target resistance value of the second resistor is the resistance value of the second resistor when the temperature coefficient resistance of the adjustable resistance circuit is adjusted to be zero.
[0023] Optionally, the method further includes:
[0024] At the next startup, the target resistance value of the second resistor is read from the digital register, and the resistance value of the second resistor is adjusted to the target resistance value.
[0025] The embodiments of the present invention include the following advantages:
[0026] The current source circuit of the embodiment of the present invention includes: an operational amplifier, a MOS tube and an adjustable resistance circuit; the positive input end of the operational amplifier is used to receive a bandgap reference voltage, the output end is connected to the first electrode of the MOS tube, and the reverse input end is connected to the second electrode of the MOS tube; the third electrode of the MOS tube is connected to the current input circuit to receive the output current of the current input circuit; one end of the adjustable resistance circuit is connected to the second electrode of the MOS tube, and the other end is grounded; the MOS tube is turned on based on the output voltage of the output end of the operational amplifier, and the output voltage of the second electrode of the MOS tube is transmitted to the reverse input end of the operational amplifier to keep the output voltage of the operational amplifier stable; the resistance value of the adjustable resistance circuit is adjusted so that the temperature coefficient resistance of the adjustable resistance circuit is zero. By adjusting the resistance value of the adjustable resistance circuit, the temperature coefficient resistance of the adjustable resistance circuit is zero, and an equivalent current with a temperature coefficient of zero is obtained, so that the current source circuit can generate both zero temperature coefficient voltage and zero temperature coefficient current. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 is a schematic structural diagram of a current source circuit according to an embodiment of the present invention;
[0028] Figure 2 is a structural schematic diagram of another current source circuit according to an embodiment of the present invention;
[0029] Figure 3 It is a schematic diagram of the structure of an operational amplifier according to an embodiment of the present invention.
[0030] Reference numerals: operational amplifier 10 , MOS tube 20 , adjustable resistance circuit 30 , first resistor 31 , second resistor 32 . DETAILED DESCRIPTION
[0031] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0032] Current sources can be subdivided into negative temperature coefficient current, positive temperature coefficient current and zero temperature coefficient current (i.e. bandgap reference current). In the field of bandgap reference generation, common structures are mainly divided into two types: voltage mode and current mode. However, although the traditional bandgap reference voltage mode structure can generate a zero temperature coefficient voltage, it cannot directly generate a zero temperature coefficient voltage and a zero temperature coefficient current at the same time. When it is necessary to directly generate a zero temperature coefficient voltage and a zero temperature coefficient current at the same time, the choice of voltage mode and current mode structures is limited.
[0033] One of the core concepts of the embodiments of the present invention is to adjust the resistance of the adjustable resistor circuit so that the temperature coefficient resistance of the adjustable resistor circuit is zero, thereby obtaining an equivalent current with a temperature coefficient of zero, so that the current source circuit can generate both a zero temperature coefficient voltage and a zero temperature coefficient current.
[0034] Reference Figure 1 , shows a schematic diagram of the structure of a current source circuit according to an embodiment of the present invention, which may specifically include the following structure:
[0035] An operational amplifier 10 , a MOS tube 20 and an adjustable resistance circuit 30 .
[0036] A current source is a circuit or device whose primary function is to provide a steady current output, independent of changes in load resistance. Current sources typically have the following characteristics: high output impedance, the output impedance of a current source is very high, making the output current steady as the load resistance changes; constant current output, a current source provides a constant current output regardless of changes in load resistance.
[0037] The positive input terminal of the operational amplifier 10 is used to receive a bandgap reference voltage. The bandgap reference voltage is a voltage reference source widely used in integrated circuits, which is characterized by having a temperature coefficient close to zero and being able to provide a stable voltage output over a wide temperature range. The principle of the bandgap reference voltage is based on the bandgap voltage in semiconductor physics, that is, the bandgap voltage of silicon material is about 1.2V. By cleverly combining voltages or currents with positive and negative temperature coefficients, a voltage reference with a temperature coefficient close to zero can be achieved.
[0038] The output end of the operational amplifier 10 is connected to the first electrode of the MOS tube 20 for controlling the MOS tube 20 to be turned on or off. The reverse input end of the operational amplifier 10 is connected to the second electrode of the MOS tube 20 .
[0039] The third electrode of the MOS tube 20 is connected to the current input circuit to receive the output current of the current input circuit. The output current IOUT here refers to the output current sink, which is a circuit configuration in which current flows from an external circuit into the circuit instead of flowing from the circuit to the external circuit. The output current sink enables current to flow into the circuit by providing a low impedance path.
[0040] One end of the adjustable resistance circuit 30 is connected to the second electrode of the MOS tube 20 , and the other end is grounded.
[0041] The MOS tube 20 is turned on based on the output voltage of the output end of the operational amplifier 10, and the output voltage of the second electrode of the MOS tube 20 is transmitted to the reverse input end of the operational amplifier 10 to keep the output voltage of the operational amplifier 10 stable; the resistance value of the adjustable resistance circuit 10 is adjusted so that the temperature coefficient resistance of the adjustable resistance circuit is zero.
[0042] This circuit uses the clamping function of the negative feedback of the operational amplifier so that the bandgap reference voltage received by the positive input of the operational amplifier 10 is the same as the feedback voltage received by the negative input of the operational amplifier 10. Through negative feedback, the operational amplifier can adjust the output voltage to the level of the reference voltage, thereby achieving a stable voltage output. The basic principle of the clamping circuit is to fix the output voltage at a certain value through the negative feedback mechanism. The negative feedback mechanism of the operational amplifier makes the voltage of the inverting input terminal (VM) almost equal to the voltage of the non-inverting input terminal (VP), thereby achieving the clamping function. Working principle of the clamping circuit: Input voltage: The input voltage Vin is added to the non-inverting input terminal (VP) of the operational amplifier; Reference voltage: The reference voltage VREF is added to the inverting input terminal (VM) of the operational amplifier; Negative feedback mechanism: The output voltage Vout is fed back to the inverting input terminal (VM) through the feedback resistor Rf. Since the open-loop gain of the operational amplifier is very high, the negative feedback mechanism makes the voltage of the inverting input terminal (VM) almost equal to the voltage of the non-inverting input terminal (VP); Clamping function: By adjusting the feedback resistor Rf, the output voltage Vout is maintained at the level of the reference voltage VREF, and the feedback voltage VFB is equal to the reference voltage VREF, thereby realizing the clamping function.
[0043] The output current IOUT of the current input circuit is equal to the feedback voltage VFB received by the negative input terminal of the operational amplifier 10 divided by the resistance value of the adjustable resistance circuit 30. Since this circuit uses the clamping function of the negative feedback of the operational amplifier, the feedback voltage VFB received by the negative input terminal of the operational amplifier 10 is equal to the bandgap reference voltage VREF received by the positive input terminal of the operational amplifier 10. Therefore, the output current IOUT of the current input circuit is equal to the bandgap reference voltage VREF received by the positive input terminal of the operational amplifier 10 divided by the resistance value of the adjustable resistance circuit 30. In other words, the magnitude of the output current IOUT of the current input circuit is only related to the bandgap reference voltage VREF is related to the resistance value of the adjustable resistance circuit 30. Since the size of the bandgap reference voltage VREF is approximately independent of temperature and power supply, the temperature coefficient of the output current IOUT of the current input circuit is only related to the resistance value of the adjustable resistance circuit 30. In the integrated circuit process, the resistance value of the resistor is usually affected by temperature changes and usually presents a positive temperature coefficient or a negative temperature coefficient. Therefore, by adjusting the resistance value of the adjustable resistance circuit 30, the temperature coefficient resistance of the adjustable resistance circuit 30 is made zero, thereby making the temperature coefficient of the output current IOUT of the current input circuit zero, thereby realizing a circuit that generates both zero temperature coefficient voltage and zero temperature coefficient current.
[0044] The current source circuit of the embodiment of the present invention includes: an operational amplifier, a MOS tube and an adjustable resistance circuit; the positive input end of the operational amplifier is used to receive a bandgap reference voltage, the output end is connected to the first electrode of the MOS tube, and the reverse input end is connected to the second electrode of the MOS tube; the third electrode of the MOS tube is connected to the current input circuit to receive the output current of the current input circuit; one end of the adjustable resistance circuit is connected to the second electrode of the MOS tube, and the other end is grounded; the MOS tube is turned on based on the output voltage of the output end of the operational amplifier, and the output voltage of the second electrode of the MOS tube is transmitted to the reverse input end of the operational amplifier to keep the output voltage of the operational amplifier stable; the resistance value of the adjustable resistance circuit is adjusted so that the temperature coefficient resistance of the adjustable resistance circuit is zero. By adjusting the resistance value of the adjustable resistance circuit, the temperature coefficient resistance of the adjustable resistance circuit is zero, and an equivalent current with a temperature coefficient of zero is obtained, so that the current source circuit can generate both zero temperature coefficient voltage and zero temperature coefficient current.
[0045] In the embodiment of the present invention, the adjustable resistance circuit 10 includes an adjustable resistor with a positive temperature coefficient and / or an adjustable resistor with a negative temperature coefficient.
[0046] By setting an adjustable resistor with a positive temperature coefficient and / or an adjustable resistor with a negative temperature coefficient, a zero temperature coefficient resistor is achieved.
[0047] Positive Temperature Coefficient Adjustable Resistor (PTC Adjustable Resistor) and Negative Temperature Coefficient Adjustable Resistor (NTC Adjustable Resistor) are two common types of resistors, and their resistance changes with temperature. The resistance of a positive temperature coefficient adjustable resistor (PTC Adjustable Resistor) increases with increasing temperature. This type of resistor is usually used in circuits that require temperature compensation or temperature control. The resistance of a PTC Adjustable Resistor increases with increasing temperature, and its temperature coefficient is positive. Common PTC materials include barium titanate (BaTiO3) and the like. The resistance of a negative temperature coefficient adjustable resistor (NTC Adjustable Resistor) decreases with increasing temperature. This type of resistor is usually used in circuits such as temperature measurement, temperature compensation, and temperature control. The resistance of an NTC Adjustable Resistor decreases with increasing temperature, and its temperature coefficient is negative. Common NTC materials include manganese oxide, nickel oxide, and the like.
[0048] Reference Figure 2 , shows a schematic diagram of the structure of another current source circuit of an embodiment of the present invention, the adjustable resistance circuit 30 includes a first resistor 31 and a second resistor 32; the first resistor 31 is a fixed resistor with a positive temperature coefficient, and the second resistor 32 is an adjustable resistor with a negative temperature coefficient; the resistance value of the second resistor 32 is adjusted so that the temperature coefficient resistance of the adjustable resistance circuit 30 is zero.
[0049] The first resistor 31 and the second resistor 32 are connected in series, and the first resistor 31 is grounded.
[0050] By using resistors with different temperature coefficients for addition operations and changing the ratio of resistors with different temperature coefficients, an equivalent current close to zero temperature coefficient can be obtained.
[0051] The first resistor 31 is a fixed resistor with a positive temperature coefficient, and the second resistor 32 is an adjustable resistor with a negative temperature coefficient. The resistance of the second resistor 32 is adjusted so that the positive temperature coefficient of the first resistor 31 plus the negative temperature coefficient of the second resistor 32 can obtain a zero temperature coefficient resistor. The second resistor 32 is set as an adjustable resistor to adjust the ratio of the first resistor 31 and the second resistor 32, thereby adjusting the temperature coefficients of the first resistor 31 and the second resistor 32.
[0052] The resistance of a zero temperature coefficient resistor (ZTC) remains essentially constant over a certain temperature range. For example, standard metal film resistors usually have a temperature coefficient close to zero. Steps to implement a zero temperature coefficient resistor: Select a suitable resistor: Select resistors with positive and negative temperature coefficients, and select a suitable zero temperature coefficient resistor as a reference; Design an addition circuit: Use a resistor network to connect resistors with different temperature coefficients together; Adjust the ratio of the resistors so that the temperature effects of the positive and negative temperature coefficient resistors cancel each other out; Calculate and adjust: Calculate the ratio of different resistors based on the required temperature coefficient, and adjust the resistance values through experiments or simulations so that the temperature coefficient of the equivalent resistor is close to zero. By adding a positive temperature coefficient resistor (R1) and a negative temperature coefficient resistor (R2), an equivalent resistor with a temperature coefficient close to zero can be achieved.
[0053] Of course, the second resistor 32 may also be set as a fixed resistor with a positive temperature coefficient, and the first resistor 31 may be an adjustable resistor with a negative temperature coefficient, which is not limited in the embodiment of the present invention.
[0054] In the embodiment of the present invention, the MOS transistor 20 is an NMOS transistor, the first electrode is a gate, the second electrode is a source, and the third electrode is a drain. The gate of the MOS transistor 20 is connected to the output end of the operational amplifier 10, the drain is connected to the current input circuit, and the source is connected to the reverse input end of the operational amplifier 10 and the connection point of the adjustable resistance circuit 30.
[0055] The NMOS transistor (N-Channel Metal-Oxide-Semiconductor Field-Effect Transistor, abbreviated as NMOS FET) is a common field-effect transistor (FET) widely used in analog and digital circuits. The main characteristic of the NMOS transistor is that its conductive channel is composed of N-type semiconductor material, and the conduction and cutoff of the channel are controlled by the gate voltage. The basic structure of the NMOS transistor includes the following main parts: Gate (G), which is a metal electrode used to control the conduction and cutoff of the channel by applying voltage; Source (S), which is the input terminal of the current and is usually connected to the low-potential end of the N-type semiconductor material; Drain (D), which is the output terminal of the current and is usually connected to the high-potential end of the N-type semiconductor material. The working principle of the NMOS transistor is based on the control of the channel conductance by the gate voltage. By applying a voltage between the gate and the source, the conduction and cutoff of the channel can be controlled. When the gate voltage (Vgs) is less than the threshold voltage (Vth), the channel is not conducting, and the NMOS transistor is in the cutoff state. At this time, no current flows between the drain and the source. When the gate voltage (Vgs) is greater than the threshold voltage (Vth) and the drain voltage (Vds) is small (Vds < Vgs - Vth), the channel is conducting, and the NMOS transistor is in the linear region. At this time, the drain current (Id) has a linear relationship with the drain voltage (Vds). When the gate voltage (Vgs) is greater than the threshold voltage (Vth) and the drain voltage (Vds) is large (Vds ≥ Vgs - Vth), the channel is conducting, and the NMOS transistor is in the saturation region. At this time, the drain current (Id) hardly changes with the drain voltage (Vds) and is mainly controlled by the gate voltage (Vgs). The NMOS transistor has the advantages of high input impedance, low output impedance, and fast switching speed.
[0056] Referring to Figure 3 , a schematic structural diagram of an operational amplifier according to an embodiment of the present invention is shown.
[0057] In the embodiment of the present invention, the operational amplifier 10 includes four MOS transistors. Among them, the gate of one MOS transistor is connected to the positive input terminal, and the gate of another MOS transistor is connected to the negative input terminal.
[0058] Specifically, the operational amplifier 10 includes MOS transistors M0, M1, M2, and M3. The gate of M3 is connected to the positive input terminal VP, the gate of M2 is connected to the negative input terminal VM, the gates of M0 and M1 are connected, and the other electrodes of M0 and M1 are grounded.
[0059] M2 and M3 act as differential amplifiers to amplify the input signal. M0 and M1 form a current mirror to provide bias current and current gain. The gate of M0 is connected to the gate of M1, so that the currents of M0 and M1 are equal. The output signal Vout is output from the drains of M0 and M2. Through the current gain of the current mirror, the output signal is further amplified.
[0060] An operational amplifier is usually composed of multiple transistors, among which the configuration of four MOS tubes is used to realize an operational amplifier with high gain, high input impedance and low output impedance. The four MOS tube operational amplifier usually includes the following main parts: input stage: composed of two MOS tubes, used to amplify the input signal; current mirror, composed of two MOS tubes, used to provide bias current and current gain; output stage: composed of one or more MOS tubes, used to drive the load and provide low output impedance.
[0061] The advantages of the four MOS tube operational amplifier include high gain: through the combination of differential amplifier and current mirror, high gain amplification effect can be achieved; high input impedance: MOS tube has very high input impedance and almost no current is drawn from the input signal source; low output impedance: through the configuration of current mirror and output stage, low output impedance can be achieved to effectively drive the load; fast switching speed: MOS tube has a faster switching speed and is suitable for high-speed digital circuits. The current source circuit of the embodiment of the present invention uses the negative feedback principle of the operational amplifier to realize the voltage following function.
[0062] The output impedance of the current source circuit of the embodiment of the present invention can be expressed as R OUT =r O +(A1+1)g m r O (R1+R2)+(R1+R2), as can be seen from the above formula, compared with the current source composed of a single MOS tube, the output impedance increases, showing a higher output impedance, where r0 represents the output resistance of the MOS tube 20; A1 represents the gain of the operational amplifier 10; gm represents the transconductance of the MOS tube M1. Regarding the temperature characteristics, the formula It can be seen that since VREF is a bandgap reference voltage and is approximately independent of temperature, the temperature coefficient of IOUT is only related to the resistance values of the first resistor 31 and the second resistor 32. In the integrated circuit process, the resistance value of the resistor is usually affected by temperature changes and usually presents a positive temperature coefficient or a negative temperature coefficient. This design uses resistors with different temperature coefficients for addition operations, and by changing the ratio of resistors with different temperature coefficients, an equivalent current with a temperature coefficient close to zero is obtained.
[0063] In an embodiment of the present invention, the circuit is applied to a microcontroller, and the microcontroller includes a digital register, which is used to store the target resistance value of the second resistor. The target resistance value of the second resistor is the resistance value of the second resistor when the temperature coefficient resistance of the adjustable resistance circuit is zero.
[0064] A microcontroller is a single-chip microcomputer that integrates a processor core, memory (such as RAM and ROM), input / output interfaces, and other peripheral functions. It is often used in embedded systems to perform specific control tasks. Microcontrollers are widely used in consumer electronics, industrial control, automotive electronics, medical equipment, and other fields due to their small size, high performance, and low power consumption.
[0065] The microcontroller includes a digital register, which is a circuit element used to store and control digital signals. It is usually composed of multiple flip-flops (Flip-Flop) to store binary data. Digital registers are widely used in digital circuits, such as counters, shift registers, memories, etc. The working principle of digital registers is to synchronize the operation of flip-flops through clock signals to achieve data storage and transmission. Its basic workflow is as follows: Data input: input data is loaded into the register through the input end; Clock signal: The clock signal triggers the operation of the register to ensure the correct storage and transmission of data; Data storage: The flip-flop stores the input data on the rising or falling edge of the clock signal; Data output: The data stored in the register is output through the output end.
[0066] When process deviation occurs, the size of the second resistor is corrected through the digital register, thereby changing the size of the current source and realizing current source correction. The digital register comes from the digital circuit of the MCU and does not require additional circuits. The correction only needs to be done once, and the correction value will be written into the register. No additional power consumption will be generated during normal operation.
[0067] Process deviation refers to the deviation of circuit component parameters caused by changes in process parameters during the manufacturing process of integrated circuits. This deviation will affect the performance of the circuit, such as the accuracy of the current source. A digital register is a circuit element used to store and control digital signals. Through digital registers, circuit parameters can be dynamically adjusted. By correcting the size of the resistor through a digital register, the size of the current source can be changed, thereby achieving the correction of the current source. After the circuit is manufactured, the impact of process deviation on the current source is detected by testing the performance of the circuit; a digital register is designed to store and control the correction value of the resistor; the size of the resistor is corrected through a digital register to change the size of the current source; the correction effect is verified by testing the performance of the circuit to ensure that the accuracy of the current source meets the design requirements.
[0068] In an embodiment of the present invention, the microcontroller is further configured to read the target resistance value of the second resistor from the digital register and adjust the resistance value of the second resistor to the target resistance value when starting up next time.
[0069] When the microcontroller is started next time, the target resistance value of the second resistor can be read from the digital register, and the resistance value of the second resistor can be adjusted to the target resistance value. In this way, calibration is only required once, and the calibration value will be written into the register, and no additional power consumption will be generated during normal operation.
[0070] An embodiment of the present invention discloses a control method for a current source circuit, which is applied to the above-mentioned current source circuit. The method includes:
[0071] The resistance value of the adjustable resistance circuit is adjusted so that the temperature coefficient resistance of the adjustable resistance circuit is zero, so that the temperature coefficient of the output current of the current input circuit is zero.
[0072] The current source circuit of the embodiment of the present invention includes: an operational amplifier, a MOS tube and an adjustable resistance circuit; the positive input end of the operational amplifier is used to receive a bandgap reference voltage, the output end is connected to the first electrode of the MOS tube, and the reverse input end is connected to the second electrode of the MOS tube; the third electrode of the MOS tube is connected to the current input circuit to receive the output current of the current input circuit; one end of the adjustable resistance circuit is connected to the second electrode of the MOS tube, and the other end is grounded; the MOS tube is turned on based on the output voltage of the output end of the operational amplifier, and the output voltage of the second electrode of the MOS tube is transmitted to the reverse input end of the operational amplifier to keep the output voltage of the operational amplifier stable; the resistance value of the adjustable resistance circuit is adjusted so that the temperature coefficient resistance of the adjustable resistance circuit is zero. By adjusting the resistance value of the adjustable resistance circuit, the temperature coefficient resistance of the adjustable resistance circuit is zero, and an equivalent current with a temperature coefficient of zero is obtained, so that the current source circuit can generate both zero temperature coefficient voltage and zero temperature coefficient current.
[0073] In an embodiment of the present invention, the adjustable resistance circuit includes a first resistor and a second resistor; the first resistor is a fixed resistor with a positive temperature coefficient, and the second resistor is an adjustable resistor with a negative temperature coefficient, and adjusting the resistance value of the adjustable resistance circuit includes:
[0074] The resistance value of the second resistor is adjusted so that the temperature coefficient resistance of the adjustable resistance circuit is zero, so that the temperature coefficient of the output current of the current input circuit is zero.
[0075] In an embodiment of the present invention, the circuit is applied to a microcontroller, the microcontroller includes a digital register, and the method further includes:
[0076] The target resistance value of the second resistor is stored in the digital register; the target resistance value of the second resistor is the resistance value of the second resistor when the temperature coefficient resistance of the adjustable resistance circuit is adjusted to be zero.
[0077] In an embodiment of the present invention, the method further includes:
[0078] At the next startup, the target resistance value of the second resistor is read from the digital register, and the resistance value of the second resistor is adjusted to the target resistance value.
[0079] It should be noted that, for the sake of simplicity, the embodiments of the adjustment method are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the described action sequence, because according to the embodiments of the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0080] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0081] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0082] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0083] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0084] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0085] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0086] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0087] The current source circuit and the control method of the current source circuit provided by the present invention are introduced in detail above. The principle and implementation mode of the present invention are explained by using specific examples in this article. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation mode and the scope of application. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A current source circuit, characterized in that: include: Operational amplifier, MOS tube and adjustable resistor circuit; The positive input terminal of the operational amplifier is used to receive the bandgap reference voltage, the output terminal is connected to the first electrode of the MOS tube, and the reverse input terminal is connected to the second electrode of the MOS tube; The third electrode of the MOS tube is connected to the current input circuit to receive the output current of the current input circuit; One end of the adjustable resistance circuit is connected to the second electrode of the MOS tube, and the other end is grounded; The MOS tube is turned on based on the output voltage of the output end of the operational amplifier, and the output voltage of the second electrode of the MOS tube is transmitted to the reverse input end of the operational amplifier to keep the output voltage of the operational amplifier stable; the resistance value of the adjustable resistance circuit is adjusted so that the temperature coefficient resistance of the adjustable resistance circuit is zero.
2. The circuit according to claim 1, characterized in that The adjustable resistance circuit includes an adjustable resistor with a positive temperature coefficient and / or an adjustable resistor with a negative temperature coefficient.
3. According to the circuit of claim 2, the adjustable resistance circuit includes a first resistor and a second resistor; the first resistor is a fixed resistor with a positive temperature coefficient, and the second resistor is an adjustable resistor with a negative temperature coefficient; the resistance value of the second resistor is adjusted so that the temperature coefficient resistance of the adjustable resistance circuit is zero.
4. The circuit according to claim 1, characterized in that The MOS tube is an NMOS tube, the first electrode is a gate, the second electrode is a source, and the third electrode is a drain.
5. The circuit according to claim 1, characterized in that The operational amplifier includes four MOS tubes, wherein the gate of one MOS tube is connected to the positive input terminal, and the gate of another MOS tube is connected to the negative input terminal.
6. The circuit according to claim 3, characterized in that Applied to a microcontroller, the microcontroller includes a digital register, the digital register is used to store the target resistance value of the second resistor, the target resistance value of the second resistor is the resistance value of the second resistor when the temperature coefficient resistance of the adjustable resistance circuit is zero.
7. The circuit according to claim 6, characterized in that The microcontroller is also used to read the target resistance value of the second resistor from the digital register and adjust the resistance value of the second resistor to the target resistance value when starting next time.
8. A method for controlling a current source circuit, characterized in that: Applied to the current source circuit as claimed in claim 1, the method comprises: The resistance value of the adjustable resistance circuit is adjusted so that the temperature coefficient resistance of the adjustable resistance circuit is zero, so that the temperature coefficient of the output current of the current input circuit is zero.
9. The method according to claim 8, characterized in that The adjustable resistance circuit includes a first resistor and a second resistor; the first resistor is a fixed resistor with a positive temperature coefficient, and the second resistor is an adjustable resistor with a negative temperature coefficient, and adjusting the resistance value of the adjustable resistance circuit includes: The resistance value of the second resistor is adjusted so that the temperature coefficient resistance of the adjustable resistance circuit is zero, so that the temperature coefficient of the output current of the current input circuit is zero.
10. The method according to claim 9, characterized in that The circuit is applied to a microcontroller, the microcontroller includes a digital register, and the method further includes: The target resistance value of the second resistor is stored in the digital register; the target resistance value of the second resistor is the resistance value of the second resistor when the temperature coefficient resistance of the adjustable resistance circuit is adjusted to be zero.
11. The method according to claim 10, characterized in that The method further comprises: At the next startup, the target resistance value of the second resistor is read from the digital register, and the resistance value of the second resistor is adjusted to the target resistance value.