I have a DS18B20 temperature sensor which I am trying to use in parasite power mode with only two wires (data line and ground) with my Raspberry Pi Zero W. I've connected it to the RPi in the following way:
(i.e. GND DS18B20 -> GND RPi
DQ DS18B20 -> GPIO4 RPi
Vdd DS18B20 -> GND RPi)
As per pg. 4 of the temp sensor datasheet the Vdd pin must be tied to ground in parasite power mode.
I'm using Timo Furrer's Python package and CLI tool, w1thermsensor, to interface with the temp sensor. The command line interface provides a way to list all OneWire temperature sensors connected to the bus with:
In /boot/config.txt, I've added the line
dtoverlay=w1-gpio,pullup=1 but when I run
w1thermsensor ls at the command line, it returns
Found 0 sensors:
I've read on more than one forum that you must use an external 4.7K pullup resistor between 3V3 and the GPIO pin, but I struggle to see why this is the case. Doesn't the above addition to config.txt connect the internal pullup resistor between 3V3 and GPIO4 (GPIO4 is default for w1-gpio overlay), and hence I wouldn't need to use an external pullup?
I did find on this Github comment that the pullup in a RPi can be 50-60KOhms, so may not supply enough current? In the same Github comment a "use-at-your-own-risk overlay" called w1-gpio-intpullup-overlay.dtb is provided for download. But how would that differ from adding
dtoverlay=w1-gpio,pullup=1 to /boot/config.txt?
TL;DR - I'm trying to use the DS18B20 temperature sensor in parasite power mode using only the data line and ground connections, and activating the internal pullup resistor on the data line instead of using an external pullup. However, the command line interface I'm using isn't registering the sensor in this configuration.