Shop OBEX P1 Docs P2 Docs Learn Events
Need Help with Infrared recievers/transmitters — Parallax Forums

Need Help with Infrared recievers/transmitters

zo0o0omzo0o0om Posts: 7
edited 2010-08-19 04:53 in BASIC Stamp
Hey I am trying to make a TV remote from scratch, So far I have managed to build a receiver using a solar panel hooked up to my computer microphone jack, and audacity to record the infrared light that it emits.

My problem is that I am not sure how to decode the infrared light so that I can output the same signals using pbasic and a basic stamp 2 chip with a IR LED, i've read a bunch of guides and they tell me to measure the length that the IR LED signal 'bursts', but what do you do with those numbers?

Any help is appreciated,
Thank you!

Comments

  • zo0o0omzo0o0om Posts: 7
    edited 2010-07-26 04:08
    259h648.jpg

    There is the input from the IR receiver, 90.884ms OFF, 23.401ms ON.
  • Mike GreenMike Green Posts: 23,101
    edited 2010-07-26 04:31
    There's a Parallax tutorial called "IR Remote for the BoeBot robot" that explains how IR remotes work and how to receive and decode IR remote signals. There's also some stuff in there on generating IR remote signals.

    Look at the main Parallax webpage and click on Downloads. You'll see a button for "Educational Tutorials & Translations". You'll find this tutorial there.
  • ercoerco Posts: 20,256
    edited 2010-07-26 22:05
    Also see·Parallax' Weekend App Kit on IR signals at
    http://www.jameco.com/Jameco/Products/ProdDS/282933APP.pdf

    You'll need to add a simple·external oscillator to generate your 38-40 kHz IR carrier signal, and your stamp can modulate that. Check this thread, I sent a Sony code (power=21) a few posts down the page: http://forums.parallax.com/showthread.php?p=759751


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."

    Post Edited (erco) : 7/26/2010 10:19:44 PM GMT
  • APSpijkermanAPSpijkerman Posts: 32
    edited 2010-07-27 20:57
    I have done something like that years ago with BS2 and javelin stamp.

    I think i have the javelin code on this machine, hmm yub.

    I took a IR receiver module, (which demodulates the IR) and hooked it up to a stamp.

    Then i made a loop that reads the lengths of pulses to the memory of the javelin stamp:

    do {
    action = CPU.readPin(CPU.pins[noparse][[/noparse]7]);
    } while(action == false);


    do {
    //code = CPU.pulseIn(32767, CPU.pin7, true);
    r = CPU.rcTime(32767, CPU.pin7, false); // false
    a[noparse][[/noparse]len] = r;// + 20;
    len++;
    //code = CPU.pulseIn(32767, CPU.pin7, false);
    r = CPU.rcTime(32767, CPU.pin7, true); // true
    a[noparse][[/noparse]len] = r;// + 5; // correction for loop
    len++;
    } while (r > 2 && len < 98);


    Then copied the data from the memory to the EEPROM.
    And for playing i did it in reverse.
    I used a 10Mhz oscillator, divided that frequency by 256 by a 4040 counter .. then put that signal
    of 39khz through an AND port together with the signal from a pin from the basic stamp to
    an IR led.

    If an IR code needs to be send it reads it from EEPROM to ram, and from there it
    is send with something like this:

    for (t = 0; t < len; t+=2){
    CPU.writePin(CPU.pins[noparse][[/noparse]0], true);
    CPU.delay( a[noparse][[/noparse]t] );
    CPU.writePin(CPU.pins[noparse][[/noparse]0], false);
    CPU.delay( a[noparse][[/noparse]t+1]);
    }


    greetings Arend-Paul Spijkerman

    Basic stamp scope
  • zo0o0omzo0o0om Posts: 7
    edited 2010-07-28 03:49
    PERFECT!! Thank you guys!
  • japcy07loljapcy07lol Posts: 1
    edited 2010-07-28 06:10
    Hey/I am new in this forum I encounter having infrared but I havent yet experience conflict.What was your worst experience regarding infrared?Let me know!!
    Regards!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    gw2 gold
  • APSpijkermanAPSpijkerman Posts: 32
    edited 2010-08-19 04:53
    I have tried making a infrared "Universal remote" using a Javelin stamp
    and a basic stamp.

    I works great on the javelin stamp, but it looks like the basic stamp
    isnt fast enough to capture the smallest pulses.

    Anyway .. i used the stampdock software as the "controls" of the
    remote, and to draw a graph of the pulses it receives and sends.
    Also it is able to store and load the IR codes on the harddisk of the PC.

    You might find it usefull while experimenting with infrared.
    You can find the software here: http://apsdev.com/stampremote/home.html
    Note that it says Javelin, but the basic stamp version is also in the archive.
Sign In or Register to comment.