EET-126 Lab 4 Instructions - Fillable PDF
EET-126 Lab 4 Instructions - Fillable PDF
Course: EET-126
INSTRUMENTATION 1
Name: ___________________________________
Ethan Katz 301482685
STD # _____________________
Name: ___________________________________ STD # _____________________
Lab 4: Temperature and Humidity Measurements
Overview
In this lab, we will use the DH11 temperature and humidity sensors to sense temperature and
humidity of our surrounding environment. We will then due some conversions between different
temperature units. An optional part of the lab also allows you to install the LCD monitor for
displaying temperatures.
Components Required
(1) x Elegoo Uno R3
(1) x DHT11 Chip
(1) x 10K potentiometer
(1) x LCD monitor
(10) x M-M wires (male to male jumper wires)
(3) x M-F wires (male to female jumper wires)
Procedure – Part 1
The setup of our board is quite simple as shown in the figure below.
https://github.com/adafruit/Adafruit_Sensor
Once the code has been downloaded, we can simply add these libraries to our Arduino sketch by
going to Sketch Include Library Add .ZIP Library and add the individual zip files
downloaded from the websites above. You can see the video walkthrough if you need more
details.
Compile the code provided for this part. Look at the serial monitor and you should see the
temperature and humidity being displayed. You can touch or breathe on the sensor to see how
the humidity and temperature change.
Part 1 - Discussion
1. What happens to the temperature and humidity when you hold the DHT11 sensor with your
fingers?
3. A third temperature unit is known as the Kelvin. Kelvin is obtained by taking the temperature
in Celsius and then adding 273.
°𝐾𝐾 = °𝐶𝐶 + 273
Modify the code given to you to obtain the temperature in Kelvins using the Celsius temperature
obtained from the DHT11 sensor.
(at the bottom of lab)
4. Converting between Fahrenheit and Celsius is important as different devices from different
manufacturers may use different scales and several devices may be present in a plant. As a
technician or technologist, you must survey the plant and quickly make predictions on whether
any measurements are inaccurate.
Using the above formulas will give us an exact answer but sometimes we may want a quick
approximate value in a work setting. The following video reviews the above formulas and gives
you a more simplified formula that you can perform on the fly when the need arises.
https://www.youtube.com/watch?v=CHn_lLbnm8c
After watching this video, Estimate the temperature for the following two tables and calculate
the percentage difference
Estimated Temperature in
Temperature in Actual Temperature in Percentage
Fahrenheit
Celsius Fahrenheit Difference
(Using video technique)
10 °𝐶𝐶 50 50 0
15 °𝐶𝐶 60 59 1.7
30 °𝐶𝐶 90 86 4.4
45 °𝐶𝐶 120 113 5.8
100 °𝐶𝐶 230 212 7.8
Estimated Temperature in
Temperature in Actual Temperature in Percentage
Celsius
Fahrenheit Celsius Difference
(Using video technique)
32 °𝐹𝐹 1 0 NA
45 °𝐹𝐹 7.5 7.2 4.0
60 °𝐹𝐹 15 15.6 4.0
98 °𝐹𝐹 34 36.7 7.9
120 °𝐹𝐹 45 48.9 8.6
Procedure – Part 2
This is an optional part for the lab where rather than seeing the temperature on the computer
screen, we will print it on the LCD monitor. To do this, you need to set up the wires as shown
below (in additional to the DHT11 sensor in part 1).
The code then displays the sensor on the LCD screen rather than on the serial output.
Conclusion
In this lab we installed a new type of sensor that senses temperature and humidity. We
observed its outputs change through the serial monitor and LED screen when we heated the
sensor with a heat gun (changed temperature) or blew on the sensor (changed humidity). A
sensor like this could be used to monitor processes such as food and beverage production as
they often require stable temperatures. The humidity sensor could be used in conjunction
with an air conditioning system to monitor areas where a certain humidity is required like a
greenhouse.
Deliverables
2. Take a picture of your setup in part 1 and include it in your lab report.
3. Include the modified code for part 1 (with Kelvin formula added).
#include "DHT.h"
#define Type DHT11
int sensePin=2;
DHT HT(sensePin,Type);
float humidity;
float tempC;
float tempF;
int setTime=500;
int dt=1000;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
HT.begin();
delay(setTime);
}
void loop() {
humidity=HT.readHumidity();
tempC=HT.readTemperature() + 273;
tempF=HT.readTemperature(true);
Serial.print("Humidity: ");
Serial.print(humidity);
Serial.print("% Temperature ");
Serial.print(tempC);
Serial.print(" K ");
Serial.print(tempF);
Serial.println(" F ");
delay(dt);