Page 2 of 2

Re: my water meter.

Posted: Thursday 23 October 2014 14:12
by schmm
Can someone tell me how accurate this solution is?

Re: my water meter.

Posted: Friday 14 November 2014 23:44
by Piacco
Is it possible to connect the watermeter sensor, described on http://www.domoticz.com/wiki/PiFace to the raspberry pi without using the piFace board?

Greetings,

Piacco

Re: my water meter.

Posted: Tuesday 23 December 2014 22:18
by sincze
Piacco wrote:Is it possible to connect the watermeter sensor, described on http://www.domoticz.com/wiki/PiFace to the raspberry pi without using the piFace board?

Greetings,

Piacco
Yes, it would be nice to know how to get the watermeter working using TCRT-5000 sendor directly connected to Raspberry GPIO. :D
I've read posts about using http://wiringpi.com/. However i did not yet find a complete solution including the script to use. :D
I think this would be the cheapest watermeter to be found on the internet. :lol:

Re: my water meter.

Posted: Thursday 25 December 2014 19:31
by roblom
bizziebis wrote:Bought this sensor from Ebay: http://bit.ly/RawnMy

It's working but it is hard to position it to work right.

How/where did you guys mount the sensor?

I'll post a picture of my mounted sensor later tomorrow.

Edit: pictures
Image
Image

I've edited the database to match the real watermeter usage. So in a couple of days I can see how reliable the sensor is. To be continued...
Is it correct that the green light is always on but goes off when the arrow (ord black area in case of a ferrarris meter) passes by?

Re: my water meter.

Posted: Tuesday 30 December 2014 15:58
by proohu01
I find it much easier to use a watermeter like this one: (I've been using it for almost 5 years now). It's an Alaxa that I bought somewhere in the Netherlands (http://www.alaxa.nl/). It give a pulse every 0,5l. It is connected to my RFXmeter but it can easyly be connected to a GPIO of your Raspberri Pi or PiFace (If you've got one :roll: )

Re: my water meter.

Posted: Tuesday 30 December 2014 18:59
by bizziebis
roblom wrote:
bizziebis wrote:Bought this sensor from Ebay: http://bit.ly/RawnMy

It's working but it is hard to position it to work right.

How/where did you guys mount the sensor?

I'll post a picture of my mounted sensor later tomorrow.

Edit: pictures
Image
Image

I've edited the database to match the real watermeter usage. So in a couple of days I can see how reliable the sensor is. To be continued...
Is it correct that the green light is always on but goes off when the arrow (ord black area in case of a ferrarris meter) passes by?
That's right. And the red light is always on.

Re: my water meter.

Posted: Tuesday 30 December 2014 23:55
by sincze
bizziebis wrote:Bought this sensor from Ebay: http://bit.ly/RawnMy

It's working but it is hard to position it to work right.

How/where did you guys mount the sensor?

I'll post a picture of my mounted sensor later tomorrow.

Edit: pictures
Image
Image

I've edited the database to match the real watermeter usage. So in a couple of days I can see how reliable the sensor is. To be continued...
Are you using your own script to communicate with the sensor? Or compiled the interrupt.c that can be found in this forum somewhere else?. My sensor connected to d0 generates 2 interrupts before green light comes on. An 2 again just before it goes off. bit frustrating.

Re: my water meter.

Posted: Wednesday 31 December 2014 14:12
by roblom
sincze wrote: Are you using your own script to communicate with the sensor? Or compiled the interrupt.c that can be found in this forum somewhere else?. My sensor connected to d0 generates 2 interrupts before green light comes on. An 2 again just before it goes off. bit frustrating.
I'm also having some problems with detecting more than one pulse sometimes.

Re: my water meter.

Posted: Friday 02 January 2015 8:50
by sincze
roblom wrote:
sincze wrote: Are you using your own script to communicate with the sensor? Or compiled the interrupt.c that can be found in this forum somewhere else?. My sensor connected to d0 generates 2 interrupts before green light comes on. An 2 again just before it goes off. bit frustrating.
I'm also having some problems with detecting more than one pulse sometimes.
Are you using tcrt5000 as well? My board says.
Pin 1 Vcc
Pin 2 GND
Pin 3 d0
Pin 4 a0

Green light will come on when it detects the reflecting disk.
I masked the rest of the water meter with Scotch tape leaving a part of the rotating disk exposed.
Repositioned the sensor and now have only 2 pulses.
1 disk arrived
1 disk left.

This is stable enough. I modified my. C file. Now let's see how accurate this is.

Re: my water meter.

Posted: Friday 02 January 2015 10:56
by sincze
Derik wrote:I did my:
https://imageshack.com/i/fvmdz4j

With the solarmeter, and then i import the data..
It seems you have tcrt5000 also.
Does yours also have 1 red light on continously.
1 green light on when it sees something?

I connected mine to raspberry directly. D0 pin will always report '1' except when it sees something '0'.
Also on interrupt level to raspberry it creates 2 interrupts despite using wiringpi 'FALLING'.

Code: Select all

  pinMode (IN_PIN,  INPUT) ;

  if (wiringPiISR (IN_PIN, INT_EDGE_FALLING, &myInterrupt) < 0)
  {
    fprintf (stderr, "Unable to setup ISR: %s\n", strerror (errno)) ;
    return 1 ;
  }
One interrupt while the disk is detected.
One interrupt while disk leaves detection area

Does your sensor do the same?

Re: my water meter.

Posted: Friday 02 January 2015 12:19
by roblom
sincze wrote:Are you using tcrt5000 as well? My board says.
Pin 1 Vcc
Pin 2 GND
Pin 3 d0
Pin 4 a0

Green light will come on when it detects the reflecting disk.
I masked the rest of the water meter with Scotch tape leaving a part of the rotating disk exposed.
Repositioned the sensor and now have only 2 pulses.
1 disk arrived
1 disk left.

This is stable enough. I modified my. C file. Now let's see how accurate this is.
Yes it's a TCRT5000 as well but only then not on a water meter but on a electricity meter. This meter has a metal rotating disk with one black area of a few millimeters. So as the disk reflects the green led is always on and goes off when the black area passes. This works fine but the virtual meter reading is becoming higher than the true meter reading, so there are to many pulses counted. I have to find out how many, but if it is a double then I know enough. When I look at the green LED it looks ok and I have set the GPIO value to "falling" but i'm not sure this solves the problem of the 2 pulses that can be caused by the arrive and left of the black area.

Re: my water meter.

Posted: Friday 02 January 2015 14:54
by sincze
roblom wrote:
sincze wrote:Are you using tcrt5000 as well? My board says.
Pin 1 Vcc
Pin 2 GND
Pin 3 d0
Pin 4 a0

Green light will come on when it detects the reflecting disk.
I masked the rest of the water meter with Scotch tape leaving a part of the rotating disk exposed.
Repositioned the sensor and now have only 2 pulses.
1 disk arrived
1 disk left.

This is stable enough. I modified my. C file. Now let's see how accurate this is.
Yes it's a TCRT5000 as well but only then not on a water meter but on a electricity meter. This meter has a metal rotating disk with one black area of a few millimeters. So as the disk reflects the green led is always on and goes off when the black area passes. This works fine but the virtual meter reading is becoming higher than the true meter reading, so there are to many pulses counted. I have to find out how many, but if it is a double then I know enough. When I look at the green LED it looks ok and I have set the GPIO value to "falling" but i'm not sure this solves the problem of the 2 pulses that can be caused by the arrive and left of the black area.
Okay, I tested with the visual interrupts on my screen and an IP cam over the meter :D
Please have al ook at the following links I did find today

http://forum.arduino.cc/index.php?topic=108371.0
http://letsmakerobots.com/content/inter ... oding-beef

These guys use the same sensor. However just the opposite interrupt ( instead of falling).:

Code: Select all

if (wiringPiISR (IN_PIN, INT_EDGE_RISING, &myInterrupt) < 0)
Sensor works like:
// Pin 1 = 1 (HIGH), it does not see a thing.
// Detection Pin 1 = 0
// Leaving Detection Pin 1=1 (HIGH) again.

So maybe just change that in your script and you are set to go. :D

Re: my water meter.

Posted: Friday 02 January 2015 17:13
by roblom
In 5 days the meters has an offset of about 10kWh so it is not double counting.
I connected the TCRT5000 directly to the GPIO ports of a RPi and used the GPIO support of Domoticz to create a sensor. Then I wrote a lua script to count the pulses the virtual sensor out of Domoticz gives.
Problem is also when I try to open the log of this sensor, Domoticz crashes. Posted a question about it on this forum, but nobody has an solution.

Re: my water meter.

Posted: Friday 02 January 2015 17:55
by sincze
roblom wrote:In 5 days the meters has an offset of about 10kWh so it is not double counting.
I connected the TCRT5000 directly to the GPIO ports of a RPi and used the GPIO support of Domoticz to create a sensor. Then I wrote a lua script to count the pulses the virtual sensor out of Domoticz gives.
Problem is also when I try to open the log of this sensor, Domoticz crashes. Posted a question about it on this forum, but nobody has an solution.
Thought of that to do it directly in Domoticz. So that works.
However I found more internet help with a solution that described counting of interrupts.
As this is outside of Domoticz I could actually see what happened.
A LUA script will import the external data for you.

Maybe you can use it as well for debugging?
http://www.domoticz.com/forum/viewtopic ... =20#p28371

Re: my water meter.

Posted: Friday 27 February 2015 21:42
by roblom
With the TCRT5000 I have a lot of "noise" so it's not one clear high or low pulse. Therefore the counter is quite inaccurate. I have about 4kWh a day difference between real and virtual counter. Somebody with the same experience? And does someone have a more accurate optical sensor?

Re: my water meter.

Posted: Monday 29 February 2016 15:39
by JelleB
Dear all,
I want to use a TCRT5000 directly on the GPIO port. I will get a water enter type sensus 620 from my water company (opportunity replacement).
Anyone got a working script for this combination?

Also, to which GPIO pin should the D0 signal be connected to?

Re: my water meter.

Posted: Friday 02 September 2016 9:51
by tricodoro
(More or less) same question here: can I connect my Sensus HRI pulse counter directly to the GPIO instead of using the S0PCM-5?

Re: my water meter.

Posted: Friday 02 September 2016 10:19
by sincze
JelleB wrote:Dear all,
I want to use a TCRT5000 directly on the GPIO port. I will get a water enter type sensus 620 from my water company (opportunity replacement).
Anyone got a working script for this combination?

Also, to which GPIO pin should the D0 signal be connected to?
A yes, TCRT5000 works well with this meter. I have it as well. Connected directly to GPIO.
I use an external program to avoid false positives. Look at my earlier posts for details and installation instructions.

Re: my water meter.

Posted: Friday 02 September 2016 10:20
by sincze
tricodoro wrote:(More or less) same question here: can I connect my Sensus HRI pulse counter directly to the GPIO instead of using the S0PCM-5?
Sorry, no experience with that. It was a bit to expensive for me..