IRK! is a USB keyboard, without keys, that you can operate by simply using your LEARNING infrared remote control.

I created it to allow me to control my MythTV home theater PC with my LEARNING infrared remote control instead of having to use a real USB keyboard - but it will work with any system (Linux, Windows, or whatever) that you can plug a USB keyboard into, and also other home theater systems like XBMC and MediaPortal.

Many people use LIRC on Linux to control MythTV, but my solution does not require you to edit any complicated configuration files and does not need any special device drivers or software to be installed. However, you do need to build it!

IRK! is an open-hardware project that I created on SourceForge. Contributors and bug reports are welcome.

I've put a 2-minute video on YouTube showing how it works.


The feature set so far includes:

  • Teaches your LEARNING remote control IR codes
  • Lets you map IR codes to USB keystrokes - for example, Shift+Enter
  • Sends the USB keystroke to your PC when you press a button on your remote
  • Can send power off, sleep, and wake codes to your PC
  • IRK! devices can have one of 256 addresses - so you can have multiple IRK!'s
  • Handles broadcasts - so multiple IRK!'s can respond to a single remote button
  • Supports USB Consumer Device functions (e.g. Mute, Volume Up, etc)
  • Has a programmable LCD backlight delay (and ON/OFF commands)
  • Can be built using either Through Hole Technology (THT) or Surface Mount Technology (SMT)

IRK! is an evolving project. Please check out irk-usb on SourceForge for the latest enhancements.

Step 1: Prerequisites

This project is for reasonably advanced electronic nuts...but if you stick with it anyone can make it.

Through Hole Technology (THT) versionIf you choose to build the Through Hole Technology (THT) version, then you will be making a Printed Circuit Board (PCB) or at least a matrix board, soldering electronic components onto it, and then programming a PIC micro-controller, so you'll need:

  • PCB making equipment. I use inkjet transparencies, an ordinary fluorescent desk lamp as a UV source, and Kinsten positive-acting presensitised board, and ferric chloride etchant.
  • A good soldering iron with a fine tip. I soldered everything on both the THT and SMT boards with a Hakko T18-B 1 mm ball tip.
  • A micro-controller programmer able to program a Microchip PIC18F2550 micro-controller, such as a Pickit2 or you can make your own (search for "pic programmer" on Instructables).

Surface Mount Technology (SMT) versionIf you choose to build the Surface Mount Technology (SMT) version, then you'll need:

  • A PCB manufacturer to make a double-sided PCB. I used a company called ITEAD who have very reasonable rates and manufacture very high quality boards. All the Gerber files are available on SourceForge. You just need to zip them up and email them to the manufacturer, pay your money and wait.
  • To be able to solder small Surface Mount Devices (SMDs) to the PCB. That is not as hard as it seems as the design uses only relatively large SMD parts. There are plenty of tutorials on the Internet showing how to handle SMDs. A Hakko T18-B 1 mm ball tip (or similar) is fine - even for the ICs. Use plenty of "no clean" flux.
  • A micro-controller programmer able to program a Microchip PIC18F25K50 micro-controller, such as Mikroelektronika's mikroProg for PIC. Unfortunately the PIC18F25K50 is not supported by Pickit2 and even Pickit3 seems to lack support (well, I couldn't get it to work, so I bought a mikroProg which seems to be better anyway).

And in case it doesn't work for you first time, you may find it helpful to have:

  • A good logic analyser like Logic (works on Windows or Linux)
  • A USB trace capture program like USBTrace or USBlyzer (for Windows) or Wireshark (free on Linux). On Linux, make sure you're using the libpcap 1.1 (packet capture library) or later.

