> So the PC itself becomes your frequency counter, with NTP providing the > long-term timebase stability you need.
> Mains cycles-per-second become RS232 bytes-per-second. You will get, on > average, 60 bytes per second. At the end of a "perfect" day you would have > read 5184000 characters. In Europe, it's 4320000 (50 Hz * 86400). I see two interesting problems with this sort of approach. One is glitches on the line, either lightning/whatever causing extra counts, or dropouts causing missed cycles. Does anybody know how often this sort of stuff happens? Does anybody have scope pictures? The other would be glitches on the PC. I can easily keep a system running for a week or a month, but every now and then I need to move the power plug or I get the urge to play with some software and ... If I have a day of good data, then a break, then more good data, how long can the break be so that I can correctly guess the number of cycles that were missed? It depends upon how much the frequency changes. If I extrapolate forward from before the break and back from after, the lines will intersect. If I can estimate the error in the slope of those lines I can see what happens if I use the high/low error cases. One thing that might help get back in cycle sync would be to use a PIC/AVR rather than a 555. The idea is that it can do the first layer of data reduction, say divide by 100. That would roughly multiply the get-back-in-sync time by 100. (assuming not much noise) The PIC could also send out a RS-232 text message with the count in it, or modulate the pulse width, say double the width every 10000 cycles. Mumble there are lots of opportunities. Another idea is that once you get the PIC debugged, you probably won't have to reboot it because you are messing with other software on the box. ------------------ An alternative would be to feed the 60 Hz into the audio port on the PC. No need for the 555 or whatever. The crystal driving the audio ADC is another variable but I think that won't be a major problem. -- These are my opinions, not necessarily my employer's. I hate spam. _______________________________________________ time-nuts mailing list -- time-nuts@febo.com To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts and follow the instructions there.