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.
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.
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.