Skip to content

Commit

Permalink
Merge branch 'main' of github.com:mzakharo/tubby
Browse files Browse the repository at this point in the history
  • Loading branch information
mzakharo committed Feb 18, 2023
2 parents e6a0c02 + 0f42ed1 commit 15f59e0
Showing 1 changed file with 22 additions and 19 deletions.
41 changes: 22 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,44 @@
# Hot Tub Sensor and Automation.
# Hot Tub Water Quality Sensor

- Battery powered ORP, PH sensor for Hot Tub/SPA or Pool sensing applications.
- Deep & Light sleep for ~ 1 year battery life @ 2 samples per hour
- MQTT with Home Assistant Auto Discovery
- Remote Logging and OTA over MQTT
- PH ATC (Automatic Temperature Compensation) integrating with [Balboa](https://github.com/mzakharo/pybalboa) temperature sensor
- Free Chlorine/Bromine estimator model from PH and ORP values
- Battery powered ORP, pH sensor for Hot Tub/SPA
- ~ 1 year battery life @ 2 samples per hour
- Sensor externally mounted, probes placed under the skimmer cover
- [Home Assistant](https://www.home-assistant.io/) Integration
- pH ATC (Automatic Temperature Compensation) integrating with [Balboa](https://github.com/mzakharo/pybalboa) temperature sensor
- Free Chlorine/Bromine estimate model from PH and ORP values

# Photos
![image](https://user-images.githubusercontent.com/567867/219641155-691258fb-7b6d-4ead-90d6-9f79a9f34092.png)

<img src="https://github.com/mzakharo/tubby/blob/main/pictures/final.jpg" width="250" height="400"> <img src="https://github.com/mzakharo/tubby/blob/main/pictures/probes.jpg" width="250" height="400"> <img src="https://github.com/mzakharo/tubby/blob/main/pictures/cal.jpg" width="250" height="400">

# Hardware
## Hardware

- [UM FeatherS2](https://unexpectedmaker.com/shop/feathers2-esp32-s2) ESP32 board
- 3500 mA battery
- Atlas Scientific Gravity Analog [ORP](https://atlas-scientific.com/kits/gravity-analog-orp-kit/) and [PH](https://atlas-scientific.com/kits/gravity-analog-ph-kit/) Kits
- Enclosure: https://www.adafruit.com/product/3931
- 2 resistors for battery sensing
- [UM FeatherS2](https://unexpectedmaker.com/shop/feathers2-esp32-s2) ESP32 board from [here](https://www.adafruit.com/product/4769)
- 3500 mAh battery or [2500 mAh](https://www.adafruit.com/product/328)
- Atlas Scientific Gravity Analog [ORP](https://atlas-scientific.com/kits/gravity-analog-orp-kit/) and [pH](https://atlas-scientific.com/kits/gravity-analog-ph-kit/) Kits
- Enclosure: [DS-AT-0811-S](https://www.adafruit.com/product/3931)
- [2x100 kΩ resistors](https://www.adafruit.com/product/2787) for battery monitoring (optional)


# Firmware
## Firmware

- https://github.com/mzakharo/micropython/blob/tubby/ports/esp32/README.me.md
- micropython. OTA & Logging over MQTT
- deep (50µA) & light (7mA) sleep
- [Build instructions](https://github.com/mzakharo/micropython/blob/tubby/ports/esp32/README.me.md)
- [Code](https://github.com/mzakharo/micropython/blob/tubby/ports/esp32/modules/app.py)


# FC (Free Chlorine) ppm Model
## FC (Free Chlorine) ppm Model

Predict Free Chlorine & Bromine ppm from PH and ORP sensors.
Predict Free Chlorine & Bromine ppm from pH and ORP sensors.

- Data source: https://jenfitch.com/free-chlorine-orpmv-vs-ph-new/


Build the model: [build_model.py](https://github.com/mzakharo/tubby/blob/main/build_model.py).

Prebuilt models:
- [model_fc.h5](https://github.com/mzakharo/tubby/blob/main/model_fc.h5): model for predicting FC from ORP/PH
- [model_fc.h5](https://github.com/mzakharo/tubby/blob/main/model_fc.h5): model for predicting FC from ORP/pH

- [model_orp.h5](https://github.com/mzakharo/tubby/blob/main/model_orp.h5): model for predicting ORP from FC/PH. This one can be used to calibrate your ORP sensor by getting your water lab tested

Expand Down

0 comments on commit 15f59e0

Please sign in to comment.