Jump to content

Banner.jpg.b83b14cd4142fe10848741bb2a14c66b.jpg

Weather Station Ideas


Gina

Recommended Posts

Ordered more cable to wire up my weather station units.

12V 24V AUTOMOTIVE 2/3/4/5/7 CORE THINWALL RED/BLACK CAR CABLE WIRE ROUND/FLAT (Flat 2 Core 0.5mm² 11Amps, 10 Metres)

This is similar to but smaller than the 16.5A cable I used for the main 13.8v feed in my observatory.  It will be fed from a buck converter to drop the main supply to 5v.  I may rebuild my main power distribution box to provide this extra supply.  Currently I have 4 supplies at 13.8v

  • Mount
  • Imaging rig
  • ASC
  • Roof control

These are all provided with digital ammeter, fuse and switch.  I think the weather station supply deserves the same treatment.

Link to comment
Share on other sites

Wired up a stripboard for ESP32 and BME280.  ESP32 is working and connecting by WiFi but BME280 isn't.  The connections look right and I can't see any solder bridges.  I'll check again later - need a break now and cool off!!

Link to comment
Share on other sites

This will be going in the Stevenson screen.  Now I'm not sure what would be the best orientation.  Flat ie. horizontal with the plane of the stripboard parallel with the ground or "stood up" ie. plane of stripboard vertical with the front of the ESP32 facing the house (and WiFi AP).

Link to comment
Share on other sites

Now I have this much working I need to change the code to read the BME280 every so often and save the results to variables then on connect reads these variables instead of the BME280.

Link to comment
Share on other sites

Running a 2s loop and added code to check if pressure is rising or falling.  Next to categorise this further into Slowly or Quickly.  Also, the "No Change" needs a tolerance.  Currently the pressure reading is very precise so the pressure is always either rising or falling.  The readings are being displayed to more precision than the measurement so this wants correcting too.  All these are simple changes.

738234754_Screenshotfrom2020-07-3118-11-50.png.846de62318f7ac7ab6ea7f9748779238.png

1922533106_Screenshotfrom2020-07-3118-28-02.png.94593cfd4025e9bbbe577b4920942025.png

Edited by Gina
Link to comment
Share on other sites

Been Googling to find what they call barometric pressure rising/falling Slowly, Quickly, Very Rapidly.  I guess I can interpolate this to work over a much shorter period.  Rather than a 2s period for the main loop I could do with a longer period but allow WiFi access to the data without having to wait too long.  So either interrupting on connect or running the on connect response rapidly and using a time interrupt.  The latter would need a Real Time Clock though I think.

1130872628_Screenshotfrom2020-07-3119-39-29.png.2f4a918886b9de0038ec78cacb761ae9.png

Link to comment
Share on other sites

26 minutes ago, Gina said:

The latter would need a Real Time Clock though I think.

 

You should be able to use your wifi router for that. The esp has rtc functionality that can use the time from the wifi router.

Btw, rather than saving data in varables, as you wrote earlier, consider saving it in a file on the esp. The weather station web server can access this file. If it contains a time stamp plus weather data, it's easy to determine the validity of the data. The file doesn't need to be updated every 2 seconds. Perhaps only every 30 seconds. Keeping data in a file rather than variables, seems more robust to me.

Have a look here

https://github.com/wberlo/indi_meteostation/blob/master/main.py

The program measures weather parameters every minute and stores the data in the index.html file. Whenever a request comes in from a web client, the server responds with the html file. What's more, the INDI weather watcher can access and interprete this information as well. For a web client, this "page" can be made to look fancier with the help of css.

Just a thought.

  • Thanks 1
Link to comment
Share on other sites

Interesting.  I'm used to using an RTC - have them in all my home made clocks.  Easy enough to connect to an ESP32 and use.  It would certainly make it much easier to create useful data.

Link to comment
Share on other sites

Yes, I think I'll use RTCs - they aren't expensive.  Let the web server run continuously and use the RTC to interrupt as required.  The process involved can process the data and make an HTML file as you say.

AZDelivery 3 x DS3231 RTC Real Time Clock I2C compatible with Arduino and Raspberry Pi

Link to comment
Share on other sites

Please tell me if I'm wrong but I think the circuit board wants mounting vertically in the Stevenson screen with the antenna at the top facing towards the house and WiFi AP.  Less likelihood of dew collecting on the surface.  Probably a good idea to coat the ESP32 with damp repellent though.  I have some somewhere.

Link to comment
Share on other sites

Since the Stevenson screen is going on the side of the obsy I'm wondering if the ESP32 could go just inside.  It would only need a few inches or say between 100mm and 200mm.  Googling seems to talk of metres but I think there's confusion.  Might try 150-200mm of ribbon cable to connect tomorrow (too tired tonight) and see if it works.

Link to comment
Share on other sites

The sensor is I2C, isn't it?  If so I'd have thought 200mm ought to be ok.  You might even be able to use a length of cat5 rather than ribbon cable which might be more convenient from the point of view of running the cable.

James

  • Thanks 1
Link to comment
Share on other sites

33 minutes ago, JamesF said:

It seems the nunchuks for the Wii console use I2C and they have cables perhaps a metre or so long, so it looks like you should be good.

James

I suspect a bespoke bit of tuning of both circuit components and bus timing to get it to work from Nintendo :) 

Link to comment
Share on other sites

Just put the esp in the stevenson screen, no extra enclosure needed. Any extra enclosure will add some shielding which may affect the wifi signal strength. Electronics generally warms up enough not to dew up. Otoh, dew on the screen or rain may very well limit the wifi range. And make sure the antenna can 'see' the wifi source.

As for i2c distance, I've used 0.3 - 0.4 m cat cable between a bme280, mlx ir sensor and an esp, and it worked fine. But I did connect an extra capacitor between + and - of the power leads.

Edited by wimvb
  • Thanks 1
Link to comment
Share on other sites

27 minutes ago, wimvb said:

Just put the esp in the stevenson screen, no extra enclosure needed. Any extra enclosure will add some shielding which may affect the wifi signal strength. Electronics generally warms up enough not to dew up. Otoh, dew on the screen or rain may very well limit the wifi range. And make sure the antenna can 'see' the wifi source.

As for i2c distance, I've used 0.3 - 0.4 m cat cable between a bme280, mlx ir sensor and an esp, and it worked fine. But I did connect an extra capacitor between + and - of the power leads.

You've got bigger problems if a bit of plastic is blocking the WiFi :) The one in my enclosure is the single bar antenna version with external antenna connection which I was going to use but didn't need to in the end.  This I think it about 70m down the garden from the AP separated by a couple of walls etc. and foliage.

Even with conformal coating on the board the connections will succumb to moisture and corrosion, additional small enclosure strongly recommended, see: 

 

 

  • Like 1
  • Thanks 1
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.