Author Topic: Barometric pressure rising/falling - how to determine?  (Read 10353 times)

0 Members and 1 Guest are viewing this topic.

Offline dschmidt_2000

  • Member
  • *
  • Posts: 44
Barometric pressure rising/falling - how to determine?
« on: March 23, 2014, 12:44:43 AM »
Barometric pressure rising/falling - how to determine?
Easy enough question, for some reason not so easy for me to figure out how to robustly implement this in code.

Made a small desktop digital barometer/temperature display using an 8x2 lcd display, Arduino micro and the Bosch BMP180 pressure sensor.  Sampling every 15 seconds.  Now I'd like to add an arrow after the pressure to denote pressure is rising or falling.

Don't know how I should implement this.

Just comparing one reading to the previous won't work as the arrow will only signify the change from the last reading.

Running average and then compare the current reading to previous?

What do commercial units do?

Offline Yfory

  • Senior Member
  • **
  • Posts: 65
Re: Barometric pressure rising/falling - how to determine?
« Reply #1 on: March 23, 2014, 02:31:42 AM »
I have worked on a few Arduino/sensor projects and I have found (along with most others) that averaging is the best possible way to read a sensor reliably. I worked with temperature, humidity and the variation from minute to minute was much greater than I had expected - micro climates and wind I suspect. So I finally developed a code for my projects using the published Arduino sample code for averages.

I found that 50 readings was a good start when I was sampling 10 times a minute. Sampling every 15 seconds for a barometer reading seems high but it depends on the reliability of your sensor, the quality and resolution of your ADC, and the long term goal of your project. This is your project and you need to set a sample rate and the sample average number that works for you.

Once you have a reliable average reading, you can then write the code to give you the barometer trend.

Offline nincehelser

  • Forecaster
  • *****
  • Posts: 3337
Re: Barometric pressure rising/falling - how to determine?
« Reply #2 on: March 23, 2014, 09:38:01 AM »
Much depends on the particular application, but you might just get away with figuring out what your sensor noise level is, and just ignore any small changes that could likely be due to that noise level.

You could also ignore any large changes that are isolated.  That should filter out externals things like doors opening and shutting.

Averaging, of course, works too.  I'm just pointing out that you might get by with cruder ways.

Offline dschmidt_2000

  • Member
  • *
  • Posts: 44
Re: Barometric pressure rising/falling - how to determine?
« Reply #3 on: March 23, 2014, 01:42:43 PM »
I'm pleased with how low the noise is in the reading.  That's not where my problem is.
It's how to determine if the pressure is rising or falling that I'm having difficulty.  The example below points out the problem.

Here's how I currently have it coded.

- every 15 seconds, take 4 measurements and compute the average.
- take the difference between the last 15 second average and the current 15 second average.
- if difference is > 0.01 in Hg (current average lower) display a down arrow.
- if the difference is < -0.01" (current average higher) display an up arrow.
- If neither, show a '-'

The problem though is that this only shows me the pressure change from the reading 15 seconds ago.  Even if it were every 15 mins, if the pressure dropped quickly only in that 15 seconds, but then was steady afterwards, at the 30 min sample the display is now saying there is no change.

Maybe instead just take data, compute the slope of the line over a greater time period and if positive, it's increasing, negative, decreasing, etc. 

Is there an accepted 'standard' for determining/displaying barometric pressure trends?
« Last Edit: March 23, 2014, 01:46:19 PM by dschmidt_2000 »

Offline nincehelser

  • Forecaster
  • *****
  • Posts: 3337
Re: Barometric pressure rising/falling - how to determine?
« Reply #4 on: March 23, 2014, 02:37:53 PM »
Well, I think I remember reading that NOAA defines the barometric tendency to be over 3 hours.

As a practical matter, I've seen units report anywhere from 1 to 15 minutes, mainly for graphing purposes.  The shorter the time interval, the more likely you are to catch fast events.








Offline SLOweather

  • Global Moderator
  • Forecaster
  • *****
  • Posts: 3456
    • Weatherelement Moline IL
Re: Barometric pressure rising/falling - how to determine?
« Reply #5 on: March 23, 2014, 05:44:34 PM »
Another forum says, "official definition of Barometer Trend uses a 3-hour time scale". I'm still looking for the "official" site.

Offline nincehelser

  • Forecaster
  • *****
  • Posts: 3337
Re: Barometric pressure rising/falling - how to determine?
« Reply #6 on: March 23, 2014, 06:09:10 PM »
Here's one site that at least as an "authoritative looking" URL.

http://www.erh.noaa.gov/er/box/glossary.htm

"Compiled from several sources" is kind of wishy-washy, though.

I've always wondered why more definitive information isn't more widely available.

Offline dschmidt_2000

  • Member
  • *
  • Posts: 44
Re: Barometric pressure rising/falling - how to determine?
« Reply #7 on: March 23, 2014, 08:05:09 PM »
Thanks guys.  That helps a lot.  Now I know the time period.

 

anything