Music Status Player
Have you ever wished you could control your music without constantly switching windows or fumbling with keyboard shortcuts that don’t even work half the time??
This project aims to solve all these problems with a live desktop Status Player! It’s a simple, affordable and compact tool that gives you direct control over your music.
It has an Arduino Nano and an OLED display with three control buttons, and a rotary encoder, all built inside of an aesthetic 3D printed case! With it, you can easily see your song name and artist at a glance, and with just a press or a twist, you can fully control your music, such as skipping, pausing, rewinding or even changing the volume!
The tool acts like a bridge between your PC and your workspace since it sends commands from the Arduino over USB through serial. It’s then picked up by a Python script that controls the actual media on your computer! This makes it super versatile and allows for extensive control and modding. The final result is a vital but out-of-the-way tool that fits perfectly on any tabletop.
Supplies
I wanted to make this status player small but also affordable, so anybody could make it. The entire cost for this project (excluding tools and filament) was only around ~10$!
Here’s what you’ll need:
- 1 Arduino Nano
- 1 SSD1306 OLED Display
- 3 Momentary Push Buttons (for rewind, pause/play, skip)
- 1 Rotary Encoder with a built-in Push Button
- 1 PCB Prototype board
- Female Header Pins
- Jumper Wires
- Hot Glue
- M2x8(mm) screws
- 3D Printed Case + Backplate + Buttons + Knob
As for the tools you’ll need:
- Soldering iron & solder
- Screwdriver
- Wire cutters/strippers
- 3D printer
- Filament (I used PLA)
3D Printing Everything
The first step in this project is to print out all the models. There are 4 main parts.
- The Enclosure that holds all the components inside
- The Backplate, which covers everything up and seals the enclosure
- The Buttons that go in the enclosure’s designated hole to make it more aesthetically pleasing
- And the Knob cover to complete the aesthetic!
When printing the parts, I would recommend the following settings:
- Layer height: 0.2 mm
- Infill: 20% is enough for strength
- Supports: None, I designed the models for support-free printing!
- Orientation: Print the enclosure flat on its face
I also used PLA filament since it’s easy to work with, but you can use any other material, such as PETG, etc.
Soldering Up the PCB
Now we’ll begin with the actual components for the tool. Originally, I had decided to wire everything up manually, but I realised that using a prototype PCB board would make the whole setup easier. I’ve attached multiple photos of my PCB and a schematic photo of the circuit, which will make it quite easy to follow!
To start, first place the three push buttons onto the PCB near the bottom left. One pin from each button should be soldered together since it will be the ground pin.
After that, you’ll need to solder the rotary encoder to the PCB.
First, place it on the PCB, making sure it’s above the middle button and with the two pins side facing towards it. The encoder module will have a total of 5 pins, with 2 of them located on the opposite side. These pins are for the built-in button and will similarly require one of the pins to be soldered to the common ground.
On the other side, there will be 3 pins (for the encoder itself). You’ll need to solder jumper wires onto the right and left pins while connecting the middle pin to the ground!
Finally, you’ll need to solder on a 4-pin female header onto the board. This will allow the OLED display to connect and interface with the Arduino! You can wire the GND header from the OLED to other ground pins on the buttons since they share a common ground.
For the other 3 pins on the header, solder jumper wires onto them individually.
At this point, your PCB should have all the components mounted. From here, make sure to use a multimeter to test each connection and ensure there are no shorts apart from the ground pins.
Assembling the Case
Next, we can give our status player a body!
- First, place the 3D printed buttons into the front panel cutouts of the 3D printed enclosure. Make sure the little tabs are all aligned so that the buttons don’t end up spinning or falling out.
- Now, insert the PCB board from behind the panel, aligning the buttons and the encoder with their openings.
- Once that’s done, carefully screw the PCB into the shell using 3 M2x8 screws through the mounting holes!
- Now the front of the case should show the three buttons and the slot for the rotary knob.
Wiring Up
With the PCB mounted, it’s time to connect everything to the Arduino Nano.
I’ve attached a schematic of the circuit in this step as well as multiple photos of my setup!
Here’s also a written-out version of it:
Buttons -> Arduino
- Skip Button > Pin 4
- Pause/Play Button > Pin 7
- Rewind Button > Pin 6
- Ground > GND
Rotary Encoder -> Arduino
- CLK (Outer pin) > Pin 3
- GND (Middle pin) > GND
- DT (The other outer pin) > Pin 2
- Rotary Button > Pin 5
OLED Display -> Arduino
- SDA > A4
- SCL > A5
- VCC > 5V+
- GND > GND
As you can see from the diagrams, the circuit is quite simple!
Mounting the Arduino
Now that we’ve wired everything up, it's time to install the Arduino inside the case.
- First, position the Arduino Nano inside the case with its USB-C port aligned to the enclosure’s cutout.
- Then, fix it in place using hot glue. Make sure the port remains accessible for programming and power!
Sealing the Enclosure
Now for the finishing touches!
- Place the backplate onto the case and screw it in using four M2x8mm screws!
- Then finally, push the rotary knob cover onto the encoder shaft to complete the look!
Your status player should now look like an actual, complete product!
Uploading the Arduino Code
Now it’s time to finally upload our code!
First, download the sketch at the bottom of the step, and open it up in Arduino IDE.
Before we can upload it, however, we need to make sure that we’ve installed the required Arduino libraries. These libraries handle the OLED display and graphics rendering.
To install these libraries in the Arduino IDE,
First, open the Arduino IDE.
Then go to Sketch > Include Library > Manage Libraries….
Search for and install:
- Adafruit GFX Library
- Adafruit SSD1306 Library
Once they’ve installed, plug your Arduino Nano into your PC via USB-C.
Then, in the Arduino IDE, select the Arduino Nano board and the correct COM port.
Finally, hit upload and you’ll be done!
Now your Nano should be able to handle button presses, the rotary encoder, and updating the OLED display.
Downloads
Setting Up the Python Script
Now we need to set up the Python script. The Python side acts like a bridge between the Arduino and Windows itself. Make sure you download it from the step and place it into an empty folder.
Once you’ve done that, first head into that blank folder and create a virtual environment in PowerShell with:
Then activate the virtual environment with:
Now we can begin installing the required libraries. With your virtual environment active, install them via:
Once everything is installed, simply run:
to verify that everything is installed and it works.
Downloads
Enjoy!
And that’s it!
Your Status Player should now be complete!
To use it, connect your Arduino Nano via USB. Then run the Python script and wait around 5 seconds for it to sync up. Then open your favourite app like Spotify, YouTube, or anything else and play something.
It should then appear on the display, and you’ll be granted full control over it, such as rewinding, pausing, skipping and adjusting volume!
I found this project extremely useful since I no longer had to change tabs or fiddle with keybinds whenever a song I didn’t like came up; all I had to do was press a physical button!
I hope you enjoyed building this project and that it finds a permanent place on your desk.
Happy making!