Programmable MP3-player

Skip to main content (skip navigation menu)
Letterhead logo

This product is made in the EU

Programmable MP3-player for scale models, broadcast systems and special applications


For use in scale models, consoles, shopping malls (background music) and kiosk applications, we designed a solid-state MP3 player with a programmable "control" and an interface to external electronics. The H0420 MP3 player produces high quality audio, that it streams from a CompactFlash disk (types 1 and 2). As mentioned, the H0420 optionally interfaces to external electronics, which can range from a mere few switches and/or LEDs, to a slave microcontroller that communicates with the MP3 player through a parallel or serial bus. Connecting the player to a PC or other peripheral, via RS232 or an Ethernet LAN, is another option. The functionality of the control logic on the MP3 player is fully scriptable (read programmable) in the pawn language.

Order button
Alternatively, use our printable order form (PDF).

For quotation requests or technical information, please contact us by e-mail. To visit us, see the address information page.

The latest firmware revision is version 1.10, build 4613, including pawn development tools. For details, see the firmware update description.

RoHS compliant (lead-free) Comforming to the ESD/EMC regulations of the European Union

Photo of the H0420 controller


Latest firmware and development environment

The most recent firmware update for the H0420 programmable MP3 controller/player is version 1.10, build 4613. You may wish to install this update if you purchased your H0420 MP3 player before 12 December 2011. Devices purchased after that date already contain this latest firmware release. The most recent version of the pawn development environment is also installed with this download.


The feature list below comes directly from the data sheet of the product (2009-09-04). For more information, see the product brochure and the order form, as well as the references at the bottom of this page.

Typical use of the H0420 is inside an object or apparatus where high quality audio is needed in a small and robust package. Due to its temperature range, the H0420 is suitable for outside use. As it is low energy and produces little warmth itself, it requires no ventilation. Being solid-state, it can be operational in moving or mobile objects. The player is easily embeddable in other apparatus through industry-standard electronic interfaces.

Zebra-speler for language training
Zebra-speler for language training
Aluminium enclosure, suitable for DIN-rail mounting
Aluminium enclosure, suitable for DIN-rail mounting
ABS enclosure with LCD and integrated power supply (mains)
ABS enclosure with LCD and integrated power supply (mains)

There are diverse enclosures the H0420 MP3 controller/player, from custom-design to a few standard enclosures. The picture at the top left is a custom enclosure for an MP3 controller with a bar-code wand scanner, (rechargeable) battery power and an internal audio amplifier. The picture at the top right is a standard aluminium box with an optional clip for DIN-rail mounting.

Click on the pictures for a detailed view.

The H0420 is scriptable, which implies that it is fully configurable. It can respond on various inputs: switches, digital I/O, RS232. Similarly, it can drive various outputs: an LCD, LEDs, opto-couplers, or equipment branched onto the RS232 or the digital I/O bus. Audio fragments may be selected based on various criteria that you put in the script. You can abort sound that is playing, or glue together various fragments. You may also synchronize the audio to the external events based on an internal high-precision timer.

The pawn "embedded scripting language" on which the MP3 controller is based, is a quick and small language whose basics can be learned in a few days —or a few hours if you already know C/C++. The language has the event-driven programming model built-in and through the direct support for events, the pawn simplifies the construction of reactive/interactive systems.

ID3 logo

The MP3 controller parses the ID3 tag (version 2) in the MP3 file, if present. An ID3 tag is an attachment to an audio file (typically prepended) that contains additional relevant information about the audio file. Version 1 provided only a fixed set of fields (and with a fixed size). In version 2, each ID3 tag holds one or more variable-length chunks of information, called frames. Every frame holds a particular item: the title, the album name, the artist and/or band, the composer, the lyrics, the preferred volume and tone presets, etc.

One particularly interesting feature of an ID3 tag is the ability to store music-synchronized lyrics. This was originally implemented for karaoke, but the MP3 controller can use it for general purpose synchronized activity: the text string that is attached to a time code or synchronization point is not necessarily a part of the lyrics, it may also be a "cue" that triggers an action in the pawn script. See the application notes for an on-line article describing this feature.

