-1

I am querying the DHT22 for temperature and humidity data, hooked on a Raspberry Pi Zero WH. My current setup works, and is as shown in the first picture, courtesy of the tutorial from PiMyLifeUp.

The current arrangement, as defined by the tutorial

Pin 1 is the VCC, connected (red) to Pi's 3.3V pin. Pin 2 is the DOUT, connected to Pi's GPIO4 pin. Pin 3 is null (my sensor does not even have it available). Pin 4 is GND, connected to Pi's GND.

There is a 10k ohm resistor as well. According to the tutorial's author it is used to " “pull-up” the input to HIGH to ensure that we have a defined valid logic level for when the pin is switching from input to output".

I want to power the sensor via an external 3.3V power module (shown in the second picture) which will be connected to the breadboard's power line. I plan to have the sensor's pin 1 connected directly to the breadboard's power line; pin 2 still connected to Pi's GPIO4, and pin 4 to be connected to the breadboard's GND line which is also connected to the power module. Is this possible, and does it need the 10k ohm resistor anywhere?

I don't yet have a multimeter to check what fluctuations I would cause by changing the arrangement. This is my first electronics project, so I am not sure what holes in knowledge I have with regards to circuits.

Thank you for your time.

The power supply which I want to power the breadboard with

2 Answers2

0

Not that you asked but the Adafruit code, while it works, is notoriously unreliable and overly complex.

See Reliable temperature/humidity logging with Python and a DHT11

Milliways
  • 62,573
  • 32
  • 113
  • 225
0

That power supply module would work However: You would need to connect the grounds of both power supplies, if you do not it will range from not working, bad results to frying the Pi. That includes a broken or open wire. That power supply module, which is designed for a plug board, has voltage selector jumpers, placing it on 5V could damage the Pi. Consider placing some resistance, maybe 100 ohm, in the data line. Reason if you use long leads they can pick up noise and damage the Pi. If the leads are more than about 1/2 meter use twisted wires. My recommendation without knowing your resources and considering it draws 1.0mA I would seriously consider powering it with the Pi taking appropriate cautions. Do not forget the 100nF cap recommended on the data sheet. Seriously consider getting a multimeter, a inexpensive one would be less then $10.00 US.

Gil
  • 1,288
  • 6
  • 5