ricknelsonmos
Posts: 3
Joined: Tue Feb 07, 2017 5:09 pm

Help with connecting multiple DHT22 to pi 3b

Tue Feb 07, 2017 5:35 pm

Hey guys I'm new to the Pi and wanting to make a project for my house to monitor 3 zones with temp and humidity.
Looking around i found the DS18B20 that i can run all on 1 pin from the gpio for the data line. (Dallas 1 wire connection)
However that only does temp, and i need humidity as well. So the DHT22 (or the AM2302 as I will order it) looks like the way to go.
But that does not support the Dallas 1 wire on the i2c and I have not seen anyone out there running more than 1 (been looking for a few hours now)
I will not be using a breadboard, they will go directly to the gpio pins, and will be about 3 meters long (do I need to use another pull up resistor? According to adafruit, there is a 5.1k resistor in the AM2302 already) and from the research I have done, I would have to use the 5V not the 3.3V correct?
And the last is, what software will get this to work with all 3 (I'm assuming some type of python library?) I see adafruit says they have this for Arduino but not for Raspberry Pi...

Thank you in advance
Rick

mosespi
Posts: 431
Joined: Mon May 12, 2014 3:35 pm
Location: 34,-118
Contact: Website

Re: Help with connecting multiple DHT22 to pi 3b

Tue Feb 07, 2017 10:01 pm

Yes, generally anything that hooks back into your Pi GPIO.. you would want to power it with 3.3v (assuming it will work at that voltage), so what comes back as data will likely be 3.3v. If you use 5v to power it, there is a strong chance that the data output will be 5v and destroy your GPIO pin and/or your Pi. I've ran one of those DHT22 from 3.3v and it was fine, although I'm not sure what resistor they used on my module.

I used the AdafruitDHT.py examples found here:
http://www.instructables.com/id/Raspber ... /?ALLSTEPS

The actual command line was slightly different for me.. but pretty simple.. you just specify the type of sensor and the GPIO pin it's attached to. While I have not had two sensors working at the same time, the writeup shows it, and I don't see why it would be a problem.

Regards,
-Moses
Power problems? MoPower UPS for the Pi
http://www.allspectrum.com/mopower/

judy19
Posts: 1
Joined: Mon Nov 13, 2017 4:36 am

Re: Help with connecting multiple DHT22 to pi 3b

Mon Nov 13, 2017 4:54 am

i am using multiple am2302 sensors in rpi 3b using pins 17,22 and 27. However, i have a problem with the code because it won't display all the read data. And also, the humidity of the sensors reached around 3311 %

Return to “Other projects”

Who is online

Users browsing this forum: Yahoo [Bot] and 12 guests