Shop OBEX P1 Docs P2 Docs Learn Events
Timer — Parallax Forums

Timer

tchescowtchescow Posts: 5
edited 2004-09-01 00:13 in Robotics
Could anyone help me to build a timer using the basic stamp? Got some hints of how to use a 555. Well, waiting for suggestions, scheamatics, anything! rolleyes.gif

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-08-27 21:22
    You need to be more specific: one-shot or astable? Triggered (either) or free running (astable only). If triggered, what level (high or low)?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • tchescowtchescow Posts: 5
    edited 2004-08-27 22:10
    Thanks for the attention!
    What I need is something like this: I'll have a robot running through a playing field, following white stripes, and doing some other tasks. The point is that I want the robot to do it only for one minute and thirty seconds, and I need to count this time, without stoping the rest of the activities. Hope I was clear enough! Thanks in advance, and I'm looking forward for the solution!
    blush.gif·smile.gif
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2004-08-27 22:33
    If this is a BOE-Bot, you could add a DS1302 RTC, and write some code to start the clock, then during your loop/routines that handle line tracking, etc. periodically check·the elapsed time.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Knight Designs
    324 West Main Street
    P.O. Box 97
    Montour Falls, NY 14865
    (607) 535-6777

    Business Page:·· http://www.knightdesigns.com
    Personal Page:··· http://www.lightlink.com/dream/chris
    ·
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-08-27 23:20
    I agree with Chris, the simplest solution is going to be an external RTC.

    And, sorry about my original post -- you mentioned the 555 and I went down the software-like-a-555 path. That said, you still could use a 555.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2004-08-28 00:07
    I would like to return the favor Jon...He could use a 555 timer the SAME way he could use a DS1302, but with less code...Maybe 2 pins..One to reset the time (Hardwired), and one to sense the output when the timing cycle is up...See, sometimes I overcomplicate things, simply because that's what *I* would do.

    So you're right...


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Knight Designs
    324 West Main Street
    P.O. Box 97
    Montour Falls, NY 14865
    (607) 535-6777

    Business Page:·· http://www.knightdesigns.com
    Personal Page:··· http://www.lightlink.com/dream/chris
    ·
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-08-28 00:50
    Actually, I nearly suggested the same thing -- it's just that a 555 has limitied flexibility in timing range. If you're going to be sampling anyway, you might as well get the actual time with proper resolution, as well as the flexibility of having longer or shorter time periods without changing/adjusting external components.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2004-08-28 00:58
    You are, of course, correct!· My point was, however, that I myself didn't think to mention the 555 as a possibility until you mentioned it.· But I do think a DS1302 is a better choice...More flexibility!


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Knight Designs
    324 West Main Street
    P.O. Box 97
    Montour Falls, NY 14865
    (607) 535-6777

    Business Page:·· http://www.knightdesigns.com
    Personal Page:··· http://www.lightlink.com/dream/chris
    ·
  • Mag748Mag748 Posts: 266
    edited 2004-08-31 05:44
    If you used a 555, would it be smart to use a digital Pot to adjust the time if you need to in the code?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • BeanBean Posts: 8,129
    edited 2004-08-31 11:16
    If your going to go to the trouble of using a 555 AND a digital pot, you might as well just use the DS1302...
    Terry
  • tchescowtchescow Posts: 5
    edited 2004-08-31 13:36
    Thanks for everything until now, but I'm still having some trouble. rolleyes.gif I don't mean to abuse, but if it would be possible for someone to post an schematic of the circuit (DS1302) I'd appreciate it. I need to count seconds!
    Thanks in advance (again!) blush.gif
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2004-08-31 13:49
    The Stampworks manual, which is downloadable here:

    http://www.parallax.com/dl/docs/books/sw/stampworksmanualv1_2.pdf

    Shows an example of connecting and using the DS1302.· I myself used it to develop my own code for specific applications.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Knight Designs
    324 West Main Street
    P.O. Box 97
    Montour Falls, NY 14865
    (607) 535-6777

    Business Page:·· http://www.knightdesigns.com
    Personal Page:··· http://www.lightlink.com/dream/chris
    ·
  • tchescowtchescow Posts: 5
    edited 2004-09-01 00:13
    Thanks a lot! I'll take a look right now!
    smilewinkgrin.gif·
Sign In or Register to comment.