Background
I purchased an used car Renault Megane Coupe 2.0 16V. It had factory installed audio system consisting of Philips cassette player receiver and its remote controller. I had Kenwood KDC-5070R CD receiver from my old car which was clearly better than the Philips device. Remote control was really useful and easy to use so I decided to make a converter from Philips wire remote to Kenwood which uses wireless infrared for remote control. From this page you can find the whole project.
Philips remote controller
Philips default audio system has a remote controller with the following functions:
Rows and columns can be connected to microcontroller so that columns
have pull-up resistors. If microcontroller has selectable pull-ups for
port input pins there is no need for external pull-ups. Controller functions
can be read by setting one row at the time to logic zero and then reading
column values. For example when setting row 0 to zero column values indicate
what is the roller position. Comparing new roller position with old position
gives to what direction it is rolled. Similar procedure is applied to read
other functions.
Number | Philips wire color | Connection | Row | Col |
1 | Brown | Roll1, Roll2, Roll3 | 0 | - |
2 | Green | Roll1, Disc, Source+ | - | 0 |
3 | Red | Disc, Volume+, Volume- | 1 | - |
4 | Blue | Roll2, Volume-, Mute | - | 1 |
5 | Black | Source+, Mute, Source- | 2 | - |
6 | Yellow | Roll3, Volume+, Source- | - | 2 |
Table 1. Philips remote controller wire connections.
Kenwood remote control
Kenwood KDC-5070R (and other models as well) can be remote controlled
via infrared. Infrared protocol is based on 38 kHz carrier which is pulse
width modulated to send start sequence, control code 0/1 bits and stop
sequence. There is also a sequence for key repeat. A control code consist
of a start sequence, 32 code bits and a stop sequence. Table 2 shows different
sequences. Delay between control code and key repeat (or other control
code) is 40000 us and delay between repeats is 90000 us.
Start sequence | Zero bit | One bit | Stop sequence | Key repeat |
9000 us carrier on
4000 us carrier off 630 us carrier on |
520 us carrier off
630 us carrier on |
1300 us carrier off
630 us carrier on |
carrier off | 9000 us carrier on
2000 us carrier off 630 us carrier on carrier off |
Table 2. Infrared carrier sequences.
Kenwood function codes are 16 bit long (2 bytes) where MSB is a device code and LSB is a function code. Complete list of Kenwood function codes are in table 3. Codes are for some reason (error correction?) send as 32 bit control codes which are generated from 16 bit codes. Code XY is encoded to 32 bit control code X~XY~Y where ~ means logical not. For example Kenwood code 0xb91c (select tuner) is encoded as follows:
X=0xb9
Y=0x1c
~X=0x46
~Y=0xe3
Thus 32 bit control code is 0xb9461ce3 which is then sent via infrared
MSB first: X, ~X, Y, ~Y. Each byte is sent LSB first. For example byte
0xb9 is %10111001 in binary code and it is sent 1, 0, 0, 1, 1, 1, 0, 1.
Each 0 and 1 bit is coded to infrared as described in table 2.
Function | Code | Function | Code | Function | Code |
0 | 0xb900 | Tuner | 0xb91c | Volume+ | 0xb914 |
1 | 0xb901 | Tape | 0xb91d | Volume- | 0xb915 |
2 | 0xb902 | CD | 0xb91e | Source | 0xb913 |
3 | 0xb903 | CD-MD-CH | 0xb91f | Mute | 0xb916 |
4 | 0xb904 | Track- | 0xb90a | ||
5 | 0xb905 | Track+ | 0xb90b | ||
6 | 0xb906 | Rew | 0xb90c | ||
7 | 0xb907 | Ff | 0xb90d | ||
8 | 0xb908 | DNPP | 0xb95e | ||
9 | 0xb909 | Play/Pause | 0xb90e |
Table 3. Kenwood 16 bit function codes.
Converter
Now we know how Philips remote controller works and how to control Kenwood
via infrared. All we need is a piece of hardware and a bit bigger piece
of software. I didn't have anything connected to my Kenwood like MD player
or CD box so I decided to make two modes of operation. Tuner and CD mode.
Table 4 shows how Philips functions are converted to Kenwood functions
in each mode.
Philips function | Kenwood function (Tuner) | Kenwood function (CD) |
Source+ | CD | CD |
Source- | Tuner | Tuner |
Roller down | Preset channel+ | Track+ |
Roller up | Preset channel- | Track- |
Volume+ | Volume+ | Volume+ |
Volume- | Volume- | Volume- |
Mute | Mute | Mute |
Disc | Track+ (auto search+) | Play/Pause |
Table 4. Philips function to Kenwood function conversion in two modes.
Hardware
I used Atmel AVR AT90S2313 microcontroller to implement the converter. It only needs few external components. I used 4 MHz crystal but it should be no problem to use different frequencies though some software changes are needed then. I used AVR port D pins 0-5 to connect Philips controller wires. Pins 0-2 for columns and 3-5 for rows. Then I used port D internal MOS pull-ups for columns. Port B pin 7 was connected to an infrared led and 38 kHz carrier was generated by software. Hand drew schematic diagram of my project.
Software
You can download source codes and binaries. Sources can be compiled and linked with IAR C, assembler and linker tools. Makefile is gmake compatible. Note that you need cl0t.r90 library file to perform linking. It is provided with the IAR tools.
Project status and future
Little 'black box' with described hardware inside is installed to my Megane and it's working fine. These instructions can be directly used to build converters from Renault Philips audio system remote controller to other Kenwood models as well. Also the principle is the same for other manufacturer devices. AVR codes can be easily modified to control other devices via infrared. Internet is full of information about infrared control.
(C) 2000 Matti Kantola
Back to my homepage.