Jump to content

Banner.jpg.b89429c566825f6ab32bcafbada449c9.jpg

INDI weather station


wimvb

Recommended Posts

I'll certainly be looking at your weather station implementation Wim as I want to make it INDI compatible and use the RPi with WiFi rather than Arduino.  I'm using the Melexis MLX90316 rotary encoder chip for the wind vane with Arduino code and don't know if there's RPi code for it.  OTOH I'm not entirely happy with this chip and considering other ways of measuring the wind vane angle.

Link to comment
Share on other sites

Read through the thread and I see you're not implementing a full weather station - just enough for controlling your roof.  I expect to add cloud sensor and SQM meter in time but currently I'm looking at a pretty much standard weather station with wind speed and direction, temperature, humidity, atmospheric pressure and rain measuring.

Actually, I'm not so sure adding a weather station to my KStars/Ekos/INDI system is really needed.  Think I'll look into other ways of using WiFi.

Edited by Gina
Link to comment
Share on other sites

14 hours ago, Gina said:

Read through the thread and I see you're not implementing a full weather station - just enough for controlling your roof.  I expect to add cloud sensor and SQM meter in time but currently I'm looking at a pretty much standard weather station with wind speed and direction, temperature, humidity, atmospheric pressure and rain measuring.

Actually, I'm not so sure adding a weather station to my KStars/Ekos/INDI system is really needed.  Think I'll look into other ways of using WiFi.

It's not a full station yet. I have a rain sensor which I haven't implemented yet, and am struggling with an anemometer. Most of the sensors are very basic. They all use i2c, which is easy to implement. The rain sensor is analog, also easy. The anemometer uses rs485/modbus, which is a completely new protocol for me. Information on the internet suggests that it's straightforward, but not so. I can read values from the anemometer with a windows modbus master. I can also communicate with arduino code and a modbus slave emulator on windows. So I know the various parts are working as they should. But I can't get the anemometer to talk to the arduino or esp32. I've tried everything, including various ttl-rs485 interface boards and chips, but no success. I will try connecting it to a rpi with the usb/rs485 adapter, but if I can't get that to work, I'm considering hacking the anemometer and use its analog signal, bypassing the modbus logic alltogether.

This is my hardware

https://www.amazon.co.uk/gp/product/B07WD8LZD6/ref=ppx_yo_dt_b_asin_title_o02_s00?ie=UTF8&psc=1

https://www.amazon.co.uk/gp/product/B078X5H8H7/ref=ppx_yo_dt_b_asin_title_o03_s00?ie=UTF8&psc=1

https://www.amazon.co.uk/dp/B0721BB8PQ/ref=dp_cerb_1

Max485 chip

https://www.amazon.co.uk/gp/product/B07G1867ZX/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1

Edited by wimvb
Link to comment
Share on other sites

I just used a Hall effect switch and tiny magnets on the anemometer to count revolutions for wind speed. That's with my own design 3D printed anemometer.

Edited by Gina
Link to comment
Share on other sites

I think most anemometers use read switch pulses, my original AAG one did and it's replacement Davies one does to (though I am just using their instruments attached to my own Arduino ESP32), I almost went down the route of an ultrasonic based anemometer but it looked a bit too difficult to homebrew at the time and the Davis kit managed to swing the vote for it's easy of mounting. I coupled that with their rain bucket as well.

http://gillinstruments.com/products/anemometer/principleofoperation2.html

One word of experience is make sure you have a robust humidity sensor, the BME style sensors are not reliable overtime even in a screen box as they are not condensation resistant. I went for a solution based on a one-wire battery sensor IC and a more robust humidity sensor.

https://taaralabs.eu/1-wire-humidity-temperature-sensor/

 

Link to comment
Share on other sites

16 minutes ago, jiberjaber said:

I think most anemometers use read switch pulses, my original AAG one did and it's replacement Davies one does to (though I am just using their instruments attached to my own Arduino ESP32)

That's also my understanding.  I think some of them actually have two reed switches placed next to each other, though I'm not sure why.

James

Link to comment
Share on other sites

The cheap chinese anemometers, such as the one I have, come in a variety of flavours, from modbus to pulse to analog output. If I can’t get mine to work, I’ll have a look at the electronics inside. What appealed to me when I bought it, was that the rs485 version was already calibrated.

Link to comment
Share on other sites

Good point.  Mind you no anemometer is going to read the true wind speed unless it's high up and well away from buildings or trees.  Few people will have a suitable place to erect a tall mast for the wind instruments.  There's a fight for my best location!!

Link to comment
Share on other sites

42 minutes ago, Gina said:

Good point.  Mind you no anemometer is going to read the true wind speed unless it's high up and well away from buildings or trees.  Few people will have a suitable place to erect a tall mast for the wind instruments.  There's a fight for my best location!!

There's a met office standard about the height of the equipment (10m I think) - mines on a scaffold pole and still suffers from some shelter in a couple of directions, less so in the winter due to tree foliage. 

https://www.metoffice.gov.uk/binaries/content/assets/metofficegovuk/pdf/weather/guides/10_0230_fs_17_observations.pdf

 

Link to comment
Share on other sites

