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
DHT11
Moderator: Benj
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
DHT11
- Attachments
-
- DHT11 USBee capture.zip
- (14.1 KiB) Downloaded 286 times
-
- DHT11_Example_v7.fcfx
- (11.58 KiB) Downloaded 315 times
Martin
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: DHT11
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: DHT11
Hi Ben,
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.Benj wrote:Out of interest are you using a pull up resistor?
Martin
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: DHT11
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.
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.
Code: Select all
OSCCON = 0xF0;
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: DHT11
Hi Ben,
produced a spreadsheet table:
No CRC error at -3% (19070976Hz)
Also working with internal osc at 32MHz (clock speed is also set at 32MHz).
Hope that helps?
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
Also working with internal osc at 32MHz (clock speed is also set at 32MHz).
Hope that helps?
Martin
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: DHT11
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel