-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

  • 1
    "I want to power the sensor via an external 3.3V power module" WHY??? - it only uses ~1mA – Milliways Dec 25 '21 at 11:17
  • 1
    NEVER - ABSOLUTELY never connect ANY power source to Pi pin 1 If you do you will have a dead Pi! – Milliways Dec 25 '21 at 11:19
  • I did not intend to connect any power source to Pi pin 1. And the DHT22 is rated for a power supply between 3.5 to 5 V on its VCC pin: https://components101.com/sensors/dht22-pinout-specs-datasheet ; the power supply's maximum current is 700 mA. Correct me if I am wrong- but a component will only draw the current it needs, and not the maximum output available. – straits Dec 25 '21 at 15:48
  • Yeah, whilst in some cases you can power the RPi via 5V applied to Pin 2 (and Pin 6 as Ground) instead of via the Power USB connector (in one of my unit's case because it is connected to an Raspberry Pi specific UPS) - you do not want to apply a supply to Pin 1 as that is a power output only - it is derived internally on the RPi board from the 5V line. – SlySven Dec 25 '21 at 18:30

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
  • 59,890
  • 31
  • 101
  • 209
  • There's a comment underneath your answer in the link; it states that this reliability issue with DHT22 is not a software problem and may happen regardless of the code. – straits Dec 25 '21 at 15:56
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,228
  • 4
  • 5