jp112sdl / Beispiel_AskSinPP

88 stars 36 forks source link

HM-ES-TX-WM: Reed sensor debounce necessary? #47

Open Hans5546 opened 1 year ago

Hans5546 commented 1 year ago

Hi! I built the HM-ES-TX-WM and flashed it with the Askin scetch. The sensor also delivers values, unfortunately these are too large by a factor of about 2.6 ... 3. I have already adjusted the counter constant, but apparently the deviation is not always the same, so this does not lead to the goal. I run a reed sensor that is attached directly to the gas meter, it is a sensor that fits the meter exactly. I suspect that the input signal has to be suppressed or debounced somehow. Do you have an idea how this works best? I run the sensor on batteries if that makes a difference.

Thanks a lot for your help!

jp112sdl commented 1 year ago

You can try it with hardware debouncing, (i.e. google for "debounce reed switch")

Hans5546 commented 1 year ago

Hello!

I tried it and it seems to work :-)

I simply connected a 100nf capacitor between ground and the input and a additonal resistor with 22kOhm between 3,3V and input. Since that, the sensor counts excatly.