Shop OBEX P1 Docs P2 Docs Learn Events
How accurate is a BS2 OEM? — Parallax Forums

How accurate is a BS2 OEM?

300c_Pilot300c_Pilot Posts: 5
edited 2005-12-21 19:41 in BASIC Stamp
I am wondering how accurate of a timer I can build with a stamp. I would like it to display time in 1000th of a second, or greater,·but I doubt a BS2 can do it. Any thoughts?
Thanks

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-12-20 10:47
    You could use an external RTC (to keep accurate time) and a driver to handle the display. If you want to synthesize accurate time and multiplex the display yourself they you'll want to look into using the SX with SX/B.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • allanlane5allanlane5 Posts: 3,815
    edited 2005-12-20 15:17
    1. There's a difference between Precision (how many decimal places displayed) and Accuracy (how close to the actual value your measured value is).

    2. The BS2 uses a 'resonator' based oscillator. Thus I believe it's not terribly accurate.

    3. You CAN base a PIC (or SX) design on a crystal oscillator, which can be accurate to 10 ppm. 10 parts-per-million means for every million ticks, it can be off 10. Thus, for every 11.574 hours, your clock could gain or lose 10 seconds.

    4. You could check out the Simple Multi-Tasking co-processor (for $12 or so) which will give you a 50 mSec 'clock tick'. You can then use this 'clock tick' to synchronize your program. I believe it can be configured to give you a 5 mSec 'clock tick', for greater precision -- that would be 1/200 second per tick, and the BS2 could keep up with that. (.005, .010, .015, etc)
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2005-12-21 09:46
    Check out the clock ICs at Maxim's website. I believe they have an ultra-accurate one that is able to interface with a BasicStamp or an SX via 12C.

    They also have ICs with the xtal included so you don't have to mess with two components.

    Any microprocessor that keeps time is limited in the other functions it might do, so having an 'outboard' timepiece is a better solution if you are developing a concept.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)

    ······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
  • 300c_Pilot300c_Pilot Posts: 5
    edited 2005-12-21 17:50
    Thanks for the replys, I will look into the Maxim's.
  • 300c_Pilot300c_Pilot Posts: 5
    edited 2005-12-21 18:12
    A little explination on what I want to do:

    It (The device currently under thought) needs to be very accurate to the actual time that has passed. It will measure the amount of time that it takes to open and close a relay switch. Example: A Basler 51/50 Over Current Substation relay takes between 10 and 300 ml. seconds to close. Depending on age & type (Mecanical/electronic). We need to know if we can build something to do measure the actual time needed. The comercial eq. is over $30,000.00 to buy. We crrently rent one from ElectroRent.
  • allanlane5allanlane5 Posts: 3,815
    edited 2005-12-21 19:11
    Time is such a finicky beast. From time-stamping satellite down links (Year-DayOfYear-Hr-Min-Sec-mSec) to measuring the pulse width of a pulse 10 to 300 mSec wide -- there's LOTS of different issues. Correctly stating the problem is important. And "a clock to measure time" is insufficiently precise to narrow it down.

    The problem with a relay is that there is significant 'bounce' time. Thus the BS2 'PULSIN' keyword (which can measure a pulse on the BS2 up to 131 mSec with 2 uSec resolution) may or may not help you here.

    The BS2 takes about 300 uSec per instruction, just to interpret the instruction and execute it. Having said that, you could put multiple PULSIN statements in a row, measure several of the 'bounce' pulses, and decide what your measurement was from that.

    Personally, I'd be tempted to put a logic analyzer on the line (with a suitable current limiting resistor). You can get USB-based logic analyzers for around $500 or less.
  • 300c_Pilot300c_Pilot Posts: 5
    edited 2005-12-21 19:41
    When we test there is no power through the relay, so it would have a 5vdc source on one side, to since the closure. I need a nice little box that I can give someone, without the need for them to do any math. These guys are not the sharpest tools in the shed.
Sign In or Register to comment.