Pro Mini is giving a frequent time out on DTH11 read out
-
I added a 10k pullup between the vcc and the dataline. But I'm still getting the same results, even if I wait 10 seconds between each reading. I timeout or checksum failure every 5 or 6 readings. Could it be possible that my Pro Mini has timing issues? If so how would one check that?
Update: I just noticed that I posted my question in the wrong forum. it should be in trouble shooting.
I just hooked up a radio. And the mySensors part seems to be working okay. So I'm calculating the percentage of failed readings and present that is the battery power level. So that I can monito this in Domoticz.
But I'm still clueless to what is causing this. Maybe a bad badge of DHT11's? Because I tried another that I purchased at the same time. Any help or thoughts are appreciated.
-
I've narrowed down the cause of the problem. It has to be the Pro Mini. I just attached the DHT11 to an Arduino Nano. The DHT11 works perfectly on the nano. It doesn't matter if I feed the DHT11 with 3.3V or 5V. I ordered two Pro Mini's. I'll solder the connectors to the other Pro Mini 3.3V tomorrow and see if that one is giving me the same reading failures as the Pro Mini I'm currently using.
-
My last guess. I'm not really sure if this is a good or a bad idea. But can I put a 4.7 mu capacitor over the ground en VCC of the DHT11?
-
You don't mention the frequency and voltage of your APM. If it's 5V and 16 MHz and multiple APMs fail the same way, then I'm at a loss. If it's lower voltage that could affect the DHT-11; and I suppose that 8 MHz could affect timing.
I'm trying to imagine what could be different to allow your Nano to work.
Nano's typically run at 5v/16 MHz even tho they have an additional 3.3v supply on board. And the 3.3v supplies from a Nano and a 3.3v APM could differ - perhaps the DHT-11 is marginal and small differences in voltage make a difference.
-
You don't mention the frequency and voltage of your APM. If it's 5V and 16 MHz and multiple APMs fail the same way, then I'm at a loss. If it's lower voltage that could affect the DHT-11; and I suppose that 8 MHz could affect timing.
I'm trying to imagine what could be different to allow your Nano to work.
Nano's typically run at 5v/16 MHz even tho they have an additional 3.3v supply on board. And the 3.3v supplies from a Nano and a 3.3v APM could differ - perhaps the DHT-11 is marginal and small differences in voltage make a difference.
@Zeph I think you're spot on. It's a 3.3V 8Mhz Pro Mini. Could the frequency cause this problem? I tried a lot of different things. Adding a pullup, adding a capacitor.
The 3.3V shouldn't be the problem, because the minimum voltage of a DHT11 is rated as 2.7V. I measured the vcc output of the Arduino and my meter is giving me a 3.3V reading. -
I would not think that the speed SHOULD make a difference. Since you can download programs, and and print to Serial at the expected baud rate, the appropriate seed info should be in the defines.
Have other people here had success with the DHT-11 on a APM at 3.3v/8MHz?
Given that I don't yet know where else to look, if I were you, I might try a quick standalone program that just prints the temperature & humidty to Serial every little while using the standard library, then try another library (I believe there are several). If some library does work well, that would give us a clue. If all libraries have the same problem, then, well, we can go from there.
Have you tried more than one DHT-11? Just in case it is in some way marginal.
-
I run two ProMinis with a DHT22 on 8MHz. I experienced issues when setting the frequency by software lower than 8 MHz. After having initial some troubles I used the library http://arduino.cc/playground/Main/DHTLib which works reliable now for me.
-
I run two ProMinis with a DHT22 on 8MHz. I experienced issues when setting the frequency by software lower than 8 MHz. After having initial some troubles I used the library http://arduino.cc/playground/Main/DHTLib which works reliable now for me.
@tomkxy thank you very much. I really feel stupid that I didn't think of that mysef.
After first testing the old DHT11 library, I got a lot less errors. But the new one is perfect for 8Mhz Arduino's results are looking great so far. 0 errors. I'm going to hook it up to a battery and let it run for the night. I'm logging the amount of errors as a battery % to Domoticz. That way I can check if the readings are okay. I'll let you know what the outcome is tomorrow. Thank you again!
I had to change to original humidity sketch a bit so that it can use the other new library. When I have time I'll refactor the library from your url so that it can run besides the DHT library that is part of MySensors. If someone is interested I'll post the Sketches and the refactored library.