Shop OBEX P1 Docs P2 Docs Learn Events
Looking for a BASIC Stamp expert with timekeeping experience in New York City — Parallax Forums

Looking for a BASIC Stamp expert with timekeeping experience in New York City

dtalvacchiodtalvacchio Posts: 36
edited 2009-05-09 02:05 in BASIC Stamp
Hello everybody--

For some time now I have been working on an art piece that uses a BASIC Stamp to operate a digital clock with a twist. The twist is that each tick of the seconds digit does not occur at one-second intervals. Instead, the ticks are programmed to occur randomly at intervals of roughly 0.7, 0.8, 1.2, and 1.4 seconds. Because these options are symmetric about 1 second, the clock wants to hover around the "actual" time . . . it can be said to move in and out of ordinary time, while still functioning as a more-or-less practical clock.

I have built the clock and done all the programming, and it works fairly well. The problem is that it is using the stamp's built-in timekeeping function, which is not quite accurate enough for the long-term precision required here. The clock has been running a little fast, not because of the randomizing component, but simply because everything is a little fast (I think). I did some research and came across the attached article, which solves just this problem by using a crystal for the timekeeping. I have built the circuit but not done the programming for the crystal, because I must have become convinced that it wasn't going to work in my case, with the randomizing bit. As I built the clock a couple of years ago, I am a little out of touch with all of the programming and circuitry knowledge. The issue now is that artwork was just accepted into a Biennial which begins in mid-June. I desperately need an expert who happens to live in or near New York City (my studio is in Queens) who can assess the situation, based on what I already have, and help to make the clock as accurate as possible by the end of May. I would be able to pay the consultant for his or her time. I'm assuming this would be fairly easy to solve for a BASIC stamp expert with any experience in crystal-based timekeeping such as shown in the attached article.

Please let me know right away if this is something that you might be able to help with . . . and/or please let any New York City area folks know about this consultant opportunity if you happen to know anybody. Thank you much.

Best--
Dominick T.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-05-08 20:28
    The timebase won't work for your needs as it's presented. It provides a "tick" twice a second and you need something roughly every 1/10 or 1/5th of a second. The 4060 counter has 14 stages for a count of 16384. With a crystal of 32768Hz, that gives you an output of 2Hz. If you use a different tap, you can get faster counts. In particular, using pin 2 of the 4060 instead of pin 3 gives you a "tick" of 4Hz. Pin 1 gives you a "tick" of 8Hz, and pin 15 gives you a "tick" of 32Hz (it skips a power of 2). With the 8Hz "tick", that gives you times of 0.625, 0.750, 1.250, and 1.375 seconds for intervals which would be symmetric around 1 second.

    Do remember that the random function in Stamp Basic uses a 16 bit counter for its "seed" value. If you generate a new "random" number every 1/8 second, the sequence of numbers will repeat every 65536 / 8 seconds = 8192 seconds = roughly every 2 1/4 hours. Not many people would notice, but you'd need a different source of random numbers or you'd have to stick with the same random value for several clock "ticks" or even several seconds so the pattern doesn't repeat for perhaps a day. Note that it wouldn't repeat at the same time each day (because it would be every 65536 "ticks"), so people probably wouldn't notice.
  • dtalvacchiodtalvacchio Posts: 36
    edited 2009-05-08 22:19
    Dear Mike-- Thank you for your response. I have tried exactly what you said, using the 4060 to output a 8Hz tick, and the seconds digit was programmed to randomly tick on the 6th, 7th, 9th, or 10th one. I thought I had it all working properly, but for some reason it wasn't. At this point, I really need someone to physically look at what I have and help me with the programming. You don't happen to know anybody in New York who might help, do you? I have some funds to compensate an expert for his or her time.
  • Mike GreenMike Green Posts: 23,101
    edited 2009-05-08 23:56
    If you post your source program as an attachment to a message, you may be able to get a quick answer. If you also have a schematic you can post, that will help as well.
  • dtalvacchiodtalvacchio Posts: 36
    edited 2009-05-09 00:19
    I think that I really need someone physically present in New York.
  • FranklinFranklin Posts: 4,747
    edited 2009-05-09 01:56
    I wish you well.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • Dave-WDave-W Posts: 94
    edited 2009-05-09 02:05
    dtalvacchio,
    Use a random number range to get the accurate time from a time keeping chip. This way every time the random number is within a "range" it would correct the time to be accurate.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dave W.
Sign In or Register to comment.