© 2001-2002 Gabriele Bellini

a universal infrared remote controller for your Sony MD walkman

[introduction] [hardware section] [software section] [supported transmitters] [more info section] [downloads] [links] [old project_01] [acknowledgements] [disclaimer] [contact me]


I am going to describe how I built a universal infrared remote control system for my Sony MiniDisc walkman. I have created (and tested) one for my MZ-R50 walkman and I think it will also work fine with other Sony models, such as MZ-R2, MZ-R3, MZ-R30, MZ-R35, MZ-R37, MZ-R55, MZ-R70, MZ-R90, and MZ-R91 (also MD players are supported). All these models have one thing in common: their remote control is connected to the base unit through a 4-pin plug. This project consists of an hardware section (the circuit description) and a software section (the project is based on a PIC16F84 microcontroller, therefore the receiver won't work until you program the microcontroller with the corresponding software). In this project, I have only focused on the receiver section: the infrared transmitter I used was a Technics remote control transmitter, which came with a portable CD player (Technics SL-XP505) that I bought a few years ago. You can achieve the same results that I achieved - without further changes - only if you use this model of remote control transmitter. Don't worry if you don't have one, this firmware version (2.0) now supports various remote transmitters! You can see the list of supported remote transmitters in the sections below. If your remote transmitter is not included in the list you can modify some parameters in the PIC16F84 source code in order to made it compatible with the receiver! To do this you must know the technical info of your remote transmitter. In the next sections you'll also find how to discover your remote technical info. As last choice, if your remote transmitter is not supported and you don't want to modify the parameters in the PIC16F84 source code, you can use a remote transmitter which is in the list and emulate it by buying a cheap multi-function remote control transmitter which supports several TV and hi-fi equipment.

Back to top of this page

the Sony MZ-R50 MiniDisc walkman
the Technics SL-XP505 remote control transmitter
the final circuit
the 4-pin plug

hardware section

the DC input plug

As you can see from the schematic diagram, the hardware structure is quite simple: an infrared receiver (U1) converts the infrared signals into electrical signals. These are then transmitted to the microcontroller (U2), which decodes them. Once it recognizes a command, the microcontroller sends it to the MD unit, following the same procedure as the one used by the cable remote control. In other words, each command is implemented by shorting 2 terminals of the 4-pin plug with different resistor values. To this end, I used a serially controlled digital potentiometer (U3) instead of resistors and relays, which take up more space on the PCB. Finally, an analog switch (U4) was used to open and close the circuit that is connected to the MD unit. Like most infrared equipment, a red led (DL1) turns on each time a key is pressed on the transmitter, so that the user knows whether the ir receiver is decoding the ir string (if it fails to do so, the cause may be various: the transmitter batteries are down, the position of the receiver unit is incorrect, the receiver unit is not connected to a power supply, etc...). The infrared remote controller needs an external power supply and can't rely on batteries: as the ir sensor needs to be constantly connected to a power supply, batteries can run out very quickly, therefore using an external power supply is preferable. The necessary power is supplied by the Sony MZ-R50 walkman AC power adapter, which supplies non-regulated DC 6V power to the receiver unit. A simple zener diode-based circuit (D1, R1 and DZ1) supplies the regulated 5V voltage to all the ICs. I don't know if other Sony walkman AC power adapters have the same voltage output or not, so be careful: your MD walkman needs a DC input voltage of 6V, otherwise you must modify the power circuitry (R1 and DZ1 values and sizes) in order to reach a voltage of 5V for all the ICs. As you can see from the part list of the project, with only four ICs and a few discrete parts you can build your own infrared remote control system. The PCB is the easy part: as it only needs to accommodate few items, this board is very small and easy to build. Assembling the circuit is also a simple task: don't forget to solder the sockets for each integrated circuit (U2, U3 and U4). This is necessary if you wish to prepare your microcontroller for future firmware updates, however using soldered sockets for digital potentiometer and analog switch too will avoid soldering damage. In order to solder the metal shield to ground on U1, you need to make two holes on the PCB, as shown in the silkscreen layer. As you can see from the connection diagram, the external connections are:

* : the pin numbers on the MD unit 4-pin plug are "1" to "4" starting from left (near the stereo headset plug) to right.

I would like to spend few words about the most wanted part of this project: the 4-pin connector plug. Neither Sony nor other companies produce this part separately. This problem could be solved by purchasing a Sony remote control and cut (!!!) the wire with the connector plug. Eric Woundenberg (from found a cheap way to obtain the connector. One source for Sony's custom remote connector plug is from a Sony MZ-R37 remote control. These are available for $13 (including shipping in North America) from:

Jeff Owens
555 W. 2nd Ave Suite B4
Mesa, AZ 85219

480-813-7280 phone
480-813-7283 fax

Ask for Part#: RM-MZR37 (Sony MZ-R37 remote control)

the original 4-pin connector plug

A cheaper (but less elegant) way to obtain the connector is simply make it by yourself! This is what I did when I started this project. In the photo you can see this very primitive connector: I used a small cardboard piece (dimensions: 8mm x 30mm x 1mm) as phisical support. Then I glued 2 wires over it with instant glue. The wires I used are those used in bread-board prototyping. To make the connection easier to do, I've flattened the copper wires at the edge with an hammer. A consistent amount of glue was used to increase the mechanical stability. To use the connector, simply put it in the MD walkman plug with the contacts faced upside.

a home made version of the connector

Back to top of this page


software section

As far as the software section of my project is concerned, all you need to do is to program the microcontroller with the appropriate firmware. To do this, you will need a PIC16F84 programmer. If you don't have one, don't worry: there are lots of web sites where you can get all the information you need to build cheap PIC programmers. I used Steve Marchant's PIC16C84 programmer (which also works for PIC16F84 microcontrollers with the PPF84 DOS-based program created by Massimo Veneziano). This programmer is cheap and very easy to build. The next step is the microcontroller programming. Now you can do one of the following 3 things:

  • if you have a Technics SL-XP505 portable CD remote transmitter (or you want to use a universal remote transmitter to emulate it) the only thing you have to do is to put the firmware (ir_recv.hex) on the PIC16F84 with the programmer software or
  • if you want to use another remote transmitter which is in the list of the supported remote transmitters, you must:
    i. edit the source code in order to specify which transmitter model to use. This job can be done by using a simply text editor program: open the file "ir_recv.asm", after few lines you'll find the following text:

    #INCLUDE ""

    which indicates that we are using by default the Technics SL-XP505 portable CD remote transmitter. Now you must change the file name "" with one of the available remote model files. Save the new version of the file.
    ii. rebuild the source code. To do this you must use the Microchip's MPASM macro assembler program. I used the Windows based version, but also the MS-DOS version can be used. The assembler program is available from Microchip web site or directly from this site. To compile the source file, simply open your file manager program and drag the file "ir_recv.asm" over the "mpasmwin.exe" file. The "ir_recv.hex" file is generated and now you can upload it into the PIC16F84 microcontroller with the programmer software
  • if you want to use a remote transmitter which is not yet supported, you can create a .inc file by yourself, include it in the ir_recv.asm file, and finally compile the ir_recv.hex file just has seen on previous section. To create a .inc remote transmitter file you must open the file and modify the timing and code parameters in order to made your transmitter compatible with the receiver. In the file comments you'll find more informations on how to change parameter values. If you have no idea on how to change these parameters, you can read some theory on infrared remote codes. There are lots of documents on the web covering this argument. I recommend you to read the docs of Björn Rhoads (Gahm)'s rem34bg program. This software can be only used with an Hewlett Packard HP48 graphic handheld calculator (it transforms the calculator in a universal infrared remote transmitter), but the documents included with the program contain useful informations on how infrared remote controllers work, giving detailed descriptions on transmission timings and codes. Another very good internet source on infrared remote control is LIRC, the Linux Infrared Remote Control page: this site contains hundreds of remote transmitter codes.
Now, insert the microcontroller on the 18-pin socket on the pcb and your receiver is ready to work! Have fun!
If you decided to do the second or third choice showed above (or simply you want to know what algorithm is used for decoding infrared signals and issuing commands to the MD unit), you must get the PIC16F84 source code: each line of the program is fully described. With the source code you will find also all the .inc files that contain the parameters of each supported remote transmitter. If you wish to find out more about the infrared transmission protocol, the MD interfacing or view a detailed parts description, then read the next sections.

Back to top of this page


supported transmitters

This section shows all of the supported remote transmitter models. To see which are the keys assignments for each remote transmitter, please read carefully the .inc file. Remote transmitters which control devices of the same brand and category often use the same codes, so, different remote transmitters could be used with the same .inc file (for example, a generic Sony TV remote control transmitter will probably work with the file even if it isn't a RM-833 model). This list is growing up and you are invited to send me your transmitter .inc files (and why not a photo?) that aren't yet shown in the list above at

transmitter docs
transmitter model ID:
Technics SL-XP505 portable CD player
.inc file name:
the Technics SL-XP505 remote transmitter
transmitter model ID:
.inc file name:
the PIONEER KEX-M900RDS remote transmitter
transmitter model ID:
.inc file name:
the SONY KV-21X5D remote transmitter
transmitter model ID:
.inc file name:

Back to top of this page


more info section

This section explains some of the circuit behaviors, if you want to know how the circuit works, you are invited to read to this section.

Notes about infrared remote transmissions:

An infrared remote transmitter sends commands to the receiver by transmitting infrared light pulses: this job is done by one or more infrared leds mounted on the top of the remote transmitter. The light pulses sent by the transmitter are modulated with a frequency of about 40kHz: this allows the receiver unit to cut out other infrared sources such as lamps and sunlight.

NOTE: although infrared remote transmissions of different brands are similar between them, we'll now refer only to the Technics SL-XP505 infrared remote controller specifications.

An infrared string consists of:

  1. a header
  2. a bit sequence
  3. a stop signal

The header pourpose is to tell the receiver that a command is coming, so that the receiver circuitry will be activated. The bit sequence usually contains:

  1. an address
  2. a command

The address selects the appropriate equipment (for example, it selects the tape deck instead of the TV of the same brand), the command tells the equipment what to do. Each bit of the sequence is coded in a different way depending on the transmitter and receiver brand: the Technics brand uses space coded signals: this means that the time length between two pulses will tell if the bit transmitted is "0" or "1". The stop signal is a pulse that ends the infared transmission. Of course, all timings differ from brand to brand: here are the Technics brand specifications:

The header pulse lenght is 4000us (microseconds), the space is 1600us long. Next follows the bit sequence. The bits are space coded: the header timings
A pulse of 400 microseconds followed by a space of 400 microseconds will be interpreted as "0" bit. the "0" bit coding
A pulse of 400 microseconds followed by a space of 1200 microseconds will be interpreted as "1" bit. the "1" bit coding
To end the bit sequence a stop bit is used: it's a 400 microseconds pulse. the stop bit coding

The transmission begins with the header, followed by six data bytes (each data byte is eight bits long, msb sent first) and the stop bit closes the protocol. The first four bytes are the address bytes, the last two bytes are the command bytes. The Technics remote transmitter which I used for this project sends 40040550 (in hexadecimal format) to select the equipment (originally the equipment was the portable CD player, in this project the equipment is the MD walkman) and then, depending on which key is pressed on the transmitter keyboard, follow the last two bytes which could be:

0055 if the "stop" key is pressed on the transmitter keyboard, this keypress will be interpreted as "stop" command on the minidisc.

5005 if the "play/pause" key is pressed on the transmitter keyboard, this keypress will be interpreted as "pause" command on the minidisc.

92c7 if the "rew/skip -" key is pressed on the transmitter keyboard, this keypress will be interpreted as "rew/track -" command on the minidisc.

5207 if the "ff/skip +" key is pressed on the transmitter keyboard, this keypress will be interpreted as "play/ff/track +" command on the minidisc.

84d1 if the "level -" key is pressed on the transmitter keyboard, this keypress will be interpreted as "volume -" command on the minidisc.

0451 if the "level +" key is pressed on the transmitter keyboard, this keypress will be interpreted as "volume +" command on the minidisc.

e2b7 if the "repeat" key is pressed on the transmitter keyboard, this keypress will be interpreted as "mode" command on the minidisc.

6237 if the "m.scan" key is pressed on the transmitter keyboard, this keypress will be interpreted as "rec" command on the minidisc.

the infrared string (header followed by the 48 data bits and the stop bit) are continously repeated until the key is released. the delay between two strings is about 80 milliseconds.

Notes about Sony MD walkman interfacing:

The cable remote controller sends commands to the MD by shorting pins 2 and 4 of the 4-pin plug with different resistor values. Here's a table (taken from Leon Woestenberg MD hacking page and Andy James MD hacking page) describing the commands recognised by the Sony MD walkman and their resistor values:

resistor value [ohm]
rew/track -
play/ff/track +
volume -
volume +
track mark
test mode(*)
Depending on which remote transmitter you are using, not all of these commands may be issued by the infrared remote transmitter. For example, since the Technics SL-XP505 portable CD player remote control transmitter has only 8 keys and the total number of MD commands is 11, I choose the commands I think most useful (use display command to change infos on lcd when you are away from the MD walkman is useless, the same for test mode command). So, if you use the Technics SL-XP505 portable CD player remote control transmitter, you can't issue the commands track mark, display and test mode to the MD walkman.

(*): using test mode command not properly may cause malfunctions to your MD walkman, so, use it at your own risk!
the commands are issued to the unit by the 4-pin plug. although the photo isn't clear, you can see 4 pins (numbered from 1 to 4, from left to right) in the reptangular socket near the phones plug (Sony MZ-R50): pins 1 and 3 are used to send data to the lcd on the cable remote controller, pins 2 and 4 are used for our pourpose.

Detailed parts description:

As infrared receiver I used the Sharp GP1U281Q part. It's similar to most famous parts like Sharp IS1U60 and Siemens SFH506 but this 3-pin receiver has an external metal shield (it must be connected to ground) which reduces electromagnetic noise. If you want to learn more about this part, please read the Sharp GP1U281Q data sheet from here or get it from the Sharp electronics web site. The microcontroller is the world's famous PIC16F84, from Microchip. It's a 18-pin flash programmable microcontroller, if you want to know more about this part, please get the PIC16F84 data sheet from this place or get it from the Microchip web site. I used the 4MHz version of this part (PIC16F84-04) because it's cheaper than the 10MHz version and the clock speed isn't critical for this application. Obviously a 10MHz version of the PIC (PIC16F84-10) will also work, you only must be careful to use always a 4MHz crystal oscillator. The digital potentiometer is a Dallas Semiconductor DS1803-050 part. It has two independent digital potentiometers inside of it and only one will be used: I haven't found a better part which meets the needed specifications. Be careful to use only the -050 version: this number is the value (in kohm) of the built-in resistor ladder (there are also the 10kohm and 100kohm versions). You can get the Dallas Semiconductor DS1803 data sheet from here or from Dallas Semiconductor web site. The last part is a MAX323 part, from Maxim. It is a dual spst analog switch. Also for this part, only one of two available switches is used. You can get the MAX323 data sheet from this site or from Maxim web site.

Back to top of this page



In this section you'll find all the downloadable files needed to build the circuit. Some links are repeated in other sections, but here you can find all of them:

If you can't read .zip files, you can get a free copy of

If there is no program installed on your PC that supports .pdf files (Adobe's Portable Document Format), you can download a free copy of
Acrobat Reader.

If your PC doesn't support .ps and .eps files (PostScript and Encapsulated PostScript), you can download a free copy of
Ghostscript and GSview.

Back to top of this page




All the links encountered in this page are reassumed in this section:

You can find lots of microcontroller projects, docs and links on Alberto Ricci Bitti's home pages! Great site! Try it at
The MiniDisc community portal:
Microchip web site:
Steve Marchant's PIC16C84 programmer page:
How to obtain the 4-pin connector plug: read the hardware section
Björn Rhoads (Gahm)'s rem34bg program page:
LIRC (Linux Infrared Remote Control) page:
Leon Woestenberg MD hacking page:
Andy James MD hacking page:
Sharp electronics web site:
Dallas Semiconductor web page:
Maxim web site:

Did you enjoy this site? Do you wish to view other interesting MD web pages? The first internet resource page about MiniDisc is undoubtedly here you will find any information about the MiniDisc world. You can also find other exciting stuff on MiniDisc by navigating the MiniDisc webring.

Back to top of this page



I wish to thank Eric Woundenberg for linking this site from the great MiniDisc resource page. Thanks to Leon Woestenberg and Andy James for sharing with me their knowledge on Sony MD remote control signals. Thanks also to Steve Marchant for his PIC16C84 parallel port programmer and special thanks to Massimo Veneziano for his support with the PPF84 DOS-based program. Thanks to Maxim's technical support team for helping me with the MAX323 part. Thanks to Dilva and Marco (my english teachers!), Claudio Santori, Giorgio Duca, Andrea Cascia, Fernando Di Benigno and Massimiliano Rosorani (thank you for letting me use your web space!) for all their hints and suggestions while designing this site.

Back to top of this page



All the information regarding this project are provided "as is", without warranty of any kind, either expressed or implied. In no event, Gabriele Bellini shall be liable to you for damages, including any general, special, incidental or consequential damages caused directly or indirectly by the use of the information provided here. No assurance is given that the information provided here is correct. Use it at your own risk.

Back to top of this page


contact me

© 2001-2002 Gabriele Bellini.

This site has been developed and tested for IE5 browser with 800x600 pixels resolution and 24-bit color depth. If you have any questions, comments, ideas, positive or negative feedback on this project, you are welcome to send me an e-mail at the following address:

last update: 07 may 2002

Back to top of this page