Re: my water meter.
Posted: Thursday 23 October 2014 14:12
Can someone tell me how accurate this solution is?
Yes, it would be nice to know how to get the watermeter working using TCRT-5000 sendor directly connected to Raspberry GPIO.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
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?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
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...
That's right. And the red light is always on.roblom wrote: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?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
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.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
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...
I'm also having some problems with detecting more than one pulse sometimes.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.
Are you using tcrt5000 as well? My board says.roblom wrote:I'm also having some problems with detecting more than one pulse sometimes.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.
It seems you have tcrt5000 also.Derik wrote:I did my:
https://imageshack.com/i/fvmdz4j
With the solarmeter, and then i import the data..
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 ;
}
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.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.
Okay, I tested with the visual interrupts on my screen and an IP cam over the meterroblom wrote: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.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.
Code: Select all
if (wiringPiISR (IN_PIN, INT_EDGE_RISING, &myInterrupt) < 0)
Thought of that to do it directly in Domoticz. So that works.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.
A yes, TCRT5000 works well with this meter. I have it as well. Connected directly to GPIO.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?
Sorry, no experience with that. It was a bit to expensive for me..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?