LM35D ¿Good?

Page: 6 .Graphic: Minimum Supply Voltage vs. Temperature.

The graph shows the voltage discontinuities at certain temperatures. The slope increases with increasing current. Arduino generates a voltage of 5.01 V.

How I can I know that there are no discontinuities in voltage between +2 º, +100 º C?
I see in the graph where the discontinuities begin to 2 mA, but I do not see where the discontinuities with 40 mA.

Dibujo.jpg

How I can I know that there are no discontinuities in voltage between +2 º, +100 º C?

Typically done by reading the datasheet or experimenting with the chip.

The graph shows the voltage discontinuities at certain temperatures.

No it doesn't.

The dotted line indicates that the chip is operating outside it's recommended parameters, not that there is a discontinuity in reading.

Nice useful post as normal from dhenery.

Can you tell me why there is a 5?

samples = (5.0* analogRead(pin) * 100.0) / 1024.0;
for this device.
100ºC = 1024 points
Tª = (points * 100) / 1024
Why you should add 5?

Why you should add 5?

You are not adding 5V you are multiplying by 5V.

An analogue reading returns a number from 0 to 1203, this corresponds to a voltage between 0 to 5V so this:-

samples = (5.0* analogRead(pin) * 100.0) / 1024.0;

Is converting the number you read into a voltage.

samples = (5.0* analogRead(pin) * 100.0) / 1024.0;

Things like that utilize floating point math and floating point math is quite inefficient on an 8-bit mcu.

A simpler approach would be to use fixed point math.

dhenry:

samples = (5.0* analogRead(pin) * 100.0) / 1024.0;

Things like that utilize floating point math and floating point math is quite inefficient on an 8-bit mcu.

A simpler approach would be to use fixed point math.

No it is not a simpler approach it is an approach that runs faster.
We are dealing with a compiler here and simple projects. All those posts and you still haven't got the basic hang of this forum have you.