Optical sensor for water meter - configuration

The optical sensor TCRT5000 works, but the results have surprised me. Just filled a bucket of water and the website shows I've used 489 liters. Somewhere this morning there's a spike of 14947 liter in a minute. Overnight I see spikes of 178 liter a minute. I'm sure there is no water used at night, the water meter has a maximum of 50 liter per minute. Something is wrong somewhere.

When I look at the sensor in action, I see a green light go on/off at every revolution of the little red/metal wheel that indicates one liter (Sensus 620). Sometimes the reflective part of the wheel stops right under the sensor, the green light stays on. When I look in syslog, I've got the idea that I might get two pulses each revolution. I just switched the constant for the sensor from 1 to 0.5 (should that have been 2 ?). Next to the wheel it says:
x0.0001 , but the liter counter (the most-right red digit of three digits) matches one revolution per liter.

I've hooked up the sensor to port 2 of my FLM02b. (D0 to +, Gnd to - )

The bucket is a good tip, looking at the blinking light is nice, but I'm looking for a way to debug this. Values like 14947 are way to big, so I'm not even close to the real water consumption.

I've started a mqtt-client to log the counter messages, that should give me a output-line per pulse (now 0.5 liter).

I've reseated the wires in the flukso, they look ok. Just filled the bucket with 5 liters and got 8 pulses. I must be doing something wrong, but I'm not sure what.

The graphs on the flukso website show periods of a constant flow of 1 liter a minute, that isn't happening according to the water meter.

So, any ideas ? Tweak the potentiometer on the sensor ? add another resistor in the power-wire ? shield the side of the optical sensor (its inside a cupboard) ? another port on the flukso ? another setting for the sensor (current clamp ports = 1, type = water, constant = 0.5) ? Just wait, the website will be ok in time ?

Fluc's picture

With so many litres consumed you must have like a kind of a interference ...
On my water meter, next to the wheel with the reflector, is also written 0,0001, but one full revolution of the wheel is 1 litre water consumption, so the meter constante must be 1.
That the green light stays on once in a while is not a problem because the Flukso counts the time between two pulses. I read somewhere here on the forum that the pulse detection is valuable only with a negative flank (that is when Digital Out goes from 1 to 0 and not from 0 to 1).
> Can someone correct me here please, perhaps it is opposite ??
Is the water meter location in full darkness ? You are sure that no reflection comes from the glass ?
What power supply you are using to feed the sensor, pin 6a of the FLM or something else ?
The potentiometer must be tuned, so that no green light goes on with no reflection on the wheel and if the reflection part is under the IR led, you must rotate the potentiometer just a bit counterclockwise until the green light goes out, than turn it little by little clockwise until the green light just comes on.
Perhaps you can be lucky to put a peace of matte tape on the glass.

bazzle's picture

Did you try changing the scale on the graph?
Top right where it says UNIT. Press litre or cumulative.

dijka007's picture

Thanks for your help.

Matted the glass with some matte sticky tape (good tip as I was a little afraid to use sandpaper), made a cap over the sensor (and cut myself) to block any light from somewhere else.

I had looked at the units in the graphs, but the graphs still puzzle me. When I look in the data that I've collected with a mqtt client, I see (for example) 8 pulses in a minute, so that should be 8 liters. If I go to the dashboard and look at the hour graph, unit = liter, the graph says 57 , and that peak in the graph is followed by a continuous 4 liters for half an hour, with no pulses in the mqtt client.

I interpreted the interference as light coming from somewhere, or do yo mean something electrical ?

The sensor is powered by pin 6a, with a 100 ohm resistor. My soldering skills are near zero, so I think I'll check the wires next, or try changing port on the flukso to another pulse (only pulse!) port.

I see I am on the right way, I'll tinker until it works.

Fluc's picture

Have you looked in the cumulative view like Bazzle wrote ?
Standard the dash opens on Litre/day and with me, this morning i used a little water, but on the dash it is showing 748 L, and during the day while i was at work, it shows 10 L with no use of water at all.
So i seems to have the same "problem" ? Yes and no... I change (and Bazzle too) always the Unit (above on the right, under Unit) to "litre" or "litre [cumulative]", than it is correct.
So click first "Hour"or "Day" in the middle above, then on the right you choose "litre [cumulative]".

dijka007's picture

If I change the unit to Liter[cumulative] it shows that my daughter has just used 2767 liters while showering for 23 minutes. That's more than twice the amount of water that the watermeter can handle.

If I count the pulses in the mqtt client, it show 558 liters, which I think is still too much.

Fluc's picture

What says the Litre unit ?
Can you test with filling a bucket, start with 1 litre and look at the dash and mqtt.
It must be something...but what ?
Test when someone use slow debit of water and you count the green led pulses and compare with the dash..

dijka007's picture

Reinstalled the wires in the flukso, but switched from port 2 to port 4. Reconfigured the sensors, filled a bucket, counted flashes and mqtt-pulses. Suddenly it all looks ok. Perhaps because i re-seated the wires, or perhaps because I switched ports, or because I touched something else in the process.

The counter in the mqtt messages matches the liters on the website, it works.

I'll keep a close eye on it, but for now I thank you all for your help.

dijka007's picture

The results are still good, but I'm still wondering why the figures were wrong the first time. I had a look at the data I collected with MQTT, and saw:

previous setup:

/sensor//counter [1402763172,1146927,"L"]
/sensor//counter [1402763174,1146937,"L"]
/sensor//counter [1402765247,1146943,"L"]
/sensor//counter [1402765250,1146959,"L"]

current setup:

/sensor//counter [1402768126,2,"L"]
/sensor//counter [1402771332,3,"L"]
/sensor//counter [1402771346,4,"L"]
/sensor//counter [1402771360,5,"L"]

In the new setup the counter just is incremented by one at each pulse, in the old setup the counter made bigger steps, and that was represented in the graphs on the website. So that explains the higher count of liters, the website was right, my flukso / sensor / configuration was wrong. Now I just have to find out what went wrong