Closed louis49 closed 2 years ago
The temperature sensor in this project was an afterthought. I added it because it was easy and because it might be good to know how hot it gets inside an waterproof case - but accuracy was never a design goal here.
The Wemos D1 has an internal voltage divider at its analog input, so yes this will affect the mathematics for the temperature. The internal resistance (320 k) is higher by a factor of more than 10 in comparison to R2 (22 k). So this changes the effective resistance by less than 10 %. As mentioned before - accuracy was not important and the the initial accuracy of my setup was better than expected. If you follow the calibration procedure I described in the README.md it will not matter if you swap R1 and R2 or not.
If you want to go for higher accuracy you should also consider the following aspects:
You can optimize the resistor values and maybe switch R1 and R2, but with the ESP8266 you will loose at the 3rd point I mentioned above because of its 10 bit resolution. You can compensate this with high oversampling but some limits remain.
In another project of mine I added a ADS1115 to the Wemos D1, used a differential voltage measurement combined with a reference voltage auto calibration and the difference in accuracy in comparison to the build in ADC of the ESP8266 was really significant.
Hi,
I tried the temperature sensor part and discover 2 things :
then, when computing temperature :
Have you observed such a thing?