General Pulse counting to much
Moderators: grovkillen, Stuntteam, TD-er
General Pulse counting to much
Hi Folks,
On this moment i'm working on a smart water meter using an NPN sensor, NodeMCU and de ESPEasy software.
The setup is working as it should, the only problem is that the software is counting to much pulses.
I've just did some testing with the sensor and i've counted 7 pulses (the LED turned on 7 times) and the ESPEasy software had a start of 280 and ending on 289 and not 287 as it should have. Did the test twice and they both had a test of +2.
Does anybody had a good solution for the problem?:
Some sensor information:
Debounce Time (mSec): 100
Counter Type: Delta
Mode Type: RISING
Thank you.
On this moment i'm working on a smart water meter using an NPN sensor, NodeMCU and de ESPEasy software.
The setup is working as it should, the only problem is that the software is counting to much pulses.
I've just did some testing with the sensor and i've counted 7 pulses (the LED turned on 7 times) and the ESPEasy software had a start of 280 and ending on 289 and not 287 as it should have. Did the test twice and they both had a test of +2.
Does anybody had a good solution for the problem?:
Some sensor information:
Debounce Time (mSec): 100
Counter Type: Delta
Mode Type: RISING
Thank you.
-
- Normal user
- Posts: 307
- Joined: 06 Nov 2016, 13:45
Re: General Pulse counting to much
Sounds like a missing Pull-Up /Pull-Down resistor.
What type of NPN sensor?
6V, 12V, 5V ?
Level convertor?
What GPIO?
Here a trouble free solution for LJ12A3-4-Z/BX-5V
https://www.letscontrolit.com/forum/vie ... 232#p32473
What type of NPN sensor?
6V, 12V, 5V ?
Level convertor?
What GPIO?
Here a trouble free solution for LJ12A3-4-Z/BX-5V
https://www.letscontrolit.com/forum/vie ... 232#p32473
30+ ESP units for production and test. Ranging from control of heating equipment, flow sensing, floor temp sensing, energy calculation, floor thermostat, water usage, to an interactive "fun box" for my grandson. Mainly Wemos D1.
Re: General Pulse counting to much
Yep, the same solution as you give me on Tweakers but the problem is not the sensor. The problem is the ESPEasy software with count's random liters. I've confirmed it with the visual counting and the sensor is giving the correct amount of pulses, the software does +2(or 3) random.Domosapiens wrote: ↑28 Nov 2018, 16:51 Sounds like a missing Pull-Up /Pull-Down resistor.
What type of NPN sensor?
6V, 12V, 5V ?
Level convertor?
What GPIO?
Here a trouble free solution for LJ12A3-4-Z/BX-5V
https://www.letscontrolit.com/forum/vie ... 232#p32473
Before toilet flush:
Count: 0
Total: 9
After flush:
Count: 4
Total: 20
Pulse counted: 7.
-
- Normal user
- Posts: 307
- Joined: 06 Nov 2016, 13:45
Re: General Pulse counting to much
Yep, that is strange !
I did not tested it, in that way.
I compared the Domoticz result (including off-set) with the real meter.
That was correct one weak ago ...
Saw your #2103 github
I did not tested it, in that way.
I compared the Domoticz result (including off-set) with the real meter.
That was correct one weak ago ...
Saw your #2103 github
30+ ESP units for production and test. Ranging from control of heating equipment, flow sensing, floor temp sensing, energy calculation, floor thermostat, water usage, to an interactive "fun box" for my grandson. Mainly Wemos D1.
Re: General Pulse counting to much
Just ordered your 5V sensor (this one) but i'm not sure it will work because the LED pulse works as it should be.Domosapiens wrote: ↑28 Nov 2018, 18:25 Yep, that is strange !
I did not tested it, in that way.
I compared the Domoticz result (including off-set) with the real meter.
That was correct one weak ago ...
Saw your #2103 github
Just put changed the debounce time to 1 msec.. Will wait for my Github request and see what that brings for info
-
- Normal user
- Posts: 307
- Joined: 06 Nov 2016, 13:45
Re: General Pulse counting to much
Still correct.I compared the Domoticz result (including off-set) with the real meter.
Could it something with time and samples?
I use:
Name: Flow
GPIO-12(D6)
Debounce 0
Counter Delta
Mode Type Rising
Interval 60 seconds !!!!!! (measure Liter/minute)
Count: 0 decimals
Total: 1 decimal
Time: 2 decimals (don't know the usage ...)
IDX 123 goes to Domoticz: Type General, Counter Incremental (only 2 decimals !!!, not like your 3 decimals)
Domoticz settings ...Meters/Counters ...Counter Dividers ...Water ..1000
To understand additional different Domoticz water meter capabilities I made this rule (fork):
Code: Select all
On Flow#Count do
SendToHTTP 192.168.1.7,8080,/json.htm?type=command¶m=udevice&idx=171&nvalue=0&svalue=[Flow#Count]
SendToHTTP 192.168.1.7,8080,/json.htm?type=command¶m=udevice&idx=122&nvalue=0&svalue=[Flow#Count]
SendToHTTP 192.168.1.7,8080,/json.htm?type=command¶m=udevice&idx=172&nvalue=0&svalue=[Flow#Count]
SendToHTTP 192.168.1.7,8080,/json.htm?type=command¶m=udevice&idx=173&nvalue=0&svalue=[Flow#Count]
SendToHTTP 192.168.1.7,8080,/json.htm?type=command¶m=udevice&idx=124&nvalue=0&svalue=[Flow#Count]
Endon
171= General, Counter Incremental (used without offset)
122= General, Waterflow (momentary usage, nice to check your shower performance; I replaced my bottleneck: shower hose)
172=RFXMeter, RFXMeter Counter (many strange high values=long standing Domoticz bug)
173=General, Custom Sensor (momentary usage, same as 122)
124=RFXMeter, RFXMeter Counter (many strange high values=long standing Domoticz bug); duplicated ... same bug, same moment
30+ ESP units for production and test. Ranging from control of heating equipment, flow sensing, floor temp sensing, energy calculation, floor thermostat, water usage, to an interactive "fun box" for my grandson. Mainly Wemos D1.
Re: General Pulse counting to much
Will try it later on the day, but still think it’s not an solution. The software is counting to much, the pulse led match 100% with the rotating diskDomosapiens wrote: ↑28 Nov 2018, 23:40Still correct.I compared the Domoticz result (including off-set) with the real meter.
Could it something with time and samples?
I use:
Name: Flow
GPIO-12(D6)
Debounce 0
Counter Delta
Mode Type Rising
Interval 60 seconds !!!!!! (measure Liter/minute)
Count: 0 decimals
Total: 1 decimal
Time: 2 decimals (don't know the usage ...)
IDX 123 goes to Domoticz: Type General, Counter Incremental (only 2 decimals !!!, not like your 3 decimals)
Domoticz settings ...Meters/Counters ...Counter Dividers ...Water ..1000
To understand additional different Domoticz water meter capabilities I made this rule (fork):123= General, Counter Incremental (Task IDX used with offset)Code: Select all
On Flow#Count do SendToHTTP 192.168.1.7,8080,/json.htm?type=command¶m=udevice&idx=171&nvalue=0&svalue=[Flow#Count] SendToHTTP 192.168.1.7,8080,/json.htm?type=command¶m=udevice&idx=122&nvalue=0&svalue=[Flow#Count] SendToHTTP 192.168.1.7,8080,/json.htm?type=command¶m=udevice&idx=172&nvalue=0&svalue=[Flow#Count] SendToHTTP 192.168.1.7,8080,/json.htm?type=command¶m=udevice&idx=173&nvalue=0&svalue=[Flow#Count] SendToHTTP 192.168.1.7,8080,/json.htm?type=command¶m=udevice&idx=124&nvalue=0&svalue=[Flow#Count] Endon
171= General, Counter Incremental (used without offset)
122= General, Waterflow (momentary usage, nice to check your shower performance; I replaced my bottleneck: shower hose)
172=RFXMeter, RFXMeter Counter (many strange high values=long standing Domoticz bug)
173=General, Custom Sensor (momentary usage, same as 122)
124=RFXMeter, RFXMeter Counter (many strange high values=long standing Domoticz bug); duplicated ... same bug, same moment
-
- Normal user
- Posts: 307
- Joined: 06 Nov 2016, 13:45
Re: General Pulse counting to much
Yep, I understand.the pulse led match 100% with the rotating disk
But that does not mean that the ESP does not get more pulses ....
ESP could see additional spikes ...
Saw your scheme on Github, but that tool limits you in your expression.
Advise ... use PPT to make a logic scheme.
30+ ESP units for production and test. Ranging from control of heating equipment, flow sensing, floor temp sensing, energy calculation, floor thermostat, water usage, to an interactive "fun box" for my grandson. Mainly Wemos D1.
Re: General Pulse counting to much
@Domosapiens, please see Github
Who is online
Users browsing this forum: No registered users and 43 guests