Introduction: Netflix Button! Arduino IR Controlling Xbox 360

This is a Arduino that sends IR signals to turn on Netflix with the push of a button. It is a good example of using IR to control a TV, stereo, Xbox 360, or anything! This also goes into depth about using RAW IR codes, which is used to to allow any device to be recognized by an Arduino, even when it does not follow normal IR protocols... like an Xbox 360. There aren't many examples of using RAW IR or using IR signals in a multi-step process on Instructables, so this instructable will shed light on both of those areas.

Step 1: Build IR Receiving Circuit

The circuit is easy to build. The list of materials is as follows:

  1. Arduino
  2. IR emitter and reciever
  3. Button

The first circuit to build is the circuit to receive IR signals. Use the wiring diagram to help.

Step 2: Receive IR Signals

Use the code provided to receive raw and hex IR signals. The code for receiving hex is great for just about everything other than the Xbox. For some reason the Xbox is not a fan of using a known protocol and the raw code has to be used.

Go to this page to download the library that will allow you to send and receive IR codes. If you do not know how to add Arduino libraries, there are a lot of other instructables to help you out with that.

Once you start receiving codes on the serial monitor, copy and paste the codes you are receiving onto a word document. You will see why in the next step.

Step 3: Collecting All of the IR Codes

Input all of the IR codes into a word document. For signals that are encoded into "NEC" or another known format, there is no more work to be done. For all codes with an "Unknown format", proceed with the rest of this step.

Delete the first number of the raw code. It is not used.

Then erase all of the negatives and separate each number with a comma. This is easily done by using "Find and Replace" and replacing "-" with "(space)" and then replacing "(space)(space)" with ",(space)".

Below is an example of the Xbox Power button.

Serial Monitor:

800FF40C
Decoded RC6: 800FF40C (36 bits) Raw (68): 14152 2650 -800 500 -400 450 -400 450 -850 450 -850 1350 -800 450 -400 500 -400 450 -400 450 -400 450 -400 450 -400 500 -400 450 -400 450 -400 450 -400 900 -450 450 -400 450 -400 450 -400 450 -400 500 -400 450 -400 450 -850 850 -850 450 -400 500 -400 450 -400 450 -400 450 -400 900 -400 500 -800 500 -400 450

Corrected Signal:

2650, 800, 500, 400, 450, 400, 450, 850, 450, 850, 1350, 800, 450, 400, 500, 400, 450, 400, 450, 400, 450, 400, 450, 400, 500, 400, 450, 400, 450, 400, 450, 400, 900, 450, 450, 400, 450, 400, 450, 400, 450, 400, 500, 400, 450, 400, 450, 850, 850, 850, 450, 400, 500, 400, 450, 400, 450, 400, 450, 400, 900, 400, 500, 800, 500, 400, 450

Fun Fact: The numbers shown here are the amount of time in nanoseconds that the LED is on and off. The amount of time on and off is translated into 1's and 0's

Step 4: Build Circuit to Send IR Signals

The circuit to send IR signals is very simple also. The diagram I have is using an IR led and a resistor. You can also use an IR led module like I did here.

Step 5: Code for Sending IR Signals

The entire Netflix automation code is attached. The code uses raw IR signals for the Xbox and uses hex protocol for the TV and stereo so you can see the differences between the two. I put comments throughout so that way you can easily change the code to match your TV, stereo, etc.

Note: I had a nasty time turning on the Xbox. I found out that for whatever reason, to turn on the Xbox, it alternates between the home button and the power button. This is easily fixed by just sending both codes.

Note: To turn off the Xbox, simply using the power button works. I just had it scroll though the menu just because it looks cool.

Step 6: Enjoy Watching Netflix With the Push of a Button!

Once the code is uploaded onto your Arduino, you will be all set to automate your Xbox, TV, and ANY IR device! Thank you.

Comments

author
DanR67 (author)2016-09-13

Is there any chance to get the left and B button raw codes? I cannot for the life of me figure out how to turn the codes from this page, into useable codes...

http://www.remotecentral.com/cgi-bin/mboard/rc-dis...

Any help would be greatly appreciated. I even downloaded one of the xbox IR remotes and used the arduino irrecvdumpv2 example to try to get the codes, but they just aren't working. I am working on just a little bit of a different approach so I don't have to use the xbox controller at all... Instead of buying an actual remote for it, it is much more fun to just build one.

20160913_203830.jpg
author
T00RU (author)2016-08-03

Thank you for your guide! ive been trying to send raw codes that i get, but when i press the same button sometimes the output is slightly different from one to another. how do i know which raw codes is correct? thanks in advance!

author
jaknieper23 (author)T00RU2016-08-11

I'm glad it helped you out. I was getting slightly different values also. I think since the differences are so slight (a few nanoseconds), the codes work either way. I tested this out with a few buttons, testing out the different values, and all of them worked except for one that was only working some of the time.

author
Mattakadeimos (author)2016-05-11

Cool project. Are you planning to make a custom enclosure for it so there aren't any wires messing the room up? I remember doing similar things with my Marantz RC5000i which could do everything as well.

author

Thanks! I'm not sure if I will make an enclosure or not, I mostly just wanted to demonstrate using IR to automate a multi-step remote process (a.k.a. going to Netflix haha). and more specifically using RAW IR to work with XBOX (or anything), which there aren't many examples of.

About This Instructable

2,497views

52favorites

License:

Bio: I am an Electrical Engineering Student at SVSU and I have a coop at Dow Corning,
More by jaknieper23:Netflix Button! Arduino IR Controlling Xbox 360TV Remote Light Switch
Add instructable to: