Pulse Counter Problem

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Normal user
Posts: 1
Joined: 11 May 2021, 12:35

Pulse Counter Problem

#1 Post by Profiler64 » 11 May 2021, 12:42

Hello guys! I think i need your help :(
I have a water meter that has build-in reed switch. every 100l it will close the reed switch.
I connected the input cable from the water meter to my Wemos D1 GND Pin and the output cable goes to the Pin D6. Also i have a 4,7k resistor between 3,3v and D6.
With my multimeter i can measure the voltage. It goes from 3,3v to 0v and stays there for 2 seconds until back to 3,3V. So 2 Seconds 3,3v and than 2 seconds 0V. So sounds good. Everytime it goes to 0V, one pulse should be counted.
But its not happening. Can somebody help me?
In the Attachments ther is a photo from my settings.
Would be nice if we could solve my probelm.
Best Regards
esp easy.png
esp easy.png (31.7 KiB) Viewed 145 times

Normal user
Posts: 202
Joined: 23 Dec 2019, 21:24

Re: Pulse Counter Problem

#2 Post by GravityRZ » 12 May 2021, 18:47

it looks like you are using the new pulsecounter functionality PULSE LOW

First, you can definately get it to work by selecting Falling
you can keep the 400ms debounce time

if you want to keep it on PULSE LOW your debounce time is way to high.

put it at 20ms to see if it starts counting.
if it does and you do not get any extra or missing pulles leave it there
if you get extra pulses increase the debounce time with 10ms(or bigger steps if you like)
if you get less pulses lower it to 10ms

what PULSE LOW does is checking on 3 different moments is the pulse level is the same, if it is a pulse is counted.

so if use a to high value of the debounce time it does not have enough time to check 3 times

rule of thumb is 1/10 of the pulse low time i think.
so in your case 200ms should work but better start really low

also should the interval not be 1 second instead of 3
this way you can also calculate the flow per second

Post Reply

Who is online

Users browsing this forum: No registered users and 20 guests