tubby
tubby copied to clipboard
Hot Tub & Pool Water Quality Sensor
Hot Tub/Spa & Pool Water Quality Sensor
- Solar powered
- ORP & pH Sensors
- Estimates Sanitizer ppm
- Home Assistant Integration
- Firmware is using esphome
Hardware
- UM FeatherS2 ESP32 board from here
- 2500 mAh
- Atlas Scientific Gravity Analog ORP and pH Kits
- Enclosure: DS-AT-0811-S
- 2x100 kΩ resistors for battery monitoring (optional)
Solar Panel Components
- Adafruit Universal USB / DC / Solar Lithium Ion/Polymer charger - bq24074
- 3.5mm / 1.1mm to 5.5mm / 2.1mm DC Jack Adapter
- Small 6V 1W Solar Panel
- JST-PH 2-pin Jumper Cable
Wiring
- Diagram
- NOTE: You can skip the ambient sensor removal step
Firmware
- Install esphome (Tested Version: 2023.12.5)
- copy
wifi_example.yaml
towifi.yaml
and edit the new file - Connect the board via USB and enter
esphome run tubby.yaml
on the command line. This will build and upload firmware to the board. - In Home Assistant, create a helper switch
input_boolean.ota
. Enable this switch, it will prevent deviceDeep
sleep. - Power cycle the board, Device then enters
Light
sleep for15 minutes
before it shows up in Home Assistant - Once your esphome device is added to Home Assistant, Use Device's page, Diagnostics section to calibrate the probes:
-
ORP Cal
: mV ORP calibration offset from raw ADC value. Note:ORP
mV Sensor value has calibration applied -
pH 10 Cal
: mV reading frompH Raw
sensor while submerged in pH 10 calibration solution -
pH 7 Cal
: mV reading frompH Raw
sensor while submerged in pH 7 calibration solution -
pH 4 Cal
: mV reading frompH Raw
sensor while submerged in pH 4 calibration solution -
ppm Factor
: 1 - Chlorine, 3 - Bromine
-
- Turn off
input_boolean.ota
to allow the device to save some power. - Place the probes in the water, and enjoy!
Sanitizer ppm Model
- pH + ORP -> Chlorine ppm Conversion Table
- Machine Learning Notebook
- Generate .h file from .tflite:
xxd -i model_fc.tflite > model_fc.h