Instructables

IRK! Infrared Remote Controlled USB Keyboard Without Keys

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.

Features

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.

 
Remove these adsRemove these ads by Signing Up
kab15615 months ago

Hello!
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!.
But there were some questions:
1. How many buttons on the remote control can be trained in IPK! ?
2. After a complete setup for a specific remote possible to exploit IPK! without LCD and keyboard?

simplicio (author)  kab15615 months ago

IRK! does not have an internal table of USB button codes. Each USB "usage" is represented (in the USB specification) by a 16-bit "usage page" and a 16-bit "usage" 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 "usage" 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.

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.

kab1561 simplicio5 months ago

Hello , Simplicio!
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 ?
In my computer already installed LCD 20x4 (analog HD44780), which I use to display information from XBMC, so second place is impractical.

simplicio (author)  kab15615 months ago

Sorry, I still do not quite understand what you are asking :( ...

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.

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.

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 "x" to USB function "y" 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.

kab1561 simplicio5 months ago

Hello, Simplicio!
Thanks for the detailed and extensive explanations. Without your response, I would not have coped.
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?

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?

simplicio (author)  kab15615 months ago

You can buy a PIC18F25K50 directly from Microchip Direct.

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 "sudo modprobe usbmon" 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.

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.

Loonytech3 years ago
Hi! I just wanted to say that this is by far, the best instructable I´ve seen. For about a year I´ve been an entuisiast with the "learning by doing"- 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
simplicio (author)  Loonytech3 years ago
Heh Loonytech,

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).

I have to admit I've not put much more effort into IRK! since I bought an Android phone and installed the mythmote 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!

Cheers,
Andrew A.


zack2473 years ago
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. :)
Taran6063 years ago
What would happen if I pulled out 1random wire what would you do cause that's a lot of wires lol jk
simplicio (author)  Taran6063 years ago
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