Page 1 of 1
DHT11
Posted: Wed Dec 21, 2016 11:24 am
by medelec35
Using DHT11 component Update and Test file (just changed to DHT11 component) posted
here
Setup is EB006 with 16F1937 running at 19.6608MHz.
Keyes KY-015 DHT11
DHT11 Datasheet with sketches of waveforms
There is no noticeable difference in results between the original DHT11 component (using FC7_Latest_Files_151216.zip) and one posted on the above link.
Attached is a USBee waveform capture and Flowchart used.
Results on LCD are similar to reported DHT22:
Temperature and humidity is displayed but keeps flashing with CRC Error on a regular basis.
Martin
Re: DHT11
Posted: Wed Dec 21, 2016 11:59 am
by Benj
Thanks Martin,
I'll have another look. I'm not in the office today but I'm back in tomorrow.
Out of interest are you using a pull up resistor? If you are then can you try it without and see if that makes a difference. This was working great for me yesterday without a resistor so if it's not that then I wonder what the problem is.
Re: DHT11
Posted: Wed Dec 21, 2016 12:29 pm
by medelec35
Hi Ben,
Benj wrote:Out of interest are you using a pull up resistor?
Yes, but the resistor is built-in to the PCB that's shipped with:
I have removed the resistor and still flashing CRC error on a regular basis.
Re: DHT11
Posted: Wed Dec 21, 2016 1:55 pm
by Benj
Thanks Martin, good to know removing the resistor made no difference.
One quick hack you could try is slightly tweaking the clock speed setting in the project options say +/- 1%. Word of warning that if you have other critical delays or UART bauds etc in your program then it will also send them out.
Just wondering if my delays are too big or too small.
The 0 has a mark of 26-28uS, the 1 has a mark of 70uS so I wait for 30uS from the start of the mark before sampling.
Might also be worth trying the 16F1937 on the IntOSC running at 32MHz.
Strange it was working so well for me but I think I need to retry with the sensor on a short cable rather than connected directly.
Re: DHT11
Posted: Wed Dec 21, 2016 2:33 pm
by medelec35
Hi Ben,
produced a spreadsheet table:
Code: Select all
19660800
+ - %
19857408 19464192 1
20054016 19267584 2
20250624 19070976 3
20447232 18874368 4
20643840 18677760 5
20840448 18481152 6
21037056 18284544 7
21233664 18087936 8
21430272 17891328 9
21626880 17694720 10
No CRC error at -3% (19070976Hz)
Also working with internal osc at 32MHz (clock speed is also set at 32MHz).
Hope that helps?
Re: DHT11
Posted: Thu Dec 22, 2016 4:00 pm
by medelec35
Hi Ben,
Just updated DHT11 compont you have posted
here
changing speed back to 19660800Hz display regally changes from showing Temperature/Humidity to 'No Reply'
It may take a while to find a speed in which it works.
Martin
Re: DHT11
Posted: Thu Dec 22, 2016 4:47 pm
by Benj
It's so strange that it's working flawlessly here for me at 19.6608MHz but not for you guys.
Are you using the standard shipped version of the PIC compiler?
Also are you using the new IO cal from the update zip? This should help but I tested and is not required for my setup to work.
I've got my sensor on a long cable now but it's still plugged into a breadboard, I wonder if the additional capacitance is having any effect.