Capturing IR and RF Codes

Understanding IR & RF Fundamentals

Capturing any IR or RF code is trivial. All you need is an IR receiver or RF receiver, resistors to form a voltage divider, and a PC with a sound card with a line-in input. We use a laptop. The DATA output of both the IR receiver and the RF receiver is usually 0-5V so a voltage divider is necessary to reduce the signal to about 1V.

Do NOT use a microphone input! Microphone jacks are wired differently (to supply bias voltage to the mic) and expect a much, much lower signal level. Use Line-In (sometimes called Audio-In) only.

The Panasonic PNA4602M (38kHz), Vishay TSOP4838 (38kHz), Panasonic PNA4614 (56.9kHz), Vishay TSOP7000 (455kHz) and Vishay TSOP1100 (33-57kHz) are inexpensive IR receivers that require a regulated +5V power supply and GND. They output an active-low signal that is the demodulated data envelope of the IR code. Typically, the average frequency of the data signal is in the 500-2000Hz range. It can be recorded as a .WAV file. If your sound card can sample at 96,000 samples/sec or higher, the rightmost phototransistor circuit can be used to capture IR carriers below approximately 48kHz although you will likely have to write your own software.

The transistor inverter versions are required for use with CodeGenPro

For ASK (Amplitude Shift Keying) or OOK (On/Off Keying) RF, the process is the same except you need an ASK RF receiver tuned for the carrier frequency. RF remotes sold in the USA are required to have an FCC ID on them. You can determine the RF frequency by looking up the FCC ID on the FCC Search page. Mouser sells the Radiotronix RCR-315-RP (Mouser P/N 509-RCR-315-RP) which can be tuned to cover approximately 300-330MHz as well as the RCR-433-RP (Mouser P/N 509-RCR-433-RP) which is the frequency used throughout Europe. There are other sources for RF modules. (Note: Radiotronix numbers the pins exactly opposite of all the other suppliers.) The DATA output of the RF receiver is 0-5V, active-high.

I use Loop Recorder (set to record in a 1 minute loop) to capture the signal with defaults of 48000 samples/second (for excellent resolution). Files are saved as mono. Lower sampling rates will eliminate noise (most codes are under 2000Hz) but may distort the pulse/space durations. You can also record the signal directly with GoldWave or a similar sound editor. Loop Recorder is especially handy for capturing periodic signals sent automatically.

Capturing IR Codes

I use GoldWave to do the editing. GoldWave allows zooming the display so that you can see the signal in great detail. It's like having a combination oscilloscope/stripchart recorder. After editing, we save the file as 8-bit unsigned mono.

Capturing RF Codes

RF is much the same although there will usually be constant RF noise coming from the RF receiver. Even with the noise, it is easy to spot the signal in the Loop Recorder display.

You can hear the noise and signal in FAN.WAV. When you load the above .wav file into GoldWave, it's about 14 seconds long. The signal starts near the end at about 11.885 seconds.

Expand the horizontal timebase using the Shift + Up Arrow keys.

Continue to expand the horizontal timebase, scrolling as needed, until you see the signal stating to emerge from the noise.

Scroll as needed to select a single clean copy of the code. The selection should begin (left click) just before the first pulse and end (right click) during the first pulse of the following copy.

Copyright: No part may be reproduced except as authorized by written permission. This restriction extends to reproduction in all media.