project_01a:
|
© 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. |
|
![]() ![]() ![]() |
![]() |
![]() |
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 http://www.minidisc.org)
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: |
|
|
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. |
|
![]() |
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 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. |
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 sony_1.inc 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 minidisc-wolit@tiscalinet.it |
|
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:
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:
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: | ![]() |
A pulse of 400 microseconds followed by a space of 400 microseconds will be interpreted as "0" bit. | ![]() |
A pulse of 400 microseconds followed by a space of 1200 microseconds will be interpreted as "1" bit. | ![]() |
To end the bit sequence a stop bit is used: it's a 400 microseconds pulse. | ![]() |
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:
|
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.
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:
All the links encountered in this page are reassumed in this section:
|
|
I wish to thank Eric Woundenberg for linking this site from www.minidisc.org: 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.
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.
© 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: minidisc-wolit@tiscalinet.it