Jump to content

Banner.jpg.b89429c566825f6ab32bcafbada449c9.jpg

Weather Station Ideas


Gina

Recommended Posts

There are examples of the time formatting  and ntp and timer interrupts in my code link to git hub. I use them all the time. Use a base heartbeat and then code for multiples for different time lengths. You can have a few running in parallel but there is a limit.

I have no idea why you would turn on Wi-Fi to enable ntp and then  turn it off again !

Note that printf and variants require Strings converted to c_str() char arrays. 

Hth

  • Thanks 1
Link to comment
Share on other sites

7 minutes ago, jiberjaber said:

The ESP has a storage drive on it which you can use and reference in your web pages, you could store an icon on there or reference a png on the net somewhere in the html?

How do I do either of those?

Edited by Gina
Link to comment
Share on other sites

9 minutes ago, Gina said:

Added a 5 minute period and compared pressure.  Taking 0.1hPa difference to trigger Rising or Falling but don't know if 5m is long enough.  Maybe an hour would be better.

I would like an up arrow and a down arrow symbol or character rather than words - any ideas anyone?  Please?

Reference external script resources to supply those icons. Names escape me right now (axis )  but there are many standard icon libraries used from, say, node that you just don't want to duplicate. Let your browser take the strain for you. 

  • Thanks 1
Link to comment
Share on other sites

Having pretty much sorted out the ESP32 for the outside and observatory sensors, I'm now looking at the wind sensors. 

I have the magnet distance somewhere near right but the amount of overlap between adjacent reed switches varies a lot, probably due to varying read switch sensitivity.  Can't say I'm very happy with the magnet and reed switches but I seem to be stumped for a viable optical system.

Link to comment
Share on other sites

If I were to go optical, the Gray coded discs would have to be on the outside with the optical sensors inside since the rotating part is the outer one.  The discs would actually be rings with the notches on the inside and I'm thinking aluminium filed to shape by hand.  3D filament is not sufficiently opaque to IR.  The optical sensors could probably be set in a 3D printed structure.  These would be the notch type with emitter one side and photo-transistor on the other.  These are better than the reflective type though reflective would be easier to use.

Link to comment
Share on other sites

6 hours ago, skybadger said:

Note that printf and variants require Strings converted to c_str() char arrays.

Just in case it isn't clear though, I don't believe you're allowed to do this for the target of (for example) sprintf().  So you can't do:

  sprintf ( instanceOfString.c_str(), "some format string", variables... );

because the return value of c_str() should point to a const type.  Hopefully any such attempt would be rejected by the compiler.

James

  • Thanks 1
Link to comment
Share on other sites

8 hours ago, Gina said:

If I were to go optical, the Gray coded discs would have to be on the outside with the optical sensors inside since the rotating part is the outer one.  The discs would actually be rings with the notches on the inside and I'm thinking aluminium filed to shape by hand.  3D filament is not sufficiently opaque to IR.  The optical sensors could probably be set in a 3D printed structure.  These would be the notch type with emitter one side and photo-transistor on the other.  These are better than the reflective type though reflective would be easier to use.

3D printed with aluminium tape on top? Could be used in transmission or reflection mode. I have no idea how age resistant aluminium tape is, though.

  • Thanks 1
Link to comment
Share on other sites

I remember from earlier experiments that the reflective sensors were very sensitive to daylight and would need serious shielding to provide sufficient darkness.  Will see what the transmission sensors are like.  I would expect that the ON condition would be a lot better than the reflective type so we could tolerate more OFF current.

Link to comment
Share on other sites

Just tested a slot type optical sensor and surprisingly a 2mm thick piece of white PLA stops the light fine.  Thought I might at least have to use a coloured filament.

  • Like 1
Link to comment
Share on other sites

I think I have a workable idea. First though, the principle.  This is a Gray coded disc.  It has the principle that only one sensor changes at a time so there are no alignment problems.  The code can be converted to binary to give the angle. The black is MSB and blue is LSB.

