USB Receiver for the Ruwido Merlin IR Keyboard


When I noticed this compact IR Keyboard was on sale for no more than 1.- € I had no choice but to order a couple. One of them might prove useful when I manage to set up a media center based on a Raspberry Pi some day.

Ruwido Merlin Keyboard

Of course, this keyboard comes without a receiver. But how hard could it be to get it to work with LIRC? Very hard, as it turns out. Fortunately, I wasn’t the first one to encounter this problem. There is an open source decoder for this keyboard targeting AVR microcontrollers and I had just come up with the idea to combine it with the V-USB stack to create a USB receiver when I found out that someone else had already done just that.

The circuit was easily set up on a breadboard, but the firmware needed a few minor modifications to compile with recent versions of avr-gcc. When those were done and the firmware flashed, the operating system would still refuse to accept the circuit as a valid HID device. It took me quite a while to figure out that the author had made and committed some changes that seemingly broke the USB stack. When I reverted to an earlier version, the device worked fine. My clone of the repository is available on Github and its master branch now holds the still working version of the firmware.

Ruwido HIDUSB 1.0

Then I created a compact board to hold all the component. It has a single sided layout with only a few jumper wires on the top side and I used the toner transfer method for etching. The result did not turn out very pretty but it does the job. Unfortunately, in the first version of my design I missed R3 so the images on the gallery show a quick-fix for that problem. The board also features a 10 pin connector for the ISP since the firmware will probably still require more work. I added the revised EAGLE files to the repository.

  1. #1 by bugwas on September 6, 2013 - 10:41 am

    // FIXME: This isn’t working correctly, dog knows why..

    “struct keymap_t modmap[NUM_KEYS] ={ };”
    can
    “struct keymap_t modmap[NUM_MODS] ={ };”

  2. #2 by Bert on June 20, 2014 - 12:23 pm

    // Additional fix in main.c, lookupKey():
    for (int i = 0; i<= NUM_MODS; i++) {

    for (int i = 0; i<= NUM_KEYS; i++) {

    executes n+1 times, must be

    for (int i = 0; i < NUM_MODS; i++) {

    for (int i = 0; i < NUM_KEYS; i++) {

  3. #3 by Thinksilicon on November 10, 2015 - 6:39 pm

    Nice build! Got some parts today and started to rebuild it. Before I was using an old VoD-IP-TV-Box which was able to receive the keyboard as well. Wrote a small Software for Linux to send the keys over network and via the uinput-kernel-module made it write to the actual PC.
    Of course an USB-Adapter safes a lot more energy compared to a 300 MHz device just waiting for some lousy keytypes.

    So this gets a BIG thumbs up from me!

    One thing which doesn’t seem to work, are the Volume Up/Down keys. Also the power-key doesn’t give any event on the system. Anyways, thanks for your great work!

(will not be published)