With many MP3 players the audio fragments must be downloaded via a cable to a PC (e.g. USB). In information centres and kiosk applications, this is often inconvenient: the player is mounted inside an apparatus that is immobile and the maximum length of an USB cable is rather short. In our design, the audio files are stored on a CompactFlash card. This way, changing the audio fragments is a simple and quick procedure of replacing the CompactFlash card. With a cheap card reader (connected to a PC), one can store the audio on the card. Up/downloading via a cable is still possible, via RS232 or by connecting the MP3 player to the network and/or internet with an extension board.

In some applications, you may wish to protect the audio content from being copied off the CompactFlash card onto notebooks, PCs or retail MP3 players. The H0420 offers protection by allowing you to encrypt the MP3 tracks with a strong encryption algorithm, using a 128-bit key. The key is embedded in the firmware of the H0420, and the firmware is "read-protected" itself. In other words, the key is never transferred to the H0420 and it is not stored at any location that is accessible from the outside. A customer can request a unique 128-bit key upon ordering the H0420, and optionally enhance this with an additional password that the customer chooses him-/herself. Please contact us to register a unique customer key, or to get more information on this application.

FileLink, data-transfer 'Quincy', for building scripts
The CD-ROM that comes with the H0420 contains several applications and software tools for configuration, programming and controlling the MP3 player/controller. The two (miniature) screen grabs above are of "FileLink", a utility for file transfer over a serial cable, and the programmer's IDE for pawn called "Quincy".

Click on the pictures for a detailed view.


Due to its programmability, the H0420 is a flexible fit in many designs. Below are a few examples, but this list is by no means exhaustive (see also the application notes at the end of this paper for more ideas).

Picture of the MP3 player inside a radio Picture of the MP3 player inside a radio
Putting the H0420 MP3 controller inside a standard car radio (in place of the tape casette unit) proved to be a perfect example of the extent in which the MP3 controller is configurable and adaptable. The MP3 controller responds to the very same buttons as the radio, which is still fully functional, intercepting the commands that were originally sent to the casette drive. When a track has supplemental information in an ID3 tag, the MP3 controller shows this information on the radio LCD (with horizontal scrolling). The MP3 controller connects to the LCD through an I2C bus.

Click on the pictures for a detailed view.

A predecessor of the H0420 MP3 controller (the model H0410), runs in four "objects" in the exhibition centre "De Hoep" of PWN in the Netherlands. A summary of these objects:

The out-door exhibition centre "Madurodam" uses both the H0410 and the H0420 models. The LEGOLAND park uses MP3 controllers of the type H0420 in a few of its attractions. The amusement park Duinrell uses a customized H0420 model that can record audio (through a microphone) as well as play it back.

The H0420 delivers standard analogue output levels, suitable for a common power amplifier. In several applications in exhibits where the output had to go through a speaker or through a head phone, we combined the MP3 player together with an audio amplifier and a power supply (mains) in a single case.

References & further reading

Product documentation

H0420 order form
Small quantities of the H0420 can be ordered directly using this order form. For larger quantities, please contact us for a quotation.
H0420 brochure
A general brochure of the H0420 MP3 controller/player. (Date: 2009-09-16).
H0420 MP3 Controller - User Guide
This is the booklet that comes with the product and introduces its features and its programming interface.
The datasheet of the H0420 MP3 controller
The datasheet and usage notes, in PDF format. (Date: 2009-09-04).
H0420 MP3 Controller - Programmer's Guide & Reference
The programmer's reference of the H0420, describing all functions and pawn language features available on the MP3 player. (Date: 2011-12-07).
H0415A Amplifier - User Guide
This booklet comes with the 2 × 2.1 Watt audio amplifier that can optionally be stack below the H0420 MP3 controller. (Date: 2008-02-01).
H0415E Ethernet Network Interface - User Guide
The extension board for the Ethernet network interface and TCP/IP stack is described in this guide. This document is for model 1 of the extension board. (Date: 2008-02-28).
H0416E Ethernet Network Interface - User Guide
The extension board for the Ethernet network interface and TCP/IP stack is described in this guide. This document is for model 2 of the extension board. (Date: 2008-02-01).
Ethernet Network Interface - Programmer's Reference
This reference documents all functions for the TCP/IP network interface. This single reference covers both the H0415E and the H0416E extension boards. (Date: 2008-12-18).
CE declaration
The declaration of conformance to the CE norms (EMC, safety en RoHS) as a multilingual document.
pawn: embedded scripting language
The pawn scripting language is fully described at its own page.

