Good day everyone. I have an Raspberry Pi2B + two DTH22 sensors ( https://www.aliexpress.com/item/2-pcs-D ... 21151.html)
To read sensors data, I am using ADAfruit Python DTH library - https://www.instructables.com/id/Raspbe ... midity-lo/
Then I connect sensors with a short cables (approximatly 30 cm) to Raspberry Pi2B, everything goes fine, I can read temperature and humidity from both sensors.
I want to put one sensor outside the window to measure weather, so i connect this DTH22 sensors to Pi2 with a wire (LAN) with length about 1.5 meters. And my DTH22 fail to work. Now it is ureachable, or read some strange data, for example humidity 3388%.
Have anyone tested, that is the maximum length of a cable to connect DTH22 to RPI2B?
-
- Posts: 81
- Joined: Tue Jan 12, 2016 1:53 pm
Re: Rapberry Pi2 B + DHT 22 - ERROR THEN WIRE LENGTH >1METER
Hi.
Did you even bother to google the question.
first result in a list of about 218,000 results
http://www.home-automation-community.co ... -as-chart/
The maximum cable length can be up to 30 meters / 98 feet if you use 5 V power and 1 meter / 3.3 feet if you use 3.3 V power (see Datasheet).
Did you even bother to google the question.
first result in a list of about 218,000 results
http://www.home-automation-community.co ... -as-chart/
The maximum cable length can be up to 30 meters / 98 feet if you use 5 V power and 1 meter / 3.3 feet if you use 3.3 V power (see Datasheet).
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported
The use of crystal balls & mind reading are not supported
-
- Posts: 81
- Joined: Tue Jan 12, 2016 1:53 pm
Re: Rapberry Pi2 B + DHT 22 - ERROR THEN WIRE LENGTH >1METER
I knew, that according to Google, the maximum length is up to 30 meters, but have anyone test it? As a fact, I cannot read values from sensor at a lenght over 1.5 meters
-
- Posts: 81
- Joined: Tue Jan 12, 2016 1:53 pm
Re: Rapberry Pi2 B + DHT 22 - ERROR THEN WIRE LENGTH >1METER
Oh MAN, 30 meters if power supply 5V and only 1 meter if power supply 3.3 V. I will test later
-
- Posts: 357
- Joined: Sat Apr 29, 2017 10:36 am
- Location: Denmark
Re: Rapberry Pi2 B + DHT 22 - ERROR THEN WIRE LENGTH >1METER
If the wire is too long or too thin the voltage will drop to a point where the sensor does no longer work. Try to put your wire, voltage and amp into this calculator and see how it goes: http://www.calculator.net/voltage-drop-calculator.html
I doubt this is true, but it depends on the used wire gauge.rpiuser2016 wrote: ↑Mon Oct 23, 2017 11:27 amOh MAN, 30 meters if power supply 5V and only 1 meter if power supply 3.3 V. I will test later
Glowing in the dark!
-
- Posts: 81
- Joined: Tue Jan 12, 2016 1:53 pm
Re: Rapberry Pi2 B + DHT 22 - ERROR THEN WIRE LENGTH >1METER
I am using good and thick wire, I have tested voltage on a sensors pins of DHT22:
3.27 V if power supply 3.3 V,
4.96 V if power supply 5 V
3.27 V if power supply 3.3 V,
4.96 V if power supply 5 V
-
- Posts: 4274
- Joined: Thu Dec 27, 2012 4:05 am
- Location: Québec, Canada
Re: Rapberry Pi2 B + DHT 22 - ERROR THEN WIRE LENGTH >1METER
For outside connection using a DTH22 I prefer another method which imply no wire and it is good for 3 months.
viewtopic.php?f=44&t=104359&p=1156616&h ... 01#p742704
http://temp.is-very-nice.org
I do have the sensor outside for 2 years and it's working fine. It is also connected to my echo dots.
https://www.dropbox.com/s/zykyqqtk0fqpj ... e.MP4?dl=0
viewtopic.php?f=44&t=104359&p=1156616&h ... 01#p742704
http://temp.is-very-nice.org
I do have the sensor outside for 2 years and it's working fine. It is also connected to my echo dots.
https://www.dropbox.com/s/zykyqqtk0fqpj ... e.MP4?dl=0
-
- Posts: 4274
- Joined: Thu Dec 27, 2012 4:05 am
- Location: Québec, Canada
Re: Rapberry Pi2 B + DHT 22 - ERROR THEN WIRE LENGTH >1METER
Try to add a 0.1uF between the ground and vcc at the sensor. Also decrease the pull up resistor to 3K3, or put two 4K7 on both ends, to reduce the capacitance effect of the cable. A long cable increase de capacitance and also create reflection effect. By decreasing pull up resistor you increase de slew rate, making the waveform more square.I am using good and thick wire, I have tested voltage on a sensors pins of DHT22:
You could also power up your DHT22 with 5V and use a adafruit/sparkfun 3.3V converter. This is a mosfet which is activated by 0V only. On 3.3V and 5V the system only see the pull-up resistor.
-
- Posts: 81
- Joined: Tue Jan 12, 2016 1:53 pm
Re: Rapberry Pi2 B + DHT 22 - ERROR THEN WIRE LENGTH >1METER
I have tested a wire about 5 meters. It does not work on 3.3 V power, successfully works on 5V power. Tomorrow I will test a wire about 25-30 meters
Re: Rapberry Pi2 B + DHT 22 - ERROR THEN WIRE LENGTH >1METER
If you were using 5v to power your sensor I hope you converted the 5v signal back to the gpio to 3.3V or you will damage your pi.rpiuser2016 wrote: ↑Mon Oct 23, 2017 8:15 pmI have tested a wire about 5 meters. It does not work on 3.3 V power, successfully works on 5V power. Tomorrow I will test a wire about 25-30 meters
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported
The use of crystal balls & mind reading are not supported
-
- Posts: 81
- Joined: Tue Jan 12, 2016 1:53 pm
Re: Rapberry Pi2 B + DHT 22 - ERROR THEN WIRE LENGTH >1METER
Thanx. I think that the pull-up resistor is already assembled into this sensor - https://www.aliexpress.com/item/2-pcs-D ... 21151.html
As you can see, there are a blue board before DHT22
As you can see, there are a blue board before DHT22
-
- Posts: 81
- Joined: Tue Jan 12, 2016 1:53 pm
Re: Rapberry Pi2 B + DHT 22 - ERROR THEN WIRE LENGTH >1METER
Looking at the sensor it looks like you are pulling the output of the sensor up to VCC which when you run the sensor with a 5v supply as you have been you are pulling the output up to 5v .rpiuser2016 wrote: ↑Mon Oct 23, 2017 8:32 pmThanx. I think that the pull-up resistor is already assembled into this sensor - https://www.aliexpress.com/item/2-pcs-D ... 21151.html
As you can see, there are a blue board before DHT22
This means you are putting 5v on the pi gpio the pi gpio is not 5v tolerant and you will damage your pi.
if you are going to run your sensor on 5v do as danjperron said.
danjperron wrote: ↑Mon Oct 23, 2017 1:42 pmYou could also power up your DHT22 with 5V and use a adafruit/sparkfun 3.3V converter. This is a mosfet which is activated by 0V only. On 3.3V and 5V the system only see the pull-up resistor.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported
The use of crystal balls & mind reading are not supported
-
- Posts: 81
- Joined: Tue Jan 12, 2016 1:53 pm
Re: Rapberry Pi2 B + DHT 22 - ERROR THEN WIRE LENGTH >1METER
1) Pi 2B is not damaged without any additional resistor - every thing works fine for 2 week
2) DHT22 with supply of 5 V works perfect then wire length is about 6 meters
3) DHT22 with supply of 5 V does not work then wire length is more than 10 meters. It returns right value once per 10-20 attemps
2) DHT22 with supply of 5 V works perfect then wire length is about 6 meters
3) DHT22 with supply of 5 V does not work then wire length is more than 10 meters. It returns right value once per 10-20 attemps
Re: Rapberry Pi2 B + DHT 22 - ERROR THEN WIRE LENGTH >1METER
Did you try to connect with CAT5 one wire from cable? I read a year ago that CAT5 handle 3.3 V with 5 meters long wire. Try and writte comments about this to others to know!
Jadro
Jadro
Oracle backend database developer
SmartHome IoT & Microprocessor enthusiast and hobbyist
SmartHome IoT & Microprocessor enthusiast and hobbyist
-
- Posts: 81
- Joined: Tue Jan 12, 2016 1:53 pm
Re: Rapberry Pi2 B + DHT 22 - ERROR THEN WIRE LENGTH >1METER
CAT 5 wire with a power 3.3 V works not far then 1 meter