Shop OBEX P1 Docs P2 Docs Learn Events
Infrared help — Parallax Forums

Infrared help

ArchiverArchiver Posts: 46,084
edited 2004-04-19 15:40 in General Discussion
I picked up a pack of infrared emitters and detectors (radio
shack). I have no experience with IR yet. I could not find any help
with this topic in the BS manual. On the web site I found DLs of
sample programs, yet they offered no help since I do not know the
wiring for IR components.
Any help using IR will be appreciated.
Thanks
CJS

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-12-22 19:39
    IR LEDs need to be modulated (usually 38.5 kHz). You can do this with
    the FREQOUT command. Even though the FREQOUT has a ceiling of 32,767
    Hz, enough harmonics are generated to modulate the LED. You can
    download any of our robotics oriented code to see this in action.
    Here's a bit of code from our Sumo robot:

    Read_IR_Sensors:
    FREQOUT LfIrOut, 1, 38500 ' modulate left IR LED
    irLeft = ~LfIrIn ' read input (1 =
    target)
    FREQOUT RtIrOut, 1, 38500 ' modulate right IR LED
    irRight = ~RtIrIn ' read input (1 =
    target)
    RETURN

    The trick is to receiver. We use Panasonic receivers that stay active
    for a bit of time after the removal of the IR signal. This is important
    as it allows the Stamp time to move to the next instruction (looking at
    the receiver output).

    -- Jon Williams
    -- Applications Engineer, Parallax
    -- Dallas Office


    Original Message
    From: Christopher [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=xBRXh1xvHJg_-6kusFbfXwzDVe2mk8PUS9KdP_YwLj9cGWVdFQxWjJbswbWRHo1qRsPqVjGkuys]cj193@y...[/url
    Sent: Monday, December 22, 2003 12:57 PM
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] Infrared help


    I picked up a pack of infrared emitters and detectors (radio
    shack). I have no experience with IR yet. I could not find any help
    with this topic in the BS manual. On the web site I found DLs of
    sample programs, yet they offered no help since I do not know the
    wiring for IR components.
    Any help using IR will be appreciated.
    Thanks
    CJS



    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.


    Yahoo! Groups Links

    To visit your group on the web, go to:
    http://groups.yahoo.com/group/basicstamps/

    To unsubscribe from this group, send an email to:
    basicstamps-unsubscribe@yahoogroups.com

    Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/




    This message has been scanned by WebShield. Please report SPAM to
    abuse@p....
  • ArchiverArchiver Posts: 46,084
    edited 2003-12-22 20:07
    You mentioned that the receiver that you use has a delay to keep the
    output high. Can I create a delay with a cap. in parallel?

    Also for the emitter, it needs to use the freqout command. This
    means I cannot just hard wire the emitter high?

    Thanks for you help
    Chris





    --- In basicstamps@yahoogroups.com, "Jon Williams" <jwilliams@p...>
    wrote:
    > IR LEDs need to be modulated (usually 38.5 kHz). You can do this
    with
    > the FREQOUT command. Even though the FREQOUT has a ceiling of
    32,767
    > Hz, enough harmonics are generated to modulate the LED. You can
    > download any of our robotics oriented code to see this in action.
    > Here's a bit of code from our Sumo robot:
    >
    > Read_IR_Sensors:
    > FREQOUT LfIrOut, 1, 38500 ' modulate left IR
    LED
    > irLeft = ~LfIrIn ' read input (1 =
    > target)
    > FREQOUT RtIrOut, 1, 38500 ' modulate right
    IR LED
    > irRight = ~RtIrIn ' read input (1 =
    > target)
    > RETURN
    >
    > The trick is to receiver. We use Panasonic receivers that stay
    active
    > for a bit of time after the removal of the IR signal. This is
    important
    > as it allows the Stamp time to move to the next instruction
    (looking at
    > the receiver output).
    >
    > -- Jon Williams
    > -- Applications Engineer, Parallax
    > -- Dallas Office
  • ArchiverArchiver Posts: 46,084
    edited 2003-12-22 20:50
    You mentioned that the receiver that you use has a delay to keep the
    output high. Can I create a delay with a cap. in parallel?

    Also for the emitter, it needs to use the freqout command. This
    means I cannot just hard wire the emitter high?

    i also need to know how to wire each component.

    Thanks for you help
    Chris
    >
    >
    >
    >
    >
    > --- In basicstamps@yahoogroups.com, "Jon Williams"
    <jwilliams@p...>
    > wrote:
    > > IR LEDs need to be modulated (usually 38.5 kHz). You can do
    this
    > with
    > > the FREQOUT command. Even though the FREQOUT has a ceiling of
    > 32,767
    > > Hz, enough harmonics are generated to modulate the LED. You can
    > > download any of our robotics oriented code to see this in action.
    > > Here's a bit of code from our Sumo robot:
    > >
    > > Read_IR_Sensors:
    > > FREQOUT LfIrOut, 1, 38500 ' modulate left
    IR
    > LED
    > > irLeft = ~LfIrIn ' read input (1 =
    > > target)
    > > FREQOUT RtIrOut, 1, 38500 ' modulate right
    > IR LED
    > > irRight = ~RtIrIn ' read input (1 =
    > > target)
    > > RETURN
    > >
    > > The trick is to receiver. We use Panasonic receivers that stay
    > active
    > > for a bit of time after the removal of the IR signal. This is
    > important
    > > as it allows the Stamp time to move to the next instruction
    > (looking at
    > > the receiver output).
    > >
    > > -- Jon Williams
    > > -- Applications Engineer, Parallax
    > > -- Dallas Office
  • ArchiverArchiver Posts: 46,084
    edited 2003-12-22 21:14
    Like I said, the emitter needs to be modulated to work with the IR
    receivers (the modulation is used to prevent other IR sources from
    causing a false trigger). So no, you can't simply wire the LED high --
    you could, however, drive it full-time with a 555 timer circuit. If you
    do, then the delay receiver delay that we use in our robots won't
    matter, since you'll not be using FREQOUT to do the modulation, you'll
    just be looking at the output of your receiver.

    Our BS1 App Notes have the schematic for a 555 circuit you can use to
    modulate your IR LEDs.

    -- Jon Williams
    -- Applications Engineer, Parallax
    -- Dallas Office


    Original Message
    From: Christopher [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=ftH1YJE_OZNuooHxZQmN-c0X2hnxTU7YJoqe_6OaDCR9CE7IjS39h48L9RY81k2HoumKbuhZoEU]cj193@y...[/url
    Sent: Monday, December 22, 2003 2:08 PM
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] Re: Infrared help


    You mentioned that the receiver that you use has a delay to keep the
    output high. Can I create a delay with a cap. in parallel?

    Also for the emitter, it needs to use the freqout command. This
    means I cannot just hard wire the emitter high?

    Thanks for you help
    Chris





    --- In basicstamps@yahoogroups.com, "Jon Williams" <jwilliams@p...>
    wrote:
    > IR LEDs need to be modulated (usually 38.5 kHz). You can do this
    with
    > the FREQOUT command. Even though the FREQOUT has a ceiling of
    32,767
    > Hz, enough harmonics are generated to modulate the LED. You can
    > download any of our robotics oriented code to see this in action.
    > Here's a bit of code from our Sumo robot:
    >
    > Read_IR_Sensors:
    > FREQOUT LfIrOut, 1, 38500 ' modulate left IR
    LED
    > irLeft = ~LfIrIn ' read input (1 =
    > target)
    > FREQOUT RtIrOut, 1, 38500 ' modulate right
    IR LED
    > irRight = ~RtIrIn ' read input (1 =
    > target)
    > RETURN
    >
    > The trick is to receiver. We use Panasonic receivers that stay
    active
    > for a bit of time after the removal of the IR signal. This is
    important
    > as it allows the Stamp time to move to the next instruction
    (looking at
    > the receiver output).
    >
    > -- Jon Williams
    > -- Applications Engineer, Parallax
    > -- Dallas Office



    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.


    Yahoo! Groups Links

    To visit your group on the web, go to:
    http://groups.yahoo.com/group/basicstamps/

    To unsubscribe from this group, send an email to:
    basicstamps-unsubscribe@yahoogroups.com

    Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/




    This message has been scanned by WebShield. Please report SPAM to
    abuse@p....
  • ArchiverArchiver Posts: 46,084
    edited 2004-02-25 09:19
    Hey guys, im in a jam and i need assistance.
    i have an invoca LCD touch screen remote for my TV and stuff. the remote
    has a learn feature so i can learn different IR codes from different IR
    sources. do you think i can send a Serout command from the stamp to store
    in the remote and when i press the button on the remote i will send to the
    stamp the same IR code. would i use a photo transistor or the 40 KHz
    receiver to read the code from the remote.

    Here is the plan.
    1) send code to the remote from the stamp using a IR LED (Send via Serout)
    2) Store that code into the remote.
    3) transmit that code back to the stamp receiving it via photo transistor
    or 40 KHz receiver
    4) based on the code received activate relays.

    Thanks to all that can help,

    Rgards,



    Gary Denison II
    Qualcomm Inc.

    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2004-02-25 14:32
    There are a couple of routes you can take
    to achieve this.

    From most primitive to most sophisticated, they are:

    1. Install an IR-LED and 40 KHz IR-Detector
    on your BOE. The IR-Detector will detect IR
    pulses at 40 KHz or so, and drive a signal low
    when it sees them. Program your Stamp to use the
    Sony protocol to transmit with the IR-LED PULSOUT()
    and decode the Sony protocol (See Parallax docs)
    using PULSIN() from the IR-Detector. $10.00

    2. Buy the Parallax IR card, which has the IR-LED
    and IR-Detector on-card. Program for the Sony
    protocol as above. $15.00.

    3. Buy the Parallax IR-Buddy ($30.00(?)). This
    has the Phillips RC-5 protocol built in to a
    co-processor. Uses 232, MUCH easier to program,
    and the IR-Buddy will recieve and hold up to
    4 keypresses until your Stamp can get around
    to them. Tell your remote to use the Phillips,
    or RC-5 code, and go for it.

    As a first try, I'd use the IR-Buddy.
    'Roll your own' only makes sense if you can't
    use the Phillips RC-5 protocol.

    --- In basicstamps@yahoogroups.com, Gary Denison <gdii@c...> wrote:
    > Hey guys, im in a jam and i need assistance.
    > i have an invoca LCD touch screen remote for my TV and stuff. the
    remote
    > has a learn feature so i can learn different IR codes from
    different IR
    > sources. do you think i can send a Serout command from the stamp to
    store
    > in the remote and when i press the button on the remote i will send
    to the
    > stamp the same IR code. would i use a photo transistor or the 40
    KHz
    > receiver to read the code from the remote.
    >
    > Here is the plan.
    > 1) send code to the remote from the stamp using a IR LED (Send via
    Serout)
    > 2) Store that code into the remote.
    > 3) transmit that code back to the stamp receiving it via photo
    transistor
    > or 40 KHz receiver
    > 4) based on the code received activate relays.
    >
    > Thanks to all that can help,
    >
    > Rgards,
    >
    >
    >
    > Gary Denison II
    > Qualcomm Inc.
    >
    > [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2004-02-25 19:22
    thanks Allan, I'll give it a shot.

    Regards,

    Gary Denison II
    Qualcomm Inc.


    At 06:32 AM 2/25/2004, you wrote:
    >There are a couple of routes you can take
    >to achieve this.
    >
    > From most primitive to most sophisticated, they are:
    >
    >1. Install an IR-LED and 40 KHz IR-Detector
    >on your BOE. The IR-Detector will detect IR
    >pulses at 40 KHz or so, and drive a signal low
    >when it sees them. Program your Stamp to use the
    >Sony protocol to transmit with the IR-LED PULSOUT()
    >and decode the Sony protocol (See Parallax docs)
    >using PULSIN() from the IR-Detector. $10.00
    >
    >2. Buy the Parallax IR card, which has the IR-LED
    >and IR-Detector on-card. Program for the Sony
    >protocol as above. $15.00.
    >
    >3. Buy the Parallax IR-Buddy ($30.00(?)). This
    >has the Phillips RC-5 protocol built in to a
    >co-processor. Uses 232, MUCH easier to program,
    >and the IR-Buddy will recieve and hold up to
    >4 keypresses until your Stamp can get around
    >to them. Tell your remote to use the Phillips,
    >or RC-5 code, and go for it.
    >
    >As a first try, I'd use the IR-Buddy.
    >'Roll your own' only makes sense if you can't
    >use the Phillips RC-5 protocol.
    >
    >--- In basicstamps@yahoogroups.com, Gary Denison <gdii@c...> wrote:
    > > Hey guys, im in a jam and i need assistance.
    > > i have an invoca LCD touch screen remote for my TV and stuff. the
    >remote
    > > has a learn feature so i can learn different IR codes from
    >different IR
    > > sources. do you think i can send a Serout command from the stamp to
    >store
    > > in the remote and when i press the button on the remote i will send
    >to the
    > > stamp the same IR code. would i use a photo transistor or the 40
    >KHz
    > > receiver to read the code from the remote.
    > >
    > > Here is the plan.
    > > 1) send code to the remote from the stamp using a IR LED (Send via
    >Serout)
    > > 2) Store that code into the remote.
    > > 3) transmit that code back to the stamp receiving it via photo
    >transistor
    > > or 40 KHz receiver
    > > 4) based on the code received activate relays.
    > >
    > > Thanks to all that can help,
    > >
    > > Rgards,
    > >
    > >
    > >
    > > Gary Denison II
    > > Qualcomm Inc.
    > >
    > > [noparse][[/noparse]Non-text portions of this message have been removed]
    >
    >
    >
    >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.
    >
    >Yahoo! Groups Links
    >
    >
    >
    >


    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2004-04-18 18:42
    hello,

    I am trying to write a program for a sound project, and having a bit of trouble.
    I want
    to write a program that, when a button is pushed, sends an infrared signal from
    an IR
    led to an IR detector. When the IR detector receives the signal, it should make
    a
    speaker emit a tone.

    The circuit that I built has a speaker output from pin 7, an IR detector input
    at pin 6,
    an IR led at pin 9, and a button input at pin 15.

    Any help would be much appreciated.

    -L
  • ArchiverArchiver Posts: 46,084
    edited 2004-04-19 15:40
    L,

    Most IR systems, such as TV remote controls, are modulated. This meas that
    the IR beam is pulsed, in the case of a TV remote, usually at 38kHz. This
    helps prevent ambient light triggering the reciver, as they are tuned to
    38kHz. It is very easy to use a 38kHz reciver with a Stamp. A little harder
    is to transmit with the Stamp, as it does not have independent PWM to drive
    the 38kHz carrier. You can use a 555 timer or similar to create the carrier
    signal and a Schmitt trigger NAND like the 74HC132.

    Bruce at Rentron has a good explanation of IR communications here:
    http://www.rentron.com/Infrared_Communication.htm

    While the page is about using PICs to accomplish the task, it has a lot of
    general information about IR communications. I also have information about
    an IR reciever module on my website at: http://madlabs.info/ir_remote.shtml
    . It would be simple to convert the code for this module for a Stamp.

    Hope this helps,

    Jonathan

    www.madlabs.info


    Original Message
    From: "elevenroyalst" <elevenroyalst@y...>
    To: <basicstamps@yahoogroups.com>
    Sent: Sunday, April 18, 2004 10:42 AM
    Subject: [noparse][[/noparse]basicstamps] infrared help


    > hello,
    >
    > I am trying to write a program for a sound project, and having a bit of
    trouble. I want
    > to write a program that, when a button is pushed, sends an infrared signal
    from an IR
    > led to an IR detector. When the IR detector receives the signal, it should
    make a
    > speaker emit a tone.
    >
    > The circuit that I built has a speaker output from pin 7, an IR detector
    input at pin 6,
    > an IR led at pin 9, and a button input at pin 15.
    >
    > Any help would be much appreciated.
    >
    > -L
    >
    >
    >
    >
    > 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.
    >
    > Yahoo! Groups Links
    >
    >
    >
    >
    >
    >
Sign In or Register to comment.