DHT-11 and DHT-22 not working at all!

#1

I have been working with this for over three weeks. I have a tried and true working example from the , as they say, “As seen on TV”

DroneBot Work program that was proven to work by the [shop]

(https://www.youtube.com/channel/UCzml9bXoEM0itbcE96CB03w).

However it has been my Non-Lucky-Streak lately to have proven things not working, for me anyway!
I have learned in the past it is usually something I overlooked or something stupid I did not think of.
Here is the completed program, with only one change, I added an LED to show that something is working, My first attempt was to use the DHT-11’s that I had in stock. NOTHING WORKED, EVEN THE LED. After much work I added an 4.7K pull up to the DHT and now the LED did flash as it should have but now I only had zero.zero C with 32.0 F, but no reading on the Humidity output. On the DHT11 there was a 10k PU on the module already.

I tried two other DHT11’s and another Arduino UNO with the same results. I used just about every port that would be within reason with the same NG results. I rebooted the computer with my big foot and rechecked the XOD for updates. Still the same bad results. Don’t forget this is a PROVEN working program that DroneBot shows it working as it should. Here is all the further information I can give you all.

UPDATE:
I ordered two NEW DHT-22’s, from a know good distributor, They had a 4.7K pull up on the data line but no power LED. I changed the layout for the DHT22 and received the same results. You can see the output on my pictures. One with the Square wave output high and one with it low. Oh yes, on Every OTHER transitions the C/F changed. I wonder why?

Oh well, here is everything I can give you, if you need something more, please ask. I am open for any and all ideas… :weary::sweat:

And here is my layout.

I hope I gave you enough information to build this and see what the %&*@ I am doing wrong.
I know it is something I am overlooking and I hope you do not make a Ass out of me.
Dave

DHT not working at all with XOD, but ok with Arduino IDE
#2

#3

DHT22 needs a time for reading, it is best to use the done pulse (when the reading is finished), to indicate to the LCD that it shows the value read
you can try the following

lcd in loop no working

#4

Hello Cesars, Tried, but no change.
I did measure the start pulse from Arduino and it is 50 ms. Spaced at 5 second intervals. Hower, no data what so ever coming back from the DHT22. I am at a loss.
Do you know how to post the .XODBALL file so someone does not have to enter the program by hand?
It would be a help to me and all others. The GIF screen shot does nothing but create lots of time for someone that wants to help.
Dave

#5

If you can not load the xodball you can upload it to any cloud, mega, dropbox, gmail, etc.
And share link

#6

Hello Vitaliysh, thanks for the mistake in the X100. This mistake was from the original DroneBot example and I thought it best to keep it original. Thank you for pointing this out, and and thanks for your time.
Have a great weekend!
Dave

#7

New New UPDATE:
I decided to make my layout EXACTLY as it was in the example. I added the switch and resistor. Yes, it does switch C/F with the push-button but the output is still the same.

On my scope the Arduino is sending a 50 ms low pulse to the DHT but there is no data what so ever coming back from the DHT, not even a wiggle. :disappointed:

I tried a new set of jumpers, two new DHT22s and two Arduino UNOs. No change.
This is not that difficult of a circuit, then why am I having so much trouble with it?

Is XOD only set to work for some people on nice day’s ? I am not one of them today. :tired_face:
Dave

#8

upload xodball from :point_down:

image

#9

Now I know. Thank you very much for that tip. I should have known. :thinking:
Dave

#10

I see a possible connection problem. In your images I do not see a resistance to pin 2

hookup-arduino-to-dht22-sensor

#11

Hell Cesars,
UPDATE
Yes, that is a very good point. However, the original DHT-11’s I used had a 10 k ohm resistor already on the module PCB, I have the ones with the carrier PCB mounting the DHT module itself.
BUT, the XOD program would not run at all so I added an ADDITIONAl 4.7 K to pin 2 and I finally saw a start pulse going to pin 2 from the Arduino. But still no data. I just received two new DHT-22’s and the carrier PCB already had a 4.7 K ohm on the PCB making the extra one not needed. But still no data coming from the DTH.
Update, I just tried using the ARDUINO IDE and wrote a small program to show the output. It is now working just fine with the Arduino IDE but not with the XOD IDE.
Here is a picture of the working DTH-22 with the Arduino IDE, C+.

You can see the start pulse from the Arduino and the data coming back to the Arduino from the DHT-22. All works well now, but not XOD.?

#12

Without the xodball it is difficult to know what can be

#13

Cesars,
Here it is from the DroneBot WorkShop on line video.

temp-humid.xodball (6.4 KB)

This is a WORKING program does not work for me?
My layout is now EXATACALLY the same as shown.

#14

try this
temp-humid-mod.xodball (7.3 KB)

#15

The videos are excellent, but IDE used in another much earlier, when the pulses were not implemented in node LCD.
Also the polarization resistor in PIN2 is missing, if that input in Arduino IDE is set as INPUT_PULLUP it will work fine, but in XOD the PULL-UP is not configured.

Here part of the code of the library(Arduino IDE), where the PIN is configured.

void DHT::begin(void) {
  // set up the pins!
  pinMode(_pin, INPUT);
  digitalWrite(_pin, HIGH);
  _lastreadtime = 0;
}

https://www.arduino.cc/en/Tutorial/DigitalPins

Add the polarization resistor and try the modified xodball.

#16

Hello Cesars,
Remember, I said in my previous post. I did add a 4.7K pullup to the circuit with no change in the Temperature or Humidity output. No, the input was not configured as a week PULLUP as stated earlier…
I wish the fix was that easy. There MUST be something wrong with the IDE since the EXACT hookup works fine in Arduino IDE.
Thank You for your help !
Dave

#17

Sorry, I had not read that, translation problems.
But to summarize, in my project it worked without problems, only at the beginning when the LCD was in loop, the reading stopped.

If in spite of all this it does not work :man_shrugging:

try only DHT22 with a watch without LCD, without a button, and follow one of the previous examples I gave you, starting a patch from scratch.

LCD in Loop
image

LCD with pulse done.

#18

Hello Cesars,
Thank you for all of your hard work trying to get this thing to work.
I ask you to PLEASE watch this training video, the second part, and see how well this sample does work. I think there must be something wrong with the version of XOD I am using.
I will try other versions and let you know the results, tomorrow.

#19

Cesars, SORRY, I forgot to include the link, here it is.

Dave

#20

use 0.29.1 and the examples I gave you before, I do not know what version is already in the video, it is March 2018. Surely use version v0.19.2, just repeat the example I gave you and everything is going to work more I can not do.