Jump to content

Banner.jpg.b83b14cd4142fe10848741bb2a14c66b.jpg

Weather Station Ideas


Gina

Recommended Posts

There are two sites I had in mind for the wind instruments but one I used in the past involves using a ladder to attach the mast to a shed.  The second is on the SE corner of the sun lounge, on the south side of the bungalow, with the bottom of the mast on the ground.  The disadvantage of the second site is that the wind will be partly obstructed by the bungalow from the north.  OTOH wind from this direction is generally less and also less frequently in this quarter.  Most storms come from the SW or SE.  We are sheltered from the NW by rising ground and tall trees.

Checked second position and it's out of sight of the imaging rig.  Also, the mast height is about the same as the roof ridge on the bungalow.

Edited by Gina
Link to comment
Share on other sites

@Gina If you put it in a sub-optimal location, you can assume it will be very reliable. If you put it in the ideal location (high up, hard to get down etc), then you can be sure it will not be reliable and require frequent inspection. There must be a name for this phenomenon when it comes to weather instruments.🤔

  • Like 1
Link to comment
Share on other sites

Generally it's called "Sod's Law".  And I agree entirely!!  Yes, I'll put it where I can take it down for servicing fairly easily.

Edited by Gina
  • Haha 1
Link to comment
Share on other sites

I think this may be the final model of the wind instruments.  Mainly printed in white PLA except for the mast and vane which are aluminium and the nosepiece/counterweight which will be turned in brass.  Oh and several nuts and bolts.

23676459_Screenshotfrom2020-07-0920-11-56.png.abb2f93f2b2248065d31af275d1a2bf1.png

Edited by Gina
Link to comment
Share on other sites

On 01/07/2020 at 13:49, pete_l said:

Since we're talking in an astronomy forum, it seems to me that the best place for an anemometer would be close to your telescopes. That way you can assess the impact that wind has on them and on your imaging.
With experience you could then know when there were good conditions for viewing, or when it was too windy for the telescope to remain stable.

I have taken this on board and thank you for your suggestion.  For this and other reasons I have decided to mount the mast for the wind sensors on the SW corner post of the observatory.

Link to comment
Share on other sites

I'm using reed switches for the wind vane arranged in a cylinder with the magnet in a sleeve round it, the latter providing weather protection as well as holding the magnet.  The anemometer uses 4 magnets in the disc shaped hub and a Hall device.

875722229_Screenshotfrom2020-07-0521-42-03.png.1e7cea86c0bf2e7f9780d190e5c0c132.png

1710519091_Screenshotfrom2020-07-0919-47-18.png.15bc62063c3801e3084dbdf6308ccf8c.png

With the wind sensors mast attached to the observatory I can now use one SBC to collect all the weather data with the wind data connected by wires.

Edited by Gina
Link to comment
Share on other sites

I was thinking of using this circuit for the wind direction sensor but with lower value resistors and connected to the ADC inputs of an ESP32.  4 signal wires plus Gnd.

1848708613_Screenshotfrom2020-07-0515-36-03.png.eeeeb104b8b8ca892767b49955994a68.png

The question is though, how far can I run the wires safely without picking up interference.  I was thinking that, with the wind instruments mounted on the observatory, I could use one ESP32 for all the weather measurements but due to the size of the observatory this would involve wiring several metres long.  Maybe this isn't such a good idea.  It's not as if ESP32s are very expensive so maybe a separate one for the wind measurements would be better.

Link to comment
Share on other sites

If I use a separate ESP32 for the wind measurements it can go in the plastic part at the top of the pole/mast with very short wires.  In fact I could simply run 9 wires and use 8 digital inputs on the ESP32 with internal pull-up thereby eliminating all the resistors.

Link to comment
Share on other sites

One question about the ESP32 - does it matter which way the antenna points?  I'm think I could have it "portrait" style with the antenna at the top.

Link to comment
Share on other sites

Sorry but that's wrong.  There will be two reed switches "on" when the magnet is between the two.  A side effect of this is to give 16 detectable directions.  It also means that there is no position in which all are "off".

Edited by Gina
Link to comment
Share on other sites

