AK-Homberger / D1Mini-GasCounter

A smart gas meter with a web interface and optional ioBroker integration.
GNU General Public License v3.0
17 stars 2 forks source link

Bouncing/Prellen #11

Open arazok opened 10 months ago

arazok commented 10 months ago

Hi, sometimes the value is not exactly as the gas meter shows. That could be bouncing / prellen if the reed contact is near the magnet and no active gas flow.
Any ideas to solve this issue ?

AK-Homberger commented 10 months ago

Hi,

Unfortunately I don't have experience with the reed contact version, because I'm using the active inductive sensor at home. Within the interrupt code, I added protection against "fast" bouncing:

_if (millis() - Last_inttime > 100) { // Debouncing 100 ms for reed contact

But this will not protect against "slow" bouncing of the reed contact, when there is no gas flow.

I would try to change the position of the contact or to use a different type with a bigger hysteresis.

Regards, Andreas