Abstract:
A highly accurate voltage reference and temperature sensor circuit requires only several low-cost components in addition to a general-purpose microcontroller with an analog-to-digital converter. Unlike known circuits, the circuit disclosed does not rely on matching between a pair of semiconductor devices, as only a single semiconductor junction is used. All of the signal processing may be performed digitally.

Description:
BACKGROUND 
     Whenever voltages (or any parameters represented by voltages) need to be measured or digitized, it is necessary to have a voltage reference. Most electronic devices of any complexity have one or more references, for example in a signal processing chain or in the power supply circuitry. 
     Depending on the desired overall system accuracy, the requirements for voltage references vary greatly; however it is clear that if well designed, a voltage reference should be relatively insensitive to deviations in its own power supply and to variations in its temperature. 
     As with any other engineering challenge, the design of a voltage reference forces tradeoffs. Designing a voltage reference to be highly accurate despite changes in temperature, for example, usually makes it much more expensive. 
     The designer of a voltage reference, in pursuit of temperature stability, will usually draw upon a bit of good luck, which is that nature will sometimes be so cooperative as to make it possible to develop a first circuit yielding a voltage having a linear relationship to temperature (with some first measurable coefficient) over some useful dynamic range, and to develop a second circuit yielding a voltage having a linear relationship to temperature (with some second measurable coefficient non-identical to the first coefficient) over that same useful dynamic range. It is particularly helpful if the two coefficients differ in sign; this prompts designers to utilize the scheme illustrated in  FIG. 1 . This figure shows two voltages (Vn and Vp), each having a prescribed relationship to the changes in temperature. Nature cooperates by providing one voltage that is decreasing when the temperature is increasing, commonly called CTAT or Complimentary To Absolute Temperature; and by providing another voltage that is increasing when the temperature is increasing, commonly called PTAT or Proportional To Absolute Temperature. 
     With these two voltages available, the designer applies an appropriate linear amplification to one of the voltages in order to make the rates of change, created by temperature changes, of both voltages equal in magnitude but with opposite signs. Then, the two voltages are added together, with a resulting sum that is relatively temperature independent. 
     In the example of  FIG. 1 , we see that the slope of the PTAT line is shallower, so the voltage that gets amplified is the PTAT voltage. The gain of the amplification is selected so that the slope of the K*Vp line is (as closely as is possible) equal and opposite to that of the Vn line. The goal of course is that the sum of these two will be relatively temperature independent. 
     One common method for the establishment of the CTAT and PTAT voltages is the utilization of semiconductor diodes (or bipolar transistors), which are behaving according to the “classic” Shockley diode equation shown in  FIG. 4(   a ). An approximate relationship may be derived from the Shockley diode equation:
 
 V   1   −V   2   =ΔV   d =( nk/q )* T*In ( J   1   /J   2 )  [Equation 1]
 
where:
         V 1  and V 2  are the voltages formed by forward-biasing the diodes with currents that establish current densities J 1  and J 2 ;   quantity (nk/q) is (for the present purposes) a constant; and   T is the absolute (Kelvin) temperature.       

     From Equation 1 we see that the difference voltage ΔV d  has a PTAT characteristic. 
     At the same time, the forward voltage of the diode has CTAT characteristics due to temperature dependency of the quantity I s  in the Shockley diode equation ( FIG. 4(   a )). 
     Most of the present-day low-voltage (below five volts) voltage references are based on the above principles. Prior art circuits depicting the groundbreaking actual realizations are shown in  FIG. 2  (Widlar) and  FIG. 3  (Brokaw). 
     From  FIGS. 2 and 3  we see that each of these circuits utilitizes and indeed depends for its accuracy upon matched semiconductor devices. 
     The circuit in  FIG. 2 , for example, develops its diode voltage difference due to differing currents passing through equal and matched units. 
     The circuit in  FIG. 3  develops the diode voltage difference due to specifically designed sizes of the matched units, so that approximately the same current will create differing current densities which are inversely proportional to the size of the respective junction. Notice the notation “ 8 A” that signifies that the device in location Q 2  is to be eight times larger than the device in location Q 1 . One way to do this, of course, is to create this larger device at Q 2  by simply connecting eight devices equivalent to Q 1  in parallel. 
     The alert reader will thus appreciate that the degree of success in making the voltage reference circuit accurate despite changes of temperature depends greatly upon the degree of success in either the matching of similar devices ( FIG. 2 ), or the degree of success in bringing about some particular physical ratio of size ( FIG. 3 ). 
     In order to provide sufficiently-matched components, the designers have to resort to making the matched devices very large, so that the geometrical processing errors in the manufacture of the integrated circuits (ICs) have a diminishing effect on the matching; however, this increases the costs of manufacture, as more area is required on the surface of the IC die. This also uses up die real estate that could have been given to some other purpose. 
     The alert reader will also have appreciated that the accuracy of Equation 1 depends on both semiconductor devices having exactly the same temperature. Saying the same thing differently, if the two devices were to be at non-identical temperatures, then the results of Equation 1 would be less helpful in providing a temperature compensation mechanism for a voltage reference. 
     The approaches of  FIG. 2  or  3  thus lead to a further design goal which is to reduce to a minimum the temperature difference between the two junctions. One design approach toward this goal includes splitting each of the matched devices into several parallel-connected units, and positioning the units utilizing geometrical symmetry considerations. But the fact remains that a temperature gradient inside the IC will create errors, and these errors cannot be completely eradicated. 
     Helpful background information may be found at:
         W. B. Shockley, “Electrons and Holes in Semiconductors,” Van Nostrand, 1950.   R. J. Widlar, “New Developments in IC Voltage Regulators,” IEEE Journal of Solid-State Circuits, vol. SC-6, no. 1, pp. 2-7, February 1971.   A. P. Brokaw, “A Simple Three-Terminal IC Bandgap Reference,” IEEE Journal of Solid-State Circuits, vol. SC-9, no. 6, pp. 388-393, December 1974.   Y. P. Tsividis, “Accurate Analysis of Temperature Effects in Ic-Vbe Characteristics with Application to Bandgap Reference Sources,” IEEE Journal of Solid-State Circuits, vol. SC-15, no. 6, pp. 1076-1084, December 1980.   U.S. Pat. No. 4,384,217 to Tsividis.       

     From the above discussion it may be seen that it would be very helpful if some approach could be found by which a voltage reference could be temperature compensated without the many drawbacks discussed. 
     SUMMARY OF THE INVENTION 
     The current invention teaches a method that guarantees the “matching”, as there is only a single semiconductor device used. This alleviates both problems due to size differences and due to variations in temperature. Drawing upon the teachings of the current invention, the semiconductor devices used for creation of the reference voltage can be very small, and the associated circuit can be manufactured utilizing the smallest-possible geometries. 
     Moreover, if a microcontroller with a built-in analog-to-digital converter is already a required part of the complete system, then a precise, high-accuracy, and low-power voltage reference can be formed by the mere addition of several low-cost components. 
    
    
     
       DESCRIPTION OF THE DRAWING 
       The current invention is disclosed with the aid of a drawing in several figures, of which: 
         FIG. 1  illustrates the establishment of a temperature-independent reference voltage; 
         FIG. 2  and  FIG. 3  depict prior-art circuits; 
         FIG. 4(   a ) shows a Shockley diode equation; 
         FIG. 4(   b ) shows a semiconductor diode; 
         FIG. 4(   c ) shows a simple model of a diode; 
         FIG. 5  discloses one exemplary embodiment of the current invention, suitable for incorporation into a solid-state integrated circuit; and 
         FIG. 6  shows one exemplary embodiment of the current invention, suitable for application with an A/D-equipped microcontroller. 
     
    
    
     DETAILED DESCRIPTION 
     Disclosed in  FIG. 5  is one exemplary embodiment of the current invention, suitable for incorporation into a solid-state integrated circuit. 
     Two different currents pass through PN diode  1  as controlled by a switch  2 . The resulting diode&#39;s voltages are stored, correspondingly, by the sample and hold circuits  3  and  4 . 
     Voltage V 1  is used directly as the CTAT component of the reference voltage; and a linearly amplified difference between V 1  and V 2  comprises the PTAT portion of the reference voltage. 
     A non-overlapping (break before make) clock generator  8  controls both which current is flowing in the diode, and which sample and hold circuit is activated (after an appropriate settling delay). The frequency of this clock generator need not be precise and/or stable. 
     Revealed in  FIG. 6  is one exemplary embodiment of the current invention that is suitable for application with an A/D-equipped microcontroller. For example in a given application there may already be an A/D-equipped microcontroller so as to satisfy some other design need. In such an application, the addition of a small number of very inexpensive external components suffices to deliver the benefits of the invention. 
     A microcontroller with built-in A/D converter  19  activates, in turn, one of the switches that are connected to lines  16 ,  17 , and  18  (in other words, it drives one and only one port pin high). This action creates a current determined by the values of the resistors R 1 , R 2 , and R 3  ( 11 ,  12 , and  13 ); the exact currents are not known, however, the ratios between all of the currents can be precisely calculated by measuring the voltage drops across resistor R 1  ( 11 ) with the on-board A/D converter&#39;s Ch 1  and Ch 2  (or an appropriately-configured single differential A/D channel). Exact precision values (and/or exact ratios of the values) for any of the resistors R 1 , R 2 , and R 3  ( 11 ,  12 , and  13 ) are not required. Saying this differently, the resistors can be inexpensive low-precision resistors. 
     Furthermore, the voltage across diode Dl ( 10 ) is measured by the A/D converter. 
     At this stage, all measured data is expressed in A/D counts, and the exact voltages are not known; however, as will be appreciated, the combined measured data are sufficient to calculate the exact value of the supply voltage V+. In this case the output of the calculation is not the voltage reference itself, but is a value indicative of the magnitude of a voltage already present elsewhere in the circuit (here, the supply voltage V+) which is then used as the A/D reference. 
     Utilization of 3 (three) test currents allows for exclusion of errors due to parasitic resistance R series  of the diode ( FIG. 4(   c )). 
     Various compensation algorithms can be applied digitally in order to correct second-order effects of the reference voltage dependency on the temperature; similar functionality is very hard to implement in “hardwired” integrated circuits. 
     Calibrations at multiple various temperatures can be made and calibration data stored, to be put to use so as to improve temperature stability of the Reference Voltage. 
     Due to the precisely linear nature of the PTAT signal (calculated digitally and internally in the microcontroller  19 ), it is possible to measure the temperature of the diode D 1  precisely. For this reason a system with multiple temperature-sensing diodes (that can also be utilized to improve the accuracy of the reference voltage by, for example, averaging) can be readily and inexpensively fashioned. 
     The alert reader will have no difficulty devising myriad obvious variations and improvements upon the invention, after having appreciated the teachings herein. It is intended that the claims which follow will embrace such variations and improvements.