bentuk dan desain untuk merancang program rotary encoder untuk mengetahui kecepatan putar (RPM) dengan tampilan LCD yang diprogram pada mikrokontrollerFull description
bentuk dan desain untuk merancang program rotary encoder untuk mengetahui kecepatan putar (RPM) dengan tampilan LCD yang diprogram pada mikrokontroller
Descripción: ADC code examples for MCU
Full description
Interfacing LCD With LPC1769...Full description
Interfacing Bluetooth with 8051 Microcontrollers www.pantechsolu tions.net WHAT IS BLUETOOTH? • Bluetooth is a proprietary open wireless protocol for exchanging data over short distances (u…Full description
interfacing
Interfacing servo motor with LPC1769 using DAC
8085
Full description
intefacing of DAC 800 to 8051 microcontrollerFull description
Radio Frequency Signal INterfacing with 8051 related families of microcontrollersDescripción completa
Rangkaian Sistem Flood Sensor dengan menggunakan LCDFull description
Rangkaian Sistem Flood Sensor dengan menggunakan LCDFull description
GHGVHGVGHVHFull description
Full description
Apuntes y explicaciones para interfase del sensor Temperatura/Humedad al microcontrolador PIC.Descripción completa
Descripción: El siguiente Driver es para poder leer temperaturas y humedad desde el sensor DHT11, para el lenguaje de programación CCS. Incluye ejemplo de uso.
proyek praktikum elektronika dasar 2Full description
I2C EEPROM Interfacing With ARM7 Primer LPC214x, Real Tim Source CodeDescripción completa
Displaying counter 0 to 9 on Seven Segment Display...Full description
DHT11 Sensor Interfacing with ATmega16 / 32. DHT11 is a single wire digital humidity and temerature sensor! which gi"es relati"e humidity in ercentage and temerature in degree #elsius.
Introduction •
DHT11 is a single wire digital humidity and temerature sensor! which ro"ides humidity and temerature "alues serially.
•
DHT11 sensor ro"ides humidity "alue in ercentage in relati"e humidity $2% to &%' (H) and temerature "alues in degree #elsius $% to *% +#)
DHT11 is - in sensor! these ins are ##! DATA! ,D and one in is not in use! shown in fig 0elow.
Fig) Pin diagram of DHT11
Pin No.
Pin Name
Pin Description
ower suly 1
## 3.3 to *.* olt D#
2
DATA
Digital outut in
Pin No.
Pin Name
Pin Description
3
,#
,ot in use
-
nd
round
Communication with microcontroller
•
•
DHT11 uses only one line for communication. The "oltage le"els with certain time "alue defines the logic one or logic ero on this in. The communication rocess is di"ided in three stes! first is to send reuest to DHT11 sensor then sensor will send resonse ulse and then it starts sending data of total -% 0its to the microcontroller.
Fig) Communication process Start pulse (e!uest)
•
To start communication with DHT11! first we ha"e to send the start ulse to the DHT11 sensor.
•
To ro"ide start ulse! ull down the data in minimum 14ms and then ull u! as shown in diag.
esponse
•
After getting start ulse from the controller! DHT11 sends the resonse ulse to the microcontroller which will indicate that DHT11 recei"ed start ulse.
•
The resonse ulse is low for *-us and then goes high for 4%us.
•
After sending the resonse ulse! DHT11 sensor sends the data! which contains humidity and temerature "alue along with chec5sum.
•
The data frame is of total -% 0its long! it contains * segments $0yte) and each segment is 40it long.
•
In this * segments first two segments content humidity "alue in decimal integer form. This alue gi"es us (elati"e ercentage Humidity. 1st 40its are integer art and ne7t 4 0its are fractional art
•
,e7t two segment content temerature "alue in decimal integer form. This "alue gi"es us temerature in #elsius form.
•
8ast segment is the chec5 sum which holds chec5 sum of first four segment.
•
Here chec5sum 0yte is direct addition of humidity and temerature "alue. And we can "erify it in microcontroller whether it is same as chec5sum "alue or not. If it is not eual! then there is some error in the data "alue otherwise the data is correct.
•
9nce microcontroller recei"es data! DHT11 in goes in low ower consumtion mode until the microcontroller do not sends start ulse again. "nd of frame
•
After sending -%0it data! DHT11 sensor sends *-us low le"el and then goes high. After this DHT11 goes in slee mode.
Circuit diagram
Fig) Circuit diagram •
The a0o"e circuit diagram shows interfacing of ATmega16 / 32 to DHT11 sensor.
•
In that! 8#D is interfaced to 9(T: in -0it mode! and DHT11 sensor is connected to D6 $in no 2%).
Programming of DHT11 •
;irst initialie the 8#D1672<-0it li0rary.
•
Define in no. to interface DHT11 sensor! in our rogram we define D6 $in no. 2%).
•
Send the start ulse to DHT11 sensor! ma5ing low to high.
•
(ecei"e the resonse ulse from the DHT11 sensor.
•
After recei"ing the resonse! recei"e -%0it data serially from DHT11 sensor.
•
Dislay these recei"ed data on 8#D1672 along with error indication.
/* * ATmega16_DHT11_Project_File.c * * http://www.electronicwings.com */ #incl!e "ar/io.h$ #incl!e "st!li%.h$ #incl!e "st!io.h$ #incl!e &'(D16)_+%it.h& #!e,ine DHT11_P- 6 int_t c02-_3H2D_3H2-_Temp2D_Temp2(hec45m oi! 3e7est89 /* icrocontroller sen! start plse or re7est */ ; DD3D <0 81""DHT11_P-9 P=3TD >0 ?81""DHT11_P-9 /* set to low pin */ _!ela@_ms89 /* wait ,or ms */ P=3TD <0 81""DHT11_P-9 /* set to high pin */ oi! 3esponse89 /* receie response ,rom DHT11 */ ; DD3D >0 ?81""DHT11_P-9 while8P-D > 81""DHT11_P-99 while88P-D > 81""DHT11_P-99009 while8P-D > 81""DHT11_P-99 int_t 3eceie_!ata89 /* receie !ata */ ; ,or 8int 70 7" 7BB9 ; while88P-D > 81""DHT11_P-99 00 9 /* chec4 receie! %it or 1 */ _!ela@_s8C9 i,8P-D > 81""DHT11_P-99 /* i, high plse is greater than Cms */ c 0 8c""19<8)19 /* then its logic H-H */ else /* otherwise its logic '=E */ c 0 8c""19 while8P-D > 81""DHT11_P-99 retrn c int main8oi!9 ; char !ataG lc!init89 lc!_clear89 lc!_goto)@829 lc!_print8&Hmi!it@ 0&9 lc!_goto)@8219 lc!_print8&Temp 0 &9
/* initialiIe '(D */ /* clear '(D */ /* enter colmn an! row position */
/* sen! start plse */ /* receie response */ /* store ,irst eight %it in -_3H */ /* store ne)t eight %it in D_3H */ /* store ne)t eight %it in -_Temp */ /* store ne)t eight %it in D_Temp */ /* store ne)t eight %it in (hec45m */
i, 88-_3H B D_3H B -_Temp B D_Temp9 J0 (hec45m9 ; lc!_goto)@829 lc!_print8&Krror&9 else ; itoa8-_3H2!ata219 lc!_goto)@81129 lc!_print8!ata9