User avatar
Posts: 2
Joined: Wed Jan 31, 2018 8:56 pm
Location: Serbia

DH11 Sensor over longer distance

Wed Jan 31, 2018 9:19 pm

Hello everybody!

This is my first post and I`m new to the forum as well!

I am working with RPi for some time now (only as a hobby, I like the DIY projects! :D ) but now I encountered an issue I cant seem to resolve so I thought to turn for the community for help.

Namely, I have a DH11 temp+humidity sensor hooked up to my RPi3 and using the code below as test:

Code: Select all

import sys
import Adafruit_DHT
while True:
    humidity, temperature = Adafruit_DHT.read_retry(11, 23)
    print 'Temp: {0:0.1f} C  Humidity: {1:0.1f} %'.format(temperature, humidity)
And it is all working correctly while its on my table and on the breadboard (small a few centimeters of distance between the sensor and the RPi), but when I try to hook it up on a longer distance (about 15-20m) the output of the sensor is crazy saying that the humidity is about 190% and the temp is 12*C (which while on the breadboard its showing 24*C and 45% humidity). The cable I`m using for this is CAT-5E full copper and the sensor is hooked up on the 3.3V pin (tried even the 5V pin over 20m but same result).

I`m working in a T-shirt and shorts and its not cold so I figured that the sensor may want to trick me :)

Joking aside, I suppose there can be 3 different causes for this:
1. Distance, so its loosing signal and somehow the signal should be strengthened.
2. The signal is interfered within the walls, because its running next to other CAT-5E cables (but currently they are not in use! so they are just sitting there)
3. The sensor must be calibrated somehow, since its detecting temp changes and humidity changes even over the 20m distance, but of course the values are incorrect.

So I wanted to reach out to the helpful community in hopes that someone can help me in resolving my agonies with the sensor and the distance.

Thank you in advance! :)


User avatar
Posts: 376
Joined: Tue May 08, 2012 9:11 am
Location: UK
Contact: Website

Re: DH11 Sensor over longer distance

Fri Feb 02, 2018 2:12 pm

Presumably you are using the DHT11 - rather than DH11.

That particular sensor only has a small range of around 20cm when run at 3.5V. If connecting to the GPIO 3.3V then that will likely drop off sooner.
Using a 5V supply may not help either as you still need to use 3.3V for the pull-up resistor to avoid damage to the GPIO pins on the Pi.

Instead I would suggest using a DHT22. I haven't actually used the DHT22 as it is more expensive (about twice the price), but as well as increased accuracy it can have a much longer cable (max 20m).

User avatar
Posts: 2
Joined: Wed Jan 31, 2018 8:56 pm
Location: Serbia

Re: DH11 Sensor over longer distance

Mon Mar 26, 2018 8:32 pm

Hi penguintutor!

You are correct, I`m using a DHT11 (was a typo).

Thank you very much for the reply, I will order the DHT22 and try it with that and update the post about the output.


Return to “Interfacing (DSI, CSI, I2C, etc.)”