Jump to content

Banner.jpg.b83b14cd4142fe10848741bb2a14c66b.jpg

INDI weather station


wimvb

Recommended Posts

Another bit says

Quote
Ar = 0.019Rrc + 0.196

So maybe the formula near the end had a misprint!  In my case the above would give about 1.9.  So two magnets on the anemometer would give roughly metres/sec.  Depends whether I want m/s or mph.

Link to comment
Share on other sites

With the bottom end of Force 1 on the Beaufort Scale being 0.5 m/s it may make sense to use 4 magnets when counting pulses per second.  With three magnets they fitted comfortable between the spokes but two or four don't so I may increase the hub size to accommodate the magnets.  This would bring the Ar value up to 2.  OTOH the tolerances we're discussing here are far less significant than things that interfere with the wind speed.

Link to comment
Share on other sites

4 hours ago, Gina said:

Another bit says

So maybe the formula near the end had a misprint!  In my case the above would give about 1.9.  So two magnets on the anemometer would give roughly metres/sec.  Depends whether I want m/s or mph.

 

6 hours ago, Gina said:

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.

 

Just different units for Rrc. mm in one, and m in the other.

  • Thanks 1
Link to comment
Share on other sites

Ah!!  That would explain it - thanks  Wim 😀

I've printed the hub and Rrc comes out at 110mm giving Ar of nearly 2.3.

This is a new (bigger) anemometer, previous one had Rrc of 75mm so 3 magnets for mph was about right.

Edited by Gina
Link to comment
Share on other sites

I'll measure my anemometer, and do the calculations. Then remove the mcu that's in there now, and replace it with an attiny/avr. I'll (try to) program this as an i2c device. As I wrote earlier, my wind meter has 8 magnets, and will give a higher frequency per m/s wind speed. It's still too bad that I can't keep the original calibration. But I can always hook up the current mcu in an experimental setup, and test it. Then put it back in if I can get it to work. I just need to order a few jst connectors, so I don't have to cut any cables.

  • Like 1
Link to comment
Share on other sites

Well, here's a glitch. I planned to leave the JST connectors in the anemometer, and order some sockets for my new circuit (with AVR). But it appears that the connectors have a pitch of 1.3 mm, while the only ones I can get here either have 1.0, 1.5 or 2.0 mm pitch. I want to avoid cutting the leads in the anomemeter. So far, i haven't made any modifications yet.

Otoh, i tested the anemometer with a home brewn python program with RS485 communication, on my Windows laptop:

# -*- coding: utf-8 -*-
"""
Created on Tue Jul  7 00:00:52 2020

@author: Wim
"""

import serial, time
import serial.rs485
mySer = serial.rs485.RS485('COM9', 9600)
mySer.rs485_mode=serial.rs485.RS485Settings(True, False)
cntr = 0
while cntr<10:
    mySer.write(b'\x01\x03\x00\x16\x00\x01\x65\xce')
    mySer.flush()
    data = mySer.read(size=7)
    myNumber = (int(data[3])*256 + int(data[4]))/10
    cntr += 1
    print(cntr, 'wind speed:', myNumber, 'm/s')
    time.sleep(3)
mySer.close()

 

This works like a charm in the Anaconda/Spyder IDE. There is a response delay in the measurements, but it's within specs.

Tomorrow (or rather, later today), I will try to program this on an old Raspberry Pi.

(And yes, I know that using 'time.sleep()' is bad programming. But this is just a Q&D test.)

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

Finally success!!

So far, I couldn't get my anemometer to talk to the ESP32. It worked fine when connected to my laptop through an RS485 - USB dongle, but wouldn't work at all with RS485 - TTL adaptors, not even with a bare chip MAX485. The only difference was that the TTL adaptor needed a write enable signal. There are several ways to generate such a signal, but none would work with my anemometer. Finally I found a new RS485 - TTL chip that doesn't need this write enable signal. I bought this

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

Hooked it up and now it just works with simple microPython code:

main.py

The next step will be to combine the anemometer code with the code for the other sensors. Then, when I have my gear out of summer storage, I will hook it up to INDI Weather Watcher.

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