PiPod, a Wearable Music Player.

by kinpro1024 in Circuits > Raspberry Pi

166 Views, 1 Favorites, 0 Comments

PiPod, a Wearable Music Player.

Ghsts.jpg
blckstr.jpg
PiPod_Mk2_2025-Apr-20_11-05-32AM-000_CustomizedView16453294277.jpg
IMG_3469.jpg

This project stems from my love and appreciation for the music I listen to. Music has been an integral part of my life, from going through tough times to celebrating the joys of existence, music has been one of, if not the most constant companion.

However, between the throbbing basslines and screeching vocals, I felt that I have formed a personal connection with the work of some of my favourite artists, and in doing so I have developed a deep appreciation of the entire albums. Consequentially, I have come to adore the Album Art, which I feel is under-appreciated in the digital music streaming era. It was even more evident when I could not find anything remotely similar to the PiPod concept, that put Album Art front and center.

To share my love for said albums and artists as well as try to find people who listen to similar kinds of music (It is quite rare someone else listens to the same indie artist that I listen to sometimes), the concept of PiPod was born.

The name combines "Pi" from Raspberry Pi and "iPod", the well known music player by Apple.


In essence, PiPod is my way to appreciate the artists I listen to, do justice to the gorgeous Album Art and maybe make some new friends along the way.

You are more than welcome to replicate and/or contribute to this project and propagate the love for Music, Album Art and the Artists.


Note for Structuring : This instructable is structured in a way that you can either follow along step by step OR modify the process based on part availability, I have also included the mistakes I made along the way in hopes that you don't repeat the same ones. It can also be viewed for inspiration even if you don't make one yourself as I have documented all the moves, even the wrong ones.

Supplies

FORMAT : "Ordering No. Item (Recommendation) (Note) - Recommended Quantity with Spares"



Electronics

1. USB DAC (I used a UGREEN DAC, get any that looks similar in size and form) - 1 unit
2. 1S Battery Indicator Module (Generic works fine) - 1 unit
3. Raspberry Pi Zero 2 W (Non-Negotiable for this Design Version, i.e. Mk.2) (Either Buy with Pre-Soldered headers or Solder Yourself, it is assumed that a decent capacity MicroSD is also used to set up the Raspberry Pi OS) - 1 unit
4. Waveshare 4in DPI Square Capacitive Screen 720p (Non-Negotiable for this Design Version, i.e. Mk.2) - 1 unit
5. Battery Protection Circuit (Generic Works) (Make sure required specs are met, ideal would be a 3A current draw and load cutoff around 3V) - 1 unit
6. Battery Charge/Boost Module (I used a SEEED STUDIO Li-Po Rider PLUS) (It is ideal to use a 5V 2.5A drain as that is the official recommended power adapter for the Pi Zero 2 W, however real world draw of this setup is close to 1A so anything 1.5A+ should be OK) - 1 unit
7. USB-C Breakout (A normal 6 pin Generic Module will work) - 1 unit
8. Sacrificial USB-C ended cable - 1 unit



Hardware and Passive Components

1. A sliding switch (I used a LilyPad Go) (Make sure the switch you choose supports the Current/Voltage load spec 5V 1.5A) - 1 unit
2. Push Buttons (The ones I used were 5mm*5mm) - 2 units
3. M2.5 10mm screws (The ones I used were hex headed) - At Least 20 units
4. M2.5 6mm screws (The ones I used were hex headed) - At Least 20 units
5. M2 5mm screws (The ones I used were Phillips) - At Least 5 units
6. M2 4mm brass inserts - At Least 5 units
7. M2.5 8mm brass inserts - At Least 10 units
8. 16-20 gauge Solid Core Wire (For the Battery Pack, I used 20AWG) - 1m
9. 20+ gauge stranded or braided wires (Solid core will be a pain to work with for the signals, DuPonts are great for connecting/disconnecting) (Multicolour preferred for sanity preservation purposes) - 20-30 units M/F
10. 2 inch wide Webbing (Nylon or Cotton) (Webbing is hard to work with depending on the material, choose wisely) - 1 meter
11. Dual Cell SMD 18650 Li-ion Holder (Generic works fine) - 2 units
12. 18650 Li-ion cells (Get the highest capacity you can afford 1000mAh ~ 1hr Battery Life) (BE VERY! VERY!!! CAREFUL WHILST HANDLING LITHIUM BATTERIES) - 4 units


Tooling

Access to a 3D Printer (Smaller Build Volumes will work) (180mm*180mm minimum) - 500g filament, at least 100g PETG/ABS for heat generating components.
Any required connectors, on the battery side like PH-A/AW-2mm-2 pin Female Housing Connector, are also nice to have. Otherwise you may directly solder.
Superglue, Gloves, Coarse and Medium Grit Sandpaper, Pliers, Wire Strippers, Soldering Iron, Solder Wire, Flux, Tape, Calipers, Measuring Implements, Multimeter, Screwdrivers, Allen Keys, Tweezers, Keyboard, Mouse, Safety Glasses, Slicing Computer, and PATIENCE. Such basic/implied tools are assumed present in your work area.

