Professional Documents
Culture Documents
Pressure v. Temperature
Project Overview
The purpose of this project is to collect pressure and temperature measurements using a
BMP180 sensor over extended periods of time to detect a pattern or relationship, such as if
pressure changes before temperature, or vice-versa, and pressure/temperature trends
throughout the day. An Arduino was used to read and log the data. Together with the BMP,
they were placed inside a box and the temperature and pressure within the box were measured
while the box was kept in one place (e.g. inside a room) and while it was moved from place to
place (e.g. to different floors of a building).
Setup
Code
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BMP085_U.h>
void setup(void)
{
Serial.begin(9600);
Serial.println("Pressure Sensor Test"); Serial.println("");
if(!bmp.begin())
{
Serial.print("Ooops, no BMP085 detected ... Check your wiring or I2C ADDR!");
while(1);
}
void loop(void)
{
/* Get a new sensor event */
sensors_event_t event;
bmp.getEvent(&event);
float temperature;
bmp.getTemperature(&temperature);
//Serial.print("Temperature: ");
Serial.print(temperature);
Serial.println(" C");
}
else
{
Serial.println("Sensor error");
}
delay(1000);
}
Data
TEMPERATURE
22.4
22.2
22
21.8
21.6
21.4
21.2
21
0 2000 4000 6000 8000 10000 12000 14000 16000 18000
PRESSURE
1002.5
1002
1001.5
1001
1000.5
1000
999.5
0 2000 4000 6000 8000 10000 12000 14000 16000 18000
TEMPERATURE
24.5
24
23.5
23
22.5
22
21.5
21
0 5000 10000 15000 20000 25000
PRESSURE
998
997
996
995
994
993
992
991
990
0 5000 10000 15000 20000 25000
3. Late Evening - Early Morning (4.29hrs; stationary). Temperature initially rises slightly
while pressure drops sharply, then they both drop at a similar rate.
TEMPERATURE
24.5
24
23.5
23
22.5
22
21.5
21
20.5
20
19.5
0 2000 4000 6000 8000 10000 12000 14000 16000
PRESSURE
993
992
991
990
989
988
987
986
985
0 2000 4000 6000 8000 10000 12000 14000 16000
4. Late Morning (2.55hrs, stationary). Temperature changes very slightly while pressure
drops at a steady rate.
TEMPERATURE
20.3
20.2
20.1
20
19.9
19.8
19.7
19.6
19.5
0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000
PRESSURE
987
986
985
984
983
982
981
0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000
TEMPERATURE
25
24
23
22
21
20
19
0 2000 4000 6000 8000 10000 12000 14000
PRESSURE
982
981
980
979
978
977
976
0 2000 4000 6000 8000 10000 12000 14000
6. Early Evening (2.71hrs, stationary). Initial sharp rise in temperature and then constant.
Pressure rises then drops.
TEMPERATURE
26.5
26
25.5
25
24.5
24
23.5
23
22.5
22
0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000
PRESSURE
982.8
982.6
982.4
982.2
982
981.8
981.6
981.4
981.2
981
0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000