Shop OBEX P1 Docs P2 Docs Learn Events
IR Communications — Parallax Forums

IR Communications

HumanoidoHumanoido Posts: 5,770
edited 2010-02-18 15:31 in Propeller 1
Are there any references to infrared communications between two props?
One program would have the prop send a character(s) to the other prop.
Another program would receive the character(s).

Comments

  • MagIO2MagIO2 Posts: 2,243
    edited 2010-02-17 07:22
    What's the required speed of the IR communication?
  • HumanoidoHumanoido Posts: 5,770
    edited 2010-02-17 07:38
    No speed requirements. Looking for the most simple programs.
    Data transfer can be fast, intermediate or slow.
    Of course, simple and fast is preferred, but the emphasis is on simple.
  • Kal_ZakkathKal_Zakkath Posts: 72
    edited 2010-02-17 10:28
    Not very polished as I had no plans to submit them publicly any time soon, but here's a couple of files that I'm using to send\receive data over IR using manchester encoding.

    Timing.spin is actually from here: http://obex.parallax.com/objects/113/

    This object also helped a lot in getting to grips with IR stuff: http://obex.parallax.com/objects/37/

    The LED I'm using is a·TSAL6100 and I'm using a mosfet to turn it on/off (the IR object in the obex mentioned has an example circuit diagram), a counter handles the carrier signal ('Carrier' constant in the files, I use 56khz but 38-40khz is common for remote controls).·The receiver I'm using is a TSOP4856, which runs fine on 3.3v and can hook straight to an I/O pin (datasheet recommends a 100ohm resistor on the 3.3v line before the receiver and a 0.1uF capacitor across it, but these are optional to "improve robustness against electrical overstress").

    The files attached have methods for sending bytes or longs (or any number of bits, for RX you say how many bits you are expecting to receive, if it times out waiting it should return -1). I can't comment as to the actual speed or throughput, as it is not a big issue for my application. At any rate it should give you a starting point if nothing else. smile.gif
  • JonnyMacJonnyMac Posts: 9,208
    edited 2010-02-17 20:28
    I've done low-speed serial comms over IR with this: obex.parallax.com/objects/462/

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon McPhalen
    Hollywood, CA
  • Kal_ZakkathKal_Zakkath Posts: 72
    edited 2010-02-17 20:40
    I forgot to mention, the ManchesterTX file includes some stuff for checking that the LED hasn't burnt out (requires another prop pin connected to the -ve side of the LED with a high value resistor). This is because I'll be running the LED at more than it's rated current so they are prone to burn out, but that shouldn't be necessary if you're just doing short range prop-prop comms.

    My addition is probably a bit pointless now anyway, that object JonnyMac linked to is compatible with the standard serial objects and that sounds like more what you're after.
  • HumanoidoHumanoido Posts: 5,770
    edited 2010-02-18 08:59
    JonnyMac said...
    I've done low-speed serial comms over IR with this: obex.parallax.com/objects/462/
    This is for transmit only and shows a schematic of the serial transmitter LED and resistor. Which receiver did you use?

    humanoido
  • JonnyMacJonnyMac Posts: 9,208
    edited 2010-02-18 15:31
    I used a PNA460x -- the IR receiver module Parallax carries. Connect the output (through a 2.2k resistor) to the Propeller and use true mode serial input (e.g., FullDuplexSerial).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon McPhalen
    Hollywood, CA

    Post Edited (JonnyMac) : 2/18/2010 3:54:03 PM GMT
Sign In or Register to comment.