lobstervomit
Posts: 2
Joined: Mon Jul 13, 2015 6:20 am

Extending the cable between the Pi and a DHT22 sensor

Mon Jul 13, 2015 7:11 am

Hey guys, so I'm super new to the Raspberry pi and I'm trying to use a wired DHT22 sensor to monitor the temperature and humidity of an incubator I'm using in a science lab to grow bacteria. The Pi will be resting on a table and will require at least 2 metres of cable that will extend into the incubator. I was thinking of using a UTP cable to do this but I'm not sure how the UTP cable will be connected to the Pi.

So the plan is to connect the sensor to the Pi via a UTP cable using 3 out of the 8 wires, where there is a connection between
the 3.3V pin of the Pi and the first pin of the DHT22
a data pin (say GPIO 4) on the Pi and to the second pin of the DHT22
a Ground pin of the Pi and to the 4th pin of the DHT22

I am not entirely sure how to connect the UTP cable to the pins of the raspberry pi. Would soldering the wires directly to the pins work? I'm trying to avoid using a breadboard since I'm trying to make the device as compact as possible. Also since it's going into a humid environment, i'm trying to limit the amount of exposed metal (So i can't use a grove pi, connected to UTP cable, connected to a RJ45 to grove adaptor since the adaptor is all metal.)

If anyone can help me I would be forever grateful! 8-)

JimmyN
Posts: 1109
Joined: Wed Mar 18, 2015 7:05 pm
Location: Virginia, USA

Re: Extending the cable between the Pi and a DHT22 sensor

Mon Jul 13, 2015 4:26 pm

I wouldn't leave the other 5 wires "floating", they'll serve as an antenna and could give you erratic signals on your data line, especially since it's 2 meters long. I'd use one wire for power, one for data, and connect the other six together as your ground "wire".

You could solder directly to the pins, but that would be rather permanent. How about the female type "Dupont" breadboard jumpers/connectors? Get some 12" long or so, cut one end off and solder them to the wire from the cable. Then you'd have three single pin connectors you could plug/unplug without doing anything permanent to the Pi. If you have any PC "junk" lying around the connecters used to connect the front panel to the motherboard will work. But they are usually 2 or 3 pin, so if the pins you want to use on the Pi are not adjacent then you're back to needing single connectors.

drgeoff
Posts: 10831
Joined: Wed Jan 25, 2012 6:39 pm

Re: Extending the cable between the Pi and a DHT22 sensor

Mon Jul 13, 2015 4:47 pm

If you are content to have soldered connections I would suggest making them to the existing solder joints between GPIO pins and the underside of the PCB.
Quis custodiet ipsos custodes?

lobstervomit
Posts: 2
Joined: Mon Jul 13, 2015 6:20 am

Re: Extending the cable between the Pi and a DHT22 sensor

Tue Jul 14, 2015 1:46 am

Thanks a lot for your responses!

if I were to connect the 6 wires to the ground, does that mean I would need to solder the tips of them to make a mega single connection?

JimmyN
Posts: 1109
Joined: Wed Mar 18, 2015 7:05 pm
Location: Virginia, USA

Re: Extending the cable between the Pi and a DHT22 sensor

Tue Jul 14, 2015 10:15 am

You could use 3 for ground, 3 for power, and 2 together for signal. Paralleling would also decrease the amount of voltage drop since it's 2 meters long and small gauge wire.

Return to “Beginners”