BMP180 barometric sensor
LA6WNA
Posts: 138
in Propeller 1
Hi all.
I`m about to convert my weather station from BS2 to Propeller version. In this new version I`d love to hook up a BMP180 barometric sensor module that`s laying around here afther an impulse shopping at e-bay. Does anyone out there have an functional Spin-code to read this sensor, that you eventually could share??
I`ve been through OBEX and the Forum, but couldn`t find anything. Just asking..
I`m about to convert my weather station from BS2 to Propeller version. In this new version I`d love to hook up a BMP180 barometric sensor module that`s laying around here afther an impulse shopping at e-bay. Does anyone out there have an functional Spin-code to read this sensor, that you eventually could share??
I`ve been through OBEX and the Forum, but couldn`t find anything. Just asking..
Comments
Also look at any other specific driver with the intention to modify it to suit.
Try this to start with:
BMP180 Barometric Pressure Sensor
This code reads the BMP180 barometric pressure sensor by Bosch. Currently support for the Parallax Propeller in SPIN to supplement existing code for the Arduino provided by SparkFun Electronics. Testing was done with the BMP180 breakout board (link below) and a Propeller ASC+. Different resolutions are selected on sensor initialization as documented in the code.
https://github.com/jrleeman/BMP180
Thanks alot for provided ideas. I`ve tried the code from github tonight, provided by Bob, and it worked well at once. No issues with this. I also use the breakout board, where the pull-up`s already are mounted. Think I`ll go for this code and modify it a little to suit my setup. I`ve never worked with barometric sensors before, so I also have one more question: Do I have to calibrate the Pascal readout value for the altitude of my weather station? I mean, if this sensor is calibrated at sea level and I`m going to have it mounted abt 200m above the sea level, would there be an offset? Any of you have experience with this?
Depending on how crazy you want to get with accuracy there are a variety of formula. You just need to pull your elevation from Google Earth or a GPS unit. It's also good to compare with a local station to make sure the implementation is correct. In the Arduino code for the BME180 it's implemented as:
You can also go little more in-depth as shown here or in how we calculate altimeter settings.