Convert Your IR Remote to RF Remote

34K21817

Intro: Convert Your IR Remote to RF Remote

In today's Instructable, I'll show you how you can use a generic RF module without a microcontroller which will eventually lead us to build a project where you can convert an IR Remote of any device to a RF Remote. The main advantage of converting an IR Remote to RF, is that, you don't have to point the remote before pressing the buttons for the device to work. Also, if you have a device that is not always in range of the remote, like a home theater in the corner of a room, this RF Remote will make your life easier.

Let's get started.

STEP 1: How About a Video?


The videos has all the steps covered in detail required for building this project. You can watch it if you prefer visuals but if you prefer text, go through the next steps.

Also if you want to watch the project in action, refer the same video.

STEP 2: Parts List.

STEP 3: Encoder and Decoder.

To use them without microcontroller you’ll need two ICs. They are called encoders and decoders. They are basic combinational circuits. Encoder has more inputs than the number of outputs. Looking at the truth table we can see that the three output pins have different combination for different states of input pins. Generally the input output pins of the encoder is defined as 2^n x n, where "n" is the number of bits. Decoders are just the opposite of the encoders and they have the pins descriptions like n x 2^n. If you ask what will happen if more than one pin goes high at the same time, then I’ll say it is beyond the scope of this Instructable.

The encoder and decoder ICs we will be using are HT12E and HT12D, D for decoder and E for encoder. Let’s take a look at the pins of these ICs.

In HT12E, pin numbers 10, 11, 12 and 13 are data input pins and pin 17 is the output pin, which we will modulate. Pins 16 and 17 are for internal RC oscillator and we connect a resistor ranging from 500k to 1M (I used 680k) across these pins. Actually, the resistor connected will be a part of the RC oscillator. Pin 14 is transmit enable pin. It is an active low pin and the data will be transmitted only if this pin is held low. Pin 18 and 9 are Vcc and GND respectively, and I will talk about remaining eight pins in a while.

Things are somewhat similar for the decoder. 18 and 9 are supply pins, 15 and 16 are internal oscillator pins and a 33k resistor is connected between them. Pin 17 is the valid transmission pin of the IC which is goes high whenever a valid data is received. The modulated data is given to pin 15 and decoded parallel data is obtained from pins 10, 11, 12 and 13.

Now you will notice that decoder IC also has those 8 pins that we saw in encoder. In fact, they serve a very important purpose in keeping your transmission secure. These are called address setting pins and they ensure that the data sent is received by the right receiver in an environment where there are more than one of these pair. If in the encoder, all of these pins are held low, then to receive the data all of these pins of the decoder must also be held low. If four are held high and four are held low, decoder address pins must also have the same configuration, then only the data will be received by the receiver. I will be connecting all pins to ground. You can do whatever you like. For changing the address on the go, a DIP switch is used, which connects the pins to either high or low just by a flick of the buttons on it.

STEP 4: Prototyping.

Enough theory, let’s go ahead and try it practically

You will need two breadboards. I went ahead and connected all up using the circuit diagram in this step with LEDs in place of the Arduino and push buttons with a 10k pull down resistor in place of switches.. I used separate power supplies for both of them. As soon as you power the transmitter, you will see that the valid transmission pin goes high indicating that the successful connection is made. When I press any button on the transmitter side, the corresponding LED on the receiver side glows. Multiple LEDs are turned on if I press multiple push buttons. Notice the VT led, it blinks every time it receives a new data, and this will be very helpful in the project we are going to make.

If your circuit is not working, you can debug easily just by connecting the output of encoder to input of decoder and everything must still work the same. This way you can at least make sure that you ICs and its connections are alright.

If you change one of the address pins to high, you can see everything stopped working. To make it work again, you can either connect it back, or change the same pin status on the other side to high. So, keep this in mind while designing anything like this as they are very important.

STEP 5: Infrared.

Now let’s talk about infrared. Every IR remote has an IR led at its front and pressing the buttons on the remote make that led light up which can be seen in the camera but not with naked eye. But it’s not that easy. The receiver must be able to distinguish each button pressed on the remote so that it can perform the said functions. To do that, the led is lighten up in pulses having different parameters and there are various protocols that manufacturers use. To learn more, refer the links I have provided.

You might have guessed by now that we are going to mimic those IR codes of the remote. To get started we will need an infrared receiver like TSOP1338 and an Arduino. We are going to determine the hex codes of each buttons that make them different from the other one.

Download and install the two libraries, link of which is provided. Now open IRrecvdump from IRLib master examples folder and upload it to Arduino. First pin of the receiver is ground, second is Vcc, and third is output. After applying power and connecting output to pin 11, I opened serial monitor. I pointed the IR remote to the receiver and started pressing its buttons. I pressed each button twice and after I was done with all the required buttons I disconnected the Arduino.

Now look at the serial monitor, there will be lots of garbage, but they are just stray light rays that the receiver caught as it is too sensitive. But there will also be the protocol used and the is hex code of the buttons you pressed. That is what we want. So I made a note with name and their hex codes as we will be needing it later.

Links:

How IR in Remote works:
http://irq5.io/2012/07/27/infrared-remote-control-...

https://www.vishay.com/docs/80071/dataform.pdf

Libraries:
https://github.com/cyborg5/IRLib

https://github.com/z3t0/Arduino-IRremote

STEP 6: What Are We Doing?

We have our IR remote of which we have determined the hex codes of the buttons of our interest. Now we will be making two small boards, one has the RF transmitter with four buttons on it that can go either zero or one, meaning 16 combinations are possible, another one has the receiver and it has a controller of some kind, in my case Arduino, which will interpret the output form the decoder and will control an IR led that eventually get the device to respond exactly the same way it did to its own remote. As 16 combinations are possible, we can mimic up to 16 buttons of a remote.

