Can I "debounce" in emoncms feed processing?

I have a gas pulse feed into a emonTH with a 10k pulldown resistor. There is no noise now, per se, but each actual pulse registers a random number of pulses (1-5 in general) in the input.

Is there a sequence of feed processing steps  that I can use to say, in effect, increment by no more than 1 per sample? I am working on the assumption that I am not going to use more than 1ft3 of gas per period sampled.

I am trying to avoid more hardware hackery and I would like to leave the emonTH firmware alone if possible,

Eric_AMANN's picture

Re: Can I "debounce" in emoncms feed processing?

Hello,

It is difficult to help you as we don't know anything about your gas meter.  And, we don't know what sketch are you using.

If pulses are generated by a reed switch, see https://openenergymonitor.org/emon/node/12165 . You will find a sketch for EmonTH V1.4 and V1.5 that should debounce your switch.

Eric

Peter Galbavy's picture

Re: Can I "debounce" in emoncms feed processing?

Thanks, I will take a look but perhaps I should have been clearer in if anyone knows a more general case solution - what I think I want is to count the number of times the pulse count changes; Some of the feed processes seem almost there, but not quite. A version of Accumulator or Rate but that says "increment feed by one if input has changed in the last period".

Robert Wall's picture

Re: Can I "debounce" in emoncms feed processing?

The problem with "debouncing" at emoncms (either local or emoncms.org) is the difficulty of knowing the time between pulses, because if the message transporting a pulse is delayed, does it make two pulses look like contact bounce or (in the other direction) contact bounce look like two pulses? 

I appreciate your desire to not change the sketch, but I think following Eric's advice is the only sure way.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.