Needing a kick start on pressure sensors (for elevation/atmospheric pressure) - Page 1
Forum section: electronics / projects

author: JPortici
author_rank: Super Contributor
timestamp: February 24, 2017, 09:28:58 am
content: Hi,in an upcoming project we would like to monitor the elevation* of the device to adjust some value automatically, instead of having a trimmer that do it manually.A pressure sensor seems to be the ideal choice (low complexity, if i understood it right with self contained sensors i just apply power and read the data from I2C when needed) but i am not sure on how to choose the sensor.The elevation range would be sea level to say 3000m above sea, i found this BMP280 from bosch that could fet (or couldn't? i don't know)(DS:http://www.mouser.com/ds/2/783/BST-BMP280-DS001-12-844746.pdf)a hint in any direction would be appreciated, just don't know where to start looking.*i said elevation, what i really want to know is local atmospheric pressure but having also an estimate of at what height i am right now could be useful

author: nfmax
author_rank: Super Contributor
timestamp: February 24, 2017, 10:44:51 am
content: Those Bosch sensors (and their predecessors) are pretty good, and as you say fairly simple to use. You have to read the calibration factors out of the device and process the sensor readings yourself to get actual pressure (and temperature), but it's just (floating-point) arithmetic.Remember the atmospheric pressure at sea level can vary quite widely - about ±4%. If you are reading ambient pressure and then correcting for reported sea level pressure to get height above sea level, you have to apply a standard atmosphere model to the sea level pressure. At low altitudes, both the US and ICAO standard atmospheres use the same model, so you can get the pressure formula from either. When I did this, I looked it up in the CRC Handbook of Chemistry & Physics - there is a Wikipedia pagehttps://en.wikipedia.org/wiki/Barometric_formulabut I'm not sure of its reliability

author: mac.6
author_rank: Regular Contributor
timestamp: February 27, 2017, 04:33:06 pm
content: BMP180/280 code is available on github from Bosch, too much verbose code (1400 line header file, doh!) but quite easy to use.

author: DaJMasta
author_rank: Super Contributor
timestamp: February 27, 2017, 05:59:24 pm
content: I believe sparkfun also has a library for at least the BMP180 (they make a breakout board) to make it trivial to use on an arduino platform.They are not the most accurate of available sensors, but they're decently priced and do give you pretty detailed measurements. I think most any available sensors will have no problems at 3000m, but you can check by checking atmospheric pressure at 3000m above sea level and looking at the pressure spec on the sensor, and there are probably even calculators that make it so you don't even need a formula.

author: JPortici
author_rank: Super Contributor
timestamp: February 27, 2017, 06:08:05 pm
content: who cares about arduino, i actually read the datasheets!but seriously, i ordered the bmp280 breakout board from adafruit (the 180 is actually end of life, no good for production)it should arrive tomorrow. i think i'll have time to play with by the end of the week

author: DaJMasta
author_rank: Super Contributor
timestamp: February 27, 2017, 08:18:58 pm
content: Reading the datasheets is great, not having to write your own low level communication code just to read a value is great too.There's definitely a place for all the libraries and interfacing you get with arduino and the associated stuff... maybe that's not in a finished product, but it's quite handy in building up a quick prototype or trying a new sensor out.If you've got a 280 on the way then there's probably no need, but I believe you can get really, really cheap Chinese 180 (or even 280) modules on ebay.