Trouble with Reading Sensor Data on Arduino Nano !

Hi everyone,

I am working on a project using an Arduino Nano and a DHT11 temperature and humidity sensor but I am struggling to get consistent readings. I am using the Adafruit DHT library and while the sensor sometimes works fine.., other times it just gives “nan” or zero values.

Here’s what I’ve checked so far :-

Wiring :- Everything looks good – VCC to 5V, GND to GND, and DATA to pin D2 with a 10k pull-up resistor.
Code :- I am using the basic example from the library with the correct pin and sensor type defined.
Power :- The Nano is powered via USB and I have tried multiple cables.

Has anyone else faced similar issues: ?? Could it be a faulty sensor or am I missing something obvious: ?? Would a capacitor across the sensor’s power lines help: ??

Any suggestions or debugging tips would be greatly appreciated. Thanks in advance !!

With Regards,
IsabeniuuCissp

Topic moved. Please do not post in "Uncategorized"; see the sticky topic in Uncategorized - Arduino Forum.

Yes, you haven't posted your code for review. :wink:

If you are using Dupont cables, test each one with your multimeter. If you are using a breadboard, try using a different part of the breadboard, or another breadboard. Try swapping the 10K for 4K7.

If the problem persists, try another DHT11 if you have one or can borrow one. But don't buy another one. They are the cheapest and poorest quality. If you want to buy a replacement, I suggest sht21 or 31 (sometimes also called htu21). These require slightly different wiring and code.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.