Akwa Ibom State University: Main Campus, Ikot Akpaden
Akwa Ibom State University: Main Campus, Ikot Akpaden
AN ASSIGNMENT
BY
COURSE CODE:
MAE 321
COURSE TITLE:
NAVIGATION AND METEOROLOGY
APRIL, 2019
ABSTRACT
Weather is the state of atmosphere at a particular time and place with regard to
temperature, moisture, air pressure, precipitation etc. Bio organisms need to adapt with
the changing atmospheric conditions. It is therefore important to know the atmospheric
condition for different applications. The interest is to design a remote sensing
instrument for collecting data for weather prediction. Here a hardware model has been
designed and implemented. It is possible to provide instant weather report which can be
used to compare the data of a place with some different altitude as well as for different
time instant. In meteorology, the main objective is to know accurate weather conditions
with less human efforts, reliable and efficient data. As the weather varies from place to
place and with the altitude, it is difficult to get accurate weather for a particular location.
Temperature prediction is one of the most important and challenging task in today's
world. Temperature prediction is the attempt by meteorologists to forecast the state of
the atmospheric parameters such as: Temperature, Humidity, etc. With the advancement
of technology, specially embedded system & data acquisition systems, the problem of
large set up area and cost has been reduced significantly. This remote sensing
instrument can be set up onboard vessels as well as in atmosphere or in space which can
provide accurate weather report.
INTRODUCTION
Arduino Due
Arduino Mega
Arduino Nano
-
Header Pins
Xioma Power Bank. This device stores power for a long period to time. It is been used
for the project this Arduino Due requires a voltage source of about 5V to operate on.
STEP 2: TEMPERATURE AND HUMIDITY SENSOR - DHT22
The DHT22 is a very popular Temperature and Humidity sensor. It is cheap, easy to use
and the specification claims good precision and accuracy.
The DHT sensors are made of two parts, a capacitive humidity sensor and a thermistor.
There is also a chip inside that does some analog to digital conversion and outputs a
digital signal with the temperature and humidity. The digital signal is fairly easy to read
using any microcontroller.
Characteristics of the DHT22
Low cost
3 to 5V power and I/O
2.5mA max current use during conversion
0-100% humidity readings with 2-5% accuracy
-40 to 125°C temperature readings ±0.5°C accuracy
Slow
The connection with Arduino is extremely easy. We connect the sensor pin with the +
sign to the 5V or the 3.3V output of the Arduino. We connect the sensor pin with the -
sign to GROUND. Lastly we connect the OUT pin to any digital pin of the Arduino.
In order to use the DHT22 sensor with Arduino we have to use the DHT library.
https://github.com/adafruit/DHT-sensor-library
STEP 3: THE DS3231 REAL TIME CLOCK MODULE
The DS3231 real time clock module is as its name suggest a Real Time Clock. Using
its battery it can keep time for years since it has minimal power consumption.
The DS3231 is a low-cost, extremely accurate I2C real-time clock (RTC) with an
integrated temperature compensated crystal oscillator (TCXO) and crystal. The device
incorporates a battery input, and maintains accurate timekeeping when main power to
the device is interrupted. The integration of the crystal resonator enhances the long-term
accuracy of the device as well as reduces the piece-part count in a manufacturing line.
The RTC maintains seconds, minutes, hours, day, date, month, and year information.
The date at the end of the month is automatically adjusted for months with fewer than
31 days, including corrections for leap year. The clock operates in either the 24-hour or
12-hour format with an AM/PM indicator. Two programmable time-of-day alarms and
a programmable square-wave output are provided. Address and data are transferred
serially through an I2C bidirectional bus.
It will be used it in order to keep time in our Weather Station Project.
The output pin is connected to the sensor of the digital pin 4 of the Arduino Nano. Then,
the Ground and Vcc are connected too. The next step now is to connect the NRF24L01
wireless module using the pins that are shown in the third image. The transmitter is now
ready.
STEP 6: BUILDING THE RECEIVER
First of all, the RF24 library was downloaded in order to make it easier while working
with the NRF24L01 wireless modules. The DHT library is also used for the DHT22
sensor.
NRF24L01 Library: https://github.com/TMRh20/RF24
DHT22 Library: https://github.com/adafruit/DHT-sensor-library
The Transmitter code sends out a simple data structure which contains two floats, the
temperature and the humidity.
In order to establish a communication link, a “pipe” was created between the two
modules. That pipe was assigned an address. Both modules have to write and read from
the same pipe in order to communicate. That’s the first thing that was defined in our
code, the pipe address was set to “0”. Next, the channel at which the communicate with
the other module was defined. The NRF24L01 chip supports 126 different channels.
Both module uses the same channel in order to communicate with each other. In this
example channel 115 was used. Next, the maximum transmitting power that the module
offers was defined. It uses more power but extends the range of the communication.
Next, the data rate of the transmission was set it to 250Kbs which is the lowest possible
data rate in order to achieve better range. Then the pipe in order to write to it later was
opened.
In the loop function, the temperature and humidity values was read from the sensor, and
the data was saved to the data structure and then the data structure by writing the data
structure to the pipe was also sent. You can find the code attached in the link provided
below
STEP 8: THE RECEIVER CODE
The receiver code needs 4 libraries.
First, download the library for the display from this link:
DISPLAY Library: https://github.com/Bodmer/TFT_HX8357_Due
After downloading the library, open the User_Setup.h file, comment line 13 and
uncomment line 14 because the display is using the HX8357C driver. The library for
the Real Time clock, one for the DHT22 sensor and lastly one for the module was
downloaded.
NRF24L01: https://github.com/TMRh20/RF24 Wireless
DHT22: https://github.com/adafruit/DHT-sensor-library
DS3231: https://github.com/SodaqMoja/Sodaq_DS3231
Taking a look at the code, the first thing was to set the time to the real time clock module
because it was not already set. The current date and time entered then setRTCTime
function uncomment the setRTCTime call of the function on line 54 and then the
program was upload to Arduino. But, then setRTCTime call of the function was
commented again and uploaded to the Arduino once more.
The code of the receiver works like this. In the setup function all sensors were initialized
and the modules and the User Interface was printed. Then at the loop function new
wireless data was continuously check for. If there is new data, it will be saved in
variables and print them on the display. The temperature and the humidity is read once
a minute and only update the display if there is a change in the values. This way the
flickering of the display is reduced even more!
Step 9: Testing the Project
The last step to power up everything and see if everything is working as expected. If so,
at the top of the display the current date and time is displayed. At the bottom of the
display you can see the temperature and the humidity from both the remote and the local
sensor. The transmitter works at a range of one metres to five meters
Conclusions
Remote sensing instrument for collecting data for weather prediction was designed.
The system is simple to construct, portable, cost efficient, less power consuming and
reliable. The hardware design and the data acquisition system is yet to be
demonstrated due to financial constraint. The different weather parameter can be
collected over a period of time and then analysis can be drawn from this data
collected.
As the system does not use internet network, data transmission has low cost which
in terms provide large applications. It will have a positive impact on marine vessel
navigation and other field of life. There are some limitations such as the device may
not communicate to a long distance without powerful transceivers section. The
components may be damaged by rain or long time use. More sensors, data logging,
internet connection, wind speed sensors and so on can also be added. The Arduino
Due, have plenty of memory to implement many more things.
Differentiate between hydrometer and hygrometer
Hydrometer Hygrometer
Measures the specify gravity of a Measures humidity i.e. the amount of
liquid, which is an indication of the water vapour in the atmosphere e.g.
liquid’s density hair tension hygrometer,
psychrometer, electrical hygrometer