Shop OBEX P1 Docs P2 Docs Learn Events
Need help with IR — Parallax Forums

Need help with IR

kerrywkerryw Posts: 61
edited 2009-11-01 19:29 in Propeller 1
I'm working on a project for my home theater. I need to be able to send out various IR remote signals from the prop.·I looked at the IR objects in obex, but they didn't seem to do everything I need. I don't want to worry about NEC vs. Sony vs. whatever. I was hoping to be able to just record the various IR pulses that I need and be able to play them back later. Think of it like a learning remote. I have an IR receiver with a current limiting resistor in series reading remote pulses (ir is 38khz). Is this doable? Any suggestions on how to start? Thanks.

Kerry

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"Heaven help me Marge, I'm just not that smart." - Homer Simpson

Comments

  • James LongJames Long Posts: 1,181
    edited 2009-11-01 01:49
    kerryw said...
    I'm working on a project for my home theater. I need to be able to send out various IR remote signals from the prop. I looked at the IR objects in obex, but they didn't seem to do everything I need. I don't want to worry about NEC vs. Sony vs. whatever. I was hoping to be able to just record the various IR pulses that I need and be able to play them back later. Think of it like a learning remote. I have an IR receiver with a current limiting resistor in series reading remote pulses (ir is 38khz). Is this doable? Any suggestions on how to start? Thanks.


    Kerry

    I too would like to know how to do this. I was wondering that earlier today, but haven't gotten around to do any research. I need an IR repeater......it's a complicated story....but I just need to repeat the pulse.

    James L

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    James L
    Partner/Designer
    Lil Brother SMT Assembly Services

    Are you addicted to technology or Micro-controllers..... then checkout the forums at Savage Circuits. Learn to build your own Gizmos!
  • Mike GreenMike Green Posts: 23,101
    edited 2009-11-01 03:09
    For a repeater, the easiest thing is to use a standard IR detector that provides a logic output (open collector with a pullup) on receipt of a modulated IR signal along with a 555 timer in asynchronous mode driving one or more IR LEDs at 38KHz triggered by the IR detector's output. The detector can be in one room and the LEDs in another. If it's a long wire run, you could use an RS485 driver/receiver in-between.
  • James LongJames Long Posts: 1,181
    edited 2009-11-01 03:21
    Mike Green said...
    For a repeater, the easiest thing is to use a standard IR detector that provides a logic output (open collector with a pullup) on receipt of a modulated IR signal along with a 555 timer in asynchronous mode driving one or more IR LEDs at 38KHz triggered by the IR detector's output. The detector can be in one room and the LEDs in another. If it's a long wire run, you could use an RS485 driver/receiver in-between.

    That is a good idea.

    I'm not sure I will go that route, as I do ahve some signals I want the system to not repeat. A small micro could filter those out by the device code.

    But thanks for the ideas.

    James L

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    James L
    Partner/Designer
    Lil Brother SMT Assembly Services

    Are you addicted to technology or Micro-controllers..... then checkout the forums at Savage Circuits. Learn to build your own Gizmos!
  • MagIO2MagIO2 Posts: 2,243
    edited 2009-11-01 10:27
    I thinkwhat kerryw wants is not a repeater. At least somewhen in future I want to replace all my remote controlls with one propeller device as well. And that's not as easy as 'record the signals'. Because in some codes you have alternating bits. You push the button once this bit is zero, you push it again and it's one. Other remote controls send the code of the button and if you keep it pushed they only send a small 'repitition' package. Others simply repeat the signal.
    The timings and the number of bits can be completely different even if you take remote controls from the same brand but for different devices.


    I'd be interested in your results and would really like to help, but my first step is to find a nice display, because for my 'livingroom home automation' I want to have a nice graphical output.
  • kerrywkerryw Posts: 61
    edited 2009-11-01 13:29
    MagIO2 said...
    I thinkwhat kerryw wants is not a repeater. At least somewhen in future I want to replace all my remote controlls with one propeller device as well. And that's not as easy as 'record the signals'. Because in some codes you have alternating bits. You push the button once this bit is zero, you push it again and it's one. Other remote controls send the code of the button and if you keep it pushed they only send a small 'repitition' package. Others simply repeat the signal.
    The timings and the number of bits can be completely different even if you take remote controls from the same brand but for different devices.


    I'd be interested in your results and would really like to help, but my first step is to find a nice display, because for my 'livingroom home automation' I want to have a nice graphical output.
    Correct, I really don't want a repeater. I want to build a remote that has the IR codes that I use 99% of the time - volume, input, start, stop etc. I'm going to use Rayman's 480x272 touch display. The reason I'm not just using a universal remote is that I'd like to display feedback from the A/V receiver. I use a Denon, and it has a serial port that can be used to query things like current audio decoding mode, input, volume level etc. If I succeed I will have a small controller that displays receiver information and can be used as a remote replacement most of the time. And it should look good [noparse]:)[/noparse].

    I'm willing to try my luck and not worry about alternating bits and and appropriate button repeating handling.

    Here is what I thought would work for recording:
    1) Hook up the 38khz IR reciever in series with a current limiting resistor to a pin on the prop.
    2) Point device remote at the reciever and hit a button
    3) Bit pattern would appear on pin
    4) Record pattern as a serious of on/offs and durations.
    5) Store them in EEPROM.

    Mike mentioned using a 555 timer to generate the 38khz signal for playback. Couldn't the prop itself be used for this?
    Playback:
    1) User hits button on screen.
    2) Look up requested button's bit pattern in EEPROM.
    3) Generate 38khz on a pin that is enabled/disabled based on the playback of the bit pattern.
    4) Output to an IR LED.

    I'm hoping for two things from folks on here. First is feedback on the above theory. Second is pointing me to current OBEX code samples that have functionality similar to what I'm trying to do so that I can use them to get started. Thanks everyone.

    Kerry

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "Heaven help me Marge, I'm just not that smart." - Homer Simpson
  • Mike GreenMike Green Posts: 23,101
    edited 2009-11-01 15:56
    You can certainly use the Prop to generate the 38KHz signal. One of the cog counters could do that and you'd just need to enable and disable the output pin with DIRA while the counter continues to run.

    Have you looked in the Object Exchange yet at the descriptions of the objects? It's faster than waiting for someone to remember whether they've seen something there.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-11-01 17:26
    Just a couple days ago, I posted a 38 kHz serial transmitter that uses the principle that Mike mentioned. You can read about it here:

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

    Once recorded, you will have to adjust the timing a little for retransmission, due to the asymmetry of the receiver's low-to-high and high-to-low delays.

    -Phil
  • MagIO2MagIO2 Posts: 2,243
    edited 2009-11-01 19:29
    The IR kit in the object exchange should help. You can watch the signal as it gives you the pulse and pause times via serial interface. If you put these timings into a dat section you should also be able to send the codes. My approach is to learn the protocols, as I have 4 remote controls that I want to replace.

    Does raymans display have it's own RAM/controller? I'd prefere having a full resolution full color GUI than the usual TV / VGA output.

    My idea is having the graphics on a SD card and the propeller manages the data transfer between SD card and display RAM. Currently I have a 2,4" Crystalfontz display (320x240) to test if that will work.
Sign In or Register to comment.