Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 8

School of CIT, EIU. Lecturer – Phan Van Vinh, Ph.D.

Course: CSE479 – Internet of Things (IoT)


Lab 7 – 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
School of CIT, EIU. Lecturer – Phan Van Vinh, 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
School of CIT, EIU. Lecturer – Phan Van Vinh, Ph.D.

3
School of CIT, EIU. Lecturer – Phan Van Vinh, 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
School of CIT, EIU. Lecturer – Phan Van Vinh, Ph.D.

2. Write the code to read the values of temperature and humidity from sensor and
display these values in Serial Monitor or your own written program

Reference:

http://tae.vn/cam-bien-nhiet-do-va-do-am-dht11

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
School of CIT, EIU. Lecturer – Phan Van Vinh, 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 detects a movement in the monitoring area: Turn LED on,
buzzer ON, send “Motion detected” message to Serial Monitor
- When no motion detects: Led OFF, buzzer OFF, and send “No motion
detected” message to Serial Monitor

3. Adjust the button on PIR sensor to test the distance and delay time for motion
detection of PIR

6
School of CIT, EIU. Lecturer – Phan Van Vinh, Ph.D.

Reference:

http://tae.vn/cam-bien-chuyen-dong-pir

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:

http://arduino.vn/bai-viet/531-dieu-khien-lcd-bang-arduino-uno

http://tae.vn/i2c-adapter-cho-lcd-1602-1604

http://tae.vn/man-hinh-lcd-1602-green-blue

Task 4 – Display data using LCD

Hardware requirements
7
School of CIT, EIU. Lecturer – Phan Van Vinh, 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:

http://arduino.vn/bai-viet/91-doc-nhiet-do-do-am-va-xuat-ra-man-hinh-lcd

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:

http://arduino.vn/tutorial/1483-huong-dan-xay-dung-he-thong-giam-sat-qua-internet-don-
gian

You might also like