I had actually expected the wind speed in km/h. However, this results in the following:
[D][pulse_counter:160]: 'Wetterstation Windgeschwindigkeit': Retrieved counter: 358.00 pulses/mine
[D][sensor:113]: 'Wetterstation Windgeschwindigkeit': Sending state 3.58145 km/h with 2 decimals of accuracye
The correct result would have been 15.4 km/h.
Can someone help me out and tell me what I’m doing wrong?
You should start by making sure all your values are interpreted as floating point, otherwise you will get rounding errors when the results are converted internally to integers. i.e.:
but i think something is wrong. Now I get the following result:
[D][pulse_counter:160]: 'Wetterstation Windgeschwindigkeit': Retrieved counter: 124.00 pulses/mine
[D][sensor:113]: 'Wetterstation Windgeschwindigkeit': Sending state 1.24050 km/h with 2 decimals of accuracy
Just to be sure: I originally missed this, but the retrieved counter is shown as “pulses/mine” in your results. So do I understand it correctly that the input is pulses per minute?
At first I understood it to be pulses per second, so with one pulse per rotation this would be revolutions per second.
But for an input of pulses per minute with one pulse per rotation and calculating the wind speed in km/h I now think the formula is:
So in that case the lambda should be:
- lambda: >-
return x * 0.003086;
Or even more simple (you don’t need a lambda with only one multiplication):
Thanks for your support!
Maybe I should stop programming my stuff at 3 in the morning. I think I was not quite up to speed.
In the manual of the anemometer was actually the solution.
It said:
“The cup-type anemometer measures wind speed by closing a contact as a magnet moves past a switch. A wind speed of 1.492 MPH (2.4 km/h) causes the switch to close once per second.”
What finally means, if the pulse counter counts for 60s, you only need to divide the 2.4km/h / 60s and get 0.04 as multiplier for the number of pulses.
With this it should fit in my opinion.
Somit ist die Lösung die ich jetzt umgesetzt habe:
What is your yaml? ESP 32? Meter or counter? How often update? What are your filters? What anemometer? Pull-up? Capacitor? My mission is to improve my readings; next on my list of to dos.
Sorry to bring this up, but this is the best discussion about wind speed measuring I have found so far.
Anyway, what I struggle to understand, is what size anemometers are you talking about, if one radius mentioned is 0.1mm (!), and then another dimension mentioned is 6mm (!). So, one anemometer is visible only under microscope, another one is in the size of human finger?
Please, can anyone clarify this?
Anemometer I am trying to use, radius is 102mm.
I am really having problems using the formulas above to calculate the correct wind speed for my use case.
My Anemometer has two magnets which pass one hall sensor in one revelation.
The cups travel a distance of 50 cm on one revelation, therefore a wind speed of 1 m/s should result in 4 pulses.
My desired output of the sensor is in m/s as well.
How do i calculate the correct multiplication factor?
So far this is what I calculated but gave me ridiculously low readings: