Help please - Pulse counter logic

I have built a helicoid anemometer and am struggling to understand the logic for the pulse counter - I think I’m overthinking it and confusing myself! Please help me confirm the logic.

The pitch is such that it does:

  • 4,800 revs per mile (pitch 335.28mm and 1,609,344 mm / mile)
  • 19,200 pulses per mile (there are 4 magnets)

So with a 1mph wind it should do:

  • 4,800 revs per hour
  • 19,200 pulses per hour = 320 pulses per minute = 5.333333 pulses per second

The pulse detector issues negative pulses so I’ve configured the sensor as follows:

sensor:
- platform: pulse_counter
  pin:
    number: GPIO23
    mode: INPUT
  unit_of_measurement: 'mph'
  name: "Wind Speed"
  icon: 'mdi:weather-windy'
  count_mode:
    rising_edge: DISABLE
    falling_edge: INCREMENT
  update_interval: 1s
  filters:
    - multiply: XXXX

What should the multiply filter be? I’ve tried 0.1875 (1/5.333333) but I then get indicated wind speeds of >100mph when it is blowing about 5 - 7mph!

As I say, I’m probably overthinking it but have confused myself completely!

Thanks!

The pulse_counter platform always reports in pulses/min, derived from the pulses/sample time, so you have to take that into account in your filter. Here’s an example of mine:

sensor:
  - platform: pulse_counter
    pin: 12
    name: "Water Usage"
    update_interval: 10s
    force_update: true
    unit_of_measurement: 'gal'
    filters:
      # reports in pulses/min, so divide by 6 and by 64 pulses per gallon
      multiply: 0.0026041667

Thanks, @rccoleman, it was the ‘always reports in pulses/min’ I had overlooked!

It seems correct now.

Thanks again - this is working great.

For interest, here is the CAD drawing of the anemometer

ftfy: image of a CAD model

1 Like

FYI if that’s solidworks, you can hide the origin

It’s DesignSpark and you probably can hide it - I just haven’t figured out how! :rofl:

usually these packages have a tree and you right click on the tree item and select hide