Introducing DHT11 temperature and humidity sensor DHT11 is a very common temperature and humidity sensor today.. Figure 2.3: DHT11 sensor arduinokit.vn Pin out - VCC: Power Supply 3.
Trang 1HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY AND EDUCATION
FACULTY FOR HIGH QUALITY TRAINING
Major: ELECTRIC& TELECOMMUNICATION
Student ID: 17141026
Major: ELECTRIC& TELECOMMUNICATION
Advisor: DO DUY TAN, PhD
Ho Chi Minh City, June 2020
Trang 2HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY AND EDUCATION
FACULTY FOR HIGH QUALITY TRAINING
Major: ELECTRIC& TELECOMMUNICATION
Student ID: 17141026
Major: ELECTRIC& TELECOMMUNICATION
Advisor: DO DUY TAN, PhD
Trang 3Ho Chi Minh City, June 2020
THE SOCIALIST REPUBLIC OF VIETNAM
Independence – Freedom– Happiness
1 Project title: CIRCUIT DESIGN GATHER OF ENVIRONMENTAL
PARAMETERS – LCD DISPLAY _
2 Initial materials provided by the advisor: _
3 Content of the project: _ Research major applications of sensors and circuits Thereby building systems of application of works in life and industry
4 Final product: _The divice to collect and display temperature and humidity
CHAIR OF THE PROGRAM
(Sign with full name)
ADVISOR
(Sign with full name)
Trang 5THE SOCIALIST REPUBLIC OF VIETNAM
Independence – Freedom– Happiness
-Ho Chi Minh City, January 20, 2020 ADVISOR’S EVALUATION SHEET Student name: Student ID:
Student name: Student ID:
Student name: Student ID:
Major:
Project title:
Advisor:
EVALUATION 1 Content of the project:
2 Strengths:
3 Weaknesses:
4 Approval for oral defense? (Approved or denied)
5 Overall evaluation: (Excellent, Good, Fair, Poor)
6 Mark:……….(in words: )
Ho Chi Minh City, month day, year
Trang 6(Sign with full name)
Trang 7THE SOCIALIST REPUBLIC OF VIETNAM
Independence – Freedom– Happiness
-Ho Chi Minh City, January 20, 2020 PRE-DEFENSE EVALUATION SHEET Student name: Student ID:
Student name: Student ID:
Student name: Student ID:
Major:
Project title:
Name of Reviewer:
EVALUATION 1 Content and workload of the project
2 Strengths:
3 Weaknesses:
4 Approval for oral defense? (Approved or denied)
5 Overall evaluation: (Excellent, Good, Fair, Poor)
6 Mark:……….(in words: )
Trang 8Ho Chi Minh City, month day, year
REVIEWER
(Sign with full name)
THE SOCIALIST REPUBLIC OF VIETNAM
Independence – Freedom– Happiness
-EVALUATION SHEET OF DEFENSE COMMITTEE MEMBER Student name: Student ID:
Student name: Student ID:
Student name: Student ID:
Major:
Project title:
Name of Defense Committee Member:
EVALUATION 1 Content and workload of the project
2 Strengths:
3 Weaknesses:
Trang 94 Overall evaluation: (Excellent, Good, Fair, Poor)
Trang 10Name of project: CIRCUIT DESIGN COLLECTS ENVIRONMENTAL PARAMETERS LCD DISPLAY
Student’s ID: 17141026 Class: 17141CLA2
Email: 17141026@student.hcmute.edu.vn
Student’s ID: 17141032 Class: 17141CLA1
Email: 17141032@student>hcmute.edu.vn
Trang 11Table of contents
CHAPTER 1 OVERVIEW
1.1 Reason choose the topic
1.2 Target the topic
1.3 Limit the topic
CHAPTER 2 THEORETICAL BASIS
2.1 Introducing arduino UNO R3
2.2 Introducing DHT11 temperature and humidity sensor 2.3 Overview of I2C communication
2.4 Overview of LCD 16×2
CHAPTER 3 CONSTRUCTION AND DESIGN
3.1 Block diagram and function of each block
3.1.1 Block diagram 3.1.2 Function 3.2 Detailed design
3.2.1 Source block 3.2.2 Sensor block 3.2.3 Control block 3.2.4 Communication block 3.2.5 Display block
CHAPTER 4 IMPLEMENTION
4.1 Hardware Design
4.2 Software Design
4.2.1 Algorithm flowchart 4.2.2 Program source code
CHAPTER 5 RESULTS AND CONCLUTIONS
5.1 Result
5.2 Development
5.3 Conclusion
REFERENCES
Trang 12CHAPTER 1: OVERVIEW 1.1 Reason choose the topic
Nowadays, many factors affect the production process and people, in which temperature and humidity are also mentioned a lot, so the circuit for measuring temperature and humidity was borned With the development of current
technology, the production of simple temperature and humidity measuring circuit with high accuracy is quite simple The practical application is more common when the humidity plays a large role affecting people, goods, machines, etc
Temperature is used mostly in factories, warehouses and goods, maintenance of machinery and operating conditions In medicine, it is widely used in isolation rooms, treatment rooms for patients.
Therefore, we decided to carry out this project with the main function of displaying the temperature and humidity of the areas to be surveyed temperature and humidity With the title of the project " Circuit design gather of environmental parameters - LCD display ".
1.2 Target the topic
The topic of development will be able to control the room temperature by automatically turning off the fan, air conditioner to open windows,
especially fire alarm and automatic fire extinguishing.
Application in environmental weather monitoring Based on the change of ambient temperature and humidity over time to make predictions as well as appropriate measures for the experimental survey area.
Research major applications of sensors and circuits Thereby building systems of application of works in life and industry.
1.3 Limit the topic
The topic only within the scope is Senior Design Project 1 so the actual efficiency as well as the accuracy of the circuit are not high.
Trang 13CHAPTER 2: THEORETICAL BASIS 2.1 Introducing arduino UNO R3
Arduino Uno is built with the ATmega328P microcontroller core using quartz with a oscillation period of 16 MHz With this microcontroller, we have a total of 14 pin in / out (including 6 pin PWM) and an additional 6 pin receive analog signals marked from A0 - A5, these 6 pin can also be used as the normal input / output batteries.
Of the batteries mentioned, pin 13 is special because it connects directly to the status LED on the board On the board there is also a reset button, a lane connected to the computer via USB and a power supply port using a 2.1mm jack to get power directly from the AC-DC adapter or via a power battery.
In addition, the Arduino board also provides us with different batteries such
as 3.3V power supply battery, 5V power supply battery, GND battery
Figure 2.1: Arduino Uno R3 ( arduinokit.vn )
Trang 14Arduino Uno R3 Specifications
Operating Voltage 5 Volts
DC Current per I/O
Trang 15Figure 2.2: The detailed diagram of Arduino Uno R3 ( tapit.vn )
2.2 Introducing DHT11 temperature and humidity sensor
DHT11 is a very common temperature and humidity sensor today The sensor has a built-in signal preprocessor that helps data get accurate without having
to go through any calculations DHT11 sensor consists of 2 power pins, and 1 signal pin.
Figure 2.3: DHT11 sensor ( arduinokit.vn )
Pin out
- VCC: Power Supply 3.5V to 5.5V
- GND: Connected to the ground of the circuit
- DATA: Outputs both Temperature and Humidity through serial Data
Trang 16Operating voltage 3V - 5V (DC) Operating humidity range 20% - 90% RH, error ±5%RH Operating temperature range 0°C ~ 50°C, error ±2°C
Maximum sampling frequency 1 Hz
Maximum transmission distance 20m
Table 2.2: Specification of DHT11 sensor
2.3 Overview of I2C communication
I2C is the abbreviation of the English phrase "Inter-Integrated Circuit" It is
a communication protocol developed by Philips Semiconductors to transfer data between a central processor and multiple ICs on the same circuit board using only two signal paths I2C interface uses 2 wires to connect is SCL (Serial Clock) and SDA (Serial Data) In particular, SCL wire is used to synchronize between devices when transmitting data, while SDA is the data transmission wire.
Because of its simplicity, this type of protocol is widely used for
communication between microcontrollers and sensor arrays, display devices, IoT devices, EEPROMs, etc This is a type of synchronous serial communication protocol It means that data bits are transmitted bit by bit at regular intervals set by
a reference clock signal.
Figure 2.4: I2C communication ( arduinokit.vn )
Trang 17Figure 2.5 The detailed diagram of Communication I2C ( academia.edu )
2.4 Overview of LCD 16×2
16×2 LCD display device (Liquid Crystal Display) is used in many
microcontroller applications LCD 16×2 has many advantages compared to other types of display such as: the ability to display diverse characters (letters, numbers, graphic characters); Easy to put into the application circuit according to various communication protocols, consuming very little system resources, low cost,
Trang 18Figure 2.6: LCD 16×2 ( arduinokit.vn )
Stable operation: 2.7-5.5V 2.7-5.5V High output voltage > 2.4V
Power supply current 350uA - 600uA Operating temperature -30 - 75 degrees C
Table 2.3: Specification of LCD 16×2
Figure 2.7: The detailed diagram of LCD 16×2
Trang 20CHAPTER 3 CONSTRUCTION AND DESIGN 3.1 Block diagram and function of each block
3.1.1 Block diagram
Figure 3.1: Block diagram of system
3.1.2 Function
Functions of each block
- Source block: Provide power to the system.
- Sensor block: Read the temperature and humidity from the environment and then send the signal to the controller.
- Control Block: Receiving information from sensor and processing, then transmitted to the communication block.
Source Block (Power Supply)
Trang 21- Communication block: Receive and process information from the control block and convert to LCD display.
- Display block: Displays the information that has been processed to LCD screen.
The operation principle
For the system to work, the source block needs to provide enough power for the control block, sensor block, display block and communication block First, the sensor block operates based on the change in temperature and humidity of the environment When humidity changes, the substrate conductivity of the substrate in the sensor will change or the resistance between these electrodes will change Thereby receiving information and sending back to the control block via analog pins are connected together, the control block will be based on data from the sensor and process based on the converts digital signals After processing the temperature and humidity information, the communication block will transfer this information to the display block for display on the LCD.
ADC
DHT11 sensor
Peripher
al
factor
Trang 22I2C
LCD display
I2C Communication
Trang 23CHAPTER 4: IMPLEMENTION 4.1 Hardware design
Figure 4.1: Hardware design
and humidity
15mm x 12mm x 5.5mm
Trang 244.2.1 Algorithm flowchart
Receive data and transfer to
display
Collect temperature, humidity by DHT11
BEGIN
DISPLAY ON LCD
Processing the valuefrom
sensor
Trang 254.2.2 Program source code
#include <Wire.h>
#include <ds3231.h>
#include <liquidcrystal_i2c.h>
#include "DHT.h"
const int DHTPIN = 2;
const int DHTTYPE = DHT11;
Trang 26clock.begin();
clock.setDateTime( DATE , TIME ); }
Trang 27lcd.write(1);
lcd.print("C");
lcd.setCursor(11,1); lcd.print("H:"); lcd.print(round(h)); lcd.print("%"); }
delay(1000);
}
Trang 28CHAPTER 5: RESULTS AND CONCLUTIONS 5.1 Result
5.2 Development
5.3 Conclusion
Trang 29REFERENCES