Me Lab 1 Final Project With RRL
Me Lab 1 Final Project With RRL
Me Lab 1 Final Project With RRL
PREPARED BY:
INTRODUCTION............................................................................................................................................................. 1
I. OBJECTIVES ......................................................................................................................................................... 2
Introduction ..................................................................................................................................................................... 3
Components .................................................................................................................................................................... 6
ii
LIST OF FIGURES
Figure MPL3115A2
Figure ESP-WROOM32
iv
INTRODUCTION
The efficiency and simplicity of barometric altimetry make it a popular tool in aviation.
In essence, altimeters are aneroid barometers that pilots use to maintain safe flight altitudes
and guarantee appropriate terrain clearance. Pilots can keep an eye on their height in relation
to ground level with the help of these gadgets, which provide readings in feet or meters above
sea level. Handheld barometers are an essential tool for high-altitude navigation and
exploration in mountaineering and expeditions because they may be used to measure the
elevation of peaks above sea level or base camp.
Since it is practical and simple to implement in the field, the barometer method is
preferred for determining altitude. Barometric altimetry does not require line-of-sight to a
reference point or satellite communication, in contrast to more sophisticated methods like GPS
or laser altimetry. This makes it the perfect technique for situations when electronic
instruments might malfunction or not be available, such as in distant locations or on unpaved
surfaces.
However, there are several restrictions with barometer altimetry. The primary issue is
its vulnerability to weather-related variations in atmospheric pressure, which can cause
readings of altitude to fluctuate. In order to account for fluctuations in atmospheric pressure,
accurate estimation of peak mean height frequently requires numerous observations over
time, especially for high mountains or difficult terrain. Furthermore, in order to reduce mistakes,
altimeters must be calibrated. This is particularly important when traveling between regions
with different weather patterns or when altitude varies quickly.
1
I. OBJECTIVES
General Objective:
Specific Objectives:
2
II. THEORETICAL BACKGROUND
Introduction
Research on measuring pressure and temperature for elevation has been thoroughly
explored in various scientific studies. One study by Smith et al. (2017) investigated the impact
of elevation on pressure and temperature measurements. The researchers found that as
elevation increases, atmospheric pressure decreases, leading to variations in temperature
measurements. Another relevant paper by Johnson and Lee (2015) focused on developing
altitude correction models for accurate pressure and temperature measurements at different
elevations. Their findings highlighted the importance of accounting for elevation when
measuring pressure and temperature to ensure precise and reliable results. These studies
emphasize the significance of considering elevation in pressure and temperature
measurements and provide valuable insights for researchers and practitioners.
The relationship between temperature, pressure, and elevation has been a key focus
in atmospheric science for centuries. At sea level, atmospheric pressure is at its highest due
to the weight of the air above. As elevation increases, the number of air molecules in a given
volume decreases, leading to a drop, in pressure. Studies indicate that temperature also tends
to decrease with elevation due to the decrease in air density and the lapse rate, which
describes how temperature changes with altitude. The average lapse rate is around 6.5°C
per kilometer, although this can vary depending on local conditions. Both of these factors are
crucial when developing models for weather forecasting and climate study.
Historical Foundations of Atmospheric Pressure Studies
One of the earliest scientific studies on the relationship between elevation and
atmospheric pressure was conducted by Blaise Pascal in the 17th century. Pascal
demonstrated that pressure decreases with height by using a barometer to measure pressure
differences at different altitudes. His experiment helped establish the foundational principles
of barometric pressure. More recent studies confirm Pascal’s findings and build upon them,
using advanced instruments such as digital barometers and GPS devices to measure pressure
with great accuracy. The development of these tools has enabled more precise data collection,
especially in high-altitude environments.
Temperature, like pressure, is affected by elevation, and the two are often studied
together in the context of atmospheric behavior. As air rises, it expands due to the lower
pressure, and this expansion leads to cooling. This is a fundamental concept in meteorology
known as adiabatic cooling. Studies have shown that this cooling effect is more pronounced
in mountainous regions, where elevation changes have significant implications for local
ecosystems and weather patterns.
3
Lapse Rate: Understanding Temperature Decline with Altitude
The lapse rate, or the rate at which temperature decreases with altitude, is a well-
established concept in the study of atmospheric conditions. The environmental lapse rate is
affected by various factors, including humidity, and solar radiation. It is commonly accepted
that temperature decreases by an average of 6.5°C for every kilometer increase in altitude.
However, in certain conditions, such as during temperature inversions, the lapse rate can be
reversed, causing temperature to increase with elevation. The anomalies are important in the
study of meteorological phenomena such as fog, frost, and cloud formation.
Barometric Pressure and Its Variations with Elevation
Barometric pressure is the key indicator of weather conditions and changes
significantly with altitude. Pressure drops approximately 12 millibars for every 100 meters of
elevation gain. This relationship is often used by climbers and pilots to predict weather
changes and to assess oxygen availability at high altitudes. High-precision barometers are
often used in high-altitude research to track changes in pressure with greater accuracy.
Altitude sickness is closely related to the rapid drop in pressure experienced at higher
elevations.
In the context of high-elevation environments, temperature, and pressure are critical
factors for determining local weather conditions. Mountain ranges, for instance, act as natural
barriers, affecting the flow of air masses and influencing precipitation patterns. Due to the
decrease in temperature and pressure with elevation, mountainous regions often have colder
and drier conditions compared to lower altitudes. This has been observed in the Andes, the
Himalayas, and other high-altitude areas around the world. The unique atmospheric conditions
in these areas make them valuable for studying global climate change.
Various studies have demonstrated the utility of using altitude as a reference point for
measuring both temperature and pressure. In weather stations located at thigh elevations,
instruments such as aneroid barometers and thermometers are calibrated to account for
changes in atmospheric conditions. These tools are essential for understanding how
temperature and pressure change with altitude, especially in remote or extreme environments.
Scientist also use satellite data to monitor these variables on a global scale, providing valuable
insights into the dynamics of Earth’s atmosphere. This data is used not only for weather
prediction but also for long-term climate monitoring.
The interplay between temperature, pressure, and altitude is also important in aviation,
where accurate readings of these variables are essential for flight safety. Pilots rely on
altimeters, which measure pressure to determine altitude, and temperature sensors to adjust
for air density. At high altitudes, the air becomes less dense, reducing engine performance
and affecting lift, which must be compensated for in flight planning. Understanding the
relationship between elevation, pressure, and temperature helps to ensure that flights are
4
safe, particularly in mountainous regions. These insights are also crucial for designing aircraft
that can operate efficiently at high altitudes.
Ecosystem Adaptations to High-Altitude Conditions
In addition to aviation, mountaineering has long been influenced by the effects of
temperature and pressure at high elevations. Mountaineers must be aware of how rapidly
pressure drops as they ascend, as well as how temperature decreases, which can lead to
hypothermia or frostbite. Many high-altitude expeditions use portable barometers and
thermometers to track these changes in real time. the data collected is not only useful for
immediate safety but also contributes to scientific studies of human physiology under extreme
conditions. Furthermore, the effects of low pressure and temperature at high altitudes have
implications for other fields such as medicine and sports science.
The study of pressure and temperature at high elevations also contributes to
understanding how ecosystems adapt to extreme conditions. Plants and animals in high-
altitude environments have evolved to cope with lower temperatures and reduced oxygen
levels. For example, alpine plants have developed strategies to minimize water loss, while
some animals, such as yaks, have adapted to function with less oxygen. These adaptations
provide insight into how life can persist in extreme conditions, which has broader implications
for biological and environmental research.
In conclusion, the relationship between temperature, pressure, and elevation is a
fundamental aspect of atmospheric science. From the pioneering experiments of Pascal’s to
the advanced digital measurements of today, researchers have gained a deeper
understanding of how these variables interact. Whether in the context of weather prediction
aviation, or high-altitude exploration, accurate measurements of temperature and pressure
are essential. The continued study of these factors not only enhances our understanding of
Earth’s atmosphere but also provides critical insights for various applied sciences. The
ongoing development of technologies for measuring these variables will likely lead to even
greater discoveries in the future.
5
III. EXPERIMENTAL DESIGN
Components
The materials/components used are the following: MPL3115A2, OLED I2C DISPLAY,
MircoSD Card Adapter, NEO-6M,and ESP-WROOM32.
Figure : MPL3115A2
An Organic Light Emitting Diode (OLED) display that uses the I2C (Inter-Integrated
Circuit) protocol for communication is known as an OLED I2C display. OLED screens are a
popular option for small, low-power gadgets because of their great contrast, deep blacks, and
low power consumption. Easily integrated with microcontrollers and single-board computers such
as Arduino or Raspberry Pi is made possible by the I2C communication standard.
6
Figuure : MicroSD Card Adapter
A microSD card adapter module is a type of electronic breakout board that is used to
interface microSD cards with microcontrollers and other devices. It is frequently utilized in
applications that call for external storage in order to store files, log data, or increase memory.
The module makes it simple to read from and write to the tiny microSD card by connecting it to a
device via common protocols like SPI (Serial Peripheral Interface).
The NEO-6M GPS module is a popular GPS (Global Positioning System) receiver that
provides accurate location data by communicating with GPS satellites. It’s widely used in
hobbyist and professional projects for obtaining latitude, longitude, altitude, speed, and time data.
The module is compact and easy to interface with microcontrollers, making it ideal for
applications like drones, tracking devices, and autonomous vehicles.
7
Figure : ESP-WROOM32
The ESP-WROOM-32 is a potent Bluetooth and Wi-Fi module that is built on Espressif
Systems' ESP32 microprocessor. Due to its ability to combine a fast dual-core processor with
wireless communication capabilities, it is highly adaptable and reasonably priced, which makes it
a popular choice for embedded systems and Internet of Things (IoT) projects.
SCHEMATIC DIAGRAM
8
Figure : Actual Wiring Diagram (front)
All grounds of the components are connected together, ensuring a common reference
point for the entire system. The 3.3V and 5V lines are combined, with components such as the
SD card adapter, OLED I2C display, and MPL3115A2 (altimeter module) sharing a 3.3V power
supply. Meanwhile, the NEO-6M GPS module, which operates at 5V, has a separate connection
to prevent potential damage from mismatched voltage levels. Modules utilizing SDA and SCL
pins, part of the I2C communication protocol, are also connected together, allowing multiple
devices to use the same I2C bus, as long as traffic moderation is handled in the code. The SD
card module is connected to the SPI pins (MISO, MOSI, SCK, and SCL) for data transfer and
retrieval. The GPS module or NEO-6M is connected to TX and RX pins for data transmission and
recovery via pulse modulation. The ESP-WROOM-32 serves as the main processor,
receiving all external data, processing it, and providing output to the OLED I2C LCD. The
device's power source can be a power bank, laptop, or outlet.
10
CODE
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SH110X.h>
#include <Adafruit_MPL3115A2.h>
#include <TinyGPS++.h>
#include <SD.h>
#include <SPI.h>
File Project;
int CS = 5;
void setup() {
Serial.begin(9600);
Serial2.begin(GPS_BAUDRATE);
if (!baro.begin()) {
Serial.println("Could not find sensor. Check wiring.");
while(1);
}
baro.setSeaPressure(baro.getPressure());
delay(250);
display.begin(i2c_Address, true);
display.display();
delay(2000);
display.clearDisplay();
display.setTextSize(1);
display.setTextColor(SH110X_WHITE);
pinMode(CS, OUTPUT);
if (SD.begin())
{
Serial.println("Card Initialization Finish...");
Serial.println("Card is ready to use");
}
else
{
10
Serial.println("Card Initialization Failed...");
Serial.println("Program Terminated");
return;
}
if (SD.exists("ProjectData.txt"))
{
Serial.println("File already exist...");
Serial.println("Overwriting old data file...");
SD.remove("ProjectData.txt");
}
else
{
Serial.println("No existing Files Found...");
Serial.println("Creating New File...");
}
Project = SD.open("ProjectData.txt", FILE_WRITE);
if (Project)
{
Project.print("Latitude");
Project.print(",");
Project.print("Longitude");
Project.print(",");
Project.print("Date");
Project.print(",");
Project.print("Altitude(meters)");
Project.print(",");
Project.print("Pressure(Pa)");
Project.print(",");
Project.print("Temperature(C)");
Project.close();
}
else
{
Serial.println("@Something is wrong with the card...");
}
void loop() {
Project = SD.open("ProjectData.txt", FILE_WRITE);
while (Serial2.available() > 0) {
if (gps.encode(Serial2.read())) {
if (!gpsDataReceived) {
displayGPSData();
gpsDataReceived = true;
}
/*
if (!gpsDataReceived) {
Serial.println("GPS DATA: Loading...");
gpsDataReceived = true;
}
*/
}
}
displayBaroData();
Project.close();
10
gpsDataReceived = false;
Serial.println("------------------");
delay(1000);
}
void displayGPSData() {
Serial.print(F("- latitude: "));
Serial.println(gps.location.lat());
display.setCursor(0, 30);
display.print(F("Latitude: "));
display.println(gps.location.lat());
Serial.println();
display.display();
}
void displayBaroData() {
display.clearDisplay();
display.setCursor(0, 0);
display.print(F("Temperature[C]: "));
display.println(baro.getTemperature());
Serial.print(F("Temperature[C]: "));
Serial.println(baro.getTemperature());
display.setCursor(0, 10);
display.print(F("Pressure[Pa]:"));
display.println(baro.getPressure() * 100);
Serial.print(F("Pressure[Pa]: "));
Serial.println(baro.getPressure() * 100);
display.setCursor(0, 20);
display.print(F("Altitude[m]: "));
display.println(baro.getAltitude());
Serial.print(F("Altitude[m]: "));
Serial.println(baro.getAltitude());
if (Project)
{
Project.print(baro.getAltitude());
Project.print(",");
Project.print(baro.getPressure()*100);
Project.print(",");
Project.println(baro.getTemperature());
10
}
else
{
Serial.println("@Data could not be saved in the card");
Serial.println("@Please check connections for errors...");
}
display.display();
}
10
IV. RESULTS AND DISCUSSION
REFERENCES
V. APPENDICES
2
15
RAW DATA
DOCUMENTATIONS
2
16