Hello,
I would like to measure the wind speed with an anemometer, which outputs one pulse per revolution with the pulse counter.
If the anemometer delivers one pulse per second, the wind speed is 2.4km/h.
From this you can calculate the radius, which is 0.106133 mm.
Therefore I thought that I am correct with the following code:
sensor:
- platform: pulse_counter
pin:
number: GPIO13
mode: INPUT_PULLUP
unit_of_measurement: 'km/h'
name: "${friendly_name} Windgeschwindigkeit"
icon: 'mdi:weather-windy'
count_mode:
rising_edge: DISABLE
falling_edge: INCREMENT
internal_filter: 13us
update_interval: 60s
filters:
- lambda: >-
return 2 * 3.14 * 0.106133 * x / 60 *3.6;
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?
Thanks in advance
Thomas