Might be able to use the ESP8266 NodeMCU V1.0 ESP-12E WiFI Module (which I also have) if I use all digital inputs.  It has 10 GPIO digital pins but I don't know if any of these are reserved.

Link to comment
Share on other sites

Been Googling (other search engines are available) and it looks iffy - pinout

Does anyone on here know exactly which GPIO pins on the ESP8266 NodeMCU V1.0 ESP-12E WiFI Module can be used for digital input?

Link to comment
Share on other sites

Looks like the ESP8266 module and digital inputs could be a goer.  The alternative would be the ESP32 which would do the job and so much more that's not wanted.

Seems the ESP8266 may do all I want for the wind sensors, light sensor (ADC) and rain gauge which I may mount on the same mast.

Edited by Gina
Link to comment
Share on other sites

I've decided to use digital inputs on the ESP (probably an ESP8266-12E) and wire the reed switches one-to-one to 8 digital inputs with the other ends commoned to another wire going to the Gnd.  I prefer all digital rather than any of the analog techniques due to the virtual immunity to interference.  Using internal pull-up resistors this arrangement needs no resistors at all.

Link to comment
Share on other sites

I have the ESP8266 NodeMCU V1.0 ESP-12E WiFI Module on a breadboard ready to connect to for testing.  I have the information on programming this so that's alright, I think.

Now to the nitty-gritty... Can someone please tell me how to read the WiFi signal from my computer (Linux Mint).  For astro I use KStars/Ekos but the far end uses RPi with INDI - a totally different system.  I know several of you use these ESP devices in your weather stations so I would appreciate help here please and not try to "reinvent the wheel".

Link to comment
Share on other sites

6 minutes ago, Gina said:

I have the ESP8266 NodeMCU V1.0 ESP-12E WiFI Module on a breadboard ready to connect to for testing.  I have the information on programming this so that's alright, I think.

Now to the nitty-gritty... Can someone please tell me how to read the WiFi signal from my computer (Linux Mint).  For astro I use KStars/Ekos but the far end uses RPi with INDI - a totally different system.  I know several of you use these ESP devices in your weather stations so I would appreciate help here please and not try to "reinvent the wheel".

Not sure I understand what you are asking Gina??

Do you want to know what settings you are using on the linux machine?

Wanting to connect the ESP to a wifi access point?

I can probably help on both... 

  • Thanks 1
Link to comment
Share on other sites

To receive the data from the wx station?

If so, then it also depends on what you plan to send from the WX station.

Here, I use something called MQTT which is a protocol that allows me to describe what and where and the value eg: home/garden/rainhourly = 0.1mm or home/garden/temp=22 or home/bedroom/temp = 24 etc 

It's a publish and subscribe model which needs something called a broker, this runs on one of my linux boxes and is a hub that all devices broadcast to and that other things can subscribe through, so my little weather display here in the study subscribes to all the home/garden stuff and also the home/*rooms* stuff so it can display all the weather plus temp/humidity in the rooms etc...

Is that what you were after?

I am not up to speed with any dedicated weather station receiving programmes though I am sure there might be one somewhere?

Link to comment
Share on other sites

Oh dear - that's gone right over my head.  For a start I just want a program that reads data from the ESP and displays it.  Either as numbers or as graphs/charts.  Later I would like to upload to my web site, which I used to do years ago but used a commercial weather station.  I wondering though if my brain is getting too old to handle all this.

Link to comment
Share on other sites

I'm sure I'm missing something quite simple here.  Getting confused!  I can handle modifying the C++ code in the INDI drivers to suit my astro needs but the framework is already there.  I reckon that if I had that for the weather station I could modify the code to suit my inclinations.  I'm well familiar with C++ so coding the ESP is no problem (same as Arduino) and I've used Python in the past and could probably pick it up again.  I have a fair sized book on Python programing.

Link to comment
Share on other sites

No - it's probably my bad way of explaining one of many ways to get the data off the ESP to somewhere else! :) 

I went down the MQTT route because so much stuff uses it today for IOT so thought I might get some advantage out of using the same approach, this works well as my house lighting uses MQTT also.

So here's how mine works:

