Measuring wind speed

Hi, why do you calibrate with this value on multiply?

Hi, this code is under pulse_counter/total and converts total number of pulses (1pulse per sec =1.492mile/hour) into km:
1.492mph=0.66698368m/s /1000m (km) gives multiplier value.

1 Like

what u think about this anemometer ? should the formula be 1/60 * 1.75 * 3.6 ( for km /h )

ā€˜you can use pulse_counter too since 20 pulses in one second means 1,75 m/sā€™

I am recycling an old Somfy EOLIS / SOLIRIS wind sensor for my DiY-project; this wind sensor still runs smoothly but off course I am still clueless what the wind speed is of one rotation (equal to two pulses). Does anyone knows this value by any change?

nice specs but what is the link?

Iā€™ve read this thread over and over and gained a lot of insight from it - thanks everyone who contributed.

I also have the same issue with a lot of generated noise leading the very high readings (apparently we peaked at 1500mph one day. I must say Iā€™m surprised I didnā€™t notice the wind being that strong!)

Iā€™ve tried the 1uf trick too, but it didnā€™t work. (Didnā€™t make things worse, just not better)

In my case, I think Iā€™ve finally figured out the reason.

First, an example of spurious readings.
image
t

My (generic 4-pulse-per-rotation anenometer from aliexpress) is connected to a nodemcu board and esp8366 that is mounted in a garage. The esp also runs a 12v PIR, rain-tip gauge and three door sensors via esphome. Theyā€™ve worked great for years.

My specific issue is in the timings of that graph. Yesterday I was working in the garage, thus triggering the PIR and door sensors a lot, but I donā€™t think theyā€™re the problem. What I do think affects it is that I had the garage lights on - four cheap LED battens. I also had drills/grinders and saws going. Looking back, I can see I get high readings only when I myself am active in that area.

My belief is that electrical interference is playing merry hell with these readings. Something about pulse_meter, the high number of reads this generates or the wiring is my problem. (itā€™s only 2m of solid copper bell wire)

So Iā€™m going to move the reading to a different esp8266, in a different outbuilding and see if that helps!

@digdilem How is your wind vane required to be wired? ADC or binary? If binary do you have a pull up resistor?

No idea - I just measured it with an ohmeter and I can see it closes 4 times a revolution.

I am using INPUT_PULLUP in my code, because I copied a chunk from earlier in this thread. It IS working perfectly now, however - weā€™re in the middle of a storm and itā€™s producing lots of sensible data.

1 Like

A follow up to this: I set up a new nodemcu and copied the same code block to it for the anenometer. I then moved it to a different shed and set it going.

For the first time ever, Iā€™ve had over 48h without any massive spikes of hundreds of a mile an hour and can now actually read the chart in HA without those spikes throwing the scale out so much.

So for me at least, I think my problem was electrical interference, even with a relatively short 2m wire run.

image

Can you share your code in 1 file, hard to copy from the forums.

Iā€™m surprised and flattered to see this thread continuing, however I just wanted to say somehow I am only just seeing your post, and I will be implementing this fix on my weather station as soon as possible. As fate would have it, I ordered a bag of 0.1ĀµF capacitors off AliExpress just yesterday!

Thank you for sharing this research!

hi, I also use a wh-sp-w01 anemometer (aliexpress) and the datasheet says:
1 turn = 2 pulses (2hz)
m/s=wind speed hz * 0.34

How should I write the code to get the speed in km/h?
Thank you

p.s.: can the condenser also be useful for the rain gauge?

@acuplush

If you read the thread, the code is all located within the first several posts, as well as in my linked GitHub. Nik71git posted the following formula for km/h:

So the code would be:

  - platform: pulse_meter
    pin: 
      number: GPIO14
      mode: INPUT_PULLUP
    name: '${loc} Windspeed Meter'
    icon: 'mdi:weather-windy'
    id: wind_meter
    unit_of_measurement: 'mph'
    accuracy_decimals: 1
    timeout: 5s
    filters:
      - multiply: 0.02 #2.4km/h per rotation so 1 / 60 / 2 * 2.4
      - sliding_window_moving_average: # Helps prevent too many datapoints
          window_size: 15
          send_every: 15
1 Like

thanks, I see someone uses pulse_meter and other pulse_counters, which one works better? Iā€™m using pulse_counter now, is the calibration formula the same?