Are you powering the sensor over the DQ line ("parasitic power")?
https://www.analog.com/en/technical-art ... works.html
Things to try:
1. changing the sample timing of the 1-wire signals
2. lower the slew rate ("drive strength") of the ESP's IO pin (gpio_set_drive_capability(...))
3. lower the value of the data line's pull-up resistor; you can try down to about 1kOhm or so.
4. create an "active pull-up" via an extra GPIO pin (and a resistor)
5. power the sensor from a dedicated power line instead of via DQ.
I don't know which, if any, of 1, 2 & 4 are directly supported in esphome.
How to make my pool heating system smart
-
- Posts: 1706
- Joined: Mon Oct 17, 2022 7:38 pm
- Location: Europe, Germany
Re: How to make my pool heating system smart
Yay, figured it out!
Gave it 5v instead of 3.3 and all is working now!
Will go into deeper analysis in final results and post back with a final wiring diagram for reference purposes!
Gave it 5v instead of 3.3 and all is working now!
Will go into deeper analysis in final results and post back with a final wiring diagram for reference purposes!
-
- Posts: 1706
- Joined: Mon Oct 17, 2022 7:38 pm
- Location: Europe, Germany
Re: How to make my pool heating system smart
Glad you got it working
I'd caution against sending 5V into an ESP's IO pins though as this may cause issues on the 3.3V power rail and/or damage the ESP over time.
I'd caution against sending 5V into an ESP's IO pins though as this may cause issues on the 3.3V power rail and/or damage the ESP over time.
Re: How to make my pool heating system smart
Hi,
Sorry for delay in with my final reply. Autumn arrived, and with it pool usage diminished and will to get everything up and running quickly also diminished, anyways have finally completed everything and have final result.
So firstly, let me summarize what happened in the meantime in bullets:
In term of components here is my final list:
Thank you and all the best!
Sorry for delay in with my final reply. Autumn arrived, and with it pool usage diminished and will to get everything up and running quickly also diminished, anyways have finally completed everything and have final result.
So firstly, let me summarize what happened in the meantime in bullets:
- When I changed to 5v, even thou it seemed to work, readings ended up being random, with most of the times not having a correct reading
- At a later stage I also started getting other problems with connecting to wifi with "Auth Expired"
- Eventually I changed my wiring setup (see bellow), which fixed the "Auth Expired", however, readings from the pool where mostly still not working
- Changed power supply to one I knew for sure was a good power supply
- Also changed platform from "dallas" to "dallasng"
- Now everything is working great, with the 30m cable and thus getting readings from the pool
Code: Select all
esphome:
name: pool-sensors
on_boot:
priority: 200
then:
- wait_until:
condition:
wifi.connected:
timeout: 30s
esp32:
board: nodemcu-32s
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
password: ""
ota:
password: "REMOVED"
wifi:
ssid: "SSID"
password: "REMOVED"
external_components:
- source: github://nrandell/dallasng
dallasng:
- pin: GPIO17
sensor:
- platform: dallasng
address: 0x876c6ef6442c7628
name: "Pool Dallas Temperature Sensor"
resolution: 10
filters:
- filter_out: NaN
- platform: adc
pin: GPIO33
name: "Pool Voltage Sensor"
update_interval: 60s
accuracy_decimals: 0
raw: true
filters:
- multiply: 0.095238
- lambda: !lambda |-
if (x < 6) {
return 0;
} else {
return 220;
}
output:
- HiLetgo ESP-WROOM-32 ESP32 board (https://www.amazon.es/dp/B0718T232Z)
- DS18B20 Temperature sensor + Adaptor (https://www.amazon.es/dp/B089ZVWJ5R?th=1)
- 220V AC Mains Sensor / Optocoupler Isolation Module Ac 220v (https://www.fruugo.pt/modulo-de-isolame ... -153246353)
Thank you and all the best!
Who is online
Users browsing this forum: No registered users and 93 guests