krrishdheeraj
Posts: 2
Joined: Tue Aug 21, 2018 4:55 pm

If I connect 5V output sensor directly with raspberry pi 3b+ so it is harmful for my raspberry pi. Yes or No?

Sun Sep 16, 2018 6:21 pm

I want to make weather station with my raspberry pi 3b+ using my DHT11 temperature and humidity sensor so I watch many video in YouTube. I notice raspberry pi use 3.3V logic level or digital output of DHT11 is 5V. In all video I watch people connect DHT11 directly with raspberry pi. No logic level convert or resistor in between sensor or raspberry pi.
My question is if I connect 5V output of sensor connect directly with raspberry pi so it is harmful for my raspberry pi. Yes or No?

Thank you for help me.


wh7qq
Posts: 1124
Joined: Thu Oct 09, 2014 2:50 am

Re: If I connect 5V output sensor directly with raspberry pi 3b+ so it is harmful for my raspberry pi. Yes or No?

Sun Sep 16, 2018 7:11 pm

The DHT11 is always shown in instructions as having an external "pull-up" resistor to the 5V supply (4.7k to 10K) as in the following instruction: https://learn.adafruit.com/dht-humidity ... ing/wiring. Unfortunately, these instructions show the breadboard accessory rather than the actual connections to the RPi. As it is then connected to the RPi input, it is likely to be an "open collector" type output...possibly not harmful by itself. Still, you may not get a dependable reading without it. The 1 manufacturers doc I found did not show the output structure of the DHT11 but did indicate that the pull-up resistor (from the output to 5V) was required. As the output is digital, that tells me that the "active" state is low and the high state floats if not pulled up. Never, ever connect the 5V supply directly to an RPi input (unless you really want to buy a replacement)!

hippy
Posts: 3880
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: If I connect 5V output sensor directly with raspberry pi 3b+ so it is harmful for my raspberry pi. Yes or No?

Sun Sep 16, 2018 7:11 pm

krrishdheeraj wrote:
Sun Sep 16, 2018 6:21 pm
digital output of DHT11 is 5V
The datasheet I have for the DHT11 describes the bi-directional data line as open drain so it is not technically a 5V output.

User avatar
joan
Posts: 13578
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: If I connect 5V output sensor directly with raspberry pi 3b+ so it is harmful for my raspberry pi. Yes or No?

Sun Sep 16, 2018 10:05 pm

There is no general answer for a sensor.

There is not even a simple answer for the DHT11 as many are built into modules with extra circuitry on board.

If you mean the 4 pin DHT11 sensor then the following applies.
  • The DHT11 will work when powered from 3V3. If you do that you don't have to worry about the output level.
  • Alternatively power from 5V and pull-up the output pin to 3V3 through a 5k resistor.

Return to “General discussion”