Shop OBEX P1 Docs P2 Docs Learn Events
BS2E timing — Parallax Forums

BS2E timing

Eric REric R Posts: 225
edited 2004-11-02 22:14 in BASIC Stamp
Just finished two outdoor Christmas displays using identical components with no external capacitors that would affect timing. It is just a down right simple BS2E -·ULN2803 - solid state relay device.·If I plug them into the same extension cord and then to the wall, within a few minutes one display will be well ahead of the other in the program loop. Is this common? The reason for asking is for my next post RC Time...

Comments

  • allanlane5allanlane5 Posts: 3,815
    edited 2004-11-01 15:11
    The on-module "resonator" oscillator that controls the BS2e can have a certain amount of variability in their frequency. It turns out that *any* oscillator circuit has a *certain* amount of variability. For really accurate timing you need a quartz crystal -- and even then you'll only get 10 ppm (pulses per million) unless you temperature control the crystal.

    All of this costs dollars and milli-amps, of course.
  • Eric REric R Posts: 225
    edited 2004-11-01 22:06
    I figured it would be a frequency issue but was amazed at how far off each one was.
  • allanlane5allanlane5 Posts: 3,815
    edited 2004-11-02 14:46
    Humans are *really* good at seeing discrepancies, but not so good at seeing absolutes. For instance, if you had an oscillator that blinked once every second, you would not be able to tell if it was blinking at 1.1 seconds or 0.9 seconds. This is the 'absolute' value.

    However, if you had another oscillator that *did* blink every 1 second, you would quickly be able to tell by comparing the two that they were not in syncronization. Part of the reason is of course that the difference increases every second.

    I believe most people use a single Stamp at a time, and if they really want wall-clock time they use a cheap DS1302 RTS chip, so the discrepancy is not a problem for them.· Note that even a·32 KHz crystal controlled DS1302 will gain or lose a few seconds a day.

    If the two units are within 10 feet of each other, I suppose you could use an IR-LED and an IR-Decoder to have one be the 'master' clocker and one the 'slave' clocker -- this would at least keep them synchronized with each other.
  • Eric REric R Posts: 225
    edited 2004-11-02 22:14
    Thanks for the idea·on the master and slave. It was just an observation that sparked curiosity. These displays will be across town from one another so timing will not be an issue.
Sign In or Register to comment.