#### Eric_O

##### Advanced Member level 4

__1) Calculation of the mounting characteristics for a full-scale variation of the ADC :__

I chose a measurement range between -10 °C and +100 °C with a 10-bit analog/digital conversion, i.e. from 0 to 1023, i.e. 1024 values. In absolute terms, the temperature range is therefore 10 °C + 100 °C, i.e. 110 °C.

Powered by a voltage of 5 V, the per-bit resolution of the 10-bit analog-to-digital converter (ADC) is 5 V / 1024 different values, or 4.88 mV each time one of the 10 bits changes state, from 0 to 1 or from 1 to 0. 4.88 mV is the resolution in volts per bit. This is the quantum q of the 10-bit converter (1).

On the one hand, we have a sensor output voltage that will vary between 0 and 110 °C x 10 mV, i.e. between 0 and 1100 mV. On the other side, there is a 10-bit analog-to-digital converter (ADC) that will convert a voltage that varies over a range of 0 to 1100 mV into input.

While powered at 5 V, the ADC could convert a voltage that varies from 0 to 5 V as input.

The solution is to amplify the voltage range from 0 to 1100 mV over a voltage range from 0 to 5 V with an op-amp amplification circuit.

- input voltage Vi = 1100 mV, i.e. 1.1 V,
- output voltage Vo = 5 V.

__2) Problems related to the treatment of sub-zero temperatures :__

LM35 Temperature Sensor Linear Relationship :

The LM35 sensor has the following linear characteristic

*V out = f (T) :*

Managing sub-zero temperatures with an LM35 :The T = f (V) characteristic of the LM35 temperature sensor has a breakpoint for a temperature of 0 °C. This is due to the intrinsic feature of the sensor, which only measures positive temperatures.

However, if you want to measure a temperature range of -10 °C to 0 °C and from 0 °C to 100 °C, it is necessary to make a reference change on the sensor characteristic above.

In electronics, this change of reference is equivalent to moving the operating point of the LM35 by adding a new DC voltage called offset to the sensor's output voltage (proportional to temperature).

Synoptic:

Determination of the offset voltage for measurement from -10 °C to +100 °C :

We need to make sure that we get a potential at the ADC input of 0 volts for a measured temperature of -10 °C. Since ADC cannot measure negative voltage, its conversion range is between 0 volts and 5 volts.

Knowing the scale factor of the sensor (10 mV / °C), we can write :

- 10 °C x sensitivity = -10 °C x 10 mV = -100 mV

Its absolute value is therefore 100 mV.

Knowing that we have an amplification factor A = 4.545, we can write:Its absolute value is therefore 100 mV.

100 mV x A = 0.1 V x A = 0.1 V x 4.545 = 0.4545 V = 454 mV.

Thus, the offset voltage introducing the offset will be

*V offset*= 454 mV.

This offset voltage allows the operating point (displaced bias) of the LM35 sensor to be shifted, so that it delivers a consistently positive potential for temperatures between -10 °C and 0 °C.

This is equivalent to introducing a change of reference on the sensor characteristic such as:

The operating point of the LM35 has been moved so that 100 mV is obtained at an intrinsic temperature of 0 °C.

Thus the linear relation is now written:

*V out*= 10 mV x T + 100 mV.

Nevertheless, this potential is a figment of the imagination because it is in practice not measurable because it is always associated with an offset voltage.

Because of this stratagem (displaced operating point) the "negativity" of the intrinsic voltage of the sensor for T = -10 °C is all relative, because it actually means nothing more than that of the voltage present on pin 2 of the sensor is at a potential 100 mV lower than that existing on pin 3.

Our measuring range will therefore be between -10 °C and +100 °C.

__3) Acquisition chain between the LM35 and the microcontroller :__

Scheme:

Equivalent diagram of the acquisition chain :

Here are the different theoretical potentials of the equivalent scheme. This is a figment of the imagination, because in fact

*V out*and

*V diff*are not measurable in practice. Indeed, the first potential is always associated with

*V offset*and for the second it is an integral part of the "difference amplifier" stage.

The "A" amplification is performed from an operational amplifier mounted as a non-inverting difference amplifier.

A = (1 + R7 / R6)

Let's maintain the value of R6 and calculate the value of R7 for an amplification A = 4.545.

4,545 = (1 + R7 / 1,24 Kohm)

R7 = 4395,8 ohm = 4,39 Kohm

4.39 Kohm is between the standard resistance values of 4.22 K and 4.42 K.

Let's calculate A with the lower standard value and the upper standard value in order to get closer to the value of 4.545 ...

A = (1 + 4,22 / 1,24) = 4,403

A = (1 + 4,42 / 1,24) = 4,564

The value of 4.42 K for R7 fits perfectly.

It can be seen that the practical value of A = 4.564 differs very slightly from the theoretical value A = 4.545 calculated above.

The general input-output relationship of the acquisition chain can therefore be written in the following form ...

Vout = (1 + R7 / R6) x

*V intrinsic sensor*

... wherein 1 + (R7 / R6) = 4.564 in practice and 4.545 in theory, and *V intrinsic sensor*, the intrinsic output voltage of the LM35, proportional to temperature.

4) Question :

How is the mathematical formula written for measuring temperature ?

I would write : temperature = ((V_ out_of_AOP / 4.564) - V_offset_of_LM35) / 10.

"/ 10" is the rate of conversion of LM35 10 mV / °C

Thanks.

Last edited: