Jump to content

Gina

Beyond the Event Horizon
  • Posts

    45,326
  • Joined

  • Last visited

  • Days Won

    120

Everything posted by Gina

  1. 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.
  2. 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.
  3. Here's another test to get an idea of "operator error" Errors :- -7, -8, 2, 5, -1, -1, -6 I reckon "operator error" amounts to around ±2°.
  4. 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 The swing is much the same as the 1mm offset. Might try 1.5 mm offset tomorrow - if I can be bothered Splitting hairs really
  5. 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.
  6. Centred the chip over the magnet and it's much worse! I'll try moving it the other way
  7. 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.
  8. 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
  9. 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 I'm just playing while listening to music.
  10. Changed code to 604 and taken another set of data. Errors :- -3, -3, 1, 4, 8, 1, 0, 0, -3
  11. I could take the above graph and produce a table from it but for now I'll just adjust the offset by -5° ie. subtract the angle from 603°. Here's the result - again every 45°. Errors are -3, -1, 2, 2, 1, -1, 0, 1, -4. Looks like I've over compensated. Think I try 604° and run the test again. Actually, I doubt I can get the angle as accurate as 1° anyway; I'd need a dividing head.
  12. This is a graph of the errors. Very rough as the data is only to the nearest degree and the x axis is only graduated in steps of 45°. Within those bounds it seems to approximate to a sine wave, indicating an offset of the rotation axis from the chip or magnet as we have deduced already.
  13. Yes, a small table would be quite sufficient. Just first order error correction would be more than adequate.
  14. Yes, that's the conclusion I came to. Either that or the magnet is offset on the axle. The dimensions are very small.
  15. Here are the data values as I turned the vane from reference ACW as looked at from beneath, every 45°. I see the values as follows. If I were to change the offset calibration by 5° the errors are reduced, giving an error of ±7° which is near enough It can also be seen that the error is roughly cyclical as would result from an off-axis condition. If I wanted I could apply an empirical correction but no need really. Angle Data Error 0 0 0 -5 45 43 -2 -7 90 93 3 -2 135 145 10 5 180 192 12 7 225 235 10 5 270 276 6 1 315 317 2 -3
  16. The errors in the angle reading could be due to the magnet axis being offset from the sensor chip axis or the magnet may not be perfectly flat on the end of the axle or the chip may not be perfectly orthogonal to the axle axis. I could take readings every 22.5° or even less and produce a calibration graph. I could then read off values and produce an array (table) to correct the error. I can't see the error changing with time or any other variable the station might encounter. OTOH the errors may not be worth bothering about. Normally wind direction accurate to the 16 point compass is considered accurate enough. So far the error seems to be about half this.
  17. Highest should be 3599 and lowest 0. Well within the 32767 range of the int variable. In fact the data output is 14bits so couldn't exceed the 15bit int variable.
  18. Here is the code section :- void loop() { if (mlxMetro.check() == 1) { ii = mlx_1.readAngle(); ii = ii / 10; ii = 608 - ii; ii = ii % 360; Serial.print(count); Serial.print(" "); Serial.println(ii); } delay(1000); count++; } Getting errors up to 12° degrees - worst at 180° I think but I'll have to do a proper calibration.
  19. Think I'll add code to give the angle in degrees from the reference position. (248-x+360) mod 360. ie. (608-x) mod 360. Where x is the data value in degrees.
  20. Here are the data values (rounded to the nearest degree) for the 8 compass points. 45, 90, 135, 180, 225, 270, 315, 0
  21. This is with the wins vane aligned with the boom. If I arrange the boom facing south, this will indicate north. Think I'll call it 249°. Also think I'll calibrate the angle to data function with a protractor as 360-249 = 111 rather than the 135° that I estimated as the angle for data=0. 24° is rather a large error!
  22. Wind vane data. First number is the record count second the bearing in tenths of a degree. Rotated wind vane in clockwise direction as seen from underneath. This means anticlockwise for the wind direction. This is with the magnet behind the chip rather than in front so direction is opposite to what I expected. Does show that the magnet works fine underneath the chip though. Since I have no information as to the pole alignment on the magnet I shall have to calibrate the North direction later in the code. ATM zero is about 135° from vane in line with boom. Correction in code is easy, just add an adjustment number and mod 360. (Assuming degrees.)
  23. A very simple wind display would be two rings of lights (LED probably). 16 (or 32) for wind direction and 12 (13?) for wind speed on the Beaufort Scale. I'd prefer pointers though But a semi-log scale for wind speed.
×
×
  • 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.