Shop OBEX P1 Docs P2 Docs Learn Events
Ir remote — Parallax Forums

Ir remote

erastuskerastusk Posts: 17
edited 2009-08-24 15:25 in BASIC Stamp
Anybody experienced in building their own IR remote?..how do you programme the stamp chip?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-10-24 04:14
    Have you looked at the "IR Remote for the BoeBot" tutorial from Parallax? Go to the main Parallax webpage, click on the Resources tab, then choose Downloads from the list that appears, then choose Stamps in Class Downloads from the next list. You'll see an index of all the Stamps in Class tutorials (which you can download).
  • ercoerco Posts: 20,256
    edited 2008-10-24 04:24
    With universal remotes available for $2-$5, I've never been tempted. There are many different manufacturer's codes, Parallax and many others opt for the Sony protocol, which is heavily documented online. Basically you need to send morse code-like bursts on a ~38-40 kHz carrier pulse, using a·series of·commands like: FREQOUT x, a, 38500 :PAUSE b

    Have a look at·Parallax's excellent IR material in http://www.parallax.com/Portals/0/Downloads/docs/prod/sic/WebIR-%20v1.1.pdf

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
  • erastuskerastusk Posts: 17
    edited 2008-10-24 04:42
    Erco,
    Your right it would be much easier buying one however, the project i'm working on is for a mentally disabled individual, really need to keep it simple .Was hoping to make simple 3 button remote (play ,pause and stop).

    Mike,
    Thanks for the info i'll check out that info and see what i can get.
  • ercoerco Posts: 20,256
    edited 2008-10-24 04:49
    Good effort. You still might consider gutting a universal remote, and
    hard wiring 3 pushbuttons to the buttons you need.

    Alternatively, I'm posting a program that I used successfully to transmit (and repeat) a single Sony power on code (21). I built an external·38.5 khz IR oscillator using a 555 timer IC·and used a BS2 to switch it on & off. My code is commented for your consideration.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
  • erastuskerastusk Posts: 17
    edited 2008-10-24 04:53
    Perfect! that's what i was really looking for.An example on how you can mimick pulses as an IR remote does.I'll give this a try if it doesn't work then i'll have to somehow modify a universal remote.

    Thanks!
  • SRLMSRLM Posts: 5,045
    edited 2008-10-24 04:54
    Don't forget eject. That's the most important button on the whole thing...
  • HumanoidoHumanoido Posts: 5,770
    edited 2008-10-24 06:26
    Erco, just admiring your code, and wondering why you used pulsout on an empty pin for timing in between pulses. Would a PAUSE 0 be just as effective? Thanks.
  • allanlane5allanlane5 Posts: 3,815
    edited 2008-10-24 12:42
    PAUSE is only accurate to milliseconds. PULSOUT is accurate to microseconds. In the Sony protocol, you need microsecond delays.
  • ercoerco Posts: 20,256
    edited 2008-10-24 15:35
    Thanks, allanlane5, perfect answer.

    erastusk: There's more·good info on IR controls and·Sony·protocol·in a shorter format at http://www.parallax.com/Portals/0/Downloads/docs/prod/compshop/IRremoteAppKit.pdf

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
  • erastuskerastusk Posts: 17
    edited 2008-10-24 22:37
    Thanks Guys your help is much appreciated.
  • erastuskerastusk Posts: 17
    edited 2008-11-28 09:06
    Hi Erco,
    I have some questions..that sample code you shared using sony protocol you need twelve pulses after·a start pulse right? Just looking for clarification.Also from reading the IR resources sounds like i'll need a 555 timer ckt right?..why wouldnt a freqout command work?

    Thanks for your help
  • ercoerco Posts: 20,256
    edited 2008-11-29 04:52
    That·code shows how to send a repeating Sony power on/off code, value 21 or 1010100.·This is a start pulsout (1200) followed by 7 pulsouts for bit0 - bit6, long (600) or short (300)·each representing a 0 or 1. These are all sent out of pin 15, which triggers an external 555 osillator that sends bursts of 38 kHz out of the IR LED.· Between pulsouts, I·send a pulsout 14,1 (nothing on pin 14) as a precision delay between the real pulses on pin 15.

    You can use the Parallax freqout trick to send minimum 1-millisecond pulses of 38 kHz, but those are too long for the Sony protocol.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
  • GeorgeLGeorgeL Posts: 131
    edited 2008-11-29 05:13
    Assuming you are using a Sony Remote, like I am, this will let you control the BOE-BOT. Hookup the ir headlights as described in the Boe-Bot manual, and then try my code out. Use the buttons 2,4,5,6 to control it. They are oriented like the arrow keys on the keyboard.
  • erastuskerastusk Posts: 17
    edited 2008-11-29 08:08
    GeorgL,
    I'm not using a sony remote, i'm hoping to build my own remote that mimics a sony remote, thanks for the info though.

    Erco,
    Thanks for that clarification..once i complete my project i'll owe you one!

    ·
  • bryce s.bryce s. Posts: 11
    edited 2009-08-21 22:55
    i was wondering how exactly you had the circuit set up in your example code
  • ManetherenManetheren Posts: 117
    edited 2009-08-24 12:46
    If you take the code to read a Sony remote, and then flip it so instead of receiving the pulses from the IR receiver and instead transmit them with an IR Transmitter you would have a homebuilt sony remote control.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tia'Shar Manetheren
  • ercoerco Posts: 20,256
    edited 2009-08-24 15:25
    Manetheren:

    Please "flip the code" and test it.

    Let us know how that works for ya.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
Sign In or Register to comment.