Application notes

Programming the MP3 controller/player: getting started
This article steps through the creation of a very simple program, from the installation and configuration of the tools to the evaluation of the result.
Playing tracks sequentially
A sequel to the above tutorial, in which we develop a script that plays MP3 tracks one after another (and in a random order).
Track and artist separation
When selecting the tracks to play at random, you will often want a form of track separation or, better yet, artist separation, so that the same track (or one of the same artist) does not play too quickly again. This article discusses how to implement track separation and artist separation.
Synchronizing activities with music
An ID3 tag in an MP3 track may optionally contain text or commands with time stamps. These time stamps allow the text or the commands to be synchronized with the music. The H0420 supports this extension, and the article gives a complete example implementation.
Gapless looping MP3 tracks
Due to the file format and the algorithm of MP3 tracks, creating a loop without a gap or click is a little involved, especially when using a hardware player. The H0420 and Starling MP3 controllers can play gapless MP3 audio loops, provided that special software has processed the MP3 track.
    Example tracks & processing software are available from this site, as well as a detailed presentation of how it works.
A remote-controlled MP3 player
Adding functionality to manipulate the H0420 with a common remote control only takes the IR-receiver chip and a pull-up resistor, plus a script that interprets the codes sent by the remote control. This article goes into details and provides a general purpose script for RC5 codes (other infrared protocols are supported by modifying the script).
Connecting a bar-code wand to the MP3 controller/player
The H0420 MP3 controller supports a low-cost bar-code wand directly on its I/O pins (only a pull-up resistors sometimes needs to be added). This article describes the connections and presents a script that decodes the "interleaved 2 of 5" bar-code symbology.
Synchronizing time with DCF77
This article describes how to synchronize the internal real-time clock of the H0420 MP3 controller on the time signal emitted by the atom clock on the DCF77 transmitter.
    Most recent update: The article also discusses the MSF60 transmitter (in Great Britain) and protocol.
Encrypted MP3 tracks
The H0420 MP3 controller is able to play encrypted MP3 tracks directly (without needing an intermediate decryption phase, and so without start-up delay). This article discusses the software and the operations necessary to create MP3 tracks with strong encryption (and how to play them back).
A MIDI to RS232 converter
The MIDI protocol is a serial data communications protocol using on a "current loop" physical layer, and using a Baud rate of 31250 bps. This article shows the electronics needed to convert between current loop and the RS232 signal levels. The circuit can be connected directly to the RS232 port of the H0420 MP3 player. In the second part, the article covers the "software protocol" of MIDI and develops a simple script to send and receive MIDI commands.
Power-outputs for the H0420 programmable MP3 controller/player
The programmable MP3 player has digital I/O pins with TTL-level output. This note describes how you can get more power (and/or a higher output voltage) from the I/O pins.
A voltage inverter circuit
The H0420 directly supports LCDs with a HD44780 controller and a positive LC-driving voltage. With the voltage inverter described here, you can also attach LCDs that need a negative LC-driving voltage.
H0420 Internals
The internals of the H0420 are briefly touched upon in this on-line article. The notes cover both the hardware and the software ("firmware").
The STA013 MP3 decoder
This paper is a collection of hardware notes on the use of the STA013 MP3 decoder from STMicroelectronics. The paper also contains some notes on the MP3 file format.


ID3 tags
Informal standards, developer information, backgrounders and the history of tagging.