USB IR HID Device Documentation

0.1

logo_big.png

Introduction

This project includes a USB device that receives Ir light from a remote control (Sony and NEC protocol) and report the keys pressed on the remote control to the PC using the standardized USB HID device. There is s special class for remote controls and this firmware will register as such a device.

Main features:

Development Environment

I started to develop on Windows (http://winavr.sourceforge.net). I now moved to Linux. Tools (for Ubuntu Linux):

User Guide

Welcome to the USB Ir Remote Device. When plugged into the computer the device will register it self as an USB Consumer HID device. It will act as a keyboard and a consumer device that can send play, stop, pause, etc commands to applications.

Windows Media Player have built-in support for these commands and the HID driver is included Windows. No drivers are needed! No girder or WinLIRC or similar is needed.

The device will react to NEC/SONY compatible IR codes. The NEC protocols is used by a number of manufacturers including Pioneer, Onkyo and Goldstar.

To learn the codes for the different commands do this:

Your computer should now be ready to control Windows Media Player. Start your favorite movie and try the start, stop and pause buttons on the remote.

Software

Uses the firmware only USB low speed driver from http://obdev.at. The USB device is configured as a Remote Control HID device.

Ir is received by ICP interrupt: irrx.h

Main loop translated the ir codes received and handles the main USB look: main()

Hardware

Schematic:
ir_hid_sch.png

Schematic

Partlist:

Partlist

Exported from ir_hid.sch at 10/30/09 2:50 PM

EAGLE Version 5.6.0 Copyright (c) 1988-2009 CadSoft

Part     Value             Device          Package         Library      Sheet

C1       27p               C-EU025-024X044 C025-024X044    rcl          1
C2       27p               C-EU025-024X044 C025-024X044    rcl          1
C3       10u               CPOL-EUE2.5-5   E2,5-5          rcl          1
C4       10u               CPOL-EUE2.5-5   E2,5-5          rcl          1
D1       1N4148            1N4148          DO35-10         diode        1
D2       1N4148            1N4148          DO35-10         diode        1
D3       1N4148            1N4148          DO35-10         diode        1
IC1      ATMega8L          AT90S4433P      DIL28-3         atmel        1
JP1                        PINHD-2X3       2X03            pinhead      1
JP2                        PINHD-2X3       2X03            pinhead      1
JP3                        PINHD-1X4       1X04            pinhead      1
JP4                        PINHD-1X1       1X01            pinhead      1
JP5                        PINHD-1X4       1X04            pinhead      1
LED2     Status            LED3MM          LED3MM          led          1
Q1       12MHz             CRYTALHC49S     HC49/S          crystal      1
R1       1k5               R-EU_0207/7     0207/7          rcl          1
R2       68R               R-EU_0207/5V    0207/5V         rcl          1
R3       68R               R-EU_0207/2V    0207/2V         rcl          1
R4       47K               R-EU_0207/7     0207/7          rcl          1
R5       100               R-EU_0207/7     0207/7          rcl          1
R6       100               R-EU_0207/7     0207/7          rcl          1
R7       10                R-EU_0207/5V    0207/5V         rcl          1
R8       47K               R-EU_0207/7     0207/7          rcl          1
R9       220               R-EU_0207/7     0207/7          rcl          1
R10      220               R-EU_0207/7     0207/7          rcl          1
R11      220               R-EU_0207/7     0207/7          rcl          1
R12      220               R-EU_0207/7     0207/7          rcl          1
R13      220               R-EU_0207/7     0207/7          rcl          1
R14      220               R-EU_0207/7     0207/7          rcl          1
R15      220               R-EU_0207/7     0207/7          rcl          1
R16      1M                R-EU_0309/10    0309/10         rcl          1
S1       Program           10-XX           B3F-10XX        switch-omron 1
U1       ELIRM8602X        ELIRM8602X      ELIRM8608S-BENT elirm        1
X1                         USB-787616      USB             con-amp      1
X3       D-SUB 25 PIN MALE M25H            M25H            con-subd     1

Board (for protoboards):

ir_hid_brd.png

Tips about HID development

General tips about HID development:

1. HID device class is cached by Windows; change USB_CFG_DEVICE_ID if you change USAGE_PAGE class to another. It took me several weeks to find this info. I copied the use page for the remote but it never work until I changed the USB_CFG_DEVICE_ID to another number so that the device was rediscovered by Windows.

2. Added usbconfig.h manually to the dependencies in the make file to all .o files. WinAVR .d files doesn't seem to work for subdirs

(c) 2007 Jorgen Birkler (jorgen.birkler)a(gmail.com) USB driver (c) 2006 by OBJECTIVE DEVELOPMENT Software GmbH


Generated on Fri Oct 30 20:43:19 2009 for USB IR HID Device by  doxygen 1.5.8