Another MP3 player?


Objectives:

-Produce a specification for a car mp3 player that's cheaper to build that any other
-Make use of second-hand parts when available wthout relying on them.
-Rock solid design, with no mickey-mouse kludges.

Note: There's a distinct UK bias to the project, but I hope others will find it useful, and at least go away with some ideas!


Required Parts

These are the required parts. It's possible to get a working system that plays music with these.

Component Supplier Part name Part number Quantity Approximate cost per
item (ex VAT)
RAM Scan Computers 32MB ? 1 £19.00
M/board Sinoco Jetway 530 BF ? 1 £50.00
Hard disk Scan Computers Suggest 8GB+ ? 1 £60.00
Processor Scan Computers Cyrix 686-233 ? 1 £20.00
Cooling Scan Computers Standard Heatsink & fan ? 2 £5.00
PSU Amplicon 10-30v IP PSU +12,-15,+5 PD65-31L-65W 1 £45.00
PSU Farnell -5v regulator LM7905 1 £0.80
Enclosure Maplin Aluminium case KR57M 1 £9.91
Power connector Farnell NC3MP panel mounting plug 308791 1 £1.86
Power connector Farnell NC3FX in-line socket 308778 1 £2.40
Audio connector (L) Farnell Phono socket, black 152047 1 £1.76
Audio connector (R) Farnell Phono socket, red ? 1 £1.76
Serial connectors Farnell Locking 3-pin DIN plug 308882 2 £1.52
Serial connectors Farnell Locking 3-pin DIN socket 308948 2 £0.98
Keyboard extensino Farnell 5-pin DIN plug, insulated 309102 1 £0.40
Keyboard extension Farnell 5-pin DIN socket 309217 1 £0.39
Misc. Cabling Sinoco AT PSU ? 1 £8.00
Keyboard Sinoco AT keyboard (or controller) ? 1 £10.00
Keypad Maplin 4x3 keypad ? 1 £6.00
TOTAL . . . . £244.78

Motherboard

This was certainly the toughest choice to make.

- To have any hope of getting all the supply voltages I needed an AT board
- If I wanted to keep a small form-factor for the case I had to have on-board sound and video, ie no expansion cards at all
- In order to run Linux the sound hardware must be supported.

The Jetway 530BF was the only board at the time that fitted the bill, but there may now be others. Linux supports the ESS Solo-1 chipset natively. Certain sound cards on other M/boards (eg PC-Chips) will work if you first boot them into DOS and run the Sound Blaster Emulation sofware, then boot into Linux but this is not always the case, so don't be fooled into thinking Sound Blaster emulation will work on anything other than DOS, at least with any kind of quality.

Hard disk

This is up to you really. If you're unhappy about vibrations in the car go for a 2 1/2 inch drive since they have better shock-proofing. In practise the shock-absorbers take most of the knocks and a normal hard disk is fine (unless you're going stock-car racing :-)). Try to find a hard disk with a low power consumption and low accoustic noise. They do vary quite a bit.

Processor

Anything over a 233MHz Pentium will do nicely. I'm not sure you can get anything less than this since they don't sell slower processors any more except in embedded SBCs (single board computers). It's worth down-clocking if possible to lower power consumption. In theory you can decode an mp3 on a P-90.

Enclosure

There are plenty of nice cases around, RS Components do some very attractive looking ones, but since cost was an issue I plumbed for one of the aluminium ones from Maplin. NOTE: It's amazing how much easier you find assembling something where the components are laid out in a plane. I've tried the 'other way' in an earlier attempt at this project: bolting half the components to the lib of the box and then wrestling with cables to close it down, and praying that none of the ventilation paths would be blocked.

Cooling

The motherboard gets cooled from a standard CPU fan, except this one is sucking air in directly from vent holes in the case cover, increasing its efficiency dramatically over the setup in a standard PC where it just circulates air round the box. Be very careful with the choice of heatsink/fan combination since there is very little space between the fan and the box lid. In the picture above I had to modify the heatsink to lower the position of the fan, then use an epoxy to glue it back in position. It is possible to find heatsink/fan assemblies that will fit unmodified though.

The power supply also needs cooling and this is achieved by the second fan in the picture (situated between the hard disk and the PSU, see pic below). This fan was ripped off a socket 7 heatsink/fan assembly. Note that due to the "PC revolution" this is by far the cheapest way to buy a fan. Don't bother going to an electronics supplier and expecting something cheaper - just buy the assembly and discard the heatsink.

PSU

Again, a difficult decision here. There are any number of ways to obtain +12V, -12V, +5V, -5V from 9-15 Volts none of them particularly easy. If you're going to buld your own you probably want to use one of the buck-boost switching regulator ICs, something which I tried and failed at. These circuits are best at supplying one voltage at high current but not particularly stable with two high-current voltages (eg 5 and 12 volts).

Several companies do self-contained 12volt input AT power supplies but they cost at least £80 which was too pricy. A standard PC supply can be fed with DC 110 volts and will work fine, so one of the possibilities is to use a laptop power supply which you can get from the US for $40, and a normal AT power supply. This is quite bulky though, and possibly hazardous.

In the end I decided on the Amplicon PSU since at £45 it made a good trade-off between cost and ease of use, and gave me +5v, +12v and -12v at the correct current ratings. The only voltage missing was the -5v, which takes so little current I was able to regulate it with a regulator from the -12v rail (no heatsink required).

Connectors