Designing the Case

IMG_5409.jpg
IMG_6297.jpg
IMG_5786.jpg
IMG_5408.jpg
IMG_5138.jpg
IMG_5130.jpg
IMG_5580.jpg
IMG_5782.jpg
IMG_5785.jpg
IMG_6113.jpg
IMG_6117.jpg

This step is not necessary if you simply wish to follow instructions and build the PiPod. However I strongly recommend going through this, if you wish to make changes to the case, or are curious as to what hurdles and challenges I faced when building this.


Being a Mechanical Engineering Student, this is where I spent the most amount of time. Which is why I have a lot to say before we even start on the electronics or software.

CADing the case was not too difficult, iterating it WAS. However, I have the dexterity of a buffalo, so I never made any rough sketches and simply started working on it in Fusion360.

Fun Fact: The butterfly that is my brand/logo was designed solely in Fusion360. ;)

The PiPod has had 3 main revisions, Mk.0, which never even saw a full Prototype because after the print failed halfway, and I realized that it was an impractical design. Mk.1 saw about 20 substantial iterations before I deemed it too thick for being practical or aesthetic. Mk.2 was a complete ground up redo from scratch, and it employed a different fitment. I shall elaborate on them now.


Mk.0 (Codenamed "Ænima", after TOOL's Album)

The Mk.0 was the first ever implementation of the PiPod, it featured a detachable shoulder mount where the case would be inserted perpendicular to the mount and secured by an array of magnets to said mount.

However, there were a number of problems with it.

  1. It was a faff trying to get the case on or off even in the half-printed state. It was because of how the horizontal printed layer lines of the mount weren't too happy about the effectively vertical layer lines of the case, causing unnecessary interference even after proper tolerancing.
  2. The strap slots were too weak and broke even before the case could come off the build plate, I was not able to fix that until Mk.2 was designed.
  3. I felt the space just behind the case, i.e. between my skin and the case was too big.
  4. Moreover, I felt that this only-magnets-no-reinforcement was not going to be enough, if some random person bumped into me with their head buried in the phone, it would knock the PiPod off the mount.
  5. Don't even get me started on probably the most idiotic screen mount designed in the history of mankind. What was I thinking? the screws would have been exposed outside the case and it would have made the case thick and criminally asymmetrical for no good reason.
  6. Moreover my obsession with a freehand internal design meant that the screw holes were too thin, later they were corrected but this idea was a bit of a dog to begin with. ("Idea was a dog" means an idea that is quite dear but not terribly bright.)

This, combined with many other tiny imperfections that needed ironing, I pivoted to Mk.1.

However as an ode to it's first version, the curves of the first iteration of the screen mount were preserved in all designs, you will see it in the pictures.


Mk.1 (Codenamed "Mezzanine", after Massive Attack's Album)

The Mk.1 was a derivation of the Mk.0, with some major changes. Here I list out some of the biggest ones.

  1. The straps were segregated into individual slots, rather than trying to accommodate them in one giant four inch slot.
  2. It was the first prototype to feature my butterfly branding.
  3. It now had a vertical slide-in-slide-out mounting that was printed separately so that the layer lines aligned.
  4. The magnets were now complimenting the mechanical clamp of the holder.
  5. The screen mount was now adapted into a sleeved clamp fit.

The Mk.1 was a big ordeal and went through 40 or so revisions before it was scrapped for a number of reasons, here are the big ones listed.

  1. It was TOO THICK, the case was designed in a way there was stacking, and the tolerancing measures made it 15mm thicker than what I wanted.
  2. Due to the way the mount was printed, I could not print both the branding and the holder in a way without either fitment issues or a big ugly gap.
  3. The slots for the straps were still an issue.
  4. This made the case design unusually complicated due to the various tolerance considerations.
  5. At one point the case was to be printed in 3 separate parts (Brim, Body, Back), and for a structural piece, I was not comfortable with that.
  6. This all meant I was overly reliant on superglue, meaning any servicing would have been extremely wasteful and a nightmare.

This made me realise the design was too ambitious and too flawed to continue, so I scrapped the whole thing and made Mk.2.


Mk.2 (Codenamed "Radio-Bonnaroo", after Radiohead's legendary live performance at the festival)

The only carry over from the Mk.1 was the measurements of the various components. Everything else was done from the ground up. This is the one the instructable covers.

  1. The biggest change was that now it was one structure, no magnets, not detachable case.
  2. That led to overall shrinkage of the height and protrusion.
  3. The body itself was more pronounced as the batteries now wrapped around the arm.
  4. There was now physical media controls for play/pause and on/off, instead of relying solely on the touchscreen.
  5. The strap slots were finally fixed with giant thick support columns.

(I made many mistakes due to a lack of foresight, but somehow weaseled to make it work. There are a few problems with this design, but they will be fixed in Mk.3)


Bonus: Mk.3 (Codenamed "Salival", after the Mythical and Colossal 1998 tour of TOOL)

I have only started the design plans of Mk.3, however here are some things that might be changing. I, personally, am not satisfied with the Mk.2, but that might be due to me always striving to be better. Others may find Mk.2 completely enjoyable and adequate.

  1. Custom PCB for the whole thing.
  2. Maybe 21700 batteries over 18650s.
  3. Even more compact design.
  4. Platform change from Raspberry Pi to Luckfox Pico.
  5. Going back to a removable case design.
  6. Maybe a custom user interface as well.

I may be done with Mk.3 by the end of 2025. The grounds for Mk.1 were laid out in September of 2024. But that's all tentative-future talk, for now, let's start building the PiPod.

Downloads

Printing and Setting Up the Case

IMG_6144.jpg

You must start printing the case in this order, The Body first (Dedicate the build plate to the body, even if you have a bigger bed, for better evenness) , The Brim and The Back after. All the rest of the parts, such as the switch cover and the button cover, buckles^ or the battery indicator holder, and the screen mounts, can be printed thereafter. Print settings depend on the printer and your preferred resolution. Here are my recommendations (I used a Bambu Lab A1 Mini) :-

  1. Material (Body) : PLA+(Marble, because it gave an interesting look)
  2. Material (Everything Else) : PETG(White)
  3. Layer Height : 0.2mm
  4. Speed (Inner Layers) : 200-300mm/s
  5. Speed (Outer Layers) : 100mm/s
  6. Infill : Gyroid@25%
  7. Wall Loops : 3
  8. Supports : Tree-Organic-Manual (Paint supports by hand otherwise they will plug the screw holes) The body needs supports on the rounded edges at the bottom and on the bottom brim of the battery holder so it does not sag.

VERY IMPORTANT NOTE: Because of the 0.2mm layer height, you may use height range modifier for parts that may otherwise be clipped*. FOR EXAMPLE :-

  1. If the height of one of the screen mount assemblies, is X.7mm, you must use a height range modifier** for X.6mm to X.8mm with a layer height of 0.1mm.
  2. If the height of one of the screen mount assemblies, is X.58mm, you must use 2 height range modifiers for X.4mm to X.5mm with a layer height of 0.1mm and X.5mm to X.6mm with a layer height of 0.08mm.
  3. This avoids the clipping and consequentially avoids loose fitment as I have already given tight tolerances to the order of 0.05-0.15mms where necessary in the X, Y and Z planes.
  4. IT IS IMPERATIVE THAT YOU MEASURE THE LENGTH ALONG Z-AXIS WITH INBUILT TOOLS BEFORE SLICING AND MAKING ADJUSTMENTS WHEREVER NECESSARY FOR PROPER FITMENT.

*Clipping is when your printer does not print a part of your model because it lies beyond the given constraints, printers would rather print nothing at all, than go over the given boundaries.

**Here is a tutorial on how to use a height range modifier for your convenience. Click Here.

^Creator of the buckles is fully and duly attributed to in the acknowledgments.

Finishing the Case

IMG_6146.jpg
IMG_3447.jpg

No 3D printed part is 100% perfect. It is now time to fix the imperfections in the case.

You are now going to finish setting up the printed parts for assembly by sanding them in uneven areas for comfort, aesthetics, and convenience, as unsanded parts may tear clothes in extreme cases.

Sanding must be done in multiple stages, Minimum two stages (100grit and 600grit), ideally 3 stages (100grit, 600grit and 800grit). I suggest looking up proper sanding techniques if you are unaware. Here is a tutorial for your convenience, Click Here.

Here are some recommended areas on the PiPod Body where I suggest you sand:

  1. Any uneven area/crevice on the body of the case must be thoroughly sanded.
  2. The bottom parts where the supports merged with the body.
  3. The saggy bottom brim of the battery holder.
  4. The bottom rounded corners on both the screen side and the shoulder side.
  5. All the sharp edges must be deburred*.

Similarly for all the other parts, sand down the sharp edges for a smoother finish.

Also, it is completely okay if it does not look picture perfect. Some imperfections are meant to be. They make your PiPod uniquely yours. ;)

You are also recommended to test fit all printed components at this stage, and correct for misfits.

Note: I used a Textured PEI plate, if you use a different one you may end up with a different Z-tolerance. Before reprinting the part, it is worthwhile to sand one end of the part for a bit and check again, if it fits, you will end up saving both material and print time.

*Deburring is a finishing process that removes sharp edges, burrs, fins or inconsistencies from material, such as plastics, metals, steel and alloys, leaving the material with smooth edges and fine finished surface.

Prepping the Electronics

IMG_6158.jpg
IMG_6174.jpg

AS A RULE OF THUMB ALWAYS DOUBLE CHECK POLARITIES BEFORE ATTEMPTING ANYTHING AT ALL.


Start by inspecting and validating everything with a multimeter. This includes :-

  1. Continuity checks on all of the wires.
  2. Continuity check on the switches and buttons, verifying on/off positions.
  3. Continuity on all the GND points on all PCBs.
  4. Checking Voltages on your 18650 cells and segregating if there are voltage differences. Remember, Lithium Batteries are dangerous and may spontaneously combust and/or arc if handled improperly. ALWAYS GIVE DUE DILIGENCE WHEN HANDLING LITHIUM BATTERIES.
  5. If voltage differences are detected, charging all of them to full capacity before plugging them in the PiPod battery pack, as the rapid discharge to normalise potentials in case of mismatch will lead to overheating.
  6. Checking continuity on the various Battery Protection and Battery Management apparatus.
  7. Checking the Battery Indicator module against your multimeter reading.

After all these sanity checks, you should be good to go for the initial setup.

You should also clip the ends of the battery holders at this point.

You are also expected to set up the Raspberry Pi with the OS at this point. If you are not aware how to do so, here is a guide, Click Here.

Setting Up the Screen and the Pi Base Packages

IMG_5770.jpg

Setting up the screen is an involved process, the instructions to which are covered in great detail and clarity on the Waveshare Wiki. Click here to go to the Wiki Page.

Once on the wiki, do the following in the respective order. They are essential for expected behavior with other packages.

  1. Set up the screen to work with the Pi.
  2. Rotate the display 270 degrees by following the guide.
  3. Disable the power saving for an Always-On-Display.


We will now pivot to the Pi.

  1. Run the following to install Audacious, the music client, which the project is built around :
sudo apt install audacious -y
  1. Note: An alternate way to install audacious is through Pi-Apps*, here is a guide to install Pi-Apps. Click Here.
  2. Now, you must use a usb drive to load music that you have bought from stores like iTunes, hdtracks or Qobuz. With the album art separated as a .jpg file. To separate the album art, you may use a music tag editor. Here is a guide to use a tag editor. Click Here.
  3. Now, connect your USB DAC to check if it is working properly by listening to a few of your favourite tracks..

At this point you have tested all the electronics.

*Pi-Apps is an open source App Store for the Raspberry Pi Systems. It is community driven and verified to be reliable and trustworthy.

Soldering and Test Wiring

Screenshot 2025-05-27 at 11.15.19.png
IMG_6162.jpg
IMG_6163.jpg
IMG_6190.jpg
IMG_6187.jpg
IMG_6342.jpg
IMG_6344.jpg

Given here is the wiring diagram/schematic for the PiPod. I am aware this schematic does not strictly follow the rules and structure of a "PROPER" schematic. That is because this is my first time using an EDA software, and it was my wish to structure it as a wiring diagram and a visual aid to refer to when wiring up the PiPod.

All ground symbols are consistently at ground potential, as marked.


If you do not know proper soldering techniques, here is an instructable. Click Here.

AS A GENERAL RULE, ALWAYS TIN THE WORK AREAS ON WIRES/PADS BEFORE ATTEMPTING A JOIN.


STEP 6(a)

We will now be soldering everything as in the schematic. You are recommended to follow this order to prevent miscalculations/misconnections : (You may use male and female ends of the DuPonts upon your discretion)

  1. The GPIO pins of the Pi. (Picture 2) (Use DuPonts)
  2. The Test Pads of the Pi, on Power and USB lines. (Picture 3) (Use DuPonts)
  3. The pads of the Battery Indicator. (Picture 4) (Use DuPonts)
  4. The switch for turning the PiPod on and off. (Use DuPonts)


STEP 6(b)

The following must be done after fitting the components inside the case to ensure adequate wire lengths.

  1. The USB C cable must be tied and soldered. (Picture 5) (Use the Sacrificial Cable)
  2. Connect the PWR and GND pins of the Battery Boost/Charger Module. (Picture 5) (Use DuPonts)
  3. The USB DAC's ends can be soldered now. (Use DuPonts)
  4. The Battery pack must now be connected internally. (Internally here refers to the banks unto themselves) (Use the Solid Core Wire)
  5. We will now connect the batteries across banks and bridge them.


STEP 6(c)

Now for the batteries, it is important to note how they are connected as lithium batteries must be handled with care. For more info, here is the guide I referred to. Click Here.

We will be connecting the two cell banks to the protection circuit DIAGONALLY. (Picture 6 & 7) (Use the Solid Core Wire)

  1. Connect wires to (-)ve side on the leftmost cell and left cell of the right hand bank.
  2. Connect wires to (+)ve side on the rightmost cell and right cell of the left hand bank.


ALL WIRES FROM THE BANKS TO THE PROTECTION MUST BE OF THE SAME LENGTH. THIS IS FOR AN EVEN CELL LOAD AND MINIMAL CURRENT DECAY BETWEEN CELLS AS IT CAN LEAD TO UNEVEN DISCHARGE, WHICH IS BAD.

Setting Up the Software - Part 1 of 2

IMG_6108.jpg
IMG_6110.jpg

Now is a good time to set up a test bench with the buttons on a breadboard, preferably, as shown. We will now go through setting up the full software of the PiPod to actually make it properly usable on a daily basis.

For wiring refer to the schematic in Step 7 and use this resource to locate Pin 35 and Pin 37. Click Here.


Setting up Samba

Samba is an open-source software suite that enables file and printer sharing between Linux/Unix systems and Windows machines over a network. It implements the SMB (Server Message Block) protocol, which Windows uses for network file access. With Samba, Linux servers can appear as Windows file servers, making it easy to share directories and resources. It’s commonly used in mixed-OS environments for seamless file access and permissions management.

In short, you can wirelessly transfer music from your devices to the PiPod

If I were to write how to set up Samba, I would really be simply be describing what I did when following these YouTube videos, in my view that would be doing them injustice. Which is why, instead of doing that and essentially "telephoning it in". I recommend you to follow the same videos, from the channels TroubleChute and Eli the Computer Guy. I am in no way affiliated with the channels, I simply think they would do a better job of explaining how to set up Samba. While you are there, don't forget to show those channels some support.

Click Here to watch how to properly set up Samba. (TroubleChute)

Click Here to watch how to properly set up Samba. (Eli the Computer Guy)

After you finish this set up you will be able to mount the PiPod as a network drive and transfer files wirelessly.


After you do that, run this if not already done:

chmod -R 777 /path/to/shared

Setting Up the Software - Part 2 of 2

IMG_6113.jpg

We will now set up the Buttons

There are 3 main steps to set up the buttons, first you will take the python script and plonk it in your local machine, after that we you set up the startup application, finally you will enable everything with required permissions.

STEP 8(a) : Importing the Python Backend Script

  1. Download and copy the "pause.py" script present at the bottom to your PiPod using Samba or a USB drive.
  2. Run the script using the following command, after you are in the folder/directory that the script is present in (You are recommended to create a new folder in the user directory dedicated entirely to PiPod software):
pip3 install pynput
python3 pause.py
  1. Check, The button on pin 35 should pause/play the music when pressed given these conditions are met :
  2. Audacious is playing music.
  3. An "(AlbumArt).jpg" is open on top of the audacious window and is the window in focus.
  4. No other windows are actively open. (It may misbehave otherwise)
  5. If you place the cursor over a folder and press the button on pin 37, the folder will open as if a double click was executed.
  6. If you place the cursor over a .jpg file in a folder and double press the button on pin 37, the folder will close, the AlbumArt will open after a few seconds and will go fullscreen a few seconds after that.
  7. If you were to long press the button on pin 37, it will close all windows and shut down PiPod.


If all that finished successfully and you are here, GOOD JOB! give yourself a pat on the back before we move on.


STEP 8(b) : Creating a startup application for handling the Buttons

We’ll launch your script after login — not boot — using a desktop autostart file, which is how Linux GUIs (like LXDE, XFCE, etc.) properly start background apps for a user.


  1. Create an Autostart Directory (if it doesn’t exist) :
mkdir -p ~/.config/autostart
  1. Create a .desktop File :
nano ~/.config/autostart/pause_script.desktop
  1. Type this :
[Desktop Entry]
Type=Application
Name=PauseScript
Exec=python3 /home/kinpro1024/buttonlib/pause.py
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
X-LXDE-Autostart-enabled=true
  1. Hidden=false and NoDisplay=false ensure the script is not hidden or suppressed.
  2. The X-LXDE-Autostart-enabled=true line is specifically for LXDE to respect this autostart as the Pi is an LDXE environment.
  3. Save and exit


STEP 8(c) : Giving Necessary Permissions to the Script and adding Crash Logs

  1. Navigate in the terminal, note the path where you have saved the "pause.py" script. Then run the following command in a fresh terminal window :
chmod +x /home/path/to/file/pause.py
  1. Edit your .desktop file :
nano ~/.config/autostart/pause_script.desktop
  1. Change the Exec line to :
Exec=python3 /home/kinpro1024/buttonlib/pause.py > /home/kinpro1024/pause_log.txt 2>&1
  1. This will save both normal output and errors to pause_log.txt. After reboot, if the script misbehaves, you can check the log:
cat ~/pause_log.txt


Checking the status of the Application

Reboot your Pi :

sudo reboot

Test the status of the app :

ps aux | grep pause.py

It should look something like this :

(username)+ 1234 0.0 0.1 123456 1234 ? S 10:00 0:00 python3 /path/to/pause.py


To evaluate crash logs, you may look up a material if needed, although I hope you never need to.


Here is pause.py :

#!/usr/bin/env python3

#Made with LOVE, by kinpro1024.

import time
import RPi.GPIO as GPIO
import subprocess
from pynput.keyboard import Controller as keyboardController
from pynput.keyboard import Key
from pynput.mouse import Controller as mouseController
from pynput.mouse import Button

BUTTON_PIN0=19
BUTTON_PIN1=26 #BROADCOM notations, not board notations, refer to pinout for more info.

keyboard = keyboardController()
mouse = mouseController()


last_button0_state = False #tracks buttonstate for state machine
last_button1_state = False
buttonstarttime = 0 #tracks time once button1 is pressed
counter = 0
check_duration = 0.70 #in seconds
long_press_threshold = 2

GPIO.setmode(GPIO.BCM)
GPIO.setup(BUTTON_PIN0, GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(BUTTON_PIN1, GPIO.IN, pull_up_down=GPIO.PUD_UP) #pulled UP

def pause_play(): #alt tabs into audacious and pauses with ctrl +',' then alt tabs back
keyboard.press(Key.alt)
keyboard.press(Key.tab)
keyboard.release(Key.tab)
keyboard.release(Key.alt)
time.sleep(0.25)
keyboard.press(Key.ctrl)
keyboard.press(",")
keyboard.release(",")
keyboard.release(Key.ctrl)
time.sleep(0.25)
keyboard.press(Key.alt)
keyboard.press(Key.tab)
keyboard.release(Key.tab)
keyboard.release(Key.alt)

def double_click():
mouse.click(Button.left,2)

def open_album_art():
#Double clicks on art, since the pi is slow, it will take some time to open.
#This ctrl qs the file explorer waits for 40secs before fullscreening the art.
#Million times better than trying to double click on a TOUCHSCREEN.
mouse.click(Button.left,2)
time.sleep(0.5)
keyboard.press(Key.ctrl)
keyboard.press("q")
keyboard.release("q")
keyboard.release(Key.ctrl)
time.sleep(40)
keyboard.press(Key.f11)
keyboard.release(Key.f11)

def shutdown_PiPod(): #alt f4 4 times, open terminal, run sudo shutdown now
for _ in range(4):
keyboard.press(Key.alt)
keyboard.press(Key.f4)
keyboard.release(Key.f4)
keyboard.release(Key.alt)
time.sleep(0.5)
time.sleep(1)
subprocess.Popen("lxterminal")
time.sleep(2)
keyboard.type("sudo shutdown now")
keyboard.press(Key.enter)
keyboard.release(Key.enter)


print("initialised")
try: #state checker for buttons
while True:
current_button0_state = GPIO.input(BUTTON_PIN0) == GPIO.LOW
current_button1_state = GPIO.input(BUTTON_PIN1) == GPIO.LOW
if current_button0_state != last_button0_state:
if current_button0_state:
print("ButtonPressed")
pause_play()
last_button0_state = True
time.sleep(0.07)
if not current_button0_state:
print("ButtonReleased")
last_button0_state = False
time.sleep(0.07)
if current_button1_state != last_button1_state:
if current_button1_state:
print("ButtonPressed1")
last_button1_state = True
button_start_time = time.time()
time.sleep(0.07)
if not current_button1_state:
print("ButtonReleased1")
last_button1_state = False
press_duration = time.time()-button_start_time
time.sleep(0.07)
if press_duration >= long_press_threshold:
print("looooooong")
shutdown_PiPod()
else:
if counter == 0:
counter = 1
first_press = time.time()
elif counter == 1 and time.time()-first_press<check_duration:
counter = 2 #only incremented if all conditions are met
if counter == 1 and time.time()-first_press >= check_duration:
print("single")
counter = 0
double_click()
if counter == 2:
print("deux")
counter = 0
open_album_art()



except KeyboardInterrupt:
print("\nexiting.")
finally:
GPIO.cleanup()
#ENDOFSCRIPT



To learn more about this, I suggest checking out Step 9 and reviewing the comments in the code.

Make Some More Mistakes and Face Disasters

C8E2DA8B-E24D-4A08-9B2E-06180C8A7857.jpg
9B7DCBDD-0285-4575-92A9-8C8452181B09.jpg
IMG_6101.jpg
IMG_6141.jpg
IMG_6180.jpg
IMG_6189.jpg
IMG_6186.jpg
IMG_6184.jpg
IMG_6178.jpg
View recent photos.jpg
IMG_6195.jpg

This step is not necessary if you simply wish to follow instructions and build the PiPod. However I recommend going through this, if you want to make changes to the software or get a better understanding of how this all came about.


Continuing from the last step, let's start with the Software :

I had to wrestle with CronTab, .bashrc, and .profile for about eight hours straight trying to get this one Python script to reliably run on startup. And, as it turns out, the reason it wouldn’t behave wasn’t even the code itself — it was the X server. For those unfamiliar, the X server is essentially the windowing system for Linux-based operating systems. It’s the part of the OS that handles the graphical display, allowing desktop applications to open windows, draw graphics, and interact with your monitor or screen. The problem is that the X server has to fully boot up before any graphical desktop applications can launch, including Python scripts that have dependencies on GUI interactions or libraries that hook into the GUI-based keyboard or mouse.

In my case, my Python script used Pynput, a Python library that listens and emulates keyboard and mouse input and because it hooks into those events through the X server, it refused to start if I scheduled it through CronTab or tried to sneak it in through .bashrc or .profile. No matter what delay I tried or workaround I attempted, there was no way to make the script launch cleanly after the desktop had loaded. It took me eight frustrating hours to finally figure out the clean, reliable way to handle this was to write a desktop application and set it up to run on startup using the desktop environment’s autostart configuration.


Now, on the hardware side, the buttons were thankfully a little more straightforward for me. Having dealt with microcontrollers before, handling button inputs and writing basic input logic felt much more familiar. The buttons in this project essentially function as state machines: each button maintains a state, and based on whether you single press, double press, or long press, different actions are triggered. The buttons themselves are wired to GPIO pins that aren’t used by the Waveshare screen I’m using. If you’re wondering which pins those are, you can verify them on the Waveshare wiki page that I linked earlier in the instructable.

Here’s a funny little tidbit. The buttons themselves don’t interact with the app's backends or anything. They simply emulate keyboard input to switch tabs and use keyboard shortcuts to play and pause the music. It is the exact reason why you need a very specific set of conditions for those buttons to work because those keyboard shortcuts only work in that particular context. For buttons that will be used only occasionally, unlike on a constantly-used device like a mobile phone, this is not the neatest, most complete, or most proper idea but it isn't useless.

Hey, if it works, it works.


Now, THE BATTERY ORDEAL, BUCKLE UP.

Originally, the Mk.2 design was supposed to use six 18650 cells. That was the plan, and early calculations showed about six hours of battery life using six 3200mAh cells based on a projected power draw of 2.5A. However, during test fitting, it quickly became obvious there was no way I could fit both the sixth battery and the USB DAC into the case. The spot where the sixth cell was supposed to go, the third battery on the left-hand bank, was just too tight.

By that point, I had also realized that my original power consumption estimate was way off. The PiPod, in real-world use, was drawing closer to 700 mA — nowhere near 2.5A. With that in mind, I recalculated the battery life, and it turned out that even with just five cells, I was looking at around 18 hours of runtime. At that point, it made far more sense to just lose a battery than to redesign the case this late in the build.

And then, I failed, AGAIN. :'(

The five remaining batteries were still mounted on the back of the case, not inside it. When the back panel was empty, it had a nice bit of flex and compliance. But once I stuck the battery holders on, it acted like a rigid spine, and the compliance was gone. That rigidity led to me breaking the back panel. Luckily, I remembered I still had the dual 18650 holders from my earlier PiPod Mk.0 design, which originally used a stacked dual carriage battery layout. So, in a moment of desperate improvisation, I retrofitted those holders into the Mk.2 design. It wasn’t planned, it wasn’t neat, but DUE TO SHEER DUMB LUCK, IT WORKED.

Now, the Mk2 case itself had to be redesigned a bit to accommodate the dual holders. Even the back of the case was redesigned to make it all fit properly.

I thought I didn’t have enough filament left over to finish printing what was effectively the final case for the PiPod. The first print had failed because, FOR THE FIRST TIME EVER, the printer nozzle got clogged. I’d never dealt with a nozzle clog before. Turns out, it happened because there were specks of black material in the marble filament.

I was genuinely panicking because I wasn’t sure if I had enough filament left to fix the case or print a new one. But, in a moment of genius disaster, I realized that the half-printed, failed case was actually useful. It was perfect to measure the tolerances for the new, retrofitted dual packs because it was literally a section of the case. It allowed me to get into tiny crevices and spots I wouldn’t have been able to reach otherwise. And, as fate would have it, there was just enough filament left to finish the final print of the case.


A CONFESSION

YES!! I am fully aware that the wiring of the PiPod itself is a giant spider web of nothingness that leads to absolute random. I would rather manually type the entire Linux kernel in binary whilst being set on fire by an 1800s circus joker than look at that ugly mess of wires after closing the case.

But it works. And it was the only way I could use DuPont connectors to properly connect and disconnect everything whenever I needed to service the PiPod. I’ll take messy-but-works over impossible-to-service any day of the week.


A NOTE ON PERSONALISATION

Also, if you, dear builder, want to have your own custom splash screen for the PiPod, you can absolutely do that. I made mine in a presentation software (yes, Keynote) because it was easy and fast. You can use any image editor you like, just make sure to export the final image at 720x720 resolution. To set it up, you’ll need to rebuild the startup process — which you can do using the resources provided in the following links, make sure to refer to BOTH RESOURCES.

Click Here for Resource 1.

Click Here for Resource 2.

FINAL ASSEMBLY!!

IMG_6197.jpg
IMG_6192.jpg
IMG_6194.jpg
IMG_6193.jpg
IMG_6191.jpg
IMG_6195.jpg
IMG_6341.jpg
IMG_6338.jpg

At this point, it’s time to assemble everything. You are expected to follow the provided 3D model files and guiding pictures closely, consider them the rulebook for this build. While you can adjust things like wire lengths or routing to suit your preferences or make servicing easier, the physical arrangement of components must match what’s shown in the 3D files. Use the visibility toggles in your CAD viewer to check placements, orientations, and clearances carefully, and assemble the device accordingly. Take your time, double-check positions, and trust the layout.


However, I will give you a rough outline as to what order to follow when assembling the PiPod :

  1. First and foremost, insert all the brass inserts in the photographed places. If you do not know how to work with brass inserts, Click Here.
  2. Do the screen mount now, take your time, ensuring that the sleeve fits the screen, the screen is properly seated on the middle layer and there is no extraordinary and unnecessary friction.
  3. I would suggest you do the middle layer assembly and screwing now. That includes the battery management system and the USB-C breakout as well as the USB DAC using M2.5 x 6mm screw screws.
  4. Now seat the screen on the middle layer delicately and use M2.5 x 10mm screws to anchor it until snug.
  5. Clip a part of the bottom most layer of the screen mount as shown in the picture.
  6. Seat the batteries as shown. Test fit the back cover with the batteries in place to verify their positioning. If they fit properly, superglue them in place. If they do not fit properly, wiggle them around and test again.
  7. Carefully but properly insert the switch in its designated compartment and screw in with a M2.5 x 6mm screw.
  8. Carefully insert the buttons after soldering the wires to them and guiding them through the given window.
  9. Finally, insert the Raspberry Pi, it need not be secured, as the friction fit from the 40 pins is more than enough.
  10. You are now expected to solder all the various Y-splints in the wiring and don't forget to insulate every exposed wire properly.
  11. Upon your discretion, using the wiring diagram given in step 6, connect all the wires if you are using DuPonts.
  12. Seat the screen properly and flush with the brim, and screw in all eight screws that hold the brim in with M2.5 x 10mm screws.
  13. Stitch the straps as shown in the picture. I just went to my grandma as attempting to stitch it myself would have probably ended with me stitching my fingers together. Ideally, you would box stitch but my grandma was not comfortable with that so she did multiple straight stitches.



If everything was followed correctly, CONGRATULATIONS!!! You now have a PiPod.

Time to listen to some bangin' tunes.

ACKNOWLEDGEMENTS

Printable_butterfly_(1)_2025-Feb-13_05-32-23AM-000_CustomizedView13913084615.jpg

I am sorry not sorry ;) for the relatively bad final coverage of the PiPod in Gujhinglish (4% Gujarati + 1% Hindi + 95% English). It is because I was supposed to fly out the subsequent day and did not have enough time, I hope you and your PiPod forgives me.


I would like to formally acknowledge that all external resources, guides, videos, wikis, and software referenced or linked throughout this project remain the intellectual property of their respective creators, owners, and contributors. I do not claim ownership or authorship over any of these external resources. Full credit is due to the original authors for their work, and their use here is solely for educational, instructional, and reference purposes to support this personal project. All trademarks, logos, product names, and other proprietary materials mentioned are the property of their respective owners.


Buckles

The buckles used in this project are a remix of a design originally shared on Printables.com by rorys3D. Full credit goes to the creator of that project. The original design is licensed under a Creative Commons license, and this remix is shared in accordance with the terms of that license.


Artwork Acknowledgments

This project includes the use of various album artworks and related media for purely representational and demonstrative purposes. All rights to the album covers for Ænima belong to TOOL and the original creator(s) of that artwork. The OK COMPUTER (OKNOTOK) and Bonnaroo artworks referenced were sourced from the Radiohead Public Library, and remains the property of its respective creators. Additionally, David Bowie’s Blackstar album artwork is released under a Creative Commons license, and has been used here in accordance with its licensing terms. The same applies to Nine Inch Nails’ Ghosts I–IV, also distributed under a Creative Commons license.The album cover for Dance Fever by Florence + The Machine is also used here for purely representational and demonstrative purposes. All rights remain with the original creators and copyright holders.

No ownership or authorship is claimed over these works. They are included solely for illustrative and personal, non-commercial, fair use within this project.


Music and Content Disclaimer

I do not condone piracy, copyright infringement, or any form of illegitimate acquisition or exchange of music albums. All music and albums presented, referenced, or demonstrated within this project have been legally and officially purchased by me from various licensed and authorized sources. This project is intended as a personal, non-commercial endeavor and respects the rights of all original content creators.


A Note to Fellow Music Lovers

Because of my own disposition and absolute love for music, I personally encourage anyone engaging with this project to go out and support the artists whose work you enjoy. Whether it’s by buying albums, attending shows, grabbing merchandise, or even streaming through official platforms, supporting musicians keeps the art alive and allows incredible albums like these to keep being made.


A Note to My Family and Friends

I thank all of you who have supported me, directly or otherwise, in the creation of this project.

A special thanks to my family and especially to my brother Mehaan for helping me through the journey of creating this project and the associated documentation.

A special thanks also to Dhairya Patel, Aditya Sharma, Vishwas Joseph, Krishna Trivedi, Rahil Kodinariya, Kush Unadkat and Swalee Pandey for their support and help with this project, for guiding me, whenever my knowledge base was not enough to tackle a problem, or correct a mistake.

I would not have completed this project without them.



This was a 250+ hour labour of love and I am very excited to share it with the rest of the world.