Waterproof temperature probe
-
HI
I am looking for a solution to create a waterproof temperature sensor for swimming pools. I don't have a ready-made solution in the M5Stack sensor line. I tested the LM35CZ sensor, but it doesn't work!
The connection on the LM35CZ is correct and connected to port A (33)
The value on the poster does not change ...
I have tested with other analog sensors and it works
Do you have an idea of the problem or another temperature sensor to suggest to me for a cable distance of 25m.
I am using a CORE2 -
You can use ds18b20 it's ideal for your distance, but it is a digital sensor. So if you want read temperatire from him you must find a library to use them.
I create simple custom block for uiflow to read temperature from this sensor, but it's limited to read temperature from only one sensor connected to gpio pin. You must remember to connect a additional pullup resistor betwen vcc and out pin of sensor (see ds18b20 datasheet for connection and proper values of this resistor).
https://github.com/stonatm/UiFlow-custom-blocks/tree/master/ds18b20
-
Thank you very much for this information.
I did the test with 25 m of Cat 7 cable and it works perfectlyI am still surprised that the analog input of the M5stack does not work with the LM35
-
Lm35 works like a regulated voltage source with 10mV step/°C. So if you measure 20°C sensor set this output to 0.20V. Analogically for 23°C this output will set to 0.23V.There is to small voltage change for this line lenght (line resistance, electric hum and too small output current). Second reason is builtin adc its non linear below ~0.16-0.17V so minimal temperature i can read with this sensor oscilate around 13-14°C and adc reading don't go below this. Ewentually you could use similiar sensor tmp36 where output voltage for 0°C starts from 0.5V with 10mV step/°C. But these sensors works good only in short distances counting in centimeters.
-
Ewentually try this code with your lm35 to check of works (i tested my lm35 sensor with it)
-
@robalstona said in Waterproof temperature probe:
Ewentually try this code with your lm35 to check of works (i tested my lm35 sensor with it)
I carried out the test on a CORE2, I have very random and non-reproducible values.
Thank you for the example under UIflow for ADCs, it will be useful to me with another sensor.
I keep the idea of DS18B20, it works perfectly.