
Connect GND and DQ to one of the pair, and 3.3V on another wire pair. Use low capacitance cable if you plan to place sensors far away, 10 -100m. When the 1-wire peripheral is enabled in the raspberry, GPIO4 is configured as data in/out pin, which connects to DS18B20 data (DQ) pin.

A pullup resistor of 4.7kOhm have been connected between +3.3V and GPIO4. It is important to connect the DS18B20 Vcc pin to +3.3V as the raspberry GPIO port is runned on 3.3V. The circuit drawing below shows how to connect four DS18B20 sensors to the Raspberry GPIO. Connect the DS18B20 sensors to the raspberry IO. The Raspberry Pi will reboot and the interface will be enabled ready for use.Ģ. When prompted to reboot highlight and activate. Highlight the “1-wire” option and activate : This will start the raspi-config utility. Open the command line CLi terminal and execute the following bash command that will start the raspberry config utility: The default Raspbian image disables the interface by default so before you can use it we must make a configuration change. Low cost 1-wire devices such as the DS18B20 temperature sensor commonly connects to this port.

It provides low-speed data, signaling, and power over a single conductor. The Raspberry Pi Rasbian operating system has a 1-wire bus driver that can use GPIO4 as data in/out if enabled.
