Shop OBEX P1 Docs P2 Docs Learn Events
ir circuit — Parallax Forums

ir circuit

hokeykhokeyk Posts: 10
edited 2004-11-05 00:38 in BASIC Stamp
could someone help me! i have to build a ir circuit driven by bs2 to controll a tv. which circuit should i use to transmit the signal and should i train the control signal or learn what they are and generate them from code. thanks for your hel;p

Comments

  • Ken GraceyKen Gracey Posts: 7,387
    edited 2004-09-18 15:07
    Hokeyk,

    Please don't cross-post your messages - it results in redundant effort from people who wish to help you out. Here is a start:
    http://forum.parallax.com/forums/default.aspx?f=6&m=4192

    Download our new infrared remote control educational text.

    Ken Gracey
    Parallax, Inc.
  • hokeykhokeyk Posts: 10
    edited 2004-09-18 16:09
    i cant get to that address is it correct?
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-09-18 16:16
    Yes, it's correct.· Here's a hot link: http://forum.parallax.com/forums/default.aspx?f=6&m=4192

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • hokeykhokeyk Posts: 10
    edited 2004-09-18 16:29
    OMG my cpu must be retarded i cant get that link to work
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-09-18 17:23
    Well, I woudn't use derogatory terms toward you computer, but I have tested the copy-and-paste link Ken provided, as well as the hot link from my post -- both work.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • Buck RogersBuck Rogers Posts: 2,175
    edited 2004-09-18 17:31
    Hello from Buck Rogers

    Well it seems I am getting the same error messages. It's not the fault of the local computer. Its the fault of the fact that the Internet can't find the server. I might also add that the forums server might be taking a break.









    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Buck Rogers

    www.gregg.levine.name
  • Fe2o3FishFe2o3Fish Posts: 170
    edited 2004-09-18 18:17
    Same here and I just logged into the forums.·· Maybe the ASP· evaluator has taken a break, I mean, it is Saturday.··It probably·has a hot date with an Apache·server tonight. lol.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    -Rusty-
    --
    Rusty Haddock = KD4WLZ = rusty@fe2o3.lonestar.org
    **Out yonder in the Van Alstyne (TX) Metropolitan Area**
    Microsoft is to software what McDonalds is to gourmet cooking
  • Fe2o3FishFe2o3Fish Posts: 170
    edited 2004-09-18 18:22
    I just tried this:

    ······ http://forum.parallax.com/forums/?f=6&m=4192


    and it worked just fine -- remove the "default.aspx/"

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    -Rusty-
    --
    Rusty Haddock = KD4WLZ = rusty@fe2o3.lonestar.org
    **Out yonder in the Van Alstyne (TX) Metropolitan Area**
    Microsoft is to software what McDonalds is to gourmet cooking
  • Rohan HamerRohan Hamer Posts: 1
    edited 2004-09-18 22:00
    The s is missing from the first word.

    Should be forums not forum.

    Then the original link will work.





    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Regards


    Rohan Hamer
  • hokeykhokeyk Posts: 10
    edited 2004-09-18 22:47
    lots of help for the link [noparse]:)[/noparse] none for my IR problems [noparse]:([/noparse]
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-09-19 04:30
    Go to the "Stamps In Class" forum and look for the thread: "FILES: IR Remote for the Boe-Bot v1.0 " -- it's a whole book (PDF download) of IR stuff.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • hokeykhokeyk Posts: 10
    edited 2004-09-20 21:10
    wow that was informative with regards to recieving ir signals but it said nothing about regenerating recieved ir signals or generating ir at all. is there a good source for generating an ir signalconfused.gif ?
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-09-20 21:25
    If you understand the modulation scheme, you can take it from there. That said, it's very tough to do with the BASIC Stamp and those that have tried (in PBASIC) have had limited success, hence the IRBUDDY product we sell.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • hokeykhokeyk Posts: 10
    edited 2004-09-21 03:27
    what u mean the bs2 isn't the do all i thought it was..opps guess i should have check into it more b4 buying the board of education!· oh well.· can i find these people and ask them what problems they had? in the mean time i will use a generic ir transmitter using a 555 timer and hopefully some comcepts form the ir buddy documentation to drive it.idea.gif
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-09-21 03:29
    You could use a 555 to modulate the IR diode -- the trickier part, however, is the bit timing to the IR stream.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • AllanL5AllanL5 Posts: 12
    edited 2004-09-23 16:00
    Hokeyk:

    There are MANY protocols used in IR remote controls.· They are built out of some basics.

    Most TV's have an IR demodulator built-in, which is sensitive to a 38Khz to 42 Khz signal.· When it sees a 'pulse' of this frequency, it outputs a 0.· When the signal goes away, it outputs a 1.· You can easily get one of these three-terminal devices from Parallax or Radio-Shack -- 38Khz or 40 Khz work well.

    1.· The typical 'pulse' signal is a 36Khz or 38Khz or 40 Khz or 42 Khz signal for some short period of time.· This can be generated by the BS2 with a 'pulsout IRPIN, 36000'.· You drive·a simple IR-LED (with current limiting resistor) with this signal.· The 'pulsout' signal does not actually generate the proper square wave -- but the harmonics in the signal will trigger the IR-Demodulator anyway.

    2.· Now, the protocols specify what makes a 'start' pulse, how long a '1' and a '0' time should be, if a '0' is the presence or absence of the 'pulse',·how many bits there are in a complete 'message', and if a 'message' is send once or many times.

    The IR-Buddy 'speaks' the Phillips RC-5 protocol, so if your TV was a Phillips the IR-Buddy could control it.
    The Sony protocol can be generated by a BS2.· Many protocols cannot be generated by the BS2, because of tighter timing constraints.· You might 'google' the brand of TV you have· + "IR" to find out if the IR-protocol has been published, and what it is.

    3.· The 'Trainable' remotes record the bit-patterns (sent from an existing remote that works).· It would be MUCH easier for you to program the BS2 to generate a message, than to try to create a 'trainable' remote out of a BS2.
  • hokeykhokeyk Posts: 10
    edited 2004-09-24 02:50
    thank you that was a great help. but if i understand this correctly Pulsout will generate a square wave with a %50 duty cycle where as the controlling ir signal for a sony is pulse coded or in other words low for 1.2ms (for logic 1) or .6 ms (logic 0) and then goes high for .6 ms and this process repeats until the whole control 'word' has been sent. how do i modulate a pulsout signal to fit those specs?
  • AllanL5AllanL5 Posts: 12
    edited 2004-09-24 18:50
    Oops, I should have RTFM'ed.· The command you want is 'FREQOUT'.

    >·pulse coded or in other words low for 1.2ms (for logic 1) or .6 ms (logic 0)
    > and then goes high for .6 ms > and this process repeats until the
    > whole control 'word' has been sent

    OK, so FREQOUT is:
    FREQOUT IRPin, <Duration>, <Freq>

    Now, Duration is in milli-seconds for a BS2, so you can't use a BS2 to·generate Sony bits.
    Duration is in 400 uSec steps for a BS2sx, so you can use that.

    SendOne:
    FREQOUT IRPin, 3, 32000 -- This will send a '1' for 1.2 msec on the SX
    PULSOUT PausePin, 1····· -- This will delay for .8 uSec (close enough?· try it).
    Return

    SendZero:
    FREQOUT IRPin, 2, 32000 -- Hopefully this will send a short-enough pulse to be recognized
    PULSOUT PausePin, 1
    RETURN


    Well, that's the approach, anyway.· As Jon has said, the BS2sx timing may not work for the Sony protocol.· Parallax makes an IR lab kit, but it uses 1 and 2 mSec pulse widths, which work great if you are talking from a BOE to a BOE.
  • NewzedNewzed Posts: 2,503
    edited 2004-09-24 19:04
    Try this:

    Use a 555 timer to generate the IR requency.· Apply it to the positive lead of your IR LED.· Connect the negative lead of the IR LED to the collector of a 2N2222A or equivalent.· Now you can apply a positive-going pulsout of any duration in 2us increments to the base of the transistor and generate very precise IR pulses that will meet the Sony protocol.

    You could also use a second Stamp to generate the IR frequency if you have one.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Sid Weaver
    Try the Stamp Tester

    http://hometown.aol.com/newzed/index.html
    ·
  • NewzedNewzed Posts: 2,503
    edited 2004-09-24 19:37
    Further to the above, Sony protocol requires a 600us low between the IR pulses.· You can accomplish this by a pulsout on any unused I/O port.
    The BS2 requires about 250us to execute an instruction so if you wanted to "kill" 600us you could write:

    pulsout deadpin, 175

    175 = 350us plus execution time would give you very close to 600us.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Sid Weaver
    Try the Stamp Tester

    http://hometown.aol.com/newzed/index.html
    ·
  • hokeykhokeyk Posts: 10
    edited 2004-10-04 13:42
    ok thanks. that sounds fairly easy. i am building and testing·the 555 circuit and will let you know how it goes. after that i will work on programming and interfacing w/the stamp.
    ·
  • m817m817 Posts: 11
    edited 2004-10-06 23:55
    Jon Williams said...
    If you understand the modulation scheme, you can take it from there. That said, it's very tough to do with the BASIC Stamp and those that have tried (in PBASIC) have had limited success, hence the IRBUDDY product we sell.

    Why is the IR Buddy showing as "limited supply"? Will it be discontinued?
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-10-07 05:27
    Probably ... hasn't been much of a seller.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • hokeykhokeyk Posts: 10
    edited 2004-11-05 00:38
    ok the controlling ir signal with 12 bits as newzed said requires

    for a control 1:
    a logic 0 for 600 us(?) followed by a logic 1 for 1200us(accomplished by pulsout irpin, 600)

    for a control 0:
    a logic 0 for 600 us(?) followed by a logic 1 for 600us(accomplished by pulsout irpin, 300)

    what code genrates a logic zero for the required 600us, maybe inserting two "time sucking instructions" like arithmatic to some dummy variable taking 250us each maybe close enough to 600us
Sign In or Register to comment.