Gray Encoder Disc 4 Track.JPG

Next to note that the black and red tracks are the same but rotated by 90° so we can use one track and put the 2nd sensor at 90° to the first and get the same effect.  That means 3 tracks are enough saving space.

Using the slot type sensors means something different from a disc - we go into three dimensions- like this (taken from an earlier design) :- 
Encoder 02.png

Encoder 03.png

To avoid making the "disc" bigger to make space for sensors side by side, they can be arranged like this :-
Position of optical sensors 01.png

This is just the general idea and will be altered in size for the present wind direction sensor.  These are very old diagrams produced in SketchUp some years ago.

  • Like 1
Link to comment
Share on other sites

Now to the dimensions.  The sensors have a 3.5mm gap and 4.5mm wide side parts (containing IR LED and photo-transistor).  This means the width of the PLA wants to be 2mm and at least 6mm between.  This gives 1.5mm allowance for tolerances.  That gives me a start for altering the CAD from reed switches to optical.

Link to comment
Share on other sites

Design pretty much finished though I may be able to do a bit of tweaking to slim it down a bit.

This is how it will look.
2136249516_Screenshotfrom2020-08-0422-53-05.png.9b916d358bd8e8a5c9406c84077f3a52.png

And this shows the insides.  Wiring and optical sensors not shown.
1717282160_Screenshotfrom2020-08-0422-54-55.thumb.png.3d4d345672cb9450cbd361ac0772f026.png

Edited by Gina
  • Like 2
Link to comment
Share on other sites

Design modifications.  I might raise the wind vane and sensor to give more clearance with the anemometer.

1818592709_Screenshotfrom2020-08-0513-17-35.png.9114e3f13f72e831bcea9b719329a540.png

1949743955_Screenshotfrom2020-08-0513-15-46.thumb.png.1dbf74638954aa2961b82c3aef3ae76f.png

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

Change of design again.  The sensor part wanted to go a bit higher so I've combined it with the vane arm.  I think this make for a smoother design.

772558552_Screenshotfrom2020-08-0611-53-49.png.e2a0d9ab0debd02cea1e79c4bfb20293.png

5878420_Screenshotfrom2020-08-0612-35-05.png.50a43f9bfad22379623849f4a31c1d4f.png

263397374_Screenshotfrom2020-08-0612-53-12.png.dd9f0ad5b172e5fa874a41d9cf54b5f7.png

1799055542_Screenshotfrom2020-08-0612-54-17.png.04ec3d0ee696d779b9017ff8f4a95098.png

Edited by Gina
  • Like 2
Link to comment
Share on other sites

For the temperature, humidity and pressure sensor unit I have tidied up the display and added dew point for both inside and outside the observatory.  With temperature only accurate to 1°C, humidity to 3% and pressure to 1 hPa there is no point in displaying fractions.

732575343_Screenshotfrom2020-08-0620-15-47.png.5bf931fcbc5a0b277dfeacb7d95ac2e9.png

Link to comment
Share on other sites

I'm not sure it's really required, but f you want more accuracy there is the 1-wire DS18B20.  If I recall correctly they're +/- 0.5C.  I bought quite a few some time back.  For the moment I use four of them and take the average of the readings just because I could, really.

  • Like 1
Link to comment
Share on other sites

Been checking out the Gray code wheel and positions of the optical sensors and I'm not sure I've got it right so I'm checking in more detail.

Link to comment
Share on other sites

I think I have this worked out now.  An interrupted beam produces a low level output and a logic 0.

  • S1 on the inner ring along the N line. 
  • S2 also on the inner ring along the W line. 
  • S3 on the middle ring along the S line. 
  • S4 on the outer ring along the E line.

1557024680_Screenshotfrom2020-08-0716-18-59.png.5002e889f55f93c055e138d61cd57e4e.png

Edited by Gina
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.