DavidAntliff / esp32-ds18b20-example

ESP32-compatible example for Maxim Integrated DS18B20 Programmable Resolution 1-Wire Digital Thermometer.
MIT License
109 stars 34 forks source link

is it also possible to use the internal pull up? #7

Closed drtyhlpr closed 4 years ago

drtyhlpr commented 4 years ago

hi, thanks for your great work! is it also possible to use the internal pull up functionalty available at almost any gpio :)?

DavidAntliff commented 4 years ago

You could try with a few minor code changes, however on the ESP32 the pull up resistance is 45kOhm which is an order of magnitude larger than the recommended ~4k7Ohm for a one-wire bus. This might have a detrimental effect on the signal rise time.

Also, if you are using parasitic mode (not tested with this library), then bear in mind that this pull-up is powering the DS18B20 when the bus is idle, and such a high resistance (and current limit on the GPIO itself) might be too limiting.

Give it a go, see if it works! If it does, please report back and we can add it as an option.

drtyhlpr commented 4 years ago

thanks for all the infos, i ll give it a try soon and send/give/pull some feedback!

DavidAntliff commented 4 years ago

I'll close this for now - please comment/re-open if you make any progress with this.