Temperature sensors are one of the most important kinds of physical sensors, because many different processes (in everyday life as well) are regulated by temperature. Besides, the temperature measurement allows indirect determination of other physical parameters, such as matter flow rate, fluid level, etc. Typically, sensors convert the measured physical value into an analog signal, and temperature sensors are no exception here. For processing by the CPU or computer, the analog temperature signal must be converted into a digital form. For such a conversion expensive analog-todigital converters (ADCs) are commonly used. 

The purpose of this project is to develop and present a simplified technique for direct conversion of the analog signal from a temperature sensor into a digital signal with proportional frequency using GreenPAK™. Subsequently, the frequency of a digital signal that varies depending on temperature can then be more easily measured with a fairly high accuracy and then converted to the required units of measurement. Such direct transformation is interesting in the first place by the fact that there is no need for the use of expensive analog-to-digital converters. Also, digital signal transmission is more reliable than analog.

Below we described steps needed to understand how the temperature to frequency converter has been programmed. However, if you just want to get the result of programming, download GreenPAK software to view the already completed GreenPAK Design File. Plug the GreenPAK Development Kit to your computer and hit the program to design the converter.

Design and Circuit Analysis

Different types of temperature sensors and their signal processing circuits can be used depending on specific requirements, primarily in temperature range, and accuracy. The most widely used are NTC thermistors, which reduce the value of their electrical resistance with increasing temperature (see Figure 1). They have a significantly higher temperature coefficient of resistance compared to metal resistive sensors (RTDs) and they cost much less. The main disadvantage of thermistors is their nonlinear dependence of the characteristic "resistance vs. temperature". In our case, this does not play a significant role since during conversion, there is an exact correspondence of the frequency to  thermistor resistance, and therefore, the temperature.

Figure 1 shows the graphical dependence of thermistor resistance vs temperature (which were taken from manufacturer datasheets). For our design, we used two similar NTC thermistors with a typical resistance of 10 kOhm at 25 °C.

The basic idea of the direct transformation of the temperature signal into the output digital signal of a proportional frequency is the use of the thermistor R1 together with the capacitor C1 in the frequency-setting R1C1-circuit of the generator, as part of a classical ring oscillator using three “NAND” logic elements. The time constant of R1C1 depends on the temperature, because when the temperature changes, the thermistor's resistance will change accordingly. 

The frequency of the output digital signal can be calculated using the following formula:

F ≈ 1 / (2.3R1C1)

This type of oscillator typically adds a resistor R2 to limit the current through the input diodes and reduce the load on the input elements of the circuit. If the resistance value of R2 is much smaller than the resistance of R1, then it does not actually affect the generation frequency.

Consequently, based on the GreenPAK SLG46108V, two variants of the temperature to frequency converter were constructed (see Figure 5). The application circuit of these sensors is presented in Figure 3.

The design, as we have already said, is quite simple, it is a chain of three NAND elements that form a ring oscillator (see Figure 4 and Figure 2) with one digital input (PIN#3), and two digital outputs (PIN#6 and PIN#8) for connection to external circuitry.
Figure 5 Photo...
Read more »