Good afternoon, I want to ask about the BMP180 and Arduino sensor. I want to learn how it works and how it connects to program and measure heights.
Of course, thanks.
Here is a tutorial : https://learn.adafruit.com/bmp085
The BMP085 and the BMP180 are almost identical. The BMP180 is the newer and more accurate version.
Of course, but I need to know is how to operate in Arduino
Please explain. That tutorial is about how to use an Arduino with BMP180/BMP085.
Do you have an Arduino board ? which one ?
Did you install the software ? Can you upload the Blink example ?
Yes, I have an Arduino Mini Pro and BMP180, with these I want to put together an altimeter, but as I am new to this, do not know how to use the sensor in the wafer and want to learn how. Also the Soft and I have a very basic knowledge of how to use it
The Arduino Pro Mini board is a special small board, and it requires an extra usb-serial board to upload a sketch (the code) to it. Is it possible that you buy an Arduino Uno ? That is the easiest board to start with.
Which version do you have ? the 3.3V 8MHz version, or the 5V 16MHz version ?
This is the 5V 16MHz Pro Mini : https://www.sparkfun.com/products/11113
A cheap clone on Ebay is less than 2 dollars (at this moment, this is the cheapest one : http://www.ebay.com/itm/400762710802 ). Those can have a wrong designed pcb board, or the wrong crystal. As a beginner, you should not start with such a clone.
To start with Arduino:
Install the software (the Arduino IDE) and connect the Arduino Uno. In the menu, select the board and the serial port. Select the Blink example from the menu and upload it. Try to change the code and see what happens. After that, you can test sending messages to the serial monitor, and after that try to install a library for a sensor.
Yes, I have an Arduino Pro Mini 16MHz 5V and have the USB adapter. This Arduino, I'll use it in a particular project is the altimeter I mentioned. But I am interested in learning how to use it, now I want to start learning about BMP180 sensor in the Arduino code.
Here I leave a link to what I do:
http://electro.olganet.com/wp-content/uploads/2014/03/diagramme_tiny_altimeter.jpg
I would like to acknowledge the assistance it is providing me.
The higher you get, the thinner the air, and the baromic absolute air pressure is getting less and less.
So you set the initial baromic value of the ground level, then you can calculate the height according to the measured pressure value.
The BMP180 itself can not calculate the height, it only measures the absolute air pressure.
Is that what you mean ? I'm not sure if I understand your question.
I understand the concept that the pressure varies linearly with height, then I want to do with the BMP180 is to calculate heights, that is, build an altimeter. What I really want to learn is how to use this sensor in Arduino, because not as commands and others, on the internet I could not find any code.
In reply #1 I gave a link to the Adafruit tutorial.
I've been watching, but does not solve my doubts, I look for a kind of tutorial of how to put together an altimeter, that is, measured height (not elevation) with BMP180 programming via Arduino
I don't know what you mean with height not elevation.
There are many ways: air pressure, GPS, radar, a very long ruler, and so on. For the Arduino there is air pressure and GPS.
Perhaps you want GPS : Adafruit Ultimate GPS Logger Shield - Includes GPS Module : ID 1272 : $29.95 : Adafruit Industries, Unique & fun DIY electronics and kits
If you use the Adafruit tutorial, also the altitude is printed, relative to the air pressure at ground level.
You don't need to manual download the libraries, they are in the Library Manager. Start the Arduino IDE, open the Library Manager, search BMP180, select the normal one or the unified one (I choose the normal one), open an example sketch "Adafruit BMP085 Library / BMP085test" and there it is.
This is the file that calculates the altitude : Adafruit-BMP085-Library/Adafruit_BMP085.cpp at master · adafruit/Adafruit-BMP085-Library · GitHub
With this formula : altitude = 44330 * (1.0 - pow(pressure /sealevelPressure,0.1903 ) ) ;
I think I understand you, then, if I use the code of this link that you happened to me:
And I run, I can automatically measure height?
Again I appreciate your help.
I don't think so. The height depends on the current baromic value at sea level. You have to fill that in the sketch.
If you want to know the height, regardless of the baromic value at the moment, then you have to use GPS.
I understand, I think it's a little more complicated than I thought.
Basically what I want is this:
http://electro.olganet.com/2014/03/29/tiny-altimeter-oled/
Here I have a code but I fail to understand the operation
In the Adafruit library, the following line of code computes the altitude in meters, from the current pressure. This equation comes from the "standard atmosphere", which is a simple mathematical model for how air pressure varies with altitude. Look it up for more information.
altitude = 44330 * (1.0 - pow(pressure /sealevelPressure,0.1903));
If you don't know the sea level pressure near your location, but do know the altitude, you can invert the above equation to calculate the sea level pressure as follows.
int32_t Adafruit_BMP085::readSealevelPressure(float altitude_meters) {
float pressure = readPressure();
return (int32_t)(pressure / pow(1.0-altitude_meters/44330, 5.255));
}
You can use just about any modern type of digital pressure sensor for these measurements.
Note that "sea level pressure" is the number given in airport weather reports, regardless of the airport altitude.
I am seeking the following: the sensor to atmospheric pressure on land and take that pressure as reference to calculate the height and then
A common method is to use the standard sea level pressure and calibrate at a know elevation by adding an elevation offset.
For example, if the elevation given by the formula jremington posted is 2650 feet and you know the actual elevation is 2725 feet, then you just add 75 feet to elevation.
This will work for a while. Then you'll have to recalibrate again. But that's the way barometric altimeters are.
Exactly what I'm looking for is the Arduino programming code to achieve this audible altimeter.
You already have the code. All you have to do is understand it.