nipunbatra / Home_Deployment

http://iawe.github.io
8 stars 5 forks source link

Water Meter False Positive on GPIO #24

Closed nipunbatra closed 11 years ago

nipunbatra commented 11 years ago

Following is a log

Falling 1369711150.08
1
RIsing 1369711154.0
Falling 1369711159.89
2
RIsing 1369711167.19
Falling 1369711167.19 
3
RIsing 1369711167.47
Falling 1369711207.39
4
RIsing 1369711208.03
Falling 1369711513.45
5
RIsing 1369711515.85
Falling 1369711604.92
6
RIsing 1369711604.95
Falling 1369711605.04
7
RIsing 1369711606.4
Falling 1369711606.52
8
RIsing 1369711606.66
Falling 1369711606.68
9
RIsing 1369711607.22
Falling 1369711608.4

Need to put a CRO to see if this is happening at s/w end or there is some noise in the circuit. Another test it to see if this comes in smaller cable length (meter connected to motor).

nipunbatra commented 11 years ago

I periodically noted down the reading from the tank meter. From the collected GPIO data found that most of the bursty data occured within few ms. Saw the number of events which are separated by more than 3 seconds. Results are much closer to actual numbers. Manoj is looking into ADC waveform and comparing it with the data from the GPIO program.

nipunbatra commented 11 years ago

Now even after adding a delay of 3s, get a lot of false positives. When 24 litres were consumed, 33 events (330 litres) are observed. Surely a lot of false events sent in the wire. I recall that when the vendor came in to give the demo last year he talked about giving data over Modbus. Should we talk to those guys if Modbus controller can be attached to this meter or would it be a different meter altogether?

amarjeet-iiitd commented 11 years ago

This is getting complicated.

Please ask manoj to check for using the ADC rather than a GPIO. In parallel, feel free to explore the modbus option from the vendor.

On Tue, Jun 4, 2013 at 8:02 PM, Nipun Batra notifications@github.comwrote:

Now even after adding a delay of 3s, get a lot of false positives. When 24 litres were consumed, 33 events (330 litres) are observed. Surely a lot of false events sent in the wire. I recall that when the vendor came in to give the demo last year he talked about giving data over Modbus. Should we talk to those guys if Modbus controller can be attached to this meter or would it be a different meter altogether?

— Reply to this email directly or view it on GitHubhttps://github.com/nipunreddevil/Home_Deployment/issues/24#issuecomment-18912808 .

Best Regards

Amarjeet Singh, Asst. Professor, IIIT Delhi http://www.iiitd.edu.in/~amarjeet/

nipunbatra commented 11 years ago

Also with Modbus controller, i feel we can get 1 liter resolution rather than 10 liter. But this needs to be confirmed. Highly possible that they take pulse o/p from meter and put the data in modbus register

amarjeet-iiitd commented 11 years ago

If the meter is giving the pulse at 10 liters then modbus controller can not do anything. That is a device that gets added with the wire of the meter and takes the pulse output from it.

On Wed, Jun 5, 2013 at 7:34 AM, Nipun Batra notifications@github.comwrote:

Also with Modbus controller, i feel we can get 1 liter resolution rather than 10 liter. But this needs to be confirmed. Highly possible that they take pulse o/p from meter and put the data in modbus register

— Reply to this email directly or view it on GitHubhttps://github.com/nipunreddevil/Home_Deployment/issues/24#issuecomment-18951371 .

Best Regards

Amarjeet Singh, Asst. Professor, IIIT Delhi http://www.iiitd.edu.in/~amarjeet/

nipunbatra commented 11 years ago

No electricity breakdown yesterday. Verified that with polling data is clean. I think that issue is resolved. Looks OK to me. @manojgulati , @amarjeet-iiitd : Please confirm if this looks OK

Time Reading
12:00 10583
1:19 10613
3:46 10661
5:15 10684

image_zoomed image_zoomed2

Water consumption

manojgulati commented 11 years ago

This is fine. But for confirmation please take one more note down of actual readings with plots. So that we can check this out of issue list.

nipunbatra commented 11 years ago

Sure taking more readings starting now and will keep updating them here itself.

Time Reading
8:42 11173
Next day
10:28 11323
amarjeet-iiitd commented 11 years ago

I dont understand the plot - is it the case that everytime we see 1, 10 liters are consumed? And why are there two consecutive ones without going to 0?

On Sat, Jun 15, 2013 at 8:14 PM, Nipun Batra notifications@github.comwrote:

No electricity breakdown yesterday. Verified that with polling data is clean. I think that issue is resolved. @manojgulati https://github.com/manojgulati , @amarjeet-iiitdhttps://github.com/amarjeet-iiitd: Please confirm if this looks OK Time Reading
12:00 10583
1:19 10613
3:46 10661
5:15 10684

[image: image_zoomed]https://f.cloud.github.com/assets/60985/658247/fa61f5e8-d5c9-11e2-8bf9-f36f319245ae.png [image: image_zoomed2]https://f.cloud.github.com/assets/60985/658248/faef1b44-d5c9-11e2-9b4d-afbbd6ac1849.png

[image: Water consumption]https://f.cloud.github.com/assets/60985/658234/1791b8f2-d5c9-11e2-9f39-9a97e3fa7c04.png

— Reply to this email directly or view it on GitHubhttps://github.com/nipunreddevil/Home_Deployment/issues/24#issuecomment-19497526 .

Best Regards

Amarjeet Singh, Asst. Professor, IIIT Delhi http://www.iiitd.edu.in/~amarjeet/

nipunbatra commented 11 years ago

This plot is based on polled data.

1 means that water level is between 2 and 3 at unit's place, 0 o/w

2 consecutive 1's mean that during those two time points, water level remaining b/w 2 and 3. So to count 10 litres you can simply count the number of rising or falling edges in the above plot.

manojgulati commented 11 years ago

Here i have attached the connection diagram for connecting water meter with Raspberry Pi Gpio. Please check the three header wires periodically so that in case of loose wires we are not going to loose any data. image

Last time the issue of noise that you were facing was due to loose header wire & Rpi was hanging on support of header wires and Ethernet cable which introduced noisy signals on Gpio's. And please check if Rpi's/ Resistors are getting warm as in our case Raspberry pi is running for 24 hours.

Thanks hope we can wrap up water meter issue list now.

manojgulati commented 11 years ago

I hope water meters are stable now. Please close this issue.