Shop OBEX P1 Docs P2 Docs Learn Events
Clearing a latch, and a couple other basic questions — Parallax Forums

Clearing a latch, and a couple other basic questions

ArchiverArchiver Posts: 46,084
edited 2000-03-24 16:25 in General Discussion
Hi everybody,

I am currently building a speed trap to monitor traffic. I am using two
ir sensors, which are not very fun to work with, that are connected to
an SR latch which would then be hooked up to the pulsin function. When
the first sensor is tripped it will change an input on the latch which
would also make the output on the latch go to a one until the second
sensor is tripped. This "pulse" would then be used as the pulsin
input. When I start up my BS2 I would like to intially set both input
states to 0 0 and have an output of 0 on my latch. How would I go about
doing this in my code? Better yet can I even do this with the stamp?

Also is there a way to monitor the battery that is used to supply the
stamp?

Could I use the 5 V output on the stamp to supply my latch chip, two IR
emitters, and two IR receivers? I guess overall how much current can I
draw from the stamp?

thanks,
babz

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2000-03-21 23:54
    are you trying to make a speed monitoring system?
    How far apart are your sensors as if the distance is large enough you could
    possibly use the STAMP
    for everything.
    There are lots of ways to do this so i expect that you'll have many ideas
    from our STAMPERS!
    I would probably not use a STAMP since all you need is a pulse generator and a
    counter that is started and stopped by the IR
    pulses. The count can be displayed on a LCD or LED display. This would allow for
    close spacing of the sensors with very short times
    from those speeders! Of course we all like to PLAY STAMPS so why not use a STAMP
    anyway.

    Date sent: Tue, 21 Mar 2000 16:15:18 -0600
    From: jbabich@p...
    To: basicstamps@egroups.com
    Send reply to: basicstamps@egroups.com
    Subject: [noparse][[/noparse]basicstamps] Clearing a latch, and a couple other basic
    questions

    > Hi everybody,
    >
    > I am currently building a speed trap to monitor traffic. I am using two
    > ir sensors, which are not very fun to work with, that are connected to
    > an SR latch which would then be hooked up to the pulsin function. When
    > the first sensor is tripped it will change an input on the latch which
    > would also make the output on the latch go to a one until the second
    > sensor is tripped. This "pulse" would then be used as the pulsin
    > input. When I start up my BS2 I would like to intially set both input
    > states to 0 0 and have an output of 0 on my latch. How would I go about
    > doing this in my code? Better yet can I even do this with the stamp?
    >
    > Also is there a way to monitor the battery that is used to supply the
    > stamp?
    >
    > Could I use the 5 V output on the stamp to supply my latch chip, two IR
    > emitters, and two IR receivers? I guess overall how much current can I
    > draw from the stamp?
    >
    > thanks,
    > babz
    >
    >
    >
    >
    >
    >
    >
    > -- 20 megs of disk space in your group's Document Vault
    > -- http://www.egroups.com/docvault/basicstamps/?m=1
    >
    >


    ron... the motor man...
    Ronald Doctors
    http://www.members.home.net/rdoctors
  • ArchiverArchiver Posts: 46,084
    edited 2000-03-24 02:06
    I am trying to make a speed monitoring system. I have to use a stamp. I'm not
    quite sure what you meant by "How far apart are your
    sensors as if the distance is large enough you could possibly use the STAMP."
    Wouldn't the distance need to be shorter to be able to
    use the stamp.

    I am still curious how I can initialize my latch and sensor using the stamp when
    I start up the system.

    babz



    Ronald Doctors wrote:

    > are you trying to make a speed monitoring system?
    > How far apart are your sensors as if the distance is large enough you could
    possibly use the STAMP
    > for everything.
    > There are lots of ways to do this so i expect that you'll have many ideas
    > from our STAMPERS!
    > I would probably not use a STAMP since all you need is a pulse generator and a
    counter that is started and stopped by the IR
    > pulses. The count can be displayed on a LCD or LED display. This would allow
    for close spacing of the sensors with very short times
    > from those speeders! Of course we all like to PLAY STAMPS so why not use a
    STAMP anyway.
    >
    > Date sent: Tue, 21 Mar 2000 16:15:18 -0600
    > From: jbabich@p...
    > To: basicstamps@egroups.com
    > Send reply to: basicstamps@egroups.com
    > Subject: [noparse][[/noparse]basicstamps] Clearing a latch, and a couple other
    basic questions
    >
    > > Hi everybody,
    > >
    > > I am currently building a speed trap to monitor traffic. I am using two
    > > ir sensors, which are not very fun to work with, that are connected to
    > > an SR latch which would then be hooked up to the pulsin function. When
    > > the first sensor is tripped it will change an input on the latch which
    > > would also make the output on the latch go to a one until the second
    > > sensor is tripped. This "pulse" would then be used as the pulsin
    > > input. When I start up my BS2 I would like to intially set both input
    > > states to 0 0 and have an output of 0 on my latch. How would I go about
    > > doing this in my code? Better yet can I even do this with the stamp?
    > >
    > > Also is there a way to monitor the battery that is used to supply the
    > > stamp?
    > >
    > > Could I use the 5 V output on the stamp to supply my latch chip, two IR
    > > emitters, and two IR receivers? I guess overall how much current can I
    > > draw from the stamp?
    > >
    > > thanks,
    > > babz
    > >
    > >
    > >
    > >
    > >
    > >
    > >
    > > -- 20 megs of disk space in your group's Document Vault
    > > -- http://www.egroups.com/docvault/basicstamps/?m=1
    > >
    > >
    >
    > ron... the motor man...
    > Ronald Doctors
    > http://www.members.home.net/rdoctors
    >
    >
    > -- 20 megs of disk space in your group's Document Vault
    > -- http://www.egroups.com/docvault/basicstamps/?m=1
  • ArchiverArchiver Posts: 46,084
    edited 2000-03-24 05:59
    I meant that the minimum time you can check witha STAMP is not as short as with
    straight logic chips.
    I guess that means the sensors would be further apart for a STAMP so the time
    interval you are measuring
    is within the STAMP limits.
    If you are going to use the STAMP just for the speed check then I think you'll
    be oK with aloop that keeps looking for
    the sensors, starting a count for the first one and then ending the count and
    outputing the count with suitable conversion to give you a
    speed reading.



    Date sent: Thu, 23 Mar 2000 20:06:50 -0600
    From: jbabich@p...
    To: basicstamps@egroups.com
    Send reply to: basicstamps@egroups.com
    Subject: [noparse][[/noparse]basicstamps] Re: Clearing a latch, and a couple other basic
    questions

    > I am trying to make a speed monitoring system. I have to use a stamp. I'm not
    quite sure what you meant by "How far apart are your
    > sensors as if the distance is large enough you could possibly use the STAMP."
    Wouldn't the distance need to be shorter to be able to
    > use the stamp.
    >
    > I am still curious how I can initialize my latch and sensor using the stamp
    when I start up the system.
    >
    > babz
    >
    >
    >
    > Ronald Doctors wrote:
    >
    > > are you trying to make a speed monitoring system?
    > > How far apart are your sensors as if the distance is large enough you could
    possibly use the STAMP
    > > for everything.
    > > There are lots of ways to do this so i expect that you'll have many ideas
    > > from our STAMPERS!
    > > I would probably not use a STAMP since all you need is a pulse generator and
    a counter that is started and stopped by the IR
    > > pulses. The count can be displayed on a LCD or LED display. This would allow
    for close spacing
    of the sensors with very short times
    > > from those speeders! Of course we all like to PLAY STAMPS so why not use a
    STAMP anyway.
    > >
    > > Date sent: Tue, 21 Mar 2000 16:15:18 -0600
    > > From: jbabich@p...
    > > To: basicstamps@egroups.com
    > > Send reply to: basicstamps@egroups.com
    > > Subject: [noparse][[/noparse]basicstamps] Clearing a latch, and a couple other
    basic questions
    > >
    > > > Hi everybody,
    > > >
    > > > I am currently building a speed trap to monitor traffic. I am using two
    > > > ir sensors, which are not very fun to work with, that are connected to
    > > > an SR latch which would then be hooked up to the pulsin function. When
    > > > the first sensor is tripped it will change an input on the latch which
    > > > would also make the output on the latch go to a one until the second
    > > > sensor is tripped. This "pulse" would then be used as the pulsin
    > > > input. When I start up my BS2 I would like to intially set both input
    > > > states to 0 0 and have an output of 0 on my latch. How would I go about
    > > > doing this in my code? Better yet can I even do this with the stamp?
    > > >
    > > > Also is there a way to monitor the battery that is used to supply the
    > > > stamp?
    > > >
    > > > Could I use the 5 V output on the stamp to supply my latch chip, two IR
    > > > emitters, and two IR receivers? I guess overall how much current can I
    > > > draw from the stamp?
    > > >
    > > > thanks,
    > > > babz
    > > >
    > > >
    > > >
    > > >
    > > >
    > > >
    > > >
    > > > -- 20 megs of disk space in your group's Document Vault
    > > > -- http://www.egroups.com/docvault/basicstamps/?m=1
    > > >
    > > >
    > >
    > > ron... the motor man...
    > > Ronald Doctors
    > > http://www.members.home.net/rdoctors
    > >
    > >
    > > -- 20 megs of disk space in your group's Document Vault
    > > -- http://www.egroups.com/docvault/basicstamps/?m=1
    >
    >
    >
    > eGroups.com Home: http://www.egroups.com/group/basicstamps/
    > http://www.egroups.com - Simplifying group communications
    >
    >


    ron... the motor man...
    Ronald Doctors
    http://www.members.home.net/rdoctors
  • ArchiverArchiver Posts: 46,084
    edited 2000-03-24 16:25
    >I am trying to make a speed monitoring system. I have to use a
    >stamp. I'm not quite sure what you meant by "How far apart are your
    >sensors as if the distance is large enough you could possibly use
    >the STAMP." Wouldn't the distance need to be shorter to be able to
    >use the stamp.
    >
    >I am still curious how I can initialize my latch and sensor using
    >the stamp when I start up the system.
    >
    >babz


    If I understand what you're trying to do, one of the gurus
    (Jon Williams?) wrote an article for Nuts & Volts a couple
    of years ago. It was an elegant STAMP solution to timing
    slot car/pinewood derby type races. Parallax and N&V both
    have archives; it's probably in there somewhere.

    Reg Neale
Sign In or Register to comment.