??? 04/20/06 05:20 Read: times |
#114594 - More sophisticated? Maybe not. Responding to: ???'s previous message |
Kai Klaas said:
But doesn't mean this, that you have to sample the output of integrator during the whole bouncing event plus an extra time and that you have to analyze the samples in order to interpret the slopes by a suited algorithm? Isn't this much more sophisticated than "my" methode of only looking for the last toggling? ... Perhaps not. After all, the method I propose requires only that he monitor the integrator voltage until its delta becomes nonzero, and then start timing. Prior to that time, he knows the switch has not yet bounced for the first time. Subsequently, he monitors until he encounters a steady stream of samples at the KNOWN maximum voltage delta. Once that point is reached, he knows the reed has stopped bouncing, and since he knows how long each delta is, he can easily deduct the number of samples at which the delta is the same as the known maximum. I don't think this needs a particularly sophisiticated algorithm. If the current before the first bounce is know, and the current after the last bounce is known, then all that remains is to collect samples, compute the delta, compare them against the known threshold values (perhaps with a "fudge factor" to allow for small relay variations and inaccuracies in the converter), then subtract the time for the number of samples necessary to convince onesself that the bounce has ended. In real life, of course, the terminal delta may vary just a bit, in fact, probably at least an LSB, so the challenge is to evaluate that "bit" of error and learn to recognize it and compensate for it. This test shouldn't take long, so the average of several attempts would probably validate a series of sample sequences, and still take less than a second. A simple single simple loop will do the whole job, I believe, with a bit of setup and a bit of post-processing. RE |