Ask Hackaday: How On Earth Can A 2004 MP3 Player Read An SDXC Card?

What were you doing in 2004? Can you even remember 2004? Maybe it’s like the old joke about the 1960s, if you can remember it, you weren’t really there, man. Cast your mind back, [Lance Armstrong] was winning the Tour de France, and SpaceShipOne made it into space.

[Gregg Eshelman], wrote to us to say that in 2004 he bought an MP3 player. Ask your parents about them, they were what hipsters used before they had cassette tapes: portable music players that everyone thought were really cool back then, onto which music didn’t come from the Internet but had to be manually loaded from a computer.

Jokes about slightly outdated consumer electronics aside, [Gregg]’s player, a GPX MW3836, turned out to be a really good buy. Not only does it still work, it packs an unexpected bonus, it reads 64Gb SD cards when they are formatted as FAT32. This might not seem like a big deal at a cursory glance, but it’s worth considering a little SD card history.

Back when the GPX was made, the maximum capacity of an SD card was 2Gb, a figure that must have seemed huge when the standard was created, but by the middle of the last decade was starting to look a little cramped. The GPX player is designed to only read these original 2Gb cards. In the years since then there have been a couple of revisions to the standard, SDHC, and SDXC, which have given us the huge cards we are used to today. Many other devices from the 2Gb SD era, made before SDHC and SDXC existed, cannot read the modern cards, yet [Gregg]’s GPX can.

Hackaday’s readership constantly amaze us with the sheer breadth of their knowledge and expertise, so we are sure that among you reading this piece will be experts on SD card standards who can shed some light on this mystery. Why can a player designed for the original SD card standard read the much newer cards when other contemporary ones can not? [Gregg] would love to know, and now our curiosity has been whetted, so would we.

If you think you’ve heard [Gregg]’s name before, it might be for his expertise in resin casting automotive parts.

SD card image: Andreas Frank (CC BY 2.5).

Patents On MP3 Format Due To Expire

MP3 took off in the late 90s as the digital music format. It then proceeded to slaughter the CD, and launch the file sharing revolution as well. It’s a proud format that has roots stretching all the way back to the early 1980s, when the possibility of sending music over ISDN lines was first considered. Now the patents on it are beginning to expire and its licencing program has been terminated.

The MP3 standard was the property of Fraunhofer IIS, and the original licencing model was intended such that encoders would be expensive, and decoders relatively inexpensive. This would allow people to buy software to listen to MP3s cheaply, but the creation of MP3s would be expensive, and thus handled by studios and music labels. This all changed when a high-quality MP3 encoder was leaked to the public, and suddenly it became possible to readily convert your CDs at home into the MP3 format.

One hangover of this ownership of the MP3 standard was that when you installed certain FOSS software, such as Audacity or a Linux distro, you would find that you had to go and do some legwork to find an MP3 codec. That was because it wasn’t worth the legal trouble for the FOSS authors to arrange a workaround, and trading in proprietary software is the antithesis to everything they stand for.

However, now that more of the relevant patents are expiring, you can now expect MP3 support to be baked into more software. It may be more than a little late, with more advanced audio formats beginning to take over, but it’s great to know that Fedora, for one, is starting to include MP3 support with their releases.

If you’d like to read more about the history of the MP3, check out this great article from NPR. Fraunhofer have their own great history site, too. If all this talk of advanced audio formats has gotten you excited, check out this MP3 decoder written for the ESP8266.

[Thanks to Tim Trzepacz for the tip!]

Sansa MP3 Player Runs Doom Unplayably

DOOM, is there anything it won’t run on? Yes. Your front lawn cannot currently play DOOM. Pretty much everything else can though. It’s a testament to the game’s impact on society that it gets ported to virtually every platform with buttons and a graphical screen.

This video shows a Sansa Clip playing DOOM, but it’s only just barely recognizable. The Sansa Clip has a single color screen, with yellow pixels at the top and grey for the rest of the screen. The monochrome display makes things hard to see, so a dithering technique is used to try and make things more visible. Unfortunately it’s not particularly effective, and it’s difficult to make out little more than the gun at the bottom of the screen.

Continue reading “Sansa MP3 Player Runs Doom Unplayably”

MP3 Player And Handheld GPS Is An Odd Combo Work Of Art

We think [Brek Martin] set out to build a handheld GPS and ended up adding an mp3 Player to it. Regardless, it’s beautifully constructed. Hand built circuit boards and even a custom antenna adorn this impressive build.

The core of the build is a 16 bit microcontroller a dsPIC33FJ128GP802 from Microchip. It’s a humble chip to be doing so much. It uses a UBlox NEO-6M positioning module for the location and a custom built QFH antenna built after calculations done with an online calculator for the GPS half. The audio half is based around a VLSI VS1003b decoder chip.

The whole build is done with protoboard. Where the built in traces didn’t suffice enamel and wire wrap wire were carefully routed and soldered in place. There’s a 48pin LQFP package chip soldered dead bug style that’s impressive to behold.  You can see some good pictures in this small gallery below.

Continue reading “MP3 Player And Handheld GPS Is An Odd Combo Work Of Art”

Synchronize Data With Audio From A $2 MP3 Player

Many of the hacks featured here are complex feats of ingenuity that you might expect to have emerged from a space-age laboratory rather than a hacker’s bench. Impressive stuff, but on the other side of the coin the essence of a good hack is often just a simple and elegant way of solving a technical problem using clever lateral thinking.

