Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By bkenobi
#90422 High level need:
I have a hot tub with a heater that overloads sometimes (less than once a month) and trips the 30A breaker for the heater but leaves the 20A for the controls/jets work. It doesn't get used that often, so finding out it's filled with cold water is a downer. Also, if the heater is not on, it could potentially freeze tubes.

Goal:
1) I have a Sonoff Basic and TH16 that are both flashed to Tasmota. I have them set up such that Node Red sees the LWT. I intend to connect the Sonoff to one leg of the 30A and neutral so that when it's on NR sees the hot tub working. When the breaker pops it will kill power to the Sonoff and lead to a LWT going offline and an email will be generated. ACCOMPLISHED

2) Monitor water temperature. I don't want to have a wire running outside the hot tub and I'm not going to cut a hole in the plumbing so a water temperature sensor won't work. I could use an ambient sensor in the controller bay, but that won't change much so it would be pretty useless. What I would like to do is monitor the surface temperature of the heater outlet tube. I have not found any easy to use surface mount temperature sensors that appear to work with Arduino/ESP. The closest I have come up with is using a water temperature sensor taped to the surface and insulated from ambient. Does anyone have a better option I should consider? Help needed
User avatar
By bkenobi
#90425 I've been leaning towards using either a thermistor or a DS18B20 waterproof sensor. One option for the thermistor would be from SparkFun which already has a thermal sensitive glue and mounting pad included. I am not clear on whether the Sonoff Basic v1.3 has the correct pins exposed to use an analog device like a thermistor so I'm leaning towards the digital DS18B20. I don't expect perfect accuracy but had read these aren't great when used for surface temperatures.

https://www.sparkfun.com/products/15767
User avatar
By eriksl
#90796 "OneWire" is a bit tricky with ESP imho.

I'd recommend using I2C, there are lots of cheap temperature sensors. As they can be selected to have multiple addresses, you can connect up to eight to the same set of wires. The ESP has strong GPIO's (up to 30 mA), so if range (length of the wires) is a problem, you could select a temperature sensor that also has strong driving and you could use a low value pullup resistor, which reduces wire capacitance and noise and then you could span up to 10 maybe 20 meters if nicessary. Without modifications I can normally get away with about 5 meters. Haven't tried any longer span actually for some years.