USB Keyboard Remote

Bumble-B

I wanted a way to control MythTV and my television with a single remote control.

So I used a Bumble-B, an IR receiver and LUFA to create a USB keyboard from the Sony remote control for my television.

This setup turns out to be really nice. Since it is just a normal HID compliant USB keyboard, it literally works in any computer with USB support. No drivers are needed, just mappings of remote buttons to keyboard keys.

Circuit

Fortunately, both parts that I attached to the Bumble-B have low power requirements and can be driven directly from the IO pins of an AVR. So the IR receiver and indicator LED in this circuit are soldered directly into the Bumble-B board.

BumbleB Sony IR Receiver Schematic
BumbleB Sony IR Receiver Schematic

For the indicator LED, I removed the anode leg and replaced it with the resistor and sealed it with shrink tubing, to keep it insulated and looking nice.

Driver

The driver is a heavily modified version of both ir2ps2 firmware and the Demos/Device/ClassDriver/Keyboard demo inside LUFA.

Configure your circuit pins and remote control codes at the top of SonyIRKeyboard.c.

Note: this driver currently only supports the Sony IR protocol. Other protocol support may be added in the future. Contact fletch.

Codes

Here is the codes I used for my setup. Tune these or add more entries to support more Sony IR codes.

KeyCode keycodemap[] = {
// .ir_addr .ir_cmd .usb .modifiers
{ 0x17, 0x15, 0x06, 0 }, // DBS/CABLE -> c
{ 0x17, 0x3A, 0x10, 0 }, // DISPLAY -> m
{ 0x17, 0x00, 0x1E, 0 }, // 1 -> 1
{ 0x17, 0x01, 0x1F, 0 }, // 2 -> 2
{ 0x17, 0x02, 0x20, 0 }, // 3 -> 3
{ 0x17, 0x03, 0x21, 0 }, // 4 -> 4
{ 0x17, 0x04, 0x22, 0 }, // 5 -> 5
{ 0x17, 0x05, 0x23, 0 }, // 6 -> 6
{ 0x17, 0x06, 0x24, 0 }, // 7 -> 7
{ 0x17, 0x07, 0x25, 0 }, // 8 -> 8
{ 0x17, 0x08, 0x26, 0 }, // 9 -> 9
{ 0x17, 0x09, 0x27, 0 }, // 0 -> 0
{ 0x17, 0x6C, 0x07, 0 }, // JUMP -> d
{ 0x17, 0x0B, 0x28, 0 }, // ENTER -> [return]
{ 0x17, 0x69, 0x18, 0 }, // TV/DBS (MUSIC) -> u
{ 0x17, 0x6E, 0x0A, 0 }, // MTS (GUIDE) -> g
{ 0x17, 0x72, 0x52, 0 }, // UP -> [up]
{ 0x17, 0x73, 0x51, 0 }, // DOWN -> [down]
{ 0x17, 0x74, 0x4F, 0 }, // RIGHT -> [right]
{ 0x17, 0x75, 0x50, 0 }, // LEFT -> [left]
{ 0x17, 0x76, 0x2C, 0 }, // ACTIVATE -> [space]
{ 0x17, 0x38, 0x29, 0 }, // MENU -> [esc]
{ 0x17, 0x10, 0x4B, 0 }, // CH UP -> [pgup]
{ 0x17, 0x11, 0x4E, 0 }, // CH DOWN -> [pgdn]
{ 0x04, 0x7C, 0x13, 0 }, // pause -> p
{ 0, 0, 0, 0 }, // {end of keycodemap}
};

 
 
 
 

Вопрос

Вопрос, на первый взгляд, не в тему: Кто-нибудь знает, что такое квантика?

 
 

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options