Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


outdoorsnz

694 posts

Ultimate Geek
+1 received by user: 303

ID Verified

#293730 10-Feb-2022 16:02
Send private message

I have been playing around with ESP8266 WEMOS D1 / D2 mini wifi board with DHT11 / DS18B20 / SPL06-007 sensors all sourced from jaycar.

 

Primarily as inside / outside temperature information displayed as a basic internal website. Avoided anything cloud based.

 

This has got me thinking that the SPL06-007 would be perfect for a simple portable battery powered display to show temperature and altitude on a lcd matrix screen when out tramping etc.

 

The code to display the altitude is:

 

get_altitude(get_pressure(),local_pressure)

 

Where the example suggests you need to know your local airport air pressure.

 

Can this variable be set and forgot (i.e. 1011.1mb from example) or would you need to regularly have to update this variable as air pressure changes?

 

Any suggestions would be great thanks :-)


Create new topic
elpenguino
3576 posts

Uber Geek
+1 received by user: 2938


  #2864854 10-Feb-2022 17:00
Send private message

You need to know the local pressure to work out altitude i.e. you need the pressure from the sensor.

 

You also need to know the air temperature to work things out properly unless the air temperature is nice enough to always stay at 15 degrees as per the 'standard atmosphere'.

 

Have a squiz at this.

 

https://keisan.casio.com/exec/system/1224585971

 

 





Most of the posters in this thread are just like chimpanzees on MDMA, full of feelings of bonhomie, joy, and optimism. Fred99 8/4/21




frankv
5705 posts

Uber Geek
+1 received by user: 3666

Lifetime subscriber

  #2864917 10-Feb-2022 17:22
Send private message

Altitude is calculated from the equivalent sea level pressure - observed pressure. Equivalent sea level pressure (aka QNH) is the pressure there would be at sea level at your location if you weren't standing on a mountain. If you don't know QNH, you can't accurately calculate altitude. These are the isobars shown on the weather map on TV or MetVUW. Variations in QNH can give you errors of 1,000ft or so, but that kind of change wouldn't happen in a day. What you could do is press a button on it for it to calculate the QNH when you're at a known altitude, then use that QNH for the next few hours.

 

Suggestion: rather than an LCD, go for an e-ink display... they're zero power when they're not updating. Also easy to read in bright sunlight, although you need to illuminate them to see them at night.

 

 


outdoorsnz

694 posts

Ultimate Geek
+1 received by user: 303

ID Verified

  #2864918 10-Feb-2022 17:26
Send private message

elpenguino:

 

You need to know the local pressure to work out altitude i.e. you need the pressure from the sensor.

 

You also need to know the air temperature to work things out properly unless the air temperature is nice enough to always stay at 15 degrees as per the 'standard atmosphere'.

 

Have a squiz at this.

 

https://keisan.casio.com/exec/system/1224585971

 

 

The pressure sensor module also provides temperature. So I could just use a base local pressure measurement, but clearly this will give variable results.

 

So might look at a GPS module for high accuracy measurements.




frankv
5705 posts

Uber Geek
+1 received by user: 3666

Lifetime subscriber

  #2865138 11-Feb-2022 08:52
Send private message

outdoorsnz:

 

elpenguino:

 

You need to know the local pressure to work out altitude i.e. you need the pressure from the sensor.

 

You also need to know the air temperature to work things out properly unless the air temperature is nice enough to always stay at 15 degrees as per the 'standard atmosphere'.

 

Have a squiz at this.

 

https://keisan.casio.com/exec/system/1224585971

 

 

The pressure sensor module also provides temperature. So I could just use a base local pressure measurement, but clearly this will give variable results.

 

So might look at a GPS module for high accuracy measurements.

 

 

If you have a GPS module for altitude, you can then use that plus your air pressure sensor to get QNH, which will allow you to see if QNH is dropping which would indicate bad weather on the way.

 

 


outdoorsnz

694 posts

Ultimate Geek
+1 received by user: 303

ID Verified

  #2865276 11-Feb-2022 11:15
Send private message

frankv:

 

If you have a GPS module for altitude, you can then use that plus your air pressure sensor to get QNH, which will allow you to see if QNH is dropping which would indicate bad weather on the way.

 

 

Think I will start the project without the GPS and add that later on after I get all the initial hardware setup. Sure your phone will do all that, but more of a exercise to learn.

 

As I live at sea level, I can easily set the baseline. I just need to have a way to quickly set the base sea level pressure. Any suggestions on this? Some sort of toggle that allows you to go up / down, starting at a 1000mb and push to set.

 

Perhaps a ESP module that has a toggle button built in would save components.

 

And a step counter might make it quite cool also. A good motivator to get out into the hills!


frankv
5705 posts

Uber Geek
+1 received by user: 3666

Lifetime subscriber

  #2865379 11-Feb-2022 12:59
Send private message

You just need one button... press it when you're at sea level, and your device reads the pressure. That's the QNH. Bingo! Job done. Or have your device do it when starting up... so no buttons needed so long as you're happy to always do this at sea level. Any time you want to reset, just turn off and on again.

 

Alternatively, if you're happy to get the height gained rather than absolute height above sea level, the same kind of thing applies. Press the button (or power on) at the start of your tramp at (say) 1,000ft and the device will give you your height relative to 1,000ft. 

 

If you want to set a specific numeric value for QNH, ideally you would want 3 buttons... up, down, and set. You could combine those functions onto 2 buttons... press both to start setting, press up or down to adjust, press both to finish setting (or just time out). Or you could get clever with long and short presses and/or double-clicks to mean different things, in which case you could do it with one button.

 

 


Create new topic








Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.