Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dallas): make recovery time for 1-bit equal to that of 0-bit #6763

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

muggenhor
Copy link

@muggenhor muggenhor commented May 16, 2024

What does this implement/fix?

Without this detection of DS18B20 sensors attached along a 10 meter wire fails on an ESP32-C3 (Wemos C3 pico). 58 μs also works when on 5V, on 3.3V however it starts to become unpredictable and fail somewhere between 1/3 and 2/3 of the time.

FYI: I've got 6 sensors in total for my setup. Soldered equidistant along a single cable (3 wires) of about 10m long. Tested both by powering from the board's 3V3 pin as well as the 5V pin. In both cases the data line had a single 4.7 kΩ pull-up resistor between the data and positive power line. (I've tried 2.2 kΩ @ 5V too before writing this patch, it didn't make a difference).

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other

Test Environment

  • ESP32
  • ESP32 IDF
  • ESP8266
  • RP2040
  • BK72xx
  • RTL87xx

Example entry for config.yaml:

esphome:
  name: temperature-sensors

esp32:
  board: lolin_c3_mini
  framework:
    type: arduino

dallas:
  - pin: GPIO6

sensor:
  - platform: dallas
    address: 0xXXXXXXXXXXXXXX28
    name: A
    accuracy_decimals: 2

Checklist:

  • The code change is tested and works locally.
  • Tests have been added to verify that the new code works (under tests/ folder).

If user exposed functionality or configuration variables are added/changed:

Without this detection of DS18B20 sensors attached along a 10 meter wire
fails on an ESP32-C3 (Wemos C3 pico). 58 μs also works when on 5V, on
3.3V however it starts to become unpredictable and fail somewhere
between 1/3 and 2/3 of the time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant