Sensor DHT11 adalah sensor yang dapat mengesan humidity dan suhu. Di atas adalah gambar sensor DHT11 dari DFRobot.
Specification:
- Operating Humidity Range = 20 to 90% RH
- Operating Temperature Range = 0 to 50°C
- Humidity Response Time = 6 to 15s
- Temperature Response Time = 6 to 30s
Sensor DHT11 menggunakan 1-wire protocol. DHT11 protocol adalah seperti timing diagram di bawah. Microcontroller perlu memberi output low kepada sensor DHT11 sekurang-kurangnya 18ms, kemudian signal high 20-40us. Selepas itu, barulah microcontroller membaca input daripada DHT11. Start bit daripada DHT11 adalah signal low 80us dan signal high 80us. DHT11 akan memberikan 8 byte iaitu 40 bit data. Data ‘0’ adalah signal low selama 50us dan signal high selama 26-28us. Data ‘1’ adalah signal low selama 50us dan signal high selama 70us.
Berikut adalah videonya.
PIC Source Code
Sertai Telegram Group bagi dapatkan source code
23 responses to “PIC Lesson: Sensor DHT”
Untuk request header file tu kene bayar ke?
Idris, header dah bagi free kat link header.
Thanks, saya ada beli sensor RHT03 dari sparkfun, da lame da tersimpan, tengok datasheet lebih kurang sama dengan DHT11 ni.
*Tiada click untuk ‘Home’ ke? hehe..
Nak link ke Home, klik perkataan BLOG KEJURUTERAAN DAN TEKNOLOGI diatas menu.
Apa tujuan return 0 atau 1 dalam function dht11_start();?
Idris, kalau signal DHT11 high terlalu lama, x de low, sensor tu kira x response. Cth dalam Projek Humidity Temperature Monitoring.
Hi Shah, how much if i want to buy everything from you(coding + all the constructed project)? Rm150?
What you want to buy? This post is Lesson and this code is free. If want constructed project, RM500 and above.
If i want this DHT11 Lesson hardware,then cost rm500 ar? Cant be cheaper since coding is free? Like RM 250?
I’m not sell this DHT11 Lesson. The code is free, so you buy the sensor and construct for yourself. As general project I take minimum RM500.
Hi Shah,then it is ok. I want to ask that i use hi tech compiler same as u and i prog into pic16f628a,it displays y<-<-_ in my 16×4 lcd,why is that happening? using same coding n header file as u, ^^
I don’t know. Should copy and edit some for configuration, it can display.
Hi Shah,now the temperature and humidity string are shown. But the data n value from dht are not displayed on the screen,it means it doesnt work ?
LCD is working but sensor DHT11 not working.
hai shah. since the code is free, can i know where i can get this DHT11 code?
aiman, the code not for free.
Assalamualaikum,
Dekat mana boleh beli DHT11?
Terima kasih.
w/salam, Quzaimer. Beli kat ebay.com
salam,
coding ni guna software ape ye? ccs c or mikro c?
w/salam, nur. Saya guna software MPLab dan compiler Hi-Tech.
Nos puede Proporcionar las librerias:
“LibraryHardware.h”
“LibraryUniversalDisplay.h”
include “LibrarySensor.h”
Gracias.
Hello Sir/Madam,
How are you today?
I just visited your web site, and know that you are in the business of Electronic products
You may be happy to find a new reliable source with superior quality & Reasonable prices.
YX Electronics (HK) CO., LIMITED has gathered together the BEST quality 3D printer accessories, Arduino,Interactive Experiments, Wireless module all over China.
We offer competitive prices direct from the factory with top quality.
Welcome to our website: http://www.yx-electronics.com
More purchase, more discount
Save time and money to get what you need
Regards/Matt
Mail/Skype: matt@yx-electronics.com
WhatsApp:(+86)18108090598
Hello Matt. Ok thank you. I will go to your website.