skip navigational linksPJRC
Shopping Cart Download Website
Home Products Teensy Blog Forum
You are here: MP3 Player Technical Docs IR Remote Control

PJRC Store
Main Board, $150
LCD & Pushbuttons, $42
LCD/Backlight/PB, $77
IDE Cable, $9
Complete Parts List
MP3 Player
Main Page
Detailed Info
User Photo Gallery
Connecting The Board
Firmware Download
Side Projects
Technical Docs
Freq. Asked Questions
FAQ #2
News And Updates

IR Controller, Control the MP3 Player From a IR Remote

This cool project was contributed by Todd Elliot (see below for email address). It's a receiver for IR remote controls. It can learn the codes from buttons on multiple types of remotes and send the command strings understood by the player. Very cool, and it's GPL'd!

schematic diagram

Schematic in PDF format

ir_schem.pdf

Project Files

irdecoder_r2.tgz

Documentation

The IR decoder is designed to work with Paul's MP3 player to allow use of any IR controller you may have by 'learning' up to 32 buttons. It only learns enough of the code to distinguish between buttons. It is a generic enough scheme that it can learn a variety of remote controllers. It has been tested with 5 different remotes so far. Probably need to try some more... Once a button is 'learned', pressing the button will produce a command string on the serial output. The codes are stored in the interal EEPROM memory. Once they are learned, you don't have to do it again for this remote.

The Decoder serial port runs at 19200 baud 8,n,1

It should be connected to the 4-pin serial port on the MP3 player

To initiate the learn function press the ] key followed by 01,02,03,...31 while running the MP3 Player connected to a terminal emulator. This will generate a 'Press XX' message. You can then press the corresponding button on your IR remote. Don't hold the remote too close to the decoder board. I have best results at least 2 or 3 feet away. After learning the button code, the IR decoder will output a ascii/visual representation of the key-code. Now pressing the button on the remote should produce the corresponding command string for control of the MP3 player on the serial port output.

Sample output:


IR DECODER

PRESS 10 
      |   |   |               |       |       |   |   |   |     
      |   |   |               |       |       |   |   |   |     
      |   |   |               |       |       |   |   |   |     
      |   |   |               |       |       |   |   |   |     
      |   |   |               |       |       |   |   |   |     
      |   |   |               |       |       |   |   |   |     
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 

DONE

End sample output

Now pressing the button on your remote control will produce the string 'play' on the serial port output.

  • X=00 -> '0'
  • X=01 -> '1'
  • X=02 -> '2'
  • X=03 -> '3'
  • X=04 -> '4'
  • X=05 -> '5'
  • X=06 -> '6'
  • X=07 -> '7'
  • X=08 -> '8'
  • X=09 -> '9'
  • X=10 -> 'PLAY'
  • X=11 -> 'NEXT'
  • X=12 -> 'PREVIOUS'
  • X=13 -> 'RANDOM'
  • X=14-31 -> Unused at this point

    Codes 14-31 could be things like GOTOXXXX, BANDXXXX,NEXTBAND,NEXTALB,ETC.

    Obviously, this hardware/software could be used to control other serial devices. It is hoped that making this design Free will inspire other uses and designs, just as Paul's enormous contribution with the MP3 player has inspired me to contribute this small project.

    TODO:

  • There are plenty of I/O pins left. The learn function could
    be initiated by pressing buttons instead of using a terminal emulator?

  • The free I/O pins could also be used to control some other logic
    instead-of/in-addition-to outputing a serial command


  • MP3 IR Decoder, tvelliott at yahoo.com (replace the at with @)
    http://www.pjrc.com/tech/mp3/ircontroller/index.html
    Last updated: February 23, 2005