Jump to content

SkySurveyBanner.jpg.21855908fce40597655603b6c9af720d.jpg

Arduino Based Weather Station


Gina

Recommended Posts

Rather a large error at 180° :(  Strange.  Tried altering the vane to give an angle output of 180 and this is the error.  I'm going to put the code back to 803 and try again.  I'm not exactly wasting my time - I don't feel like doing anything more productive :D  I'm just playing while listening to music. :D

5a382e299eeda_SensorErrors04.thumb.png.3de3290dcc0db159207614f945431339.png

Link to comment
Share on other sites

Here we go...  Errors :-  -5, -3, 1, 2, 2, 7, -2, 0, 0, -4.   That's not far off for offset.  I think I'm getting the vane angle within a degree or two.  I think I'll apply a table to correct the errors which are now worst at 0° and 180°, though is 7° significant regarding wind direction.  I used to measure the wind in 16 directions ie. in 22.5° steps.  The current system is already more than three times better without error correction :)

5a382fd176874_SensorErrors05.png.84398178302982aa58fed57e0889c575.png

Edited by Gina
Link to comment
Share on other sites

I would be rather interested in knowing just what's causing these errors.  I purposefully offset the sensor chip by 1mm in accordance with the datasheet diagram showing the position of the centre of measurement.  OTOH I read somewhere else to put the magnet in the centre of the chip.  I only have to take the anemometer off (one screw) to get at the sensor.  Then I could take the chip carrier (breakout board) off and cut the plastic mounting so that I can centre the chip w.r.t. the magnet.

Link to comment
Share on other sites

Moved another mm making a 2mm offset.  Values are :- 346, 31, 83, 133, 177, 214, 263, 305, 346
Adding 14                                                                                 0  45  97  145  191  228  277  319  360/0
Error                                                                                          0    0    7    10    11      3       7      4       0
Adding 9                                                                               355  40  91   142 186  223  272  314  355
Error                                                                                        -5   -5     1      7      6     -2       2     -1     -5

Conclusion - this gives much the same errors as before with 1mm offset.  The errors shown in red seem to be rogue values.

5a3847619af93_SensorErrors06.png.82b3f5a54a96e0c1263ae39ec43723cd.png

Edited by Gina
Link to comment
Share on other sites

Added 8 to the 608 giving 616 ie. 616-ii in the code and here is the result of another test.

Errors :- -6, -7, 0, 1, 6, -3, -3, -1, -7  Not much like a sine wave :icon_scratch:  The swing is much the same as the 1mm offset.  Might try 1.5 mm offset tomorrow - if I can be bothered :D  Splitting hairs really :D

5a384dbe1e176_SensorErrors07.png.adaf32d03895d9790dfbd4934b47f696.png

Edited by Gina
Link to comment
Share on other sites

Here's another test to get an idea of "operator error" :D

Errors :-  -7, -8, 2, 5, -1, -1, -6  I reckon "operator error" amounts to around ±2°.

5a385214aa49b_SensorErrors08.png.27315d152adeb8eab9d7398ecd6a9317.png

Edited by Gina
Link to comment
Share on other sites

Taking all the results, I think I conclude that the magnetic axis may not be in line with the axle axis rather than the wrong chip offset.  That is not easily corrected so I think that's it as far as the hardware is concerned.  I could probably halve the errors in code if it's worth bothering.  The worst errors are around north and south otherwise they're negligible.  I'm not sure I could align the hardware N-S within that much anyway.

Link to comment
Share on other sites

Putting everything together, when I fix the anemometer on I get a place where the wind vane binds very slightly and I think it's the part that attaches the magnet to the axle bolt head so I shall reprint this part making it slightly smaller on the outside.  I can't see what else it could be.  Of course, this will mean recalibrating and may also alter the amount of error if I'm right that this is the cause of the error.

Edited by Gina
Link to comment
Share on other sites

Here's the raw data - one tenth of a degree resolution.  Looks like 248 is the reference value.  So formula required is 360+248-ii mod 360 = 608-ii mod 360.  How strange, magnet seems to have gone back on the axle in almost the same orientation.  I'll re-enable the calculation and do another test run.

5a38f781298c7_SensorData13.png.1ed121a0e870429a1f74cd042447d1a9.png

Edited by Gina
Link to comment
Share on other sites

Errors plotted on a graph/chart.  Not exactly sinusoidal as shown more clearly in the two cycle plot but these are only small errors and the hardware settings are only accurate to a few degrees.

5a390bdb92646_SensorErrors11.png.4f5be96ba603ff882ef1463c3e06bc10.png5a390bdc8a71e_SensorErrors10.thumb.png.e76823562e7389cbdb6239ff0a1f15bd.png

Link to comment
Share on other sites

This screenshot shows the relevance of the errors concerned.  One compass point (of 16) is shown by markers on the LHS.  The errors are less than a quarter of a compass point ie. four times better (or more) than the standard for wind direction.  There would seem to be little point in trying to reduce these errors.

5a3911fde23cb_SensorErrors12.png.11f18e1c93d615ba8475f2840f43abaa.png

Edited by Gina
Link to comment
Share on other sites

The wind instruments on a pole outside.  No bottom cover on the narrow part of the casing yet so the USB cable and Arduino Nano are hanging out.  I've given the narrow parts a bit more overlap that I originally intended since the arm was longer than needed.  I think I'll see about the bottom cover and ASC casing next.

5a393e9554544_ASCWindSensors04.thumb.png.4706adfc4a91823b963875ed88772b3c.png5a393e90bdf2c_ASCWindSensors05.thumb.png.c82857612936ab75d6dfe962196dcd56.png

  • Like 4
Link to comment
Share on other sites

Looks the Biz!

Why not 'bin' the numbers from the vane?

I assume you will classify them into 16 or 32 sectors so you can draw a wind rose with the data.

You just need to decide which reading defines the lower bound of each sector and use a series of compares to increment the right bin (and identify the current direction).

  • Like 1
Link to comment
Share on other sites

I shall need to give some thought about how to take the weather station data into the desktop computer, process it and send to the wall mounted gauges and web site etc.  I could probably do this with INDI as I do for the astro imaging systems including ASC but there may be an easier way.  It's beginning to get rather complicated for my poor old brain :D

Link to comment
Share on other sites

The electronics for the weather station will be in two groups - Arduino Nano + RPi at mast head and Arduino Uno + RPi in the scope room of the observatory.  The wind instruments feed the Arduino at the mast head.  Outdoor temperature and humidity will read by a DHT22 in a small Stevenson Screen attached to the north side of the observatory and fed to the main Arduino Uno.  Finally the rain gauge I'm thinking I shall attach to the mast just above the roof of the obsy with Hall sensor and fed to the inside Arduino Uno.  I may add a light level sensor too.

  • Like 1
Link to comment
Share on other sites

Been looking into the ASC casing but there are problems due to the lens adjustments for focussing and alignment.  In fact I definitely don't like my present design for lens control and have decided I need to find a better solution.  The present arrangement is bulky, complicated and may be difficult to operate :( 

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.