Shop OBEX P1 Docs P2 Docs Learn Events
Transmitting IR Remote Signals with the BASIC Stamp 2 — Parallax Forums

Transmitting IR Remote Signals with the BASIC Stamp 2

filip911filip911 Posts: 17
edited 2010-06-19 19:34 in BASIC Stamp
Hi

Basic stamp can receive or transmit IR signals. I need that my bs2 is Transmitting IR Signals. I find how but i need NE555N timer IC. I dont have it. Is it possible to make that BS2 is Transmitting IR Remote Signals without NE555N timer IC.
i only need is simple IR Transmitter of Sony remote signals.

thanks

Comments

  • allanlane5allanlane5 Posts: 3,815
    edited 2010-06-17 14:24
    The BS2 can transmit IR signals using "FREQOUT IRPin, 38000, 1". However, the shortest duration of this it can do is 1 mSec -- where I believe the Sony protocol is made up of 0.6 mSec or 1.2 mSec pulses -- so it can't do the Sony protocol that way.

    Bottom line -- the "Sony Remote Signal" is not "simple" enough for the stock BS2. Perhaps one of the faster BS2 flavors could do it.
  • Spiral_72Spiral_72 Posts: 791
    edited 2010-06-17 14:31
    Yes, that should work. Look up the FREQOUT command.

    You could drive the Ir LED directly off the BS but you likely won't get much range that way. Chances are you'll need to switch power through a 2N2222 or similar transistor. MAKE SURE YOU USE A CURRENT LIMITING RESISTOR [noparse]:)[/noparse]

    Without looking it up, you'll need to modulate that Ir LED somewhere around 38 - 40kHz

    Another cool trick [noparse]:)[/noparse] You can't see Ir light, but any video camera can..... including the cell phones [noparse]:)[/noparse] Awesome for troubleshooting!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "puff"...... Smile, there went another one.
  • ercoerco Posts: 20,256
    edited 2010-06-17 17:15
    Here's·my quickie app to send·a single·Sony code 21 (power). Can be expanded to send many more. You'll def need an external LM555 oscillating at 38 kHz·if you're using a BS2. Check this thread:

    http://forums.parallax.com/showthread.php?p=759751

    A·555 can send a·very strong IR signal, its output is·~200 mA, where a Stamp pin is only 20mA. Excellent 555/556 info at http://www.kpsec.freeuk.com/555timer.htm

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
  • ercoerco Posts: 20,256
    edited 2010-06-19 16:41
    The vaunted and well-documented Sony protocol is the de facto standard for many projects, Parallax and otherwise. It uses a pattern of 300 and 600 uS pulses. Per allanlane, the shortest burst a vanilla BS2 can deliver is 1 ms, or 1000 uS (microseconds). That won't work to send STANDARD Sony codes.

    That is to say, a BS2 can receive, but not directly transmit, standard Sony codes, unless you attach an external circuit to generate the 38 kHz carrier signal.

    But if your receiver/controlled item is another BS2 decoding the IR tone bursts (instead of a Sony TV set), you are not married to the Sony code, you can make up any code you like, and use the BS2 as a transmitter directly without an external oscillator.

    One way to skin this cat would be to use the Sony codes, tailored to the BS2's relatively long minimum FREQOUT pulse. Keep the same pulse pattern, but use 1 ms and 2 ms pulses instead of 300 and 600 uS pulses. Obviously Parallax' well-documented ReadIR code routine would have to be modified, and the transmitting BS2 would use a series of FREQOUT pin, 38000,1 and FREQOUT pin, 38000,2 commands, separated by short uS pulsouts on an unused pin per the code in my link above.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
  • filip911filip911 Posts: 17
    edited 2010-06-19 19:34
    Ok, thanks to all. i will wait LM555

    thx
Sign In or Register to comment.