tdprince
Posts: 5
Joined: Fri Sep 02, 2016 1:55 pm

GPIO Wiring to CAT5 (or similar) with DHT22

Wed Oct 12, 2016 7:52 am

Hello and good morning,
I have done a raspberry pi project using a DHT22 and the Adafruit Python Library for that sensor. For now I connected the DHT22 Sensor to the GPIO using jumper wires (data, vcc, gnd) but I would like for the sensor to be at a higher distance from the raspberry pi board.

The board would be located in a safe and temperature controlled spot while the sensor would be on the outside (taking the temperature and humidity values and sending them to the raspberry pi board).

Now, I am totally new to the Raspberry Pi world and even newer to the wiring / cabling / soldering world so I have no idea what to look for, what names to search on google and so on.

What I have is a CAT5 cable of which I want to use 3 cables out of 8, each one connected to the jumper wires that would connect the CAT5 from one side to the sensor and from the other to the raspberry pi board.

Connection would be something like this:

Sensor (Data, VCC, GND) connected by female jumper to the CAT5
CAT5 connected to the raspberry pi board with female jumper

[DHT22]===[jumper]===[jumper]CAT5------------------------------------------------CAT5[jumper]===[jumper]===[RaspberryPi]

How would you go about doing that? Consider that I really know little to nothing about electronics and wiring!

Thanks a lot in advance!

shuckle
Posts: 565
Joined: Sun Aug 26, 2012 11:49 am
Location: Finland

Re: GPIO Wiring to CAT5 (or similar) with DHT22

Wed Oct 12, 2016 8:00 am

How long is the distance?
If more than 100m, I doubt it will work.

I would use the blue and brown lines as they are not used in normal ethernet. And you really should use only 3 cables (instead of combining 2 for example and use 6).

I have similar setups and it works without issues.

tdprince
Posts: 5
Joined: Fri Sep 02, 2016 1:55 pm

Re: GPIO Wiring to CAT5 (or similar) with DHT22

Wed Oct 12, 2016 8:25 am

The distance is about 4 or 5 meters, probably even less. I would like to use single cables instead of "pushing" them together.
3 out of the 8 cables that the Ethernet has. That is the general idea.

The problem is more about how to physically attach the jumpers with their heads to the wires of the Ethernet cable and than do it again with the other jumpers that attach the ethernet to the raspberry pi board!

shuckle
Posts: 565
Joined: Sun Aug 26, 2012 11:49 am
Location: Finland

Re: GPIO Wiring to CAT5 (or similar) with DHT22

Wed Oct 12, 2016 8:52 am

hmm. just solder them together?

tdprince
Posts: 5
Joined: Fri Sep 02, 2016 1:55 pm

Re: GPIO Wiring to CAT5 (or similar) with DHT22

Wed Oct 12, 2016 9:19 am

shuckle wrote:hmm. just solder them together?
So, I can pretty much twist the end of the 3 ethernet wires with the headless jumpers and solder the twists?

shuckle
Posts: 565
Joined: Sun Aug 26, 2012 11:49 am
Location: Finland

Re: GPIO Wiring to CAT5 (or similar) with DHT22

Wed Oct 12, 2016 9:24 am

tdprince wrote:
shuckle wrote:hmm. just solder them together?
So, I can pretty much twist the end of the 3 ethernet wires with the headless jumpers and solder the twists?
Yep

tdprince
Posts: 5
Joined: Fri Sep 02, 2016 1:55 pm

Re: GPIO Wiring to CAT5 (or similar) with DHT22

Wed Oct 12, 2016 9:24 am

shuckle wrote:
tdprince wrote:
shuckle wrote:hmm. just solder them together?
So, I can pretty much twist the end of the 3 ethernet wires with the headless jumpers and solder the twists?
Yep

Thanks everyone. Lots of love.

Massi
Posts: 1691
Joined: Fri May 02, 2014 1:52 pm
Location: Italy

Re: GPIO Wiring to CAT5 (or similar) with DHT22

Wed Oct 12, 2016 9:26 am

lan cables work well, it's not a problem
but you have to consider the sensor itself. On long distances, DHT22 sensors will not work powered with 3,3V, you'll need to power them with 5V (as far as i can remember, the datasheet speaks about longer distances than 1 meter)
And if you power them with 5V, you'll need to manage the data line since it will be at 5V and this will kill the pi if not lowered
To create "clean" calbes, you should buy some dupont female headers and crimp (or solder, if you do not have the crimper) them to the cable.

User avatar
rpdom
Posts: 14985
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: GPIO Wiring to CAT5 (or similar) with DHT22

Wed Oct 12, 2016 6:43 pm

Massi wrote:lan cables work well, it's not a problem
but you have to consider the sensor itself. On long distances, DHT22 sensors will not work powered with 3,3V, you'll need to power them with 5V (as far as i can remember, the datasheet speaks about longer distances than 1 meter)
And if you power them with 5V, you'll need to manage the data line since it will be at 5V and this will kill the pi if not lowered
The data line is open-collector, so the level is determined by the pull-up resistor. As long as that resistor is at the Pi end of the cable and linked between the data pin and 3.3V, you should have no trouble with powering the sensor from the 5V line.

Massi
Posts: 1691
Joined: Fri May 02, 2014 1:52 pm
Location: Italy

Re: GPIO Wiring to CAT5 (or similar) with DHT22

Wed Oct 12, 2016 8:12 pm

rpdom wrote:
Massi wrote:lan cables work well, it's not a problem
but you have to consider the sensor itself. On long distances, DHT22 sensors will not work powered with 3,3V, you'll need to power them with 5V (as far as i can remember, the datasheet speaks about longer distances than 1 meter)
And if you power them with 5V, you'll need to manage the data line since it will be at 5V and this will kill the pi if not lowered
The data line is open-collector, so the level is determined by the pull-up resistor. As long as that resistor is at the Pi end of the cable and linked between the data pin and 3.3V, you should have no trouble with powering the sensor from the 5V line.
dht22 are commonly available also in pre built board (or even in the AM2302 format), and i suppose the op is not using a bulk dht22 sensor, but a sensor board, since as you see, he speaks about "data, vcc, gnd" and no pullups, while the bulk sensor has 4 pins and no pullup embedded.

Return to “Beginners”