Skip to content
Gajdos Tamás edited this page Nov 9, 2021 · 13 revisions

How I wired up my lab

In the past I used very random quality cabling with bad connections. I told myself that this network will be only temporary. For months it worked fine, but later some DS18B20 sensors went missing or reported 85°C. So I rewired the whole network (Raspberry Pi 1B+, 6xDS18B20, 4k7 resistor, ~15 m of telephone cable, RJ11 connectors and passive hubs). And all the problems went away.

This page is only a recommendation.

Wiring

I recommend using 4-wire flat telephone cable (braided copper 4x7x0.12mm, AWG 28). The used wires are:

  • Yellow - VCC
  • Green - OneWireData
  • Red - Not used
  • Black - GND

The cable is crimped into an RJ11 connector. (From top to bottom: yellow-green-red-black)

Note: Sometimes the black and red wires are not in order. If this is the case I cut out the red wire and bend the black one a little bit to be in the fourth hole.

Passive hub wiring

Note: This was my initial testing setup, where I read out the sensor IDs.

You have to open the telephone hub and reorder the wires. In this setup the 4k7 resistor was placed inside the first hub. In later setups I soldered it directly onto the raspberry pi. The order is the same:

  • Yellow - VCC
  • Green - OneWireData
  • Red - Not used (I might connect a DHT22 onto this wire later)
  • Black - GND

Note: The DHT11, DHT22, AM2302 sensors are very keen on the wiring length (<1m) and wiring quality. I hate them.

Clone this wiki locally