Wednesday, January 1, 2014
Roku remote mod
We recently got a Roku 3 player, which is awesome. Just a few days into using it, though, I got fed up with having to use two separate remotes for the player and the TV. Before, we could use just one since the cable box remote can be programmed to operate the TV also. The Roku remote can't do this, though, primarily because its connection to the box is RF instead of IR. I decided to modify the controller to send IR commands to the TV so I could use just the one remote while watching stuff on the Roku.
The first step was to decode the protocol used by my LG TV. By watching IR on the scope, I could see that it was modulated at 38kHz, and sends a 4-byte packet for each command. Each packet starts with a fairly long start pulse, followed by 33 pulses 580us long. The 1/0 keying is encoded in the space time between pulses, either 520uS (which I arbitrarily called 0) or 1.6ms (1). This is why there are 33 pulses instead of 32, because the final space has to be framed by a final pulse. I recorded the waveforms for four commands (power, input, volume up, volume down) and noticed that most of the bits are always the same. The only ones that change are the high nybbles of the 3rd and 4th bytes, so when I wrote my transmit function I have it just take in a single byte and split it into those two parts of the transmission. There's also a signal that tells the TV to repeat the last command, which is just a start pulse and a single bit pulse. The remote sends these repeat commands any time a button is held down to avoid repeating the entire packet (saving power).
I wrote my application for the PIC12F617, which is the perfect size for 4 switch inputs and a single IR output. It is also well-suited because it has a PWM output, which I used to generate the 38kHz carrier signal. The PIC waits in sleep until a button is pressed, then sends the command out, and then sends the repeat command if the button is held down, and that's it. I measured the sleep current and it was so low that my meter didn't register anything at all (meaning it is less than 0.05 microamps). Here's my protoboard test setup:
I then opened the Roku remote to see how much room there was inside to add hardware. It is a very well-designed product. Luckily, up front there's a lot of room under the board.
The remote has a feature where you can plug headphones into it and listen to stuff silently, so there are already volume switches. I didn't expect to use this feature much, so I replaced those switches on the PCB with my own and hijacked the external buttons to send volume commands to the TV instead. On the opposide side I added two momentary switches by drilling through the case and epoxying the switches inside. I put the IR LED into a black plastic tube to make the installation neater since it would be recessed into a curved surface, and epoxied it in place.
The PIC sits down at the bottom, and taps power directly from the battery connections on the stock PCB.
In the end it came out very well, although driving the LED directly from the PIC's I/O may have been a mistake because it needs to be very precisely aimed for the TV to receive it. This could also be a carrier frequency issue, though, as the PIC's internal oscillator is not extremely accurate. Here's the code
Subscribe to:
Post Comments (Atom)
MR. Everett Bradford. i hve no idea how to contac tyou other than this, id just like to say you're awesome! and can you help me with a project? It's basically your old Prmetheus project aha.. i don't use G+ much so please send me an email at tezzrat1@live.com
ReplyDeleteHaha, still everybody is waiting for the flamethrower here xd
ReplyDeleteI don't want to sound rude, but don't expect too much attention on the other projects until you finish the Pyro System :p
Roku is an awesome streaming device with that you can watch your favorite TV shows. Sometimes your Roku remote not responding, No need to panic about it. Roku experts are one step away from you to help you out.
ReplyDeletefamily tree maker 2019 move to new computer
ReplyDeleteFamily Tree Maker has become a new-generation tool where an individual can keep track of their past and future generations without any hassle digitally. It is user-friendly software and with ease, you can move it from one device to the other.
Transferring FTM from one computer to another You can easily export FTM both Family Tree Maker 2019 altogether safely. This is because while you are moving from one computer to another, the file will still remain in your old device. It happens because you will be making a new folder to transfer.
How to Transfer family tree maker 2019 move to new computer
?
Family Tree Maker File Export
On your computer, launch Family tree maker 2019 Download.
Cool and that i have a dandy give: What Renovations Increase The Value Of A Home zombie house renovation
ReplyDelete