Shop OBEX P1 Docs P2 Docs Learn Events
1 PPS clock source issues: Basic Stamp frequency counter? — Parallax Forums

1 PPS clock source issues: Basic Stamp frequency counter?

FlyingFishFingerFlyingFishFinger Posts: 461
edited 2010-01-08 23:53 in General Discussion
Hi all-
So I finally finished the Nixie clock I've been working on for a LONG time. However, the 1PPS source I built doesn't quite seem to run true: It gained about one second over 6 hours. Now my nicer multimeter is at my appartment at school and the scope I have at home has a broken trimmer on the time/div knob so I don't know what exactly it's set to.
The examples I worked off of say that I can get 32.768 kHz at one test point in the circuit, but I don't have anything to measure this with. Is a Stamp 2p fast enough to be programmed as a frequency meter, and if so how would I go about doing that?
Thanks

Raf

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
UC Berkeley '12 EECS
CalSol: Berkeley Solar Car team
www.calsol.berkeley.edu
KJ6AWU

Post Edited (FlyingFishFinger) : 1/6/2010 8:41:13 AM GMT

Comments

  • Alan BradfordAlan Bradford Posts: 172
    edited 2010-01-06 22:35
    I assume your Nixie Clock needs lots of power and is AC Line powered rather than gobbling up batteries like a kid and a plate of Oreos!
    The easiest way to get an accurite time base is to count the zero crossing of the AC line. Divide bt 120 and you have a 1PPS signal.
    The Line Frequency is 60 Hz +/- .1 hz. This in its self is not too accurate but the power company monitors and corrects the frequency.
    If it runs at 59.9 hz for 127 cycles then they will speed it up to 60.1 hz for 127 cycles.
    Over a long time, like hours or days the timing is very accurate, and this is why most AC powered clocks keep such good time.

    Anyway just my 2 cents worth.
    Hope it helps

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Alan Bradford ·N1YMQ

    Plasma Technologies
    Canaan NH 03741
    www.plasmatechnologies.com
  • Alan BradfordAlan Bradford Posts: 172
    edited 2010-01-06 23:11
    Sorry I went off on a tangent...
    I am not sure if the Stamp is fast enough, maybe the SX or 2P might be.
    The problem is the Stamp time base is not that accurite and you would still need a scope or other type of acurate piece of test equipment to calibrate it.

    Good luck,

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Alan Bradford ·N1YMQ

    Plasma Technologies
    Canaan NH 03741
    www.plasmatechnologies.com
  • FlyingFishFingerFlyingFishFinger Posts: 461
    edited 2010-01-07 02:08
    No the clock is not AC powered. My source is running *almost* correctly off of a 32.768 kHz watch crystal. I didn't want to divide off AC because I'm pretty international and the clock might find itself in a place where there are 50 Hz on the mains. And I wanted the option of running it off batteries. At the moment it's running of a 9VDC wall wart.
    The frequency source is supposed to be adjustable with a variable capacitor, but I don't have anything to measure the test point frequency with. Actually, I also have a Prop around. Would that be good enough?

    Raf

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    UC Berkeley '12 EECS
    CalSol: Berkeley Solar Car team
    www.calsol.berkeley.edu
    KJ6AWU
  • Alan BradfordAlan Bradford Posts: 172
    edited 2010-01-08 21:38
    I am not sure about the Prop.
    I have not been able to 'Cog' my brain in to the Prop programming.
    My head "Spins' when·I think about it.· (I·have been a·Basic junkie since 1969 and can only think of one thing at a time!)

    If·the Prop·has a crystal time base, but it may not be much more accurate than your 32 khz on the clock.

    If time is not an issue (pun intended), you could tweak your clock timebase a little bit, wait 6 hrs to see if it drifted, and if not your done, if it did then repeat.
    You could use WWV as your time base.

    Eventually you will get get it right on.

    Good Luck,

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Alan Bradford ·N1YMQ

    Plasma Technologies
    Canaan NH 03741
    www.plasmatechnologies.com
  • BeanBean Posts: 8,129
    edited 2010-01-08 22:24
    You have to watch when you say it "gained one second" what were you measuring it against because everything is relative you know.

    At my work we have an atomic clock, and unless you run the counter from the atomic clock you are really just comparing the clock to the clock inside the counter (which could be worse than the clock you are trying to measure).

    I would suggest using the·1pps from a GPS receiver.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Use BASIC on the Propeller with the speed of assembly language.

    PropBASIC thread http://forums.parallax.com/showthread.php?p=867134·
  • FlyingFishFingerFlyingFishFinger Posts: 461
    edited 2010-01-08 23:53
    It gained one second compared to the stopwatch on my G-Shock. I don't know if that qualifies as "good". When I get back to school next week I'll check the frequency and see if setting it makes any difference.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    UC Berkeley '12 EECS
    CalSol: Berkeley Solar Car team
    www.calsol.berkeley.edu
    KJ6AWU
Sign In or Register to comment.