The choice of connectors was fairly arbitrary, but the main power connector had to take 6 amps continuous, and I didn't want it coming out at an inopportune moment so I bought a locking one. Note that if you order from the audio section of an electronics catalogue the prices are low and the current capacities high. The power connector above is designed for speaker cable patching and has a 14 Amp current rating - pretty impressive for the price. The serial connectors are optional, but since the motherboard came with serial ports I thought it far easier to make the holes for them now rather than take the box apart later just because I happened to need a serial port for GPS or whatever.

The keyboard extension is necessary due to the orientation of the m/board. In order to be able to plug in an ethernet card for downloading mp3 files the board has to be this way round but that puts the keyboard connector in an odd place. I prefer to have all connectors along the same side of the box for neatness and accessibility.

Cabling

The easiest way of getting the power connector for the motherboard is from a normal AT PSU. If you can't find one that's broken buy a new one and take it apart anyway - you can get the -5v regulator out of it as well. If you're careful, what's left of the PSU can be used to power the mp3 player when you're uploading mp3s to it in the house

Keyboard/keypad

The PC keyboard will not be used. You just need the controller out of it to convert the keypad output into something the computer can read, and it's convenient to use the keyboard input instead of a serial port. Devices are available that convert keypad keypresses into RS232 output but they tend to cost more than a new keyboard anyway. A broken AT keyboard is perfect for this, which is what I used.

I acquired a 4x4 keypad some time ago (forget where) but Maplin do them for about 7 uk pounds.

If you unscrew the K/B you'll find the controller looks something like the picture on the right. There are two edge connectors of twelve contacts each. I went through all the combinations of key presses by shorting different pins and produced a 12x12 (144 value) table showing all the keys. Some rows in the table were completely unused since there are only 102 keys and 144 possible key values. Since I had a 16 key keypad I needed four contacts from each of the connectors and I chose these such that all the keypad keys corresponded to printable characters (no control codes). This simplifies the software coding. I soldered leads to the pins of the controller chip directly, taking care there were no shorts. Remember that the K/B controller has a hefty 5 volts straight from the PSU running through it. A short to ground may smoke the M/board as well as the PSU. An equivalen 'PC keypad' keyboard will set you back about 50 uk pounds, we've just produced it for 15.

Optional Parts

Component Supplyer part number quantity price
Cassette adapter Comet 1 £19.70 (UK pounds)
FM radio transmitter Radioshack 12-2051 1 $29.00 (US dollars)
FM radio transmitter kit Jameco 1 $29.00 (US dollars)
FM radio transmitter kit Disk Smith Electronics K5004 1 $35.00 (Australian dollars)

Cassette Adapter

This is a device that looks like a cassette with a lead coming out of it. It's the easiest way to get audio into a car stereo lacking a line in. Goodmans supply one as part of a kit to put a CD 'walkman' in a car. It includes the adapter, power lead and flexible arm (more on this later).

Beware of cassette adapters which are not compatible with auto-stop/auto-reverse decks. If unsure look out for the pinch roller (see picture), which should be geared to the motor drive to simulate a real cassette. If this roller is missing, chances are it'll only work in old players.

FM Radio Transmitter

These devices transmit a short-range FM signal to the car radio which (hopefully) doesn't coincide with any radio station. you'll find a similar circuit in many standard boot-mounted CD auto-changers. Not only do they obviate the need for a line-in on the stereo but also minimise cables running the length of the vehicle. They seem to be unavailable in the UK since the CE regulations came into force. I suppose this is due to companies not being prepared to pay for CE approval on such a small, cheap and specialist device. The only option is to purchase from abroad. Using such a device in the UK could well be illegal.
I've looked at two, and neither were particularly satisfactory.

Radio shack

The quality of transmission was poor, the only way to get clear sound was to lay the transmitter antenna beside the radio antenna. The range seems to have been so severely limited that the device is practically useless.

Jameco

This comes as a kit. It's not too hard to put together, and I think I had it working in under an hour. Jameco supply a box for the module but it's not included. The device gave much clearer (though not perfect) sound, and seems to be a workable solution. There are three phono sockets (audio left & right and antenna) that probably need labeling since they look identical. Worth mentioning that at normal line-in levels distortion occurs, so try reducing the output of the audio source if you can't get clear sounnd by adjusting the presets.

Dick Smith Electronics

13/08/00: This kit is the best yet. It works perfectly, even some distance from the receiver. URL: Dick Smith Electronics, P/N K5004. Comes in a kit which includes the box!

Software

Some tips for configuring the car player software

  1. Install Linux (I used Slackware)
  2. Configure X and sound
  3. Compile and Install Xmms
  4. Change the Xmms hotkeys to suit the keypad. This can be achieved by altering the mainwin_general_menu_entries[] construct in xmms/main.c. Recompile and make sure the hotkeys have been added to the menu.
  5. Copy mp3s to your hard disk, then create a playlist with a command like "find / -name \*.mp3 > /root/playlist.m3u".
  6. Modify rc.local or one of the other init scripts to launch X windows on system startup. You can use the xinit command. ie "/usr/X11/bin/xinit /usr/local/bin/xmms -s /root/playlist.m3u". Reboot and check it works.
  7. Change the X resolution to make it run in 320x240 mode. This is an easy way of making sure the mouse always ends up over Xmms, so it gets keyboard focus.
  8. Remove the filing system checks from /etc/rc.d/rc.S, just make sure you leave the "mount -w -o remount" in there or your system won't work properly. Modify /etc/fstab so any partitions are mounted with the sync option (sync,rw) - this will reduce the chances of filing system corruption.
  9. Remove all unneccessary daemons (syslogd, kswapd etc...) from the init scripts.
  10. All done!

Simon Harrison 22 June 2000