I'm intending to use DHT22s to get temperatures from multiple sites using a RPi2.
Since I'm not much of an electronics guy, how many DHT22s can I connect? From the schematics, it uses the 3V port for power, and RPi has 2 of those only.
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It only takes a minute to sign up.
Sign up to join this communityI'm intending to use DHT22s to get temperatures from multiple sites using a RPi2.
Since I'm not much of an electronics guy, how many DHT22s can I connect? From the schematics, it uses the 3V port for power, and RPi has 2 of those only.
You can connect as many as you have spare gpios, so potentially 26 on the 40 pin expansion header Pis.
There is a variant which claims to use the I2C bus (it has a designation of something like AM2321). You could potentially connect a hundred of those. However I2C is a short distance bus (50 cm say) so your multiple sites will have to be close together. Also I have seen doubts raised about how well the device implements I2C.
All the Pis gpios are 3V3. For any distance you should be powering the devices from 5V and using a suitable divider to feed 3V3 to the Pis gpios.
You can feed multiple devices from one 3V3 or 5V pin (port in your terms).
Please remember the Pi expansion header has many pins, not all are connected to gpios. You connect the output of a DHT22 to an individual gpio. You power the DHT22 from the 3V3 or 5V power rails and the ground (0V) rail.
pin pin
3V3 1 2 5V
0/2 (SDA) 3 4 5V
1/3 (SCL) 5 6 0V
4 7 8 14 (TXD)
0V 9 10 15 (RXD)
17 (ce1) 11 12 18 (ce0)
21/27 13 14 0V
22 15 16 23
3V3 17 18 24
10 (MOSI) 19 20 0V
9 (MISO) 21 22 25
11 (SCLK) 23 24 8 (CE0)
0V 25 26 7 (CE1)
.......
0 (ID_SD) 27 28 1 (ID_SC)
5 29 30 0V
6 31 32 12
13 33 34 0V
19 (miso) 35 36 16 (ce2)
26 37 38 20 (mosi)
0V 39 40 21 (sclk)
As joan says, you cannot easily make several DHT22:s share a gpio pin.
If you only want temperatures and don't care about humidity, you can look at the DS18B20, also on Adafruit. For outdoors use you can get a waterproof version. Several of these can be connected to the same I/O pin. Adafruit has a great tutorial about connecting them to the Pi and reading the temperature.
I've also found that DS18B20:s handle long cables (several meters) better than the DHT11, which is similar to the DHT22.