<p>Hello!<br>Thank you so much for your work on creating IPK!. This device is very interesting to me. I'm doing a media player with OpenELEC + XBMC and his management want to use IPK!.<br>But there were some questions:<br>1. How many buttons on the remote control can be trained in IPK! ?<br>2. After a complete setup for a specific remote possible to exploit IPK! without LCD and keyboard?</p>
<p>IRK! does not have an internal table of USB button codes. Each USB &quot;usage&quot; is represented (in the USB specification) by a 16-bit &quot;usage page&quot; and a 16-bit &quot;usage&quot; code. IRK! knows about the usage page codes for Keyboard and Consumer Device. Within those pages, IRK! can teach a learning remote the low-order 12-bits of any Consumer Device &quot;usage&quot; code or the low-order 8-bits of any Keyboard usage code. Sure, it tries to display the popular usage names on the LCD display, but even the ones that it doesn't display can still be programmed on a remote. When a remote IR signal is received, IRK! simply pulls the 8-bit or 12-bit usage code out of the packet and sends it unchanged to the host's USB interface.<br><br>As for whether IRK! can be used without an LCD and front panel buttons, I think it would be difficult to operate without those user interfaces, but I guess if you could program IRK!'s IR command pattern directly into your remote then you wouldn't need an LCD or front panel buttons. I think the Philips Pronto remote control (for example) has a way of defining IR codes using PC software and loading them directly into the remote - but I've never used that remote. </p>
<p>Hello , Simplicio!<br>Thank you for your prompt response .Since English is not my native , I probably wrongly brought to you the meaning of your first question. I wanted to learn about what the maximum number of different buttons on the remote control can be mapped to keyboard shortcuts ? Or say differently. Every control XBMC I need 37-39 buttons on the remote control . I have a TV remote Cameron, which transmits the IR signal in NEC protocol and has 40 buttons. And I made the front panel with 11 buttons that are connected to the chip SAA3010 ( transmits infrared signal protocol RC- 5 (Philips)). These 11 buttons duplicate main function XBMC. So, will there be enough memory IPK! Programming compliance of all these buttons with shortcuts transmitted interface USB? And is it possible to assign the same key code USB two different IR code from different remotes ?<br>In my computer already installed LCD 20x4 (analog HD44780), which I use to display information from XBMC, so second place is impractical.</p>
<p>Sorry, I still do not quite understand what you are asking :( ...<br><br>To be clear on one thing though: IRK! knows nothing about NEC or RC5 protocols - it does not need to. Instead, it uses its own IR signalling protocol, which is why you must have a remote control that can learn IRK!'s IR signal patterns. If you have a learning remote control that can store 100 IR signal patterns, then you can program 100 IRK! IR signal patterns on it (for example, Keyboard:A, Keyboard:B, ConsumerDevice:Play etc). If you have two learning remote controls then you can also program the same (or different) IRK! IR signal patterns on each of them. IRK! can only recognise its own signal patterns when they are transmitted from a learning remote control that has already learned IRK!'s IR signal patterns. <br><br>If your remote transmits NEC or RC5 signal patterns, then IRK! will completely ignore those patterns. That is a good thing, because you can control your TV or AV system using NEC or RC5 (or whatever) protocols, and you can also control your PC using IRK! - with a single learning remote control.<br><br>The mapping of remote control buttons to IR signal patterns is done by your learning remote control and the maximum number possible depends on your remote control's capacity. IRK! does not have a table that maps IRK! IR signal pattern &quot;x&quot; to USB function &quot;y&quot; because IRK! has been designed so that part of the IRK!'s IR signal pattern can be sent directly to the USB interface. As a result, more IR signal patterns does not mean more IRK! memory is required.</p>
<p>Hello, Simplicio!<br>Thanks for the detailed and extensive explanations. Without your response, I would not have coped.<br>I gathered IPK!. Did not find the chip PIC18F25K50, had to do on the PIC18F2550. Used firmware v.2.11 for PIC18F2550. Trained key codes necessary USB Universal Learning Remote Remote Control. In Windows XP IPK! works perfectly. In Linux (OpenELEC v3.2.4) for some time IPK! works fine, then the transmission of any (no matter how trained IR commands) IPK! freezes. In this activity LED is lit constantly, and key codes in Linux is not transmitted. It is treated just reboot the system. What could be the reason?</p><p>And one more question. For PIC18F25K50 (v.3.04) F0 command list was expanded . Added command F0 0A, F0 0B, F0 0D, F0 0E. Can I add these commands into the firmware for PIC18F2550 and even add command switches the output BACKLIGHT from one state to another?</p>
<p>You can buy a PIC18F25K50 directly from Microchip Direct.<br><br>I've had a few problems with Linux in the past but they were solved by upgrading Linux to a later version. I have been using the THT version on my MythTV HTPC running Arch Linux without issue for a few years now. I suspect some sort of Linux USB glitch because the normal flow is: turn on activity LED, then send the keystroke to the USB Interface, then after a short delay turn off the activity LED. What you can do is use wireshark to trace the USB activity (don't forget to &quot;sudo modprobe usbmon&quot; first to load the USB packet trace drivers). Look at the Linux message log for any related error messages. Try a different USB port on your motherboard.<br><br>You can retrofit the SMT code to the THT code if you want - that is one of the good things about open source projects. Note that the THT version supports only two external MOSFET switches - and I still haven't tested that functionality so I still can't guarantee that it actually works (but it seemed like a good idea at the time). Toggling the BACKLIGHT state should be possible if you want that. Personally, I find the backlight distracting and leave it off.</p>
Hi! I just wanted to say that this is by far, the best instructable I&acute;ve seen. For about a year I&acute;ve been an entuisiast with the &quot;learning by doing&quot;- principle, and the tricky side is to understand the instructions in this new and great hobby. This instructble has no such bieffects.. absoluteley fantastic. This is probably my first comment as well.. Thanx a 1000 times for a wonderful work. Now lets see if I can do some work on the actual content in your instructable. / Loony
Heh Loonytech,<br> <br> Glad you're having fun with it! (sorry about the delay in responding, but I only got notified about your comment after 5 days - must be some anti-spam thing).<br> <br> I have to admit I've not put much more effort into IRK! since I bought an Android phone and installed the <a href="http://code.google.com/p/mythmote/">mythmote</a> app on it to control my MythTV system, but I sure had a lot of fun doing the whole design/build/program thing and to end up with a reasonably unique home-made gadget was worth it just for that!<br> <br> Cheers,<br> Andrew A.<br> <br> <br>
i would love to make this but i would get as far as finding the parts and by then i already would have given up. :)
What would happen if I pulled out 1random wire what would you do cause that's a lot of wires lol jk
Well, it *was* a lot of wires...but it's off breadboard now. New pic attached.
very nice and you go into detail on this so well great asset to instructables

About This Instructable



More by simplicio:PUB! Programmable USB Button TIC! One-button Time Lapse Camera Timer IRK! Infrared Remote Controlled USB Keyboard Without Keys 
Add instructable to: