BookPC MP3 Player, continued

Choices and Challenges:
The BKi810 motherboard is small and has great sound onboard. Fast ethernet is nice for updating the music and system, I have a 100 foot cable I drag outside and plug in (wireless would be nice but it’s not in the budget at this time). The motherboard requires no negative voltages, only +12 and +5 volts. The +5 is very low current, it only powers a small amount of the board. The motherboard has a DC-DC converter so the real power requirement is a clean 12 volts at a few amps and +5 volts at 50 milliamps.
The wired remote control is more of a challenge. My previous car MP3 player used a serial port for the remote. This BKi810 motherboard has no serial ports! I used the MIDI port. MIDI is a 31250 baud asynchronous serial protocol very much like RS-232, with the differences being mostly electrical. The real problem was with the operating system. I didn’t want to write my own drivers, and it seems that the use of any kind of hardware is always poorly documented. Drivers for the MIDI port are part of the sound package. I installed SuSE Linux 7.3 and found the ALSA driver for my chipset did not support the MIDI UART. Rather than install OSS sound drivers, I elected to switch Linux distributions. Red Hat Linux uses OSS sound drivers, and I installed Red Hat 7.2 and managed to get the MIDI UART to work. Raw MIDI is supposed to work as a regular serial port, but it doesn’t. The “spells” involved in doing non-blocking I/O took a bit of experimentation and I have it working. The program I wrote is in Perl.
My previous system had a remote based on my lcdterm project, but 31250 baud was too high for it. This remote control has a backlit intelligent LCD display, a PIC microcontroller, and not much else. I switched to a PIC16F628 micro because it has a hardware UART and the baud rate was no problem. It also has a PWM output which I used for controlling backlight brightness.

Power Supply:
The power supply accepts 8 to 16 volts and produces 12 volts. The topology is SEPIC (single-ended primary inductance converter), the advantage being the ability to convert up or down with a minimum of parts and maximum efficiency. The system draws about 1.7 amps while playing, but the power supply is good for about 8 amps output and can power the system while starting the car. There is a linear 5 volt regulator running continuously to power the remote control, this 5 volts is also fed to a transistor and then to the motherboard’s 5 volt input, switched by the main power.

click for a high resolution schematic

SEPIC topology uses two inductors, but if you couple them your efficiency goes up. Don’t go calling it a transformer, though :) I used an RM10 core, I don’t know the exact material. It is wound in bifilar fashion. I used a bit of sticky label to add a gap between the two halves, and put a spot of epoxy in it to keep it from making noise, see the lower picture for the epoxy shot. RM is a generic classification for this type of ferrite core, and 10 is the size. If you can’t find one, you can use a clamshell open core such as sold by RadioShack for reducing interference. It will look completely different but work just as well. Remember to add the sticky-label gap and glue it with epoxy.

The UC3843 chip is very common and made by many manufacturers using slightly different numbering systems. It comes in an 8 pin DIP package, but I only had 14 pin SOP versions so I used a DIP header and hacked it in. Three type of protection are incorporated in the design. First is a 6 amp Polyswitch fuse, it is self-resetting, and also protects against high temperatures. Next is an 18 volt surge absorber. Finally, the circuit has current limiting using a method I invented that limits based on saturation voltage of the main switching transistor. No current sense resistors are needed. The value of the big electrolytic capacitors is not critical but they must be rated for high frequencies.

Wired Remote Control:

click for a high resolution schematic

Only four buttons control the unit, each button does something different if held for more than a second. The remote is in charge of the power supply of the main unit. It has a sense lead from the car stereo remote wire, and powers up the computer when the car stereo is on. Computers do not like to have the power turned off unceremoniously, the remote understands. Time is allowed to boot, and the remote waits until the system is halted before powering off (unless it crashes, in which case it will eventually kill the power). I found the BKi810 motherboard standby signal to be a little non-standard when not used with its intended power switch, and it must not be loaded. Here’s where the standby signal is located on the motherboard:

I soldered directly to the bottom of the motherboard for the power and MIDI connections. Here is a diagram showing how I wired the remote and power connectors:

Wired remote control source code rmot3mdi.c version 0.3
Binary version ready to download into a PIC16F628 chip rmot3mdi.hex
Main program version 0.1

A functional Linux system with Perl installed.
MPG123 patch level “r” or higher.
Sound and MIDI drivers installed.

You’ll need to edit to suit your system. It requires at least one playlist, and a list of available playlists, and expects to see them in /home/bob. Playlists are just like Winamp or XMMS .m3u files, one line per song with full path, such as:
You can automatically create a playlist of all your tunes as simply as:
find /music | grep \.mp3 | sort > all.m3u
You need to start the program when the system boots, so put something like
“perl /home/bob/ &” in your /etc/rc.d/rc.local file.

The hardware design and software are covered under the GNU General Public License.


Previous page...


[Home] [Services] [TechRef] [Weekend] [Legal] [Contact]



Copyright © 1995-2002 Bob Blick. All Rights Reserved.
Designated trademarks and brands are the property of their respective owners.