IUH. Lecturer – Le Ngoc Tran, Ph.D.
Course: CSE479 – Internet of Things (IoT)
Lab 4 – Using LCD display and Sensor Module
Duration: 4 hours
Group ID Write group number here
Students’ name Write students’ name in the group here
Final Score
Lab Exercise Submission
Students are responsible for submitting the final report by the stated deadline for full
marks. Late submissions will NOT be accepted.
Learning Objective: At the end of this Lab, students will be able to:
- Use Text-LCD, PIR and DHT11 (temperature) sensor module
- Understand serial communication and display information on LCD display
Content Lab Description
- Sending "Text message" to UART
- Controlling Text-LCD
- Output characters which entered from UART to
Lab 4. LCD Display and Sensor
the serial monitor and to LCD
Module - Data Sharing between the Computer and UART
Equipment: Computer, Arduino UNO, LED
module, PIR and Temperature sensor, Text LCD
NOTE: The final report should be written in English and submitted with the
programming source files (if any).
- Good luck -
1
IUH. Lecturer – Le Ngoc Tran, Ph.D.
Hardware Requirement
# Device Quantity
1 Arduino Board 1
2 BreadBoard 1
3 LED 1
4 Resistor 220Ω, 1k 3
5 Arduino USB connector 1
6 Jumper Wires (male, female) 10
7 LCD 1
8 Temperature/Humidity sensor (DHT11) 1
9 Motion sensor (PIR) 1
Software Requirement
# Software Quantity
1 Arduino IDE 1
2 Fritzing tool 1
3 Visual Studio 2013 1
Report Requirement
1. Submit the Arduino source code
2. Final report (word): include the circuit diagram (by Fritzing tool) and the photo
taken when the circuit is running
2
IUH. Lecturer – Le Ngoc Tran, Ph.D.
3
IUH. Lecturer – Le Ngoc Tran, Ph.D.
Lab Experiment Procedure:
Task 1 – Read Temperature and Humidity
Hardware requirements
# Device Quantity
1 Arduino Board 1
2 BreadBoard 1
3 LED 1
4 Resistor 220Ω 1
5 USB connector 1
6 Jumper Wires many
Procedure
1. Connect DHT11 sensor to your Arduino
4
IUH. Lecturer – Le Ngoc Tran, Ph.D.
2. Write the code to read the values of temperature and humidity from sensor and
display these vaules in Serial Monitor or your own written program
Reference:
[Link]
Task 2 – Using Motion detection sensor (PIR)
Hardware requirements
# Device Quantity
1 Arduino Board 1
2 BreadBoard 1
3 Motion sensor (PIR) 1
4 Resistor 220Ω 1
5 USB connector 1
6 Jumper Wires 10
5
IUH. Lecturer – Le Ngoc Tran, Ph.D.
Figure 1. Circuit diagram for PIR sensor
Experiment Procedure
1. Connect the PIR sensor, LED and buzzer to your Arduino
2. Write the code with Arduino IDE with the following requirements:
- Read the signal from PIR sensor
- When PIR dectects a movement in the monitoring area: Turn LED on,
buzzer ON, send “Motion dectected” message to Serial Monitor
- When no motion detects: Led OFF, buzzer OFF, and send “No motion
dectected” message to Serial Monitor
3. Adjust the button on PIR sensor to test the distance and delay time for motion
detection of PIR
6
IUH. Lecturer – Le Ngoc Tran, Ph.D.
Reference:
[Link]
Task 3 – Using LCD Display 1602/1604
Hardware requirements
# Device Quantity
1 Arduino Board 1
2 BreadBoard 1
3 LCD 1602/1604 1
4 Resistor 220Ω 2
5 USB connector 1
6 Jumper Wires 10
Procedure
1. Connect LCD display to the Arduino board
2. Write the code with Arduino IDE with the following requirements:
- On LCD displays the following information:
+ “Welcome to EIU” on line 1
+ “IoT Project” on line 2
Reference:
[Link]
[Link]
[Link]
Task 4 – Display data using LCD
Hardware requirements
7
IUH. Lecturer – Le Ngoc Tran, Ph.D.
# Device Quantity
1 Arduino Board 1
2 BreadBoard 1
3 DHT11 (temperature sensor) 1
4 Resistor 220Ω 2
5 USB connector 1
6 Jumper Wires 10
7 LCD 1
Reference:
[Link]
Procedure
1. Connect LCD and DHT11 module to Arduino
2. Write a program to collect and display temperature and humidity on LCD
Task 5 – Building a Monitoring System (Collect data and display on your website)
Procedure
1. Connect DHT11 module to Arduino
2. Write a program to collect and display temperature and humidity on your
website or your own program (C#, Java)
Reference:
[Link]
gian