Professional Documents
Culture Documents
Tutorial
The BMP Pressure Sensor is a replacement for the BMP085 but it also entirely identical
to the original. Having either sensor will suffice as a low-cost method for measuring
barometric pressure and temperature.
Typical uses for this sensor could include:
Athletic sports
There are many athletes that
utilize sea-level measurements
to gain a better workout. The
higher altitude the more their
heart has to work and therefore
the greater stamina they can
build when coming back down.
This is otherwise known as
Altitude Training.
Other uses for this sensor include, but are not limited to:
SDA, SCL, 3.3V, GND are the pins that will be used for this tutorial. A description of
the pins can be seen in the fritzing schematic below. The voltage (red) is connected the
3.3volt power pin on the Arduino. The ground (black) can be connected to either GND
pin. The SDA is connected to the A4 analog pin while the SCL is connected to the A5
analog pin.
The VIN pin on the sensor is not used for this tutorial and project but can actually act as
an external voltage source of input to the Arduino board, or as voltage output source to
power external components.
Arduino IDE
To get to the Arduino IDE go here: https://www.arduino.cc/en/main/software
The subsequent page should look like this:
Select which computer operating system the computer you will be programming on is
using and click on the Just Download link and follow the instructions to install.
Arduino Libraries
Arduino libraries are a great way to share code. They take a desired action and create
simple functions to allow for this task. The Arduino IDE already comes with a number of
libraries and sketches. One can also write the code from scratch or download the libraries
and import them to use them within a sketch.
For this particular sensor the libraries can be found at Adafruit.com and search for Bosch
BMP180 Breakout Board. This should bring you to a page like the one shown below.
The schematic of the sensor as well as directions to connect the sensor to an Arduino
board are given on this site.
To download the necessary libraries and code you will use Github. Github is a site that
offers source code and the ability to download other programmers code or contribute
your own.
To conveniently download the files directly from Github, Adafruit offers a link located in
the center of the page in the green box labeled Download the Adafruit_BMP085
Arduino Library (API v2)
Once you click on the link your computer will begin to download the zip file.
Once the zip has been downloaded you should be able to go in your download files and
select the uncompressed file labeled Adafruit_BMP085_Unified-master.
To include the libraries in the Arduino IDE for use you must add the ZIP.
You then select the file from your downloads and restart the IDE.
Indicated Libraries
This section is the part that indicates which libraries will be used that can be downloaded
from the Adafruit website on the sensors page.
Setup: of Loop for Sensor Readings
This is the part where the sensor will begin taking readings on a continuous loop every
indicated milliseconds. This way you can get the readings for each separately. Loop()
indicates that this will be continuous and the data will be printed to the Serial Monitor,
there will be a delay, and then the loop will begin again.
The delay() is in milliseconds and therefore 5,000 milliseconds, the default delay, is 5
seconds worth between loops.
When you feel your code is ready to be tested you can verify your code first to identify
any bugs or misprints by clicking on the Verify button shown here.
If there are no errors it should then say at the lower left side of the screen:
Once you are ready you must upload your sketch. To upload your sketch to begin
outputting data from the sensor you must connect your Arduino board to your computer
(with the sensor connected correctly as shown in the previous diagram). To connect the
Arduino to your computer you will need a standard USB 2.0 cable type A to type B.
You must select the port for a USB modem and then upload your code. Once the IDE
says Done Uploading you can open the serial monitor on the upper right-hand corner to
view your data output.
Open you Serial Monitor and view your data at the correct baud setting.
Your data should look something like this:
Youve successfully completed the wiring and setup for the BMP180 Pressure Sensor.
MEASURING PRESSURE,
TEMPERATURE, AND
ALTITUDE USING A
BMP180 PRESSURE
SENSOR
My plan for this experiment was to submerge the sensor in a pool and collect data
every five seconds, ten seconds for every foot of water. I want to collect data on
temperature, pressure, and altitude where Im sure the temperature will have the most
evident change the fastest. To test the sensor and that code I will travel up and down on
an elevator to see the changed in elevation to glimpse at the accuracy of the BMP sensor.
The next experiment would be to place the sensor in a vacuum chamber to test the low
pressure environment that many scientists and engineers use to test devices that will be
Parts needed:
A portable charger
To collect data I used an OpenLog that can be found at the Sparkfun website here:
https://www.sparkfun.com/products/13712
To gather data effectively for this experiment there were a couple of revisions that needed
to be done to the original sketch. The libraries included include the libraries necessary for
the OpenLog.
Elevator Ride Data Collection
Data collected on an elevator to test the sensor. It is very easy to see the changes in
elevation. I started on the fifth floor and traveled down to the first then back up to the
eleventh, down the first once more and then back to the fifth floor.
Problems Encountered
Although this particular sketch resulted in readings in the Serial Monitor data view the
data collected on the micro SD card was useless.
To fix this I used a different OpenLog sample sketch which included different libraries
and it read the same in the serial Monitor except the data was now saving properly to the
SD card.
Location and Setup
LA Fitness Health Club
Address: Heritage at Millennium Park, 55 E Randolph St, Chicago, IL 60601
Errors
During the pool data collecting there the data was corrupted and resulted in this:
Whereas earlier this was my data collection on an elevator: