Ten readings a second
The chip measures on its own clock: a short conversion about every 100 milliseconds, the result left in the register for whoever asks. Reading faster returns the same number again. The first read after power-up comes before the first conversion and is thrown away.
Its own clock
Nobody tells the chip when to measure. From power-up it converts on a fixed schedule and writes each result into register 0. NXP's LM75B takes about 10 ms to convert and starts a new conversion every 100 ms; UMW's sheet for the fitted part gives 26 ms every 80 ms. Either way, a new number about ten times a second.
A read does not start a conversion or interrupt one. It returns whatever the last finished conversion left.
So reading every 20 ms gets each number four or five times. Nothing is lost, nothing is gained, and the bus is busier than it needs to be. The book's sketch reads twice a second.
The first read
At power-up the register holds nothing useful. NXP says the first reading "must be ignored"; UMW's sheet says the register reads zero until the first conversion ends. The book's sketch waits a quarter of a second, reads once and throws it away, then starts printing.
It measures itself
The sensor is inside the chip, so the number is the temperature of the chip. The chip sits on the board, the board sits on your wires, and heat reaches it through its legs and through the air.
Its own supply current barely warms it: at NXP's worst case, 200 µA at 5.5 V, the chip heats itself by about 0.06 °C. What does warm it is whatever is near it. How quickly it follows a change in the air is not in either datasheet; a small board like this one takes something like a minute in still air to settle, but that is an estimate, not a measurement.
When it does not work
The register has nothing in it until the first conversion ends. NXP says to ignore the first reading after power-up; UMW's sheet says the register reads zero until then. The book's sketch waits and throws the first one away.
Either the sketch is reading faster than the chip converts, about ten times a second, or the temperature is simply steady. Hold a finger on the chip: a live sensor starts to climb within a second or two.
No. The conversion period is fixed inside the chip; neither datasheet offers a faster setting. What a sketch can do is read less often, or put the chip into shutdown between readings, which is bit 0 of register 1.
Edit this page — content/books/lm75/ten-readings-a-second.mdx
Questions about this product
See what other owners have asked, and read their solutions.
LM75 Temperature Sensor
Loading discussions…
Discuss this article
Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.