LPCXpresso804 - Sensor Demo

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPCXpresso804 - Sensor Demo

789 Views
ashokfair
Contributor IV

This is a quick demo tutorial about interfacing DHT22 with LPC804.

IMG_5636.00_00_10_01.Still001.jpg

The LPC804 are an ArmCortex-M0+ based, low-cost 32-bit MCU family operating at CPU frequencies of up to 15 MHz. The LPC804 supports 32 KB of flash memory and 4 KB of SRAM.
I have used the LPCXpresso804 development kit here .
The IoT adapter board is handmade one , it has esp8266 module interface to send the data to cloud.
LPC side PIN P0_13 is used for 1wire interface with DHT
               PIN P0_8 and P0_9 is used for UART Debug interface
dht_01.jpg
DHT22 data line is pulled up with 10k resistor. when we want to read the data from DHT22 , the LPC pulls the data low for 18ms then poll the pin for acknowledge (Pin as Input) The DHT responds with Low for nearly 40us. After that sampling the data at right interval receives all 5 bytes. The last byte contains the checksum which is addition of other 4 bytes.
Byte0 - Humidity HIGH byte
Byte1 - Humidity LOW byte
Byte2 - Temperature HIGH byte
Byte3 - Temperature LOW byte
Division by 10 will give proper data with one decimal point. (example 27.8 C)
after processing the data will be send to PC via serial debug interface.
The working demo is here Watch Now
Labels (1)
Tags (4)
0 Replies