Inconsistent Pulse device

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Viald
Normal user
Posts: 16
Joined: 11 Jul 2018, 15:42

Inconsistent Pulse device

#1 Post by Viald » 11 Jul 2018, 17:13

Hi.
I would like to measure the water consumption using this water meter
https://ibb.co/myzmro

This water meter has a built-in ILS switch which is ON during the first half water liter and OFF during the last half water liter.
https://ibb.co/hOh6ro

I use a mini D1 running ESP_Easy_mega-20180708_normal_ESP8266_4096.bin
I have connect the 2 wires, one on the GND and the other on GPIO12 (D6), I have also added a 10Kohms pull up resistance between GPIO12 and PIN 3.3V
I tried 2 kind of devices

1/ Switch input - Switch with dummy device
https://ibb.co/dr6o48
https://ibb.co/cZ7HxT

With this rule:

Code: Select all

on Gpio#Impulsion do 
TaskValueSet,2,1,[Compteur#Total]+0.5
endon
2/ Generic - Pulse counter
https://ibb.co/fdMzBo

The switch input (and rule) gives the same consumption than the water meter. But he Pulse counter gives wrong total value. It's sometimes more and sometimes less than the reality.
(Total from Pulse counter should be divided by 2)
https://ibb.co/k1tqHT

I tried all the mode type (falling, rising, change and low) without success

What could be wrong ?

Thank for your advises.
Last edited by Viald on 11 Jul 2018, 23:18, edited 1 time in total.

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Inconsistent Pulse device

#2 Post by grovkillen » 11 Jul 2018, 17:40

Total pulses are rising until the set interval time is reached. Then it broadcast the value (computed with the formula if that exists) and start over at zero.
Last edited by grovkillen on 11 Jul 2018, 22:59, edited 1 time in total.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Viald
Normal user
Posts: 16
Joined: 11 Jul 2018, 15:42

Re: Inconsistent Pulse device

#3 Post by Viald » 11 Jul 2018, 19:13

Thank you Grovkillen.
I'm not sure to well understand the way that pulse mode works :?
Where do you set the interval time ?

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Inconsistent Pulse device

#4 Post by grovkillen » 11 Jul 2018, 19:17

In the plugin settings page.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Viald
Normal user
Posts: 16
Joined: 11 Jul 2018, 15:42

Re: Inconsistent Pulse device

#5 Post by Viald » 11 Jul 2018, 19:47

I set interval to 120s.
I tested during 90s, both Total were almost the same. Wait until 150s, Total of Pule device was not set to 0, start over a new test to 41 liter.
Image 544.jpg
Image 544.jpg (147.55 KiB) Viewed 9707 times
Pulse Total is wrong with 43.5 liter :?

What are Count and Time ?

Thank you.

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Inconsistent Pulse device

#6 Post by grovkillen » 11 Jul 2018, 20:03

Count is what I was referring to. Total is the total since last reboot. Time I'm not entirely sure what it is representing. So you should use count if you want the momentary consumption of water.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Viald
Normal user
Posts: 16
Joined: 11 Jul 2018, 15:42

Re: Inconsistent Pulse device

#7 Post by Viald » 11 Jul 2018, 22:46

I did other longer tests. The result is still the same, the Pulse counter is less accurate compare to the switch method which is identical as the mechanic counter of the water meter.
For sure, there is something wrong with the pulse counter.

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Inconsistent Pulse device

#8 Post by grovkillen » 11 Jul 2018, 23:00

I'm not sure what you're referring to with the "switch method". You need to give me more info on the settings and actual hardware and hope you have connected it.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Viald
Normal user
Posts: 16
Joined: 11 Jul 2018, 15:42

Re: Inconsistent Pulse device

#9 Post by Viald » 11 Jul 2018, 23:15

Everything is explained in my first post, please tell me what is missing.
By switch method, I mean using switch device and dummy device to calculate the amount of liter

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Inconsistent Pulse device

#10 Post by grovkillen » 12 Jul 2018, 09:56

What's the debounce time, you need to trim this down. See my wiki article in the matter: https://www.letscontrolit.com/wiki/inde ... ogic_input
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Viald
Normal user
Posts: 16
Joined: 11 Jul 2018, 15:42

Re: Inconsistent Pulse device

#11 Post by Viald » 12 Jul 2018, 17:12

I tried different debounce time. I found that the best one depends on the rate of flow of the water.
For exemple at constant high rate of flow, 1 second debounce time give exactly the same amount of liter than the water meter.
But if I reduce the rate of flow, the number of liter increases abnormally.

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Inconsistent Pulse device

#12 Post by grovkillen » 12 Jul 2018, 18:11

I use 100 mSec for debounce time. Could you try it too?
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Viald
Normal user
Posts: 16
Joined: 11 Jul 2018, 15:42

Re: Inconsistent Pulse device

#13 Post by Viald » 12 Jul 2018, 18:22

Dit it. No good as soon as it starts, it measures 5 liters (10/2) instead of 7.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Inconsistent Pulse device

#14 Post by TD-er » 14 Jul 2018, 08:08

This sensor is not like a switch, but gives a proper square wave signal.
It probably uses a Hall sensor and a magnet.

This means the debounce should not be needed at all.
It could be there is some issue with the plugin, I haven't looked at its implementation yet, on how it is using this debounce feature.

Edit:
I was just thinking about these sensors. Is it possible the flow sensor is acting a bit strange when starting/stopping the flow?
For example rotating back/forward when starting/stopping, or at a low flow rate?

Viald
Normal user
Posts: 16
Joined: 11 Jul 2018, 15:42

Re: Inconsistent Pulse device

#15 Post by Viald » 16 Jul 2018, 20:48

Thank you for your help.
It was not designed to be a switch, but using the switch setting with ESPeasy gives very good result.

I don't think it's a all sensor, I have joined the picture of the sensor, it seems to be an ILS switch.

If the sensor goes backwards, I see it on the mechanical meter and this is not the case.
The flow is of course not constant, but for sure nothing seems abnormal.

alabama
Normal user
Posts: 90
Joined: 24 Nov 2017, 10:04

Re: Inconsistent Pulse device

#16 Post by alabama » 14 Sep 2018, 10:26

TD-er wrote: 14 Jul 2018, 08:08 This sensor is not like a switch, but gives a proper square wave signal.
It probably uses a Hall sensor and a magnet.

This means the debounce should not be needed at all.
It could be there is some issue with the plugin, I haven't looked at its implementation yet, on how it is using this debounce feature.

Edit:
I was just thinking about these sensors. Is it possible the flow sensor is acting a bit strange when starting/stopping the flow?
For example rotating back/forward when starting/stopping, or at a low flow rate?
I have an additional question about the debounce time.
I use a flow meter with hall sensor.
Not exactly this one, but something similar: https://www.magnetventile-shop.de/daten ... -5-30l.pdf)
Now I have crashed my ESP8266-01 and changed it to another one. So I want to use this opportunity and make the calibration new. But I'm not sure to have teh correct debounce time. You write this type of meters with hall sensors don't need debounce time, so I have to set it to 0? I set it to 1ms, mode type Falling after I get the two measurements of my sensor by the oscilloscope for maximum and for very low flow (see attachements). Do you think it will work?
Attachments
Wasserzähler_Garten_Minimum.jpg
Wasserzähler_Garten_Minimum.jpg (66.47 KiB) Viewed 9681 times
Wasserzähler_Garten_Maximum.jpg
Wasserzähler_Garten_Maximum.jpg (65.61 KiB) Viewed 9681 times

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Inconsistent Pulse device

#17 Post by TD-er » 14 Sep 2018, 20:20

I think it will, but like I said, I will have a thorough look at both P001 and P003 to see how both can be improved.
It should work just fine with a very low de-bounce effect. That will also filter noise picked up by long wires.

alabama
Normal user
Posts: 90
Joined: 24 Nov 2017, 10:04

Re: Inconsistent Pulse device

#18 Post by alabama » 15 Sep 2018, 12:25

Thanks. I think that this summer is already over for wateing, but I want to be prepared for next year.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Inconsistent Pulse device

#19 Post by TD-er » 16 Sep 2018, 10:51

alabama wrote: 15 Sep 2018, 12:25 Thanks. I think that this summer is already over for wateing, but I want to be prepared for next year.
I know there is at least one user of ESPeasy that's just starting his summer of watering strawberries. So I will try to get these things fixed before his strawberries dry out completely :)

Post Reply

Who is online

Users browsing this forum: No registered users and 33 guests