Wednesday, 24 July 2019

Starting on a Quest to Building a Music Player

Hi All!

I've recently gotten into the swing of libre software/hardware projects, and so am interested in designing a music player capable of playing ogg vorbis format music.

This is the rough set of requirements:
-Portable (roughly size of a smartphone/PDA, realistically smaller since it's not going to have much hardware other than audio)
-Capable of output sound to a 3.5mm jack (with a small stereo amplifier).
-Capable of Bluetooth A2DP for comparable sound quality to wired. This is important for me as I have a pair of wireless speakers.
-Play audio files from a micro SD card. Keeps design simple and reduces size.
-Play large audio files (100s of MB) to allow listening to podcasts.
-Main audio format to be Ogg Vorbis because the specification is free and available (https://xiph.org/vorbis/doc/). However, given the components I'll be using, other formats (WAV, MP3 etc.) will be usable too. Additional formats will be a stretch goal.
-Custom shuffle functions. I don't like when my devices recommend a song I already played during the same day. Perhaps having a list on the SD card that shows what I listened to today and not adding anything in that list to the shuffle queue?
-Use on of my existing development boards as a prototype. Contenders are: Raspberry Pi 3 Model B, CHIP, STM32F0 Discovery, ESP32 WROOM 32. I decided against using Arduino based boards so that I got more experience with C programming and to reduce  memory overhead.
-Physical buttons for controlling volume, play/stop, next, previous, perhaps some additional functions. For the prototype I'll use my existing protoboard keypad with 14 buttons available.
-Small display for showing current song, shuffle settings, directory etc. For prototyping I have an I2C OLED display with a 0.96 inch diagonal and 128x64 resolution. Should more than enough for testing.
-At least initially, I will reuse parts that I already have (Li-On charger IC, passives etc.) to cut down on prototyping cost.
-Minimise power consumption by using interrupts, turning off unnecessary gpio, reducing clock frequencies etc. This will be more relevant once I figure out the final set of hardware after prototyping. This is also where Arduino, and Linux based solutions may be unsuitable as they have a lot of overhead.
-(?) Anything else that I may deem fun or interesting to play with, since it is my device after all!

Once this device gets closer to finalisation, I will aim to use parts that are:
1. Readily available.
2. Have datasheets and all bootloader information available.
3. Will be produced for a long time.
I'll approach the design from a modular perspective, to allow parts to be replaced with minimum hassle if any parts from my original BOM go out of production etc. In addition I'll include debugging pins and ways of bypassing sections (such as the audio amplifier, bluetooth chip etc.) to allow straightforward replacement of sub-systems.

No comments:

Post a Comment