How to connect temperature sensor to Raspberry Pi

R PiHome+  can remote heating system, display and record into the database the temperature of more than 10 conected temperature sensors. After connecting all of the temperature sensor, select one as primary. The central heating system is regulated by the primary sensor. 


The  “1-wire” temperature sensor can be connected in parallel . All sensors should share the same pins and you only need one 4.7K resistor for all of them

  • Connect Black (GND) wire with GND pin of the Raspberry PI
  • Connect Red (VCC) wire with 3.3V pin of the Raspberry PI
  • Connect White/Yellow (DATA) wire  with pin number 7
  • Put the 4.7kΩ resistor between DATA wire and VCC wire.

After connecting to R PIHome, the new temperature sensor will be recognised and  the current temperature will be display  on the ‘heating page’.

If you need to extend wires, we recommend to use CAT5 cable. If there is a problem with reading temperatures, try to use lower resistor (3.3kΩ, 2.2kΩ)

Connect the data and ground to one pair of wires – blue/blue-white for example. Use a single wire from another pair for 3.3 volt power. Leave all other wires unconnected – do not attach them to ground.

Also avoid the temptation to double-up wires to reduce resistance.
Doubling up wires dramatically increases capacitance on the data circuit, as does grounding unused lines. The increased capacitance distorts the waveform, potentially putting the pulses outside the required limits, and so resulting in the one-wire system not communicating with the sensors.

connect temperature sensor to raspberry pi, home automation
Temperature Sensor & Raspberry Pi – Connecting diagrem


Leave a Reply