Pulse meter double reading

Hi all,

I’ve been attempting to measure my power using a photoresistor over the LED on my meter.
I initially started out using “Pulse Counter” which seems to be quite successful.
After a bit of reading I stumbled across “Pulse Meter” which looks to be the better counterpart of the pulse counter.
I’m using the counter/meter with totals for both functions and they work, however the pulse meter reads almost exactly double the power of the pulse counter. The pulse counter measurements are closest to correct.
I’m hoping someone has an idea of what could be wrong as I don’t want to just blindly halve the number.

I’ve included the code for the pulses. This is running on a ESP32-CAM.
Thank you for any help in advance.

# LDR input
sensor:
  - platform: pulse_counter
    pin: GPIO14
    update_interval: 60s
    unit_of_measurement: 'kW'
    name: 'Power Meter'
    filters:
      - multiply: 0.06  # (60s/1000 pulses per kWh)
      
    total:
      unit_of_measurement: 'kWh'
      name: 'Total power check'
      accuracy_decimals: 2
      filters:
        - multiply: 0.001  # (1/1000 pulses per kWh)

#sensor:
  - platform: pulse_meter
    pin: GPIO14
    internal_filter: 35ms
    unit_of_measurement: 'kW'
    name: 'Power Meter1'
    filters:
      - multiply: 0.06
    total:
      name: "Total power check1"
      unit_of_measurement: "kWh"
      accuracy_decimals: 2
      filters:
        - multiply: 0.001

Thinking there may be some conflict having both using the same pin I tried commenting out either of the platforms but the pulse meter still reports double.

I am currently struggling with a similar issue. It appears as if pulse_meter is incrementing on both the rising and falling edges. I am trying to read a Ferraris wheel energy counter with a Wemos ESP32 board and a TCRT5000 infrared sensor.

The pulse meter does not count pulses:

It measures the time between rising edges on a pin, for each pulse it outputs the frequency in pulses/min.
Pulse Meter Sensor — ESPHome

It does have this:

  • total (Optional, ID): An additional sensor that outputs the total number of pulses counted.

Compare the total sensors.

I am using the code from the documentation, adapted to my counter with 120 revs per kWh

sensor:
  - platform: pulse_meter
    pin: GPIO2
    unit_of_measurement: 'kW'
    name: 'Ferraris Counter'
    internal_filter: 100ms
    accuracy_decimals: 3
    filters:
      - multiply: 0.5
    id: house_verbrauch
    total:
      name: "Stromverbrauch Total"
      unit_of_measurement: "kWh"
      accuracy_decimals: 3
      filters:
        - multiply: 0.00833333333

I observe that any state change triggers a reading in pulses/min, not just the rising edge.

The Ferraris Wheel has a circumference that is reflective on about 95% of its length and black on 5%. This leads to the effect that during one revolution of the wheel I see a more or less plausible consumption in kW for 5% of the time on a gauge card and for 95% of the time the value in kW is 20x higher than I would expect. I assume that the internal_filter setting should take care of any bouncing effects on the falling edge. The LED that indicates high or low state of the sensor does not flicker to indicate bouncing.

I get the same behavior with an ESP8266 board and a different TCRT5000 sensor.

1 Like