Shop OBEX P1 Docs P2 Docs Learn Events
TRULY universal remote: one that records signals! Please help — Parallax Forums

TRULY universal remote: one that records signals! Please help

ubnmceubnmce Posts: 1
edited 2007-05-22 13:37 in BASIC Stamp
Hi
I am brand new to BASIC stamp and have been assigned a moderately difficult project. I need to record the signals from any arbitrary remote control using a BS2 or BS2sx and then output the signal to an infrared LED.

Since every remote has a different protocol, the program must be able to be flexible and record a steady stream of data for approx. 1 second.

I am thinking about using the PULSIN commands to record the length of the signal when it is high and low, but I need a way to organize these values in the order that the come, save them, and then output this exact same pattern later.

I already fooled around with the SONY universal remote tutorial, and got it to work; but this only works for sony so I cant use much of the code.

Please help! I know this isnt very difficult. If you understand what I am trying to do, which is record a signal then transmit the same signal (the resolution must be in microseconds), then maybe you can find an easy solution for me, which I will greatly appreciate.

Regards,
ubnmce

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-05-21 20:59
    The BS2 Stamps are just not fast enough nor do they have enough internal memory to record an IR datastream for that period of time. Most remote control work done with Stamps at least assumes that the IR is at a fixed frequency, usually 38KHz. You typically buy an IR detector that is tuned to this frequency and outputs a low logic level when this IR frequency is present and a high (open circuited) logic level when there's nothing detected. If you can at least assume a fixed frequency, then a Stamp should be able to time the on/off pulses. Finding enough memory to record the "raw" data is another issue. The BS2 only has 26 bytes of data memory. The BS2sx has a separate 63 bytes of data memory, but that will fill up quickly. The program EEPROM can be used to store data, but takes about 10ms to store a byte (and nothing else can be done during that time) and a given EEPROM location can only be written a limited number of times (about 100,000) ... it goes faster than you think. You can attach external memory, but this is still likely to be too slow for the kind of data you want to store.

    You'd be better off using either an SX microcontroller with some kind of external memory or a Propeller with its 32K internal main memory.
  • allanlane5allanlane5 Posts: 3,815
    edited 2007-05-22 13:37
    It's actually a pretty safe assumption to assume that almost every modern IR-Remote control uses a 38 Khz modulation scheme -- 36 Khz to 42 Khz, anyway, which 38 Khz will usually trigger. So simply using the IR-Decoder (as Mike described) is a good start.

    Different vendors use different encoding schemes, too. Start bit duration, what a 'one' is versus a 'zero', how much 'dead' time there is between bits, what is the 'repeat' interval -- all vary quite a lot. If you look at the Sony IR protocol, and the Phillips RC-5 protocol, you'll at least see what you're up against.

    I agree with the Propellor suggestion -- the BS2sx could be used for this purpose, but it would depend heavily on the exact protocol if it would work.
Sign In or Register to comment.