An RC oscillator with frequency temperature compensation function
By introducing a bandgap reference voltage source and temperature sensor into the RC oscillator to adjust the capacitance value of the adjustable capacitor, the drift problem of the RC oscillator frequency when the temperature changes is solved, and the temperature compensation and stability of the frequency are improved.
Patent Information
- Application Number
- CN202110278238.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-15
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2041-03-15
AI Technical Summary
The frequency of the RC oscillator will drift more than 10% when the temperature changes, resulting in unstable internal frequency of the chip. It is necessary to solve the problem of temperature compensation for the oscillation frequency of the RC oscillator to reduce the influence of temperature.
An RC oscillator including a bandgap reference voltage source, a temperature sensor circuit, an ADC module and a logic controller is designed. By collecting the temperature detection voltage and the bandgap reference voltage, adjusting the capacitance value of the adjustable capacitor, and achieving frequency and temperature compensation.
It effectively reduces the impact of temperature on the oscillation frequency of the RC oscillator, improves the temperature stability of the frequency, and ensures the accuracy of the oscillation frequency in the full temperature zone.
Smart Images

Figure CN113162583B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of crystal oscillators, and in particular to an RC oscillator with a frequency temperature compensation function. Background Art
[0002] Crystal oscillators have good frequency accuracy and stability, and are small in size and low in power consumption. They are often used as time and frequency references and are widely used in military and civilian communication radio stations, microwave communication equipment, program-controlled telephone exchanges, radio integrated testers, BP machines, mobile phone transmitters, high-end frequency counters, GPS, satellite communications, remote control mobile devices, etc. Among them, off-chip crystal oscillators have good frequency stability and high absolute accuracy, and are widely used in integrated circuit systems. However, off-chip crystal oscillators are large in size, high in cost, and high in power consumption. Therefore, RC oscillators are usually used inside the chip. RC oscillators include resistors and capacitors to form a frequency selection network. RC oscillators are realized by RC charging and discharging. The frequency of the RC oscillator is inversely proportional to the product of the resistor R and the capacitor C.
[0003] like Figure 1 The figure shows an RC oscillator, which uses the upper and lower currents I S1 and I S2 The first capacitor C1 is charged and discharged, and then the voltage of capacitor C1 is compared with V H and V L Compare (V H and V L is the current I S3 The comparison result is obtained by dividing the resistors R1 and R2), and the comparison result is output to the SR trigger SR1, which outputs the oscillation voltage CK. When the temperature changes, the capacitance and resistance of the above RC oscillator will change, causing the time constant of the RC oscillator to change. The oscillator frequency is directly dependent on the time constant. If the circuit is not temperature compensated, the frequency of the RC oscillator inside the chip will change by more than 10% in the full temperature range. How to adjust the oscillation frequency of the RC oscillator to prevent it from being affected by temperature has become a technical problem that technicians in this field need to solve. Summary of the invention
[0004] The object of the present invention is to provide an RC oscillator with a frequency temperature compensation function, so as to reduce the influence of temperature on the oscillation frequency of the RC oscillator.
[0005] For the purpose of the present invention, the technical solution adopted by the present invention is as follows:
[0006] An RC oscillator with a frequency temperature compensation function comprises a crystal oscillator circuit, wherein the crystal oscillator circuit comprises a current source module, a resistor module and a capacitor module, wherein the current source module provides current to the resistor module and the capacitor module; the crystal oscillator circuit generates and outputs an oscillation voltage according to a voltage of the resistor module and a voltage of the capacitor module;
[0007] The capacitor module includes an adjustable capacitor; the RC oscillator also includes a bandgap reference voltage source, a temperature sensor circuit, an ADC module and a logic controller; the output end of the temperature sensor circuit is connected to the ADC module, and the ADC module collects the temperature detection voltage and sends it to the logic controller; the output end of the bandgap reference voltage source is connected to the ADC module, and the ADC module collects the bandgap reference voltage and sends it to the logic controller; the logic controller adjusts the capacitance value of the adjustable capacitor according to the bandgap reference voltage and the temperature detection voltage.
[0008] As a specific implementation, the bandgap reference voltage source includes a first MOS tube, a second MOS tube, a third MOS tube, a first triode, a second triode, a fifth resistor, a sixth resistor, a seventh resistor, an eighth resistor, a third capacitor and a first operational amplifier; the source of the first MOS tube, the source of the second MOS tube and the source of the third MOS tube are connected to a power supply; the gate of the first MOS tube, the gate of the second MOS tube and the gate of the third MOS tube are connected and connected to the output end of the first operational amplifier; the drain of the first MOS tube is connected to the positive input end of the first operational amplifier, one end of the fifth resistor and one end of the sixth resistor ; The other end of the sixth resistor is connected to the collector of the first triode; the base of the first triode is connected to the base of the second triode and is grounded; the emitter of the first triode, the other end of the fifth resistor and the emitter of the second triode are grounded; the drain of the second MOS tube is connected to the negative input end of the first operational amplifier, one end of the seventh resistor, the collector of the second triode and the input end of the temperature sensor circuit; the drain of the third MOS tube is connected to one end of the eighth resistor and one end of the third capacitor, and outputs a bandgap reference voltage; the other end of the seventh resistor, the other end of the eighth resistor and the other end of the third capacitor are grounded.
[0009] As a specific implementation, the temperature sensor circuit includes a fourth MOS tube, a fifth MOS tube, a second operational amplifier, a ninth resistor, a tenth resistor, a third triode and a fourth capacitor; the source of the fourth MOS tube and the source of the fifth MOS tube are connected to a power supply; the gate of the fourth MOS tube is connected to the gate of the fifth MOS tube, and is connected to the output end of the second operational amplifier; the drain of the fourth MOS tube is connected to the positive input end of the second operational amplifier and to one end of the ninth resistor; the negative input end of the second operational amplifier is connected to the negative input end of the first operational amplifier; the other end of the ninth resistor is connected to the collector of the third triode, and the base and emitter of the third triode are grounded; the drain of the fifth MOS tube is connected to one end of the tenth resistor and one end of the fourth capacitor, and outputs a temperature detection voltage; the other end of the tenth resistor and the other end of the fourth capacitor are grounded.
[0010] As a specific implementation, the current source module includes a first current source, a second current source and a third current source, and the resistance module includes a third resistor and a fourth resistor; the crystal oscillator circuit also includes a first controllable switch, a second controllable switch, a third comparator, a fourth comparator and a second RS trigger; the output end of the first current source is connected to one end of the first controllable switch, and the other end of the first controllable switch is connected to one end of the second controllable switch, one end of the adjustable capacitor, the inverting input end of the third comparator and the inverting input end of the fourth comparator; the other end of the second controllable switch is connected to the input end of the second current source, and the output end of the second current source is grounded ; The other end of the adjustable capacitor is grounded; the output end of the third current source is connected to one end of the third resistor and the non-inverting input end of the third comparator; the other end of the third resistor is connected to one end of the fourth resistor and the non-inverting input end of the fourth comparator; the other end of the fourth resistor is grounded; the output end of the third comparator is connected to the S input end of the second RS trigger, and the output end of the fourth comparator is connected to the R input end of the second RS trigger; the Q output end of the second RS trigger outputs an oscillating voltage and is connected to the control end of the first controllable switch; the QB output end of the second RS trigger is connected to the control end of the second controllable switch.
[0011] Further, the third resistor includes a second RPPOSAB resistor and a third RPPOSAB resistor; one end of the second RPPOSAB resistor is connected to the output end of the third current source, and the other end is connected to one end of the third RPPOSAB resistor; the other end of the third RPPOSAB resistor is connected to one end of the fourth resistor.
[0012] Beneficial effects of the present invention:
[0013] It can be seen from the above technical scheme that the present invention samples the bandgap reference voltage and the temperature detection voltage through the ADC module and sends them to the logic controller, and performs logical digital operations through the logic controller to adjust the capacitance value of the adjustable capacitor, thereby adjusting the oscillation signal frequency output by the RC oscillator and reducing the influence of temperature on the oscillation frequency of the RC oscillator. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. The drawings described below are only embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0015] Figure 1 It is a schematic diagram of the circuit principle of an RC oscillator provided by the background technology.
[0016] Figure 2 It is an overall structural block diagram of an RC oscillator with frequency temperature compensation function provided by an embodiment of the present invention.
[0017] Figure 3 It is a specific structural block diagram of an RC oscillator with frequency temperature compensation function provided by an embodiment of the present invention.
[0018] Figure 4 It is a circuit principle diagram of the resistor R3 of the RC oscillator with frequency temperature compensation function provided by an embodiment of the present invention.
[0019] Figure 5 The invention is a circuit schematic diagram of a bandgap reference voltage source and a temperature sensor circuit of an RC oscillator with a frequency temperature compensation function provided by an embodiment of the invention.
[0020] Figure 6 It is a timing comparison diagram of an enable signal, a temperature calibration signal, a bandgap reference voltage sampling signal, a temperature detection voltage sampling signal, and a temperature compensation calculation signal in an RC oscillator with a frequency temperature compensation function provided by an embodiment of the present invention.
[0021] Figure 7 It is a schematic diagram of the variation of the bandgap reference voltage source voltage and the temperature sensor circuit detection voltage with temperature in the RC oscillator with frequency temperature compensation function provided by an embodiment of the present invention.
[0022] Figure 8 It is a comparison chart of the oscillation frequency of the RC oscillator with frequency temperature compensation function provided by the embodiment of the present invention and the oscillation frequency of the RC oscillator provided by the prior art. DETAILED DESCRIPTION
[0023] The present invention will be described in detail below in conjunction with the accompanying drawings.
[0024] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0025] like Figure 2 As shown, an RC oscillator with frequency temperature compensation function includes a crystal oscillator circuit, a bandgap reference voltage source, a temperature sensor circuit, an ADC module and a logic controller; the crystal oscillator circuit includes a current source module, a resistor module and an adjustable capacitor C2, and the crystal oscillator circuit generates and outputs an oscillation signal at least through the resistor module and the adjustable capacitor; the temperature sensor circuit is used to detect the temperature of the RC oscillator, and output a temperature detection voltage VPTAT (a voltage signal converted after the temperature sensor circuit detects the temperature) to the ADC module, and the ADC module collects the temperature detection voltage VPTAT and sends the temperature detection voltage VPTAT to the logic controller; the ADC module also collects the bandgap reference voltage VBG output by the bandgap reference voltage source, and sends the bandgap reference voltage VBG to the logic controller; the logic controller adjusts the value of the trim code according to the bandgap reference voltage VBG and the temperature detection voltage VPTAT, and then adjusts the oscillation signal frequency by adjusting the capacitance value of the adjustable capacitor, thereby realizing frequency temperature compensation of the RC oscillator and reducing the influence of temperature on the oscillation frequency of the RC oscillator.
[0026] like Figure 2 , as shown in 3, in this embodiment, the current source module includes a first current source I S1 , the second current source I S2 and the third current source I S3 The resistance module includes a third resistor R3 and a fourth resistor R4; the crystal oscillator circuit also includes a first controllable switch SW1, a second controllable switch SW2, a third comparator COMP3, a fourth comparator COMP4 and a second RS trigger RS2; the first current source I S1 The output end of is connected to one end of the first controllable switch SW1, the other end of the first controllable switch SW1 is connected to one end of the second controllable switch SW2, one end of the adjustable capacitor C2, the inverting input end of the third comparator COMP3 and the inverting input end of the fourth comparator COMP4, the other end of the second controllable switch SW2 is connected to the second current source I S2 The input terminal of the second current source I S2 The output end of the adjustable capacitor C2 is grounded; the other end of the adjustable capacitor C2 is grounded; the third current source I S3The output end of the third resistor R3 is connected to one end of the third resistor R3 and the non-inverting input end of the third comparator COMP3; the other end of the third resistor R3 is connected to one end of the fourth resistor R4 and the non-inverting input end of the fourth comparator COMP4; the other end of the fourth resistor R4 is grounded; the output end of the third comparator COMP3 is connected to the S input end of the second RS trigger RS2, and the output end of the fourth comparator COMP4 is connected to the R input end of the second RS trigger RS2; the output end Q of the second RS trigger RS2 outputs the oscillation voltage CK and is connected to the control end of the first controllable switch SW1; the output end QB of the second RS trigger RS2 is connected to the control end of the second controllable switch SW2.
[0027] like Figure 4 As shown, in this embodiment, the third resistor R3 includes a second RPPOSAB resistor RPPOSAB2 and a third RPPOSAB resistor RPPOSAB3; one end of the second RPPOSAB resistor RPPOSAB2 is connected to the third current source I S3 The output end of RPPOSAB is connected, and the other end is connected to one end of the third RPPOSAB resistor RPPOSAB3; the other end of the third RPPOSAB resistor RPPOSAB3 is connected to one end of the fourth resistor R4.
[0028] In this embodiment, the third resistor R3 selects two RPPOSAB resistors. Theoretically, the resistor with a smaller temperature coefficient is better. The RPPOSAB resistor is selected in the standard CMOS process because the temperature coefficient of this resistor is the smallest, which reduces the impact of temperature. In practice, the resistor type and resistance value can be reasonably selected according to the specific situation.
[0029] like Figure 5As shown, the bandgap reference voltage source includes a first MOS tube M1, a second MOS tube M2, a third MOS tube M3, a first triode Q1, a second triode Q2, a fifth resistor R5, a sixth resistor R6, a seventh resistor R7, an eighth resistor R8, a third capacitor C3 and a first operational amplifier OP1; the source of the first MOS tube M1, the source of the second MOS tube M2 and the source of the third MOS tube M3 are connected to the power supply VDD; the gate of the first MOS tube M1, the gate of the second MOS tube M2 and the gate of the third MOS tube M3 are connected and connected to the output end of the first operational amplifier OP1; the drain of the first MOS tube M1 is connected to the positive input end of the first operational amplifier OP1, one end of the fifth resistor R5, and the sixth resistor R6. The other end of the sixth resistor R6 is connected to the collector of the first triode Q1; the base of the first triode Q1 is connected to the base of the second triode Q2 and is grounded; the emitter of the first triode Q1, the other end of the fifth resistor R5 and the emitter of the second triode Q2 are grounded; the drain of the second MOS tube M2 is connected to the negative input terminal of the first operational amplifier OP1, one end of the seventh resistor R7, the collector of the second triode Q2 and the input terminal of the temperature sensor circuit; the drain of the third MOS tube M3 is connected to one end of the eighth resistor R8 and one end of the third capacitor C3, and outputs the bandgap reference voltage VBG; the other end of the seventh resistor R7, the other end of the eighth resistor R8 and the other end of the third capacitor C3 are grounded.
[0030] like Figure 5 As shown, the temperature sensor circuit includes a fourth MOS tube M4, a fifth MOS tube M5, a second operational amplifier OP2, a ninth resistor R9, a tenth resistor R10, a third triode Q3 and a fourth capacitor C4; the source of the fourth MOS tube M4 and the source of the fifth MOS tube M5 are connected to the power supply VDD; the gate of the fourth MOS tube M4 is connected to the gate of the fifth MOS tube M5, and is connected to the output end of the second operational amplifier OP2; the drain of the fourth MOS tube M4 is connected to the positive input end of the second operational amplifier OP2, and is connected to one end of the ninth resistor R9; the negative input end of the second operational amplifier OP2 is connected to the negative input end of the first operational amplifier OP1; the other end of the ninth resistor R9 is connected to the collector of the third triode Q3, and the base and emitter of the third triode Q3 are grounded; the drain of the fifth MOS tube M5 is connected to one end of the tenth resistor R10 and one end of the fourth capacitor C4, and outputs the temperature detection voltage VPTAT; the other end of the tenth resistor R10 and the other end of the fourth capacitor C4 are grounded.
[0031] like Figure 6 As shown, the working principle of the RC oscillator with frequency temperature compensation function provided by this embodiment is as follows:
[0032] First, the device in the crystal oscillator circuit receives a power-on enable signal (RC Enable) and obtains a temperature calibration signal (Trim Code loading) from the memory unit of the chip to calibrate the oscillation voltage output by the RC oscillator to the target frequency; secondly, the bandgap reference voltage source outputs a bandgap reference voltage VBG, the temperature sensor circuit outputs a temperature detection voltage VPTAT, the ADC module performs sampling conversion of the bandgap reference voltage VBG and the temperature detection voltage VPTAT, and outputs a bandgap reference voltage sampling signal (Bandgap Voltage ADC sample) and a temperature detection voltage sampling signal (VPTAT Voltage ADCsample) to the logic controller; finally, the logic controller performs logical digital operations, and the logic controller outputs a temperature compensation calculation signal (Temperature Compensate Calculate) to adjust the capacitance value of the adjustable capacitor C2, thereby adjusting the oscillation signal frequency output by the RC oscillator.
[0033] like Figure 7 As shown, the bandgap reference voltage source provided in the embodiment of the present application adopts a multi-order temperature compensation design and outputs a bandgap reference voltage VBG with good temperature compensation characteristics; the temperature sensor circuit provided in the present embodiment can output a temperature detection voltage VPTAT with a positive temperature coefficient (mainly considering the first-order temperature coefficient); in the present embodiment, in order to track the temperature characteristics of the RC oscillator in real time, the ADC module is required to sample the bandgap reference voltage VBG and the temperature detection voltage VPTAT, record them to the logic controller, and then the logic controller compares the logic operation and considers the compensation of different temperature slopes to obtain a temperature compensation calculation signal (Temperature Compensate Calculate), and finally adjusts the current calibration information trim code value to control the capacitance of the adjustable capacitor C2.
[0034] like Figure 8 As shown, compared with before temperature compensation, the oscillation frequency of the oscillation voltage output by the RC oscillator increases with the increase of temperature. After the RC oscillator provided in the present application is temperature compensated, the temperature stability of the oscillation frequency of the oscillation voltage output by the RC oscillator is greatly improved; the temperature characteristics of the oscillation frequency of the clock output by the RC oscillator are relatively stable, and the slope of the temperature detection voltage VPTAT output by the temperature detection sensor is also relatively stable. By compensating with a fixed temperature slope, the temperature characteristic compensation of the oscillation voltage output by the RC oscillator can be achieved.
[0035] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiment. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.
Claims
1. An RC oscillator with a frequency temperature compensation function, comprising a crystal oscillator circuit, wherein the crystal oscillator circuit comprises a current source module, a resistor module and a capacitor module, wherein the current source module provides current to the resistor module and the capacitor module; the crystal oscillator circuit generates and outputs an oscillation voltage according to a voltage of the resistor module and a voltage of the capacitor module; Features: The capacitor module includes an adjustable capacitor; the RC oscillator also includes a bandgap reference voltage source, a temperature sensor circuit, an ADC module and a logic controller; the output end of the temperature sensor circuit is connected to the ADC module, and the ADC module collects the temperature detection voltage and sends it to the logic controller; the output end of the bandgap reference voltage source is connected to the ADC module, and the ADC module collects the bandgap reference voltage and sends it to the logic controller; the logic controller outputs a temperature compensation calculation signal according to the bandgap reference voltage and the temperature detection voltage, thereby adjusting the capacitance value of the adjustable capacitor; The current source module includes a first current source, a second current source and a third current source, and the resistance module includes a third resistor and a fourth resistor; the crystal oscillator circuit also includes a first controllable switch, a second controllable switch, a third comparator, a fourth comparator and a second RS trigger; the output end of the first current source is connected to one end of the first controllable switch, and the other end of the first controllable switch is connected to one end of the second controllable switch, one end of the adjustable capacitor, the inverting input end of the third comparator and the inverting input end of the fourth comparator; the other end of the second controllable switch is connected to the input end of the second current source, and the output end of the second current source is grounded; the other end of the adjustable capacitor is grounded ; The output end of the third current source is connected to one end of the third resistor and the non-inverting input end of the third comparator; the third resistor is a RPPOSAB resistor, and the other end of the third resistor is connected to one end of the fourth resistor and the non-inverting input end of the fourth comparator; the other end of the fourth resistor is grounded; the output end of the third comparator is connected to the S input end of the second RS trigger, and the output end of the fourth comparator is connected to the R input end of the second RS trigger; the Q output end of the second RS trigger outputs an oscillating voltage and is connected to the control end of the first controllable switch; the QB output end of the second RS trigger is connected to the control end of the second controllable switch.
2. The RC oscillator with frequency temperature compensation function according to claim 1, characterized in that: The bandgap reference voltage source includes a first MOS tube, a second MOS tube, a third MOS tube, a first triode, a second triode, a fifth resistor, a sixth resistor, a seventh resistor, an eighth resistor, a third capacitor and a first operational amplifier; The source of the first MOS tube, the source of the second MOS tube and the source of the third MOS tube are connected to the power supply; the gate of the first MOS tube, the gate of the second MOS tube and the gate of the third MOS tube are connected and connected to the output end of the first operational amplifier; the drain of the first MOS tube is connected to the positive input end of the first operational amplifier, one end of the fifth resistor and one end of the sixth resistor; the other end of the sixth resistor is connected to the collector of the first triode; the base of the first triode is connected to the base of the second triode and is grounded; the emitter of the first triode, the other end of the fifth resistor and the emitter of the second triode are grounded; the drain of the second MOS tube is connected to the negative input end of the first operational amplifier, one end of the seventh resistor, the collector of the second triode and the input end of the temperature sensor circuit; the drain of the third MOS tube is connected to one end of the eighth resistor and one end of the third capacitor, and outputs a bandgap reference voltage; the other end of the seventh resistor, the other end of the eighth resistor and the other end of the third capacitor are grounded.
3. The RC oscillator with frequency temperature compensation function according to claim 2, characterized in that: The temperature sensor circuit includes a fourth MOS tube, a fifth MOS tube, a second operational amplifier, a ninth resistor, a tenth resistor, a third triode and a fourth capacitor; the source of the fourth MOS tube and the source of the fifth MOS tube are connected to a power supply; the gate of the fourth MOS tube is connected to the gate of the fifth MOS tube, and is connected to the output end of the second operational amplifier; the drain of the fourth MOS tube is connected to the positive input end of the second operational amplifier and is connected to one end of the ninth resistor; the negative input end of the second operational amplifier is connected to the negative input end of the first operational amplifier; the other end of the ninth resistor is connected to the collector of the third triode, and the base and emitter of the third triode are grounded; the drain of the fifth MOS tube is connected to one end of the tenth resistor and one end of the fourth capacitor, and outputs a temperature detection voltage; the other end of the tenth resistor and the other end of the fourth capacitor are grounded.
Citation Information
Patent Citations
High-precision band-gap reference circuit
CN106055009A
RC oscillator
CN107017844A
Temperature compensated oscillation circuit, oscillator, electronic apparatus, vehicle, and method of manufacturing oscillator
CN107483016A
Novel RC oscillator with low power consumption, high precision and low temperature drift
CN108667439A
Circuit device, oscillator, electronic apparatus, and vehicle
CN110401415A