Skip to content

Commit

Permalink
release v1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Schluggi committed Oct 3, 2022
1 parent 7dd5416 commit 1d2fcda
Show file tree
Hide file tree
Showing 7 changed files with 2,517 additions and 1,971 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
## 1.0
## v1.1
- added: esphome example file
- added: labels of the D1 mini
- fixed: LED+ is now LOUT
- fixed: temp sensor now works

## v1.0
The first release.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<a href="https://www.buymeacoffee.com/schluggi" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/white_img.png" alt="Buy Me A Coffee" style="height: auto !important;width: auto !important;" ></a>

> __WARNING!__ The PCB is not tested yet. I'll remove this info after my order arrived and got tested.
>
> **Update**: after testing v1.0: It does work but only with a lot of modifications. So lets test v1.1...
## Description
I love the idea of GreatScott`s [Online Water Tracker](https://www.youtube.com/watch?v=BNK92ep8DhY), but unfortunately
Expand All @@ -18,8 +20,9 @@ The PCB has also some improvements:
- Extra connection for waterflow-sensors with temperature sensor

## Images
[<img src="images/v1.0/pcb_3d.jpg" width="495"/>](images/v1.0/pcb_3d.jpg)
[<img src="images/v1.0/pcb.jpg" width="400"/>](images/v1.0/pcb.jpg)
[<img src="images/v1.1/pcb_3d.png" width="495"/>](images/v1.1/pcb_3d.png)
[<img src="images/v1.1/pcb.png" width="400"/>](images/v1.1/pcb.png)
[<img src="images/v1.1/schematic.png" width="800"/>](images/v1.1/schematic.png)

## How to order?
Before you order the PCB, make sure you had all components need. You can find them
Expand All @@ -34,7 +37,7 @@ printed on the PCB (for aesthetic reasons).

[<img src="images/order_jlcpcb.jpg" width="1000"/>](images/order_jlcpcb.jpg)

After all you got 5 PCBs for less than 10€.
After all you got 5 PCBs for less than 10€.

## Questions
Just open an issue :)
Expand Down
108 changes: 108 additions & 0 deletions esphome/v1.1/esphome.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
esphome:
name: waterflow-shower

esp8266:
board: d1_mini

substitutions:
prefix: Bathroom Shower

# Enable logging
logger:

# Enable Home Assistant API
api:
encryption:
key: "<secret>"

ota:
password: "<secret>"

wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
ap:
ssid: "Waterflow-Shower"
password: "12345678"

captive_portal:

sensor:
# https://esphome.io/components/sensor/ntc.html
- platform: ntc
sensor: resistance_sensor
calibration:
# do your own measurements and change it here
- 159.910kOhm -> 0°C
- 52kOhm -> 20°C
- 3.090kOhm -> 100°C
name: ${prefix} Water Temperature

# https://esphome.io/components/sensor/resistance.html
- platform: resistance
id: resistance_sensor
sensor: source_sensor
configuration: DOWNSTREAM
reference_voltage: 3.3V
resistor: 22kOhm

# https://esphome.io/components/sensor/adc.html
- platform: adc
id: source_sensor
pin: A0
filters:
# adjust these values if the log shows other values then you can measure
- multiply: 3.3
- offset: -0.1

# https://esphome.io/components/sensor/pulse_counter.html
- platform: pulse_counter
pin: D6
update_interval : 1s
unit_of_measurement: 'L/min'
name: ${prefix} Water Meter
filters:
- multiply: 0.001835 # (400 pulses per L -> 1/545=0.001835)
total:
name: ${prefix} Water Meter Pulses Total

switch:
# https://esphome.io/components/sensor/ntc.html#self-heating
- platform: gpio
pin: D0
id: ntc_vcc

# https://esphome.io/components/binary_sensor/gpio.html
- platform: gpio
pin: D2
id: esp_power_off
restore_mode: ALWAYS_OFF

binary_sensor:
# https://esphome.io/components/binary_sensor/gpio.html
- platform: gpio
pin: D7
name: ${prefix} Water Flow
on_release:
- delay: 1s
- switch.turn_on: esp_power_off
filters:
- delayed_off: 10s

button:
- platform: template
name: ${prefix} Power Off
id: my_button
icon: "mdi:power"
on_press:
- switch.turn_on: esp_power_off

interval:
# https://esphome.io/components/sensor/ntc.html#self-heating
- interval: 10s
then:
- switch.turn_on: ntc_vcc
- delay: 1s
- component.update: source_sensor
- delay: 1s
- switch.turn_off: ntc_vcc
Loading

0 comments on commit 1d2fcda

Please sign in to comment.