I am using a Dual Counter from Hobby Boards for monitoring my gas usage. (http://www.hobby-boards.com/catalog/pro ... ucts_id=42)
For a bit more info on how I do this see:http://www.domoticaforum.eu/topic.asp?TOPIC_ID=119
At first everything seemed to work just fine, but occasionally it seems like the DS2423 goes crazy, it just keeps incrementing its counter while nothing really happens!
The DS2423 is queried every 5 seconds to see if there is a change in 1 of the 2 counter-values and if so, both values are written to an SQL table.
The following table will show what i mean:
Code: Select all
<b>Time CntrA CntrB</b>
7-7-2006 19:06:13 495615 143850
7-7-2006 19:06:43 495616 143850
7-7-2006 19:07:18 495617 143850
7-7-2006 19:07:48 495618 143850
7-7-2006 19:08:18 495619 143850
7-7-2006 19:29:40 495620 143850
7-7-2006 19:29:55 495621 143850
7-7-2006 19:30:20 495622 143850
7-7-2006 19:41:06 495623 143850
8-7-2006 0:51:02 496011 143851
8-7-2006 0:51:27 496267 143851
8-7-2006 1:36:55 496687 143851
8-7-2006 1:41:16 496688 143851
8-7-2006 1:41:36 496689 143851
8-7-2006 1:42:01 496690 143851
8-7-2006 5:43:11 496691 143851
8-7-2006 5:43:26 496692 143851
8-7-2006 5:43:46 496693 143851
As you can see above, everything works fine on 7-7-2006. Counter A is perfectly counting the gas usage, Counter B keeps the same value all the time. Perfect.
But then, suddenly, at 08-07-2006 00:51 both counters behave unexpectedly. Counter B increments and at the same time, Counter A increments far too much in a query-interval of just 5 seconds...the DS2423 is going crazy!
And then, as if nothing has happened, it goes back to "normal" at 8-7-2006 1:36:55...
You can imagine what this would do to my gas statistics...
What i've tried so far to eliminate this misbehavior is:
- use shielded cables for the CNY70;
- put everything (counter kit, LM741 etc.) in an aluminum case;
- use different algorithms to read the DS2423.
But i still haven't found any solution yet.
This "going crazy" just happens once every 1-3 weeks, and i still have no clue what causes this.
I recently added a screendump-routine to my program that is triggered whenever "strange" counter-values are encountered, but with no results yet. Maybe i can see something on these screendumps that will give me new information to work with. That's why i still have a datalogger monitoring some input-voltages that are going to the DS2423.
Another thing i have found out recently, is that when these strange behavior occurs, the time to establish a 1-Wire session (i'm using TMEX) is >5 times the normal value (>1000 ms vs. 180 ms). Why's that?
So, it's all still a big mystery to me what's going on with my DS2423, maybe someone can come up with some ideas...???