Take this project from [drtune], he needed to synchronize some lighting to an audio stream from an MP3 player and wanted to store his lighting control on the same SD card as his MP3 file. Sadly his serial-controlled MP3 player module would only play audio data from the card and he couldn’t read a data file from it, so there seemed to be no easy way forward.

His solution was simple: realizing that the module has a stereo DAC but a mono amplifier he encoded the data as an audio FSK stream similar to that used by modems back in the day, and applied it to one channel of his stereo MP3 file. He could then play the music from his first channel and digitize the FSK data on the other before applying it to a software modem to retrieve its information.

There was a small snag though, the MP3 player summed both channels before supplying audio to its amplifier. Not a huge problem to overcome, a bit of detective work in the device datasheet allowed him to identify the resistor network doing the mixing and he removed the component for the data channel.

He’s posted full details of the system in the video below the break, complete with waveforms and gratuitous playback of audio FSK data.

Continue reading “Synchronize Data With Audio From A $2 MP3 Player”

ESP8266 As A Networked MP3 Decoder

Support libraries, good application notes, and worked examples from a manufacturer can really help speed us on our way in making cool stuff with new parts. Espressif Systems has been doing a good job with their ESP8266 product (of course, it doesn’t hurt that the thing makes a sub-$5 IOT device a reality). Only recently, though, have they started publishing completed, complex application examples. This demo, a networked MP3 webradio player, just popped up in Github, written by the man better known to us as Sprite_tm. We can’t wait to see more.

The MP3 decoder itself is a port of the MAD MP3 library, adapted for smaller amounts of SRAM and ported to the ESP8266. With a couple external parts, you can make an internet-connected device that you can point to any Icecast MP3 stream, for instance, and it’ll decode and play the resulting audio.

What external parts, you ask? First is something to do the digital-to-analog conversion. The application, as written, is build for an ES9023 DAC, but basically anything that speaks I2S should be workable with only a little bit of datasheet-poking and head-scratching. Of course, you could get rid of the nice-sounding DAC chip and output 5-bit PWM directly from the ESP8266, but aside from being a nice quick demo, it’s going to sound like crap.

The other suggested external IC is an SPI RAM chip to allow for buffering of the incoming MP3 file. WiFi — and TCP networks in general — being what they are, you’re going to want to buffer the MP3 files to prevent glitching. As with the dedicated DAC, you could get away without it (and there are defines in the “playerconfig.h” file to do so) but you’ll probably regret it.

In sum, an ESP8266 chip, a cheap I2S DAC, and some external RAM and you’ve got a webradio player. OK, maybe we’d also add an amplifier chip, power supply, and a speaker. Hmmm…. and a display? Or leave it all configurable over WiFi? Point is, it’s a great worked code example, and a neat DIY device to show your friends.

The downsides? So far, only the mono version of the libMAD decoder / synth has been ported over to ESP8266. The github link is begging for a pull request, the unported code is just sitting there, and we think that someone should take up the task.

Other Resources

In our search for other code examples for the ESP8266, we stumbled on three repositories that appear to be official Espressif repositories on Github: espressif, EspressifSystems, and EspressifApp (for mobile apps that connect to the ESP8266). The official “Low Power Voltage Measurement” example looks like a great place to start, and it uses the current version of the SDK and toolchain.

There’s also an active forum, with their own community Github repository, with a few “Hello World” examples and a nice walkthrough of the toolchain.

And of course, we’ve reported on a few in the past. This application keeps track of battery levels, for instance. If you’ve got the time, have a look at all the posts tagged ESP8266 here on Hackaday.

You couldn’t possibly want more resources for getting started with your ESP8266 project. Oh wait, you want Arduino IDE support?

Thanks [Sprite_tm] for the tip.

The Four Thousand Dollar MP3 Player

[Pat]’s friend got a Pono for Christmas, a digital audio player that prides itself on having the highest fidelity of any music player. It’s a digital audio device designed in hand with [Neil Young], a device that had a six million dollar Kickstarter, and is probably the highest-spec audio device that will be released for the foreseeable future.

The Pono is an interesting device. Where CDs have 16-bit, 44.1 kHz audio, the Pono can play modern lossless formats – up to 24-bit, 192 kHz audio. There will undoubtedly be audiophiles arguing over the merits of higher sampling rates and more bits, but there is one way to make all those arguments moot: building an MP3 player out of an oscilloscope.

Digital audio players are limited by the consumer market; there’s no economical way to put gigasamples per second into a device that will ultimately sell for a few thousand dollars. Oscilloscopes are not built for the consumer market, though, and the ADCs and DACs in a medium-range scope will always be above what a simple audio player can manage.

[Pat] figured the Tektronicx MDO3000 series scope sitting on his bench would be a great way to capture and play music and extremely high bit rates. He recorded a song to memory at a ‘lazy’ 1 Megasample per second through analog channel one. From there, a press of the button made this sample ready for playback (into a cheap, battery-powered speaker, of course).

Of course this entire experiment means nothing. the FLAC format can only handle a sampling rate of up to 655 kilosamples per second. While digital audio formats could theoretically record up to 2.5 Gigasamples per second, the question of ‘why’ would inevitably enter into the minds of audio engineers and anyone with an ounce of sense. Short of recording music from the master tapes or another analog source directly into an oscilloscope, there’s no way to obtain music at this high of a bit rate. It’s just a dumb demonstration, but it is the most expensive MP3 player you can buy.