This is Tahir Ul Haq and introduces you to another member in the family.
This time the project is named as Weather Monitoring System. This is another TIVA based project presented by students of UET LHR.
Weather monitoring plays an important role in human life, so the collection of information about weather changes is very important. In any industry during certain hazards it is very important to monitor weather. In this project, we will monitor different weather parameters with the help of respective sensors. These sensors will be interfaced with TM4C1233H6PM microcontroller and there output will be shown on an LCD module. These temperature parameters include temperature, humidity and light intensity. Our system includes DHT 22 sensor for measuring temperature and humidity and a photodiode which is used to measure relative light intensity in the atmosphere.
Step 1: Introduction:
An automated weather system is a system that measures and records meteorological parameters using sensors without intervention of humans. The measured parameters can be stored in a built-in data logger or can be transmitted to a remote location via a communication link. If the data is stored in a data logger, recorded data must be physically downloaded to a computer at a later time for further processing. Therefore, the communication system is an essential element in an automated weather station. Today, automated weather stations are available as commercial products with variety of facilities and options. Although automated weather stations can be built and implemented in remote areas to bring down the cost of maintaining weather stations, until recently, not much emphasis has been given for building and using such instruments locally. Automated weather stations have been developed in universities by interfacing meteorological parameter monitoring sensors to microcomputer/commercially available data loggers with communication devices or through serial and parallel ports to obtain hard copies of weather data. We are going to design such a small embedded system which can be used locally to monitor weather.
Step 2: Methodology:
In this project, we are using DHT 22 digital humidity and temperature sensor to measure humidity and temperature. DHT 22 sends the 40 bit digital data to the microcontroller.
The microcontroller processes this data and shows the result on the LCD module. The light intensity is measured with the help of a photodiode. Photodiode, after sensing the light intensity, gives us an analogue voltage value. Microcontroller receives this analogue voltage value and does its ADC and finally converts its digital output to relative light intensity.
Step 3: Components:
Components Required are:
> Tiva micro-controller
> DHT-22 Sensor
> Photo diode
> 16*2 LCD module
A. Tiva Launchpad:
The Tiva Launchpad (TM4C123GH6PM) was used as the microcontroller in the project. The microcontroller has a 64 pin package. Out of these 64 pins, 43 pins are available for the purpose of GPIO pins. These GPIO pins are grouped into six ports labelled Port A to Port F. Port A to D are 8 pin ports, while port E is 6 pin and Port F is 5 pin. Each of the pins on these ports can be configured as GPIO. Some of the port pins also have special peripheral functionalities multiplexed along with GPIO functionality and can be configured for that purpose as well.
B. DHT 22 humidity and temperature sensor:
1. Features: DHT 22 is a Digital Humidity and Temperature sensor which gives a precise value of both temperature and humidity measurement. It utilizes exclusive digital-signal-collecting- technique and humidity sensing technology, assuring its reliability and stability. No extra components are required for its interfacing with the microcontroller. Small size & low consumption & long transmission distance (20m) enable DHT22 to be suited in all kinds of harsh application occasions. Single-row packaged with four pins, making the connection very convenient. Its humidity measurement range is 0 to 100% RH (Relative Humidity) and temperature range is -40 to 80 degree Celsius.
2. Power and Pins:Power’s voltage should be 3.3-6V DC. When power is supplied to sensor, don’t send any instruction to the sensor within one second to pass unstable status. One capacitor valued 100nF can be added between VDD and GND for wave filtering.
3. Communication and signal: Single-bus data is used for communication between MCU and DHT22, it costs 5mS for single time communication. Data is comprised of integral and decimal part, the following is the formula for data. DHT22 send out higher data bit firstly! DATA=8 bit integral RH data+8 bit decimal RH data+8 bit integral T data+8 bit decimal T data+8 bit check-sum If the data transmission is right, check-sum should be the last 8 bit of “8 bit integral RH data+8 bit decimal RH data+8 bit integral T data+8 bit decimal T data”. Figure 3. Serial data transfer between DHT 22 and Microcontroller. As shown in Figure 2, when MCU send start signal, DHT22 change from low-power- consumption-mode to running-mode. When MCU finishes sending the start signal, DHT22 will send response signal of 40-bit data that reflect the relative humidity and temperature information to MCU. Without start signal from MCU, DHT22 will not give response signal to MCU. One start signal for one time’s response data that reflect the relative humidity and temperature information from DHT22. DHT22 will change to low- power-consumption-mode when data collecting finish if it don’t receive start signal from MCU again.
C. Light Intensity Sensor (Photodiode):
Photodiode is designed to be responsive to optical input in such a way that when light falls on it, a reverse current flows through it due to the principle of photoelectric effect. As a result, a potential is developed across it. The reverse photoelectric current varies directly with the intensity of light.
Greater the current, greater will be the current and so the voltage. So, by measuring the voltage developed across the photodiode, we can calculate the intensity of light by multiplying the voltage by a suitable constant factor.
D. 16 × 2 LCD Display:
A liquid-crystal display (LCD) is a flat-panel display or other electronically modulated optical device that uses the light-modulating properties of liquid crystals. Liquid crystals do not emit light directly, instead using a backlight or reflector to produce images in color or monochrome.LCDs are used in a wide range of applications including computer monitors, televisions, instrument panels, aircraft cockpit displays, and indoor and outdoor signage. Small LCD screens are common in portable consumer devices such as digital cameras, watches, calculators, and mobile telephones, including smartphones. LCD screens are available in a wider range of screen sizes than CRT and plasma displays, with LCD screens available in sizes ranging from tiny digital watches to huge, big-screen television sets. 16×2 LCD is named so because it has 16 Columns and 2 Rows.
Step 4: Codes and Videos:
The codes have been implemented in Keil uvision4.
For details of various lines of codes you can refer to tiva launchpad datasheet at
The project videos can be viewed at the following links:
Inside Room : https://drive.google.com/open?id=0B7jmiltJ3Rl8dDc1…
In Open Air : https://drive.google.com/file/d/0B7jmiltJ3Rl8blRKe…
The datasheets for the sensors and photo diodes have also been attached.
Step 5: Conclusion:
We designed a small embedded system which can monitor different weather parameters like humidity, temperature and light intensity. Respective sensors measure the corresponding weather parameters, microprocessor receives and processes this data and ultimately shows the resulting measurement on the LCD module.
You are encouraged to build this project and many others 🙂
Source: Weather Monitoring System Using TIVA