ESP32 DHT22 sensor doesn't work on some pins

Hello,

I am using the ESP32 Devkit V1 for a project for which I created a PCB with a DHT22 Temperature/Humidity Sensor connected to PIN 36 of the ESP32.
I use the adafruit dht library, but even with the "DHTtester" Example I get the "Failed to read from DHT Sensor!" error.
I tried different ESP boards and sensors, but the problem remains the same. Only when I change for example the pin to to pin 32 I get a correct reading. Unfortunately I can not change the pin so easily because the pcbs are already manufactured (yes I should have tested it in advance :roll_eyes: ). From the GPIO reference I did not see anything special about pin 36, except that it is input only - which seemed perfect for a sensor.

Is there anything I am missing? Do I have to adjust some settings that I can get Pin 36 to work as a sensor input on the ESP32?

Thank you very much in advance!

Florian

flo911:
pin 36, except that it is input only - which seemed perfect for a sensor.

True... if that is the kind of sensor that does not have to be queried actively, like the DHT22. So it's time for a PCB redesign.

wvmarle:
True... if that is the kind of sensor that does not have to be queried actively, like the DHT22. So it's time for a PCB redesign.

:-X

Okay thank you, if there is no other option...

One obvious solution for your current PCB would be: set pin 36 to INPUT and leave it at that; solder a wire from there to to pin 32 and you can read the sensor on pin 32. Or whatever I/O pin you have available.

Of course don't forget to update your design. Many of my projects that have made it to the PCB stage have a folder ./project_name/V1, ./project_name/V2, ./project_name/V2.1, etc, each containing the files (KiCAD schematic and PCB layout, gerbers) for that specific version, with the latest working copy in ./project_name. Changes ranging from as little as a silkscreen correction to a ground up redesign, the latter mostly as the project itself evolved :slight_smile:

Alright, thank you all, I will update the PCB.