Shop OBEX P1 Docs P2 Docs Learn Events
stamp II and IR emitter/detector — Parallax Forums

stamp II and IR emitter/detector

ArchiverArchiver Posts: 46,084
edited 2002-05-14 22:23 in General Discussion
I am trying to use a fairchild qrb1134 emitter/detector with my bsII
for a line sensing robot. The sensor has a total of four lines:
cathode,anode,emitter,detector. I have the + and gnd hooked up
and the detector is obviously an input on the stamp, but what
about the emitter? Do I use the freqout command to have it send
out a specific signal? I have tried to do this using 38.5K as the
output frequency but have come up empty. Any ideas are
appreciated.

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2002-05-12 00:27
    Actually, the level change isn't all that great.
    You don't need to modulate the emitter to get the detector to pick it up.
    What you need is a comparator IC like a LM339. Use either the - or the +
    input connected to the detector (the detector is also open collector, you
    you'll need a 10k resistor to V+ as well), then use the other - or + input
    connected to the wiper on a 1k or 5k potentiometer, with the other ends
    going to V- and V+ respectively.
    Then you adjust the pot to get your sensitivity.
    What makes this neat, is you can tie the outputs from several detectors to
    the one input on the LM339, and use several I/O port pins going to each
    emitter separately. Then you fire each emitter one at a time and check the
    output from the LM339 to see if it went low or high depending on whether
    your over a white or black area.
    The LM339's - input causes the output to be inverted, whereas the + inpout
    is non-inverting. There are several other types of comparators you could use
    as well, besides a LM339, but it is easy to get, and you don't have to do
    anything with the comparators you don't need.


    Original Message
    From: mrscience509 [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=NtGAcPWI8VWXhMyG0VygSLB4HsSasIRx1iEGEHhxaHZMt0kOywIS2hO1HWJgtzRLh2d1C2Fy8Z2nPvOO]mrscience509@y...[/url
    Sent: Saturday, May 11, 2002 5:31 PM
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] stamp II and IR emitter/detector


    I am trying to use a fairchild qrb1134 emitter/detector with my bsII
    for a line sensing robot. The sensor has a total of four lines:
    cathode,anode,emitter,detector. I have the + and gnd hooked up
    and the detector is obviously an input on the stamp, but what
    about the emitter? Do I use the freqout command to have it send
    out a specific signal? I have tried to do this using 38.5K as the
    output frequency but have come up empty. Any ideas are
    appreciated.




    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.


    Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
  • ArchiverArchiver Posts: 46,084
    edited 2002-05-12 06:06
    If you only have one sensor you can easily fire the emitter with a Stamp pin
    and use another pin for the detector. This is the generic method I use for
    the Fairchild sensors. You may have to juggle the 10k resistor value a bit
    to get good results.

    ********

    Connect one lead of a 270 ohm resistor to +5 volts. Connect the other side
    of the resistor to the A (anode) terminal of the emitter (documentation says
    it the orange wire).

    Connect the K (cathode) terminal of the emitter (documentation says its the
    green wire) to a Stamp pin. Set the Stamp pin to output and set it LOW to
    turn on the LED. If you need to modulate the emitter (not really needed as
    detector is not looking for a modulated signal) you can use PULSOUT.

    Note: If you don't want to be able to turn the emitter on and off you can
    wire the K terminal to ground instead of to the Stamp pin.

    Connect one lead of a 10k resistor to +5 volts. Connect the other lead of
    the resistor to the C (collector) terminal of the detector (documentation
    says its the white wire).

    Connect the E (emitter) terminal of the detector (documentation says the
    blue wire) to ground.

    Connect one lead of a 270 ohm resistor to the C terminal and the other lead
    to a Stamp pin. Set the Stamp pin for input. The pin should read high when
    there is something reflecting the light from the emitter to the detector.
    You can also wire the C terminal directly to the Stamp pin, but the resistor
    serves to protect things from code errors.

    Original Message

    > I am trying to use a fairchild qrb1134 emitter/detector with my bsII
    > for a line sensing robot. The sensor has a total of four lines:
    > cathode,anode,emitter,detector. I have the + and gnd hooked up
    > and the detector is obviously an input on the stamp, but what
    > about the emitter? Do I use the freqout command to have it send
    > out a specific signal? I have tried to do this using 38.5K as the
    > output frequency but have come up empty. Any ideas are
    > appreciated.
  • ArchiverArchiver Posts: 46,084
    edited 2002-05-14 04:35
    Thanks, this method worked very well, you saved my project.

    Now may I ask for the same procedure using a Sharp GP2D12
    IR emitter/detector?

    Thanks again.

    Al

    --- In basicstamps@y..., Rodent <daweasel@s...> wrote:
    > If you only have one sensor you can easily fire the emitter with
    a Stamp pin
    > and use another pin for the detector. This is the generic
    method I use for
    > the Fairchild sensors. You may have to juggle the 10k resistor
    value a bit
    > to get good results.
    >
    > ********
    >
    > Connect one lead of a 270 ohm resistor to +5 volts. Connect
    the other side
    > of the resistor to the A (anode) terminal of the emitter
    (documentation says
    > it the orange wire).
    >
    > Connect the K (cathode) terminal of the emitter (documentation
    says its the
    > green wire) to a Stamp pin. Set the Stamp pin to output and set
    it LOW to
    > turn on the LED. If you need to modulate the emitter (not really
    needed as
    > detector is not looking for a modulated signal) you can use
    PULSOUT.
    >
    > Note: If you don't want to be able to turn the emitter on and off
    you can
    > wire the K terminal to ground instead of to the Stamp pin.
    >
    > Connect one lead of a 10k resistor to +5 volts. Connect the
    other lead of
    > the resistor to the C (collector) terminal of the detector
    (documentation
    > says its the white wire).
    >
    > Connect the E (emitter) terminal of the detector (documentation
    says the
    > blue wire) to ground.
    >
    > Connect one lead of a 270 ohm resistor to the C terminal and
    the other lead
    > to a Stamp pin. Set the Stamp pin for input. The pin should
    read high when
    > there is something reflecting the light from the emitter to the
    detector.
    > You can also wire the C terminal directly to the Stamp pin, but
    the resistor
    > serves to protect things from code errors.
    >
    >
    Original Message
    >
    > > I am trying to use a fairchild qrb1134 emitter/detector with my
    bsII
    > > for a line sensing robot. The sensor has a total of four lines:
    > > cathode,anode,emitter,detector. I have the + and gnd hooked
    up
    > > and the detector is obviously an input on the stamp, but what
    > > about the emitter? Do I use the freqout command to have it
    send
    > > out a specific signal? I have tried to do this using 38.5K as
    the
    > > output frequency but have come up empty. Any ideas are
    > > appreciated.
  • ArchiverArchiver Posts: 46,084
    edited 2002-05-14 22:23
    Read the Acroname documentation -- it works quite well.

    Original Message

    > Thanks, this method worked very well, you saved my project.
    >
    > Now may I ask for the same procedure using a Sharp GP2D12
    > IR emitter/detector?
Sign In or Register to comment.