Yes, 10m above ground is the standard.  I had mine on a mast 6.8m high but it had to go because it interfered with my astro imaging.  Planning regs limit the height and it has to be self supporting.

  • Like 1
Link to comment
Share on other sites

Location isn ’t going to be much of a problem; I live well away from any neighbours, my house is on a ridge, and the few high trees around are mine, and planned to go down in the not so distant future. But the anemometer will definitely not be placed on a 10 m high mast. Just above the obsy will do for me.

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
On 22/06/2020 at 10:53, Gina said:

I just used a Hall effect switch and tiny magnets on the anemometer to count revolutions for wind speed. That's with my own design 3D printed anemometer.

 

On 22/06/2020 at 12:40, jiberjaber said:

I think most anemometers use read switch pulses, my original AAG one did and it's replacement Davies one does to (though I am just using their instruments attached to my own Arduino ESP32), I almost went down the route of an ultrasonic based anemometer but it looked a bit too difficult to homebrew at the time and the Davis kit managed to swing the vote for it's easy of mounting. I coupled that with their rain bucket as well.

http://gillinstruments.com/products/anemometer/principleofoperation2.html

One word of experience is make sure you have a robust humidity sensor, the BME style sensors are not reliable overtime even in a screen box as they are not condensation resistant. I went for a solution based on a one-wire battery sensor IC and a more robust humidity sensor.

https://taaralabs.eu/1-wire-humidity-temperature-sensor/

 

 

On 22/06/2020 at 12:58, JamesF said:

That's also my understanding.  I think some of them actually have two reed switches placed next to each other, though I'm not sure why.

James

I opened my anemometer just the other day. It contains 1 reed switch in the static, bottom part, and 8 (!) neodyme magnets in the rotating top. Three wires lead to/from the reed switch: Red, Black, Yellow. The whole sensor part is covered with silicone, so i can't see how it's connected. My guess is that the red wire (which supplies 3.3 V to the sensor) is connected to a resistor which is in series with the switch. From the resistor/switch, the yellow wire gets the signal out. And the other side of the switch is connected to ground (black). I verified that the voltage on the yellow wire goes low whenever a magnet passes the reed switch. The pulses are fed into a microcontroller for processing, and then into a MAX485 type chip for RS-485 signal conversion.

The MCU is this one (overkill if you ask me)

https://www.st.com/en/microcontrollers-microprocessors/stm32f030f4.html

I still haven't got the anemometer to work with either an Arduino or an ESP32. But it does work with a Windows based Modbus test tool. And my Arduino/ESP32 software works with a windows based modbus slave emulator.

I'm leaning more and more towards butchering the anemometer and just get the pulse output of the reed switch. If I remove the mcu, I will also lose the calibration. Hacking the anemometer isn't much of an issue, but I would need another wind speed meter to calibrate the hacked device. Otoh, I could then turn the anemometer into an I2C device, as are all the other sensors in my weather station.

Link to comment
Share on other sites

On 22/06/2020 at 10:53, Gina said:

I just used a Hall effect switch and tiny magnets on the anemometer to count revolutions for wind speed. That's with my own design 3D printed anemometer.

Did you do any calibration to get wind speed in m/s, or does your anemometer just report revolutions/minute?

Link to comment
Share on other sites

I seem to remember that somehow I estimated that a third of a revolution per second represented 1mph but I'll need to go through my Arduino weather station thread to see if I can find it.

Link to comment
Share on other sites

I seem to recall reading somewhere that with anemometer cups of the commonly used sizes you can assume a given wind speed gives you one revolution per second.  I can't find the reference at the moment though.

James

Link to comment
Share on other sites

Aha!  I was forward-thinking enough to document it in my code.  The figures I have are that you divide the number of revolutions per second by:

  • 1.096 to give m/s
  • 3.9477 to give km/h
  • 2.453 to give mph
  • 2.130 to give knots

James

  • Thanks 1
Link to comment
Share on other sites

37 minutes ago, JamesF said:

Just checked the OWW code and that uses 2.453 for mph, too.

James

Ah, so the value of 3 that I assumed wasn't that far off, but the PDF may give a better value.  I shall be reading it.  Thanks James.

Link to comment
Share on other sites

2 hours ago, JamesF said:

Aha!  I was forward-thinking enough to document it in my code.  The figures I have are that you divide the number of revolutions per second by:

  • 1.096 to give m/s
  • 3.9477 to give km/h
  • 2.453 to give mph
  • 2.130 to give knots

James

That should depend on the diameter  of the anemometer head (more than the cups). I’ll read that article you referred to. Thanks.

Link to comment
Share on other sites

PHEW - Ma bwain 'urts Bwian!!!  Just been "reading" the PDF.  I shall need to try to read this again to get the calibration factor for my anemometer.  One thing stood out though - the size of cup made little difference but the radius of cup centre from axle did.  Intuition (or common sense) tells me that bigger buckets/cups should be better at overcoming friction in the bearing.  I wonder if anyone has read this article and boiled it down to basics.  How bucket centre radius relates to calibration.  May go and have a lie down!

Link to comment
Share on other sites

Hmm...  A is in metres/sec per Hz so presumably Ar is too.

My Rrc is about 90mm, giving Ar = 1800.  That doesn't make any sense!!  I would expect a value around 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
×
×
  • 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.