It is pretty easy to make a temperature sensor with a Dallas DS18B20 and a ESP32-C3 which reports the temperature value via WiFi. The bigger problem was a housing for that, especially with a power supply. Here the problem is that the temperature rises a bit even when the ESP sleeps most of the time.
Never-the-less I wanted to showcase my solution here in case that others want to do the same.
Full project description can be found on MakerWorld, mainly because it is more a 3D printing project than an electronics project.
In operation the sensor should be on the bottom to prevent that warm air from the power supply and the ESP is raise up to the sensor.
I use more than one of these since a year to report towards my home automation system (Home Assistant) via MQTT. The project description contains my ESPHome Code.
I wish you all a Merry Christmas and excellent ideas for your projects.
That's why I wrote that it should be on the bottom during operation... It shouldn't be too hard to stick it in with the sensor on the bottom, or is it?
They will get problems earlier if they try to integrate a USB power adapter with grounding into the case. US plugs without grounding are also rotatable by 180 degrees, so I can't see any problem.
But before this thread goes long about different plugs in different countries, I will change the pic.
Changed the pic, so it shows the correct orientation. Hopefully now everybody is happy, even those with little spatial sense.
Sorry, but it is ridiculous that the orientation of the image generates more comments than the content.
For temperature sensors, a power supply is probably always going to increase the temp readings.
My sensors use 1800mAh li-po battery packs. If you choose the XIAO ESP32C3, it has pads on the underside that you can solder your li-po pack to and in this configuration the deep sleep current is only 35uA, so the battery life should be long and you'll only have to plug the XIAO into USB-C and it will l will re-charge the pack.
Yes, you are right. I used the Xiao for a WiFi remote, my current readings are a bit higher but never less such a configuration will produce less heat. But as I said I wanted mains power in this project and the usb power supply was a good option for me. I corrected the temperature readings by a simple offset, which is ok because it only measures temperatures between 16 and 22 degrees usually. Everything below is holiday or above is summer, so there is no need for an exact reading outside this window.
The advantages of my configuration are peace of mind (you don't have to monitor the battery) and price, the Xiao is 3 times more expensive than a cheap ESP32 supermini and the usb power adapters are also much cheaper than a li-po (I paid less than 4 Euro for 5).