STEP 7: Find the Receiver.

If the receiver on your device is not visible, open the IRSendDemo sketch from the library example and change the protocol and hex code accordingly. I used hex code of the power button. Now connect an IR led with 1k resistor to pin 3 of the Arduino and open serial monitor. So when you will type any character in the serial monitor and press enter, the Arduino will send the data to IR led and should cause the device to function. Hover over different regions where you think the receiver can be and eventually you will find the exact location of the receiver in your device (refer video for clear understanding).

STEP 8: Soldering.

Using the same connection diagram, I built the required two PCBs, I have used standalone Arduino instead of a Pro Mini as that’s what I had laying around.

Before putting the microcontroller in, I wanted to test the connections one more time. So I applied 9 Volts to transmitter and 5 Volts to receiver and used a LED to test the functioning of the boards and quickly tested everything. I also added a power switch for saving battery to the transmitter PCB.

Finally after uploading the sketch, I fixed the Arduino to its place.

I soldered the 1k resistor directly to the cathode of LED and I will use a heat shrink before gluing it to the adapter I made for my home theatre using a GI sheet, but if you have access to 3d printer, you can build a far more professional looking adapter easily, if it is required. I will also solder a long wire between the LED and the PCB so that it is easy to place the PCB in a different place, somewhere hidden. After all these are done, it is time to test its functioning, which you can see in action in the video I have embedded in step 1.

The best thing about converting it to RF is that you don’t have to point it directly to the device you can control it even if you are on another room, the only thing you need to care about is that the RF pair must be in range and that’s it. Lastly if you have a 3d printer, you can also print a little case for the transmitter section.

STEP 9: Done.

Let me know what you think of the project and if you have any tips or ideas, please share in the comments below.

Consider subscribing to our Instructables and YouTube channel.

Thank you for reading, see you in the next Instructable.

14 Comments

You wouldn't have a "Convert your RF remote to an IR remote" tutorial, would you? I have a controlled-by-RF-remote TV mount. I want my Harmony Elite to be able to lower/raise the TV based on if I turn the whole scene on or off. Harmony hubs can only learn devices that transmit in IR. I am trying to figure out a way to transmit the DOWN signal in RF, and have a converter change it to IR, that the Harmony hub could learn.
Good day to you - this is awesome !Thanks so much for taking the time to document all of this here and on instructables, this is exactly what i needed for ages !!!Well done - beautiful job on the home made boards too !!
I've been looking for this guide for a very long time my friend, thank you.

Excellent write up.

(Not sure what the other commenter is on about as I found your style to be straightforward and easy to digest.)

For too long I've been looking to find something to walk me through the basics of RF transmission and receiving, and how it can be built "from scratch", so I can add a more practical skill set to a largely theoretical understanding. You just connected some dots for me, that require far too much context for me to attempt to explain, suffice to say I had been pondering for quite some time so to finally have the answers is exciting. Thank you again!
Thanks for appreciation.

Sorry, but still not understand. You do so much blah-blah, but didn't say main thing: what exactly you wanna build?? Do you make IR remote to control RF device? Or you make RF remote to control IR device? In your case before drawing elec.scheme, better to draw normal diagram, what device what signal sends, where it received, to what converted and where the final signal go. Shift registers is the least interesting thing here.

And since you use Arduino, I'm confused you talk about "only 16 buttons". You can join here rotary encoder, touch screen, even pedal! And all of that can send separate signal to control devices.

I am trying to make a device that can control IR devices using RF without disturbing anything in the IR Remote and the device which it controls.
As there are 4 inputs via push buttons that can either go 0 or 1, that means there are 2^4 = 16 combinations possible.
Yes, you can use any kind of device, but eventually you can only send 0 or 1 over the RF module I used, so it makes no sense to use rotary or touch screen or whatever.
Moreover, this project is not for beginners. To understand this, you must have proper knowledge of digital electronics, theory and practical both.

Now you explain clear what you made! Why you didn't put it in article?? :)

Your project is not rocket science and "beginners" never appear on this resource - we all know about radio parts, voltage, etc. But for better understanding you should be short and exact, article has tooooo much details anybody can realize themselves. The main scheme you shown in "Step 6", while actually it had to be "Step 0" and be more accurate and detailed. THAT's why your words (before step 6) means nothing - you gave main part too late.

Dude, don't take offense, I know this project is good and really worth to implement, but your way to express things is below the average. Look at article like you read it on one page during train trip - put only necessary, non-trivial things and only core ideas - you'll get short text. What people don't understand will be in comments and NEXT you can improve text, extending with only necessary explanations.

Good luck!

Tesalex, great video! I disagree with VincentT57, it was a no BS vid, right to the point and very descriptive. Anybody who is interested in building this would appreciate the instructive tutorial you just made! That's why the website is called "instructables", and not "one page of useless crap you'd find on an airplane" haha.

One more thing: even title of the article is wrong - you DO NOT convert any remote! You create additional way (RF) to control IR device.

Very well done instructional Tesalex, using this approach to salvage old IRremotes can also give a lot of micro controller projects a relatively low cost and flexible user interface.

My cable TV decoder module has an RF remote and must have RF inputs. I wish to control the RF module with IR commands from my digital recorder which inputs and outputs IR and has an IR remote controller and IR blaster. Suggestions for adapting your project to this problem? Anything out there already made for this purpose?

As you cable TV Decoder is RF Controlled, that means it does not have any IR Receiver, it will not be easy. Although these Instructables can help a little: