Transmit Infrared Signals Through Walls
How to turn your IR transmitter into an RF transmitter & control stuff throughout your house.
Project update: The project has now been updated to work with the newer Linx Technologies RXM-xxx-LR modules. The older LC series RF modules limited range to somewhere around 300 foot. The newer LR series can work up to 3000 foot. So range has been extended by around 2,700 foot, and the project now works with current RF modules. The new LR series RF modules are just outstanding products once you learn how to take full advantage of them. So here's how.
Both circuits are very simple, but work much better than you might think at first glance. This is a very handy little project. With this gadget you can control just about anything you're now using your IR remote for, from just about anywhere in your home , back yard, and maybe even from the yard next door!
You can even place your equipment inside a cabinet, then use your existing IR remote control without line of sight to adjust volume, change TV channels, etc, from other rooms in the house. Try that with your IR transmitter that came with your TV, DVD player, stereo, or anything else. IR requires line-of-sight. RF doesn't.
Both circuits have been tested with various name brand TV's, stereo's, VCR's, cable boxes, CD players, and quite a few more appliances. I can change channels, adjust volume, etc, from any room in the house (and outside) by carrying the IR to RF circuit in Figure #1 with me, or locating it somewhere at my remote location.
The RF to IR circuit in Figure #2 can be placed anywhere as long as the equipment being controlled has line-of-sight with the infrared LED. Place it on a bookshelf or table close to the equipment you want to control, or even across the room, and aim the infrared LED in the direction of the TV, stereo, etc.
It can also be placed inside a cabinet, and will work without line-of-sight with your existing IR transmitter.
Infrared Receiver & RF transmitter Operation:
When you aim your existing infrared remote control transmitter at the circuit shown below in Figure #1, and press a button, it transmits the IR signal to the IR detector. The IR detector modules data output pin, (marked OUT) in Figure #1 outputs a low-going signal, which connects to the base of the 2N3906 PNP transistor turning it ON.
The output of the PNP transistor connects the RF transmitters DATA input to logic 1 causing it to transmit an RF carrier. When no data is being received at the IR detector, its OUT pin returns to logic 1, and the PNP transistor & RF transmitter module are both OFF.
In simple terms, when you press a button on your IR transmitter, the RF module emits a carrier. When you release the button on your IR transmitter, the RF carrier is turned OFF. Simple enough, but there's more - so read on.
So - only incoming data from the IR transmitter turns ON the RF transmitter. This re-creates the same signal the IR transmitter is sending, but now the signal is RF, which can go through walls, ceilings, etc, and no longer requires line-of-sight.
If you have one of the circuits in Figure #1 in each room of your house, and one receiver circuit like in Figure #2 in front of the equipment you're controlling, you can control the equipment from pretty much anywhere in your home, and even from outside in the backyard...;o)
I control the stereo in our living room from outside in my backyard, through the walls, and everything else in between.
It's pretty handy when your system is in a cabinet too. Just plop the receiver inside the cabinet, and place the transmitter wherever it's most convenient, and away you go. No need to drill holes in that expensive cabinet.
And, yes, I am aware that we can simply buy something like this off-the-shelf, but where's the fun in that? And how much control do you have over it?
Most off-the-shelf, manufactured units, aren't portable either. With this one, you can build the transmitter circuit in a very small package, something close to the size of a pack of cigarettes, it runs on 2 small AA batteries, and it's very portable..
Figure #1: Infrared Receiver to RF Transmitter Circuit
Note that this new version uses 2 AA batteries in series for 3 volt operation. Using 2 small batteries makes it much smaller, and requires fewer components, so a very small circuit board could be produced.
NOTE: Be sure to use an IR detector module that can operate on 3 volts. The Linx LR series transmitter cannot operate from anything > 3.6 volts DC. The power ON/OFF switch is optional, but it comes in handy for saving batteries. Just flip it ON when in use, and OFF when not to save power.
Important: You will want to install the IR detector in an enclosure that will shield the detector from direct sunlight or other sources of IR energy and interference. If the GREEN LED (shown below in Figure #2) on COUT blinks like crazy when it's not supposed to, and you can't adjust it OFF with the POT, then look at where you have placed the unit. It's a good bet you have it sitting in direct sunlight or in front of some other IR interference source. It likes being in the dark - so take note!
Now all we need is the circuit that receives the RF signal, re-generates this data signal with an IR carrier, and can handle that LR receivers noisy data output. The circuit shown below in Figure #2 plus a little fancy PIC code does exactly what we need.
* Figure #2: RF Receiver to Infrared Transmitter Circuit
NOTE: We have a schematic showing how to operate the RF receiver & IR transmitter circuits at 3V HERE if you prefer to run this circuit on 2 AA batteries VS a regulated +5V DC power supply.
The RF Receiver & IR Transmitter Circuit:
This one's a little trickier than the original project that used the older Linx LC receiver since the newer LR series data output pin will emit random noise pulses when there's no active RF transmitter carrier.
To deal with this, we're now using a different PIC microcontroller with built-in comparators. The CMVin+ pin is the + comparator input. This connects to the Linx LR series receiver RSSI (Received Signal Strength Indicator) pin, and a filter circuit consisting of the 1MΩ resistor and 0.1uF capacitor. The RSSI output normally will idle (when no RF carrier is present) at around 1.5V. When the RF transmitter is active, the RSSI output level will increase.
The potentiometer connects to CMVin-, and is used to set the IDLE threshold voltage. Apply power to the receiver circuit, with no active transmitters in range, and adjust the potentiometer until the GREEN LED on COUT turns OFF.
The voltage on CMVin- should be just a few millivolts higher than the voltage applied to CMVin+ from the receivers RSSI output. Now, when the RF transmitter turns ON, the RSSI output voltage will increase, and trip the comparator output on COUT. The code waits for COUT to be at logic 1, which indicates the receiver is receiving a good strong RF carrier, and it looks at the RF receivers inbound data signal on GP3.
The filter circuit with 1MΩ resistor and 0.1uF cap helps filter pulses on the RSSI signal when the RF transmitter carrier turns ON/OFF quickly when re-creating the IR signal. I.E. in between logic 0 and logic 1 IR bursts. This provides a nice stable analog signal into the comparators CMVin+ pin, and it will quickly stabilize back to the idle voltage level close to approximately 1.5V when the RF transmitter ends its transmission.
TIP: Adjust the POT until the GREEN LED turns OFF. Back away for a few seconds. If the LED blinks randomly, turn the POT again slightly, in the same direction, until the LED no longer blinks at random intervals. This can also be used if you need to limit the range between RF transmitter & RF receiver because the RSSI output level will be higher as the transmitter gets closer (stronger RF carrier signal), and it will drop to a lower voltage as the RF signal strength decreases. See the Linx LR receivers data sheet HERE for details on the RSSI specifications and options.
The GREEN LED should only be ON when the RF transmitter is ON. It should be noted that any RF signal in the receivers range on a similar frequency will cause the RSSI signal level to increase. This should not be a problem however since the PIC code looks for the comparator to trip & data signals, so any false output from the IR LED will be garbage, and should have no affect on the equipment you're controlling. We beat up on this one pretty hard, and it works exceptionally well. And by simply adjusting the POT on CMVin- it's easy to tune out unwanted interference in the same frequency range.
We have now turned our incoming RF data back into a modulated IR signal, and have an IR remote transmitter we can use from pretty much anywhere in the house for our stereo, TV, CD players, etc, etc..
To assemble the code below you'll need the Microchip MPASM assembler. You can download the MPASM assembler from http://www.microchip.com free of charge. It's included in the MPLAB IDE.
If you don't need to make changes to the PIC firmware, or just want the .HEX file, you can download the pre-assembled .HEX file HERE.
You will also need a PIC programmer, and, of course, a PIC12F609. If you don't have all this stuff, don't worry, we have a project kit HERE that includes most of the components to build both circuits. Including a pre-programmed 12F609.
The RF-TO-IR Firmware:
;**************************************************************** ;* Name : NEW_RF_TO_IR.ASM * ;* Author : B. Reynolds * ;* Notice : Copyright (c) 2010 http://www.Rentron.com * ;* : All Rights Reserved * ;* Date : 3/11/2010 * ;* Version : 1.0 * ;* Notes : Using the Linx LR receiver for IR to RF * ;* : with comparator to sense RSSI output level * ;**************************************************************** title "IR to RF" processor 12F609 #include P12F609.inc radix dec errorlevel -302 ; suppress annoying assembler message 302 __CONFIG _BOR_OFF & _INTRC_OSC_NOCLKOUT & _WDT_OFF & _MCLRE_OFF & _IOSCFS_4MHZ & _CP_OFF BANKSEL GPIO ; bank0 CLRF GPIO ; clear outputs at POR MOVLW b'11100000' ; comparator enabled, COUT=1 when CMVIN+ > CMVIN-, COUT on COUT pin. MOVWF CMCON0 ; COUT not inverted, CMVIN+ to CIN+ pin, CMVIN- to CIN0- pin. MOVLW b'00011010' ; Comparator Hysteresis enabled, Timer 1 Gate Source is T1G pin. MOVWF CMCON1 ; CLRF VRCON ; Vref disabled. CLRF INTCON ; interrupts disabled. BANKSEL TRISIO MOVLW b'00001011' ; GPIO.0=RSSI in, GPIO.1=POT in, GPIO.2=GREEN LED out, GPIO.3=RF data IN ; GPIO.4=IRLED OUT. MOVWF TRISIO ; setup input/output pins. BANKSEL GPIO ; back to bank0 for the remainder. ; If GPIO.2 (comparator output=1) AND GPIO.3=1, then output 40KHz on GPIO.4. ; If input GPIO.3=0 turn OFF carrier. HOLD40 BCF GPIO,4 ; IR LED = OFF BTFSS GPIO,2 ; has RSSI level triggered comparator output? GOTO $-1 ; no. loop until comparator output trips FREQ1 ; yes. comparator tripped, start IR carrier generation BSF GPIO,4 ; 1uS IR LED ON HERE BTFSS GPIO,3 ; 2uS GOTO HOLD40 ; 3uS BTFSS GPIO,3 ; 4uS GOTO HOLD40 ; 5uS BTFSS GPIO,3 ; 6uS GOTO HOLD40 ; 7uS BTFSS GPIO,3 ; 8uS GOTO HOLD40 ; 9uS BTFSS GPIO,3 ; 10uS GOTO HOLD40 ; 11uS BTFSS GPIO,3 ; 12uS GOTO HOLD40 ; 13uS BCF GPIO,4 ; 14uS IR LED OFF HERE BTFSS GPIO,3 ; 15uS GOTO HOLD40 ; 16uS BTFSS GPIO,3 ; 17uS GOTO HOLD40 ; 18uS BTFSS GPIO,3 ; 19uS GOTO HOLD40 ; 20uS BTFSS GPIO,3 ; 21uS GOTO HOLD40 ; 22uS BTFSC GPIO,3 ; 23uS GOTO FREQ1 ; 25uS = 40KHz. Still active? Continue to generate IR carrier GOTO HOLD40 ; no, return END
Project Schematics & Code:
5V receiver schematics HERE
3V receiver schematics HERE
pre-assembled .HEX file HERE
Just right-click one of the links above, then select Save As to save the schematic to your PC.
The parts kit HERE includes;
Resistors, capacitors, green LED, IR LED,
pre-programmed PIC12F609, BS170 mosfet,
TSOP4840 IR module, PNP transistor and potentiometer.
The IR to RF part kits may be purchased HERE
The Linx Technologies LR modules are available from our Remote Control Store in surface mount or pinned versions HERE.
Until the next project -- Have fun & don't blow anything up...;o]
Click HERE For
We have the majority of the parts for this project in stock.