Sensors ---ESP -.-.-.-.-.-.-.-.-.-.-Wifi AccessPoint -.-.-.-.-.-.-.-.-.-.- Linux Box

On the Linux Box I run a MQTT broker (Mosquitto), NodeRed and an Influx database. 

The ESP read and processes the sensors and at certain times (every 5s or every minute etc) sends a MQTT message which identifies where the data reading is from, what the data reading is and also it's value. so that might be:

where = home/garden/    what=wind/speed_2m = value=8.44

on MQTT this is known as a 'topic' that looks like home/garden/wind/speed_2m and will have a value 8.44

In addition to the MQTT the ESP also sends a tweet every couple of hours and uploads to wunderground every couple of minutes.

image.png.676cd29f0749820c2e4531fcec520a73.png

https://www.wunderground.com/dashboard/pws/ICHELMSF35

 

The broker on the linux box receives all the broadcasts

Now say I am a display in my study, I am interested in the wind speed every 2 mins, I would connect to the broker, and subscribe to the 'topic' home/garden/wind/speed_2m Each time there is a publish from the wxstation of that topic, it will also then be sent by the broker to the display in the study which will then act upon it.

NodeRed is like a graphical programming language which I use to do some other stuff around the house, this connects to the broker using the same subscribe approach for various topics and acts on the topics when received, for example my Nodered subscribes to all the wxstation's topics and stores them in a database when received.  Because of the way the topics are structured, you can subscribe using a wildcard to pick up all of them, so for example "home/garden/wind/*" will pick up all garden wind values (so speed, gust, direction etc). There is no specification of what you use for your topics but using something that makes sense and allows for future groupings is a good idea.

Once the data is in the database (Influxdb) I can then also use their tools to create a dashboard showing the weather data (for this I use Grafana). This could probably be embedded in a web page somehow... Here's what that looks like:

image.thumb.png.0b4cea7db710f425bc65304c729c9ed0.png

 

 

There is probably some software to do this for just a weather station - it probably uses similar components - I'm just a bad hacker pulling together bits with a little understanding, I am sure a proper developer would know exactly how to describe and do better what I have :)

 

So I guess having a think about what data, where you want it to be and how you want to use it (now and in the future) would be a good start to work out the best approach for you, however I can recommend MQTT in some form as it is well supported for 'IOT devices' which the weather station is to some degree.. 

Here's some more stuff on MQTT

https://www.hivemq.com/blog/mqtt-essentials-part-1-introducing-mqtt/

Also this chap is quite useful for info on more than just MQTT (also devices around the house etc) https://tech.scargill.net/

 

Another option might be looking at some of the home automation software which might give you a way of sending the data (in their format) and using/presenting it.  Home assistant or openhab etc... 

 

 

 

 

Link to comment
Share on other sites

I can see the benefits of MQTT etc., but I think it's possibly over the top for what you want, Gina.  Where it would probably come in really useful is if you have all sorts of things that need to happen based on the data from the weather station.

As you say though, there must be some relatively simple software that reads the sensors and either writes it to some application running on the network elsewhere, or makes it available for applications to read over the network.  I wonder if Wim's weather station project might give you a good head start:

https://stargazerslounge.com/topic/345153-indi-weather-station/

His software is on github.

James

  • Like 1
Link to comment
Share on other sites

Just now, JamesF said:

I can see the benefits of MQTT etc., but I think it's possibly over the top for what you want, Gina.  Where it would probably come in really useful is if you have all sorts of things that need to happen based on the data from the weather station.

As you say though, there must be some relatively simple software that reads the sensors and either writes it to some application running on the network elsewhere, or makes it available for applications to read over the network.  I wonder if Wim's weather station project might give you a good head start:

https://stargazerslounge.com/topic/345153-indi-weather-station/

His software is on github.

James

Yes - if it's just for integration in to Ekos etc, then I agree certainly.  Not withstanding the limitations on space inside the ESP and any time constraints, there probably no reason why you couldn't incorporate this and if at a later date needed more than just sending stuff to indi, then the extra could be added (eg: I have MQTT, Twitter and Wunderground uploads from my ESP8266 weather station - also toying with indi uplink as well)

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.