Temperatur sensor mm111

Hello

I want to use my sensor mm111 but I have no idea to calculate the result in degrees

I found the user PDF but no line of code is present : https://www.vellemanprojects.eu/downloads/0/user/usermanual_mm111_en.pdf

If anyone has any idea :confused:
thx

Vout tells you the temperature.

You may have to extrapolate for the temperatures not in the table.

.

From the data sheet:

The voltage output varies according to the temperature measured by following a linear constant value of typically 21 mV / ° C, starting from a maximum of 5 V at -50 ° C.

Easy enough. Take an analogRead() of the signal, convert it to voltage, calculate temperature. Every ADC step is about 5 mV so the effective resolution is about 0.25°C, which is OK, the sensor has an stated accuracy of 0.4°C.

BUT!

  • make sure Vcc is really 5V.
  • make sure Vcc is always 5V.
  • make sure Vcc is simply dead stable.

As any change in Vcc is bound to mess up your readings. It's unclear how the output of the sensor changes (the data sheet claims it can work with as little as 1.5V supply, but I doubt it can produce a 5V output that way), and as you're using Vcc as reference for your ADC that's another place where readings go off with change in Vcc.

The brochure says that for each deg0C change of temperature, the output of the sensor changes by 21 mV. The brochure does not say how much the output is when the ambient temperature is 250C, for example. This means that we are not sure whether the sensor has any offset or not. Or, it could be that the sensor is directly calibrated in 0C. Connect the sensor with UNO and see how much the sensor reads for the the room temperature. If the reading is too far off (more than 2/3 degrees), we need to calibrate the sensor to get its gain and offset.

The gain of offset of the sensor could be determined by the following set up.
1. Maintain Room Temperature at (say) 250C. Measure and record the output voltage of the sensor. This is your point A(25, VDT1).

2. Maintain Room temperature at 200C (by running the AC). Measure and record the output of the sensor. This is your point B(20, VDT2).

3. C(T, VDT) is the unknown 3rd point.

4. Derive y = mx +c equation fro points A(), B(), and C(). We will get: T = k*VDT + c; where k and c are known quantities.

5. Now, transform T into the domain of UNO. T will be related with analogRead(A0); and VREF of 1.1v (INTERNAL) in an unique way.

Thank you very much for your answers.
What I forgot to say is that when the temperature goes up, the value goes down which bothers me to display the value on an lcd screen for example.
I also vaguely had the same idea as you GolamMostafa but it is my very first program in arduino and I do not understand all your calculation :confused:

Analogue sensors are difficult to interface with a processor (need a reference voltage).
This one is a bit harder, because the output is inverted.
Do yourself a favour, and throw it as far as you can.
Then buy a $2 digital waterproof DS18B20.

That said, try this:
float temp = (((1023 - analogRead(A0)) * 0.23) -50.0);
Leo..