Close
0%
0%

sPot: Spotify in a 4th-gen iPod (2004)

Full-on Spotify scrolling and streaming via a Raspberry Pi Zero W and the original iPod clickwheel. Bluetooth, WiFi, and haptic feedback!!

Similar projects worth following
My mother-in-law recently gifted me a bag of the family's retired iPods. I had forgotten how good it feels to hold and use one of these things. Naturally, I decided to modify one. I wanted to supply some modern features (streaming, search, Bluetooth audio, etc), while paying homage to the amazing UX that Apple originally released almost 20 years ago.

Fast forward a few months - here's the sPot (ess-pot)! We've got:
* Streaming/Search via Spotify.
* Scratch-built UI, written in Python, based on the OG iPod experience.
* Full control via the original "click wheel".
* Haptic feedback.
* Micro-USB port for charging.
*... Linux, because there's a Raspberry Pi inside.



Hardware overview:

* Power is provided by a standard rechargeable li-ion battery. It's charged through a 500 ma Adafruit USB charger, and boosted to 5V using the Adafruit PowerBoost Basic. Both the Raspberry Pi and the display run on 5V.
* The click wheel connected to the original iPod motherboard via an 8 pin FPC cable. Thanks to this 10-year-old Hackaday article (and accompanying blog post by Jason Garr , I was able to find the pinout. Using an FPC breakout board, I easily connected the click wheel controller's 3.3V, GND, Data, and Clock lines directly to the Raspberry Pi. (More on this in the software overview).
* I used one of the Raspberry Pi's GPIO pins to drive a small DC motor (through a transistor, of course) for haptic feedback. I use quick haptic pulses in place of the iPod's original click sound, which triggers as your finger crosses each of the click wheel's virtual "steps".

* Repurposed the iPod's original lock switch to control the device's power. Conveniently, the PowerBoost module has an "enable" pin that can simply be pulled low to cut all power.

* Connected the display directly to 5V and the Pi's composite video output!




Software:

* I installed Raspberry Pi OS Lite as my OS. I figured I'd be conservative by not installing a full desktop environment, not sure if that was actually necessary in retrospect. The Pi Zero is more capable than I originally figured.
* Streaming from Spotify was surprisingly simple. I installed Raspotify, which just runs as a daemon and handles everything once you've authenticated. When it's running, the Pi appears as a "Spotify Connect" device on your account, and you can instruct it to takeover playback via an HTTP request (or using the UI of another authenticated Spotify client!).
* I used the Spotipy Python library to authenticate, search Spotify's catalog, fetch my saved artists/albums/playlists, and send playback commands to Spotify's servers.
* I wrote the UI as a Python application using tkinter. It was honestly pretty great to work with - front-end frameworks are hard to pick up! And this project was the first time I put any real effort into learning (and trying to love) Python. Forgive me, I spend most of my time in JVM-land.
* Referencing Jason Garr's blog post, I wrote a C program to the bitbang the click wheel's serial data into the Pi. I used pigpio to control the GPIO pins. Once I parse out the button presses and finger position, I send the data to the UI application via UDP. Jason - THANK you, wherever you are. This project would have been nothing without the original click wheel, and I would not have been brave enough to try to figure out the pinout myself. I will - hopefully - on future projects.
* ^ I snuck the haptic control into the C program that reads the click wheel. When the user's finger position changes, I quickly pulse the GPIO pin that's hooked up to the haptic motor. This was super easy, but the downside is that the haptics don't sync perfectly with the UI. For example, if you reach the bottom of a list, the haptics will continue even when the scrolling stops. It syncs perfectly while actively scrolling, so I didn't think it was worth changing.
* I use Redis (via Python library) to persist/cache user's Spotify data.
* I use Openbox to host the UI Application, which starts automatically once the PI boots up.
* I use pi-btaudio to get Bluetooth audio out of the Pi.

All of my source code will eventually be available here.


iPod-Spotify client UI running on Desktop
I was able to develop the UI entirely on my MacBook! Only had to optimize a tiny bit when I migrated to the Pi.
Earlier in the build: Haptic motor too big. Battery too small. Sketchy charge/boost module. Tried using a transistor to switch all power, but it kept cutting out.
These screens are adorable. Not bad image for composite input, either!
The "Now Playing" screen

Issues / TODOs:
* At some point the Pi started emitting a high-pitch whine. Big spike at 16khz and a little something at 8khz. What could this be? Doesn't bother me too much...

Read more »

View all 10 components

View all 3 project logs

Enjoy this project?

Share

Discussions

Michal wrote 08/22/2023 at 20:30 point

Not sure if asked. What's the current battery life? I know it's small but how small?

Also, you could design a PCB and include all components ( minus the PI, which could be just soldered on the PCB, it would save a lot of space for a larger battery. EasyEda and JLCPCB is your friend.

  Are you sure? yes | no

Rockfantic wrote 07/18/2023 at 22:14 point

Would this work on a 7th gen ipod classic?

  Are you sure? yes | no

devis9990 wrote 05/05/2023 at 11:53 point

i am wonder that you still have too much old phone. Is there parts still available in the market ? Checkout <a href="https://www.gachacute.com/">Gacha Cute</a>for latest smartphone apps templates.

  Are you sure? yes | no

Doris wrote 04/03/2023 at 05:40 point

The “sPoT’s” software installation instructions & Q&A  at the end of GitHub (see open issue #69) are now at a level where those with very  basic Linux knowledge should be capable of successfully achieving “Spot” software installation and operation! 

  Are you sure? yes | no

Yeninja456 wrote 03/30/2023 at 23:41 point

Does this support Premium features like playlist downloads?

  Are you sure? yes | no

Doris wrote 04/03/2023 at 05:17 point

Yes., however only the markers to the playlist (http request) that will allow playback of your playlist not the actual file for downloading/storing.

  Are you sure? yes | no

Doris wrote 03/26/2023 at 04:42 point

Update:

Added a (2500mAh) battery as per Tanagram27 (below ) to my Zero 2W works great with extended power availability & longevity!

I used a thick 60gb 4th generation iPod  thick back case cover and a Adafruit usb “C” charger with the Adafruit powerboost 1000 basic boost module and the below battery from Amazon:

AKZYTUE 3.7V 2500mAh 653496 Lipo Battery Rechargeable Lithium Polymer ion Battery with PH2.0mm JST Connector(Actually 1800mAh).

Check for correct battery plug to charge board polarity and reverse pins where necessary!  

The "pi" sits on top of the battery.

Remove one or more ports if/as necessary!

Best to use Waveshare screen for space optimization.

Thanks Again Tanagram27.

  Are you sure? yes | no

Michal wrote 08/22/2023 at 20:31 point

Can you post the inside picture please?

  Are you sure? yes | no

tanagram27 wrote 01/12/2023 at 03:27 point

I am not sure how useful this information will be to everyone.  However, I have been working on my own ipod on and off for a while now and I am proud to say that while I have been struggling with the software, I have successfully slimmed down a pi zero and fit a much larger (2500mAh) battery inside of the case.  Additionally, this setup has quite a bit of free space for extra pcb's to be wired up.  For instance, I have also wired up an external dac board (pcm5102) and fit it inside the case.  My plan is to use this extra space (and probably multiple revisions of this project... probably over a long time) to eventually turn an ipod into a device similar to a flipper zero.  Currently, I hope to also wire up an IR led, and a RF module.  However, I do have one concern with lack of power with the original raspi zero.  I do hope to upgrade to the second gen with a newer "prototype" of this idea, but I am curious if it would be possible to use a cm4 board instead of the zero, and I would appreciate it if anyone has thoughts on that.  

If anyone has any questions about my ipod please feel free to ask

  Are you sure? yes | no

Doris wrote 01/12/2023 at 17:54 point

Hello tanagram27, Interested to know how you slimmed down the pi zero and fit a 2500mAh battery?  Thanks.

  Are you sure? yes | no

tanagram27 wrote 01/17/2023 at 04:03 point

To slim down the pi, i trimmed off all of the ports on it since they're not used.  And the battery I used is a slim one kinda similar to the large batteries that people will mod their fifth gen iPods with.  So basically the battery sits flat with the laying on top of it

  Are you sure? yes | no

Doris wrote 01/17/2023 at 08:18 point

Thank You !

  Are you sure? yes | no

douglsuk wrote 02/02/2023 at 16:51 point

Do you have any pictures of your build? Just getting going on mine now and wanted to include the DAC output connected to the headphone jack, but no idea where to start with it! 

  Are you sure? yes | no

Doris wrote 04/09/2023 at 04:06 point

Hello again tanagram27,

Just curious to know which Charge and/or boost  module did you use?

Which display screen?

and

Did you use the 20,40 or 60gb case back?


Thanks.

  Are you sure? yes | no

Michael wrote 12/21/2022 at 06:27 point

Hello just wanted to let you guys know that I was able to get this project working and documented the way I did it, though the code is modified for the waveshare display in Ricardo's build.  This is the first time I have ever tried this so please forgive me for any errors. https://github.com/dupontgu/retro-ipod-spotify-client/issues/69

  Are you sure? yes | no

Benjamin Stallings wrote 11/09/2022 at 16:04 point

Hey all, not sure how many people are keeping up with this project, but I'm interested in making one for myself and noticed a lack of good documentation on the wiring besides the click-wheel. While I wait for parts, I took it upon myself to try and make a wiring diagram for myself and everyone else like me who are new to DIY projects such as this. Again, new to this, so if I made one or more mistakes, let me know and I'm happy to make a revised diagram.

I drew this up in illustrator, so edits are easy. And I can drop the .ai file where data and power wires are separated into separate layers. Makes it a little bit easier in my opinion.

https://imgur.com/a/epvkWsR

  Are you sure? yes | no

Guy Dupont wrote 11/20/2022 at 01:09 point

Yeah, admittedly I underestimated the interest in this project initially and so the "documentation" is more "this is what I did" than "this is how to do it." Thanks for this. The one thing I would add (somebody else mentioned this in a comment a while ago) is to add a flyback diode across the two leads of the haptic motor. I didn't do this on my original design and I think it actually caused occasional issues.

  Are you sure? yes | no

Doris wrote 08/21/2022 at 01:47 point

Hi Guy, Just figured I drop you a note that a newly released older version of Raspbian (Legacy Buster) 10 and an older version of Raspotify v.(14.0) solved all my problems!

Thanks again for creating this satisfying project .

Check out issue GitHub issue #69 when you have a chance.

Note: I'm now  using a Zero 2W. boots really fast.

However poor on power consumption.


Update:

Added a 2500nah battery as per Tanagram27 (above) to my Zero 2W works great with extended power availability!


Thanks Again Tanagram27.

  Are you sure? yes | no

Michael wrote 07/30/2022 at 05:02 point

Hello I've finally got Spot to auto start and a bunch of other problems fixed but when I try to play a song it gives me this error

"playing  spotify:album:6Bp2ojsBc8CtNaYipdxCLt spotify:track:3ZcLmonVVD1MTQtmQb8yf3
error! no devices"

I saw in the Github issue #4 someone had this error but they fixed it so I applied the fix to mine and it didn't do anything. Got a solution or an idea? 

  Are you sure? yes | no

Guy Dupont wrote 04/20/2022 at 22:33 point

I appear to have missed a large number of comments on this project! I apologize, I am not sure how hackaday.io notifications work - I used to get emails for everything. Please reply to me directly if you have questions, but truthfully I have not had much time to move this project forward in the past months.

  Are you sure? yes | no

Michael wrote 09/15/2022 at 18:11 point

Hello I've finally got Spot to auto start and a bunch of other problems fixed but when I try to play a song it gives me this error

"playing  spotify:album:6Bp2ojsBc8CtNaYipdxCLt spotify:track:3ZcLmonVVD1MTQtmQb8yf3
error! no devices"

I saw in the Github issue #4 someone had this error but they fixed it so I applied the fix to mine and it didn't do anything. Got a solution or an idea? 

  Are you sure? yes | no

Sven Svenson wrote 02/25/2022 at 09:40 point

Hey! Been building computers but new to the actual electronics side of things. Definitely can't read any electronic diagrams...! Are there any resistors or whatever between any of the components etc, or given most of it is 5v, is it not necessary? 

  Are you sure? yes | no

yes wrote 02/20/2022 at 13:15 point

help pls did the 64 bit isnt working on the raspberry pi and the raspotify needs 64 bit to work and im stuck please help please

  Are you sure? yes | no

Cole.devries wrote 02/14/2022 at 06:30 point

can you show me the wiring for using the 2 piece 1000 booster basic usb c 

Thanks!

  Are you sure? yes | no

Cole.devries wrote 02/14/2022 at 06:35 point

especially which resistor is r13 to move and to pull to ground

  Are you sure? yes | no

David wrote 07/16/2021 at 23:42 point

Since the 2.5 TFT display is out of stock on Adafruit for the foreseeable future, is there any alternatives or a way to use the ipods original screen instead?

  Are you sure? yes | no

chinmay wrote 07/11/2021 at 10:10 point

Anyone here thinking of modding ipod 3rd gen?

I opened my dead ipod and instantly hit first roadblock, scrollwheel connectors are completely different, can anyone identify what connector this is and is there any breakout and pinout available?
https://imgur.com/a/L1g7F7F

  Are you sure? yes | no

tanagram27 wrote 07/11/2021 at 05:06 point

To people who have made a sPot for themselves, are there any other generations of iPod that seem possible to use.  I am most specifically interested in the 5-7th generation iPods as customizable replacement parts for these generations are usually readily available.

  Are you sure? yes | no

Guy Dupont wrote 07/13/2021 at 03:03 point

I can't say for sure, but I think they're going to be too small for the pi + LCD. If you can figure out how to use the original screen in those, it may be possible.

  Are you sure? yes | no

tanagram27 wrote 07/13/2021 at 05:15 point

So I tried looking it up and found that the 4th gen is likely about .2" thicker than the thick versions of the 5-7th gen.  But out of curiosity, how tight is the fit in the fourth gen, and do you know where it is the tightest?  Because based off of the project pictures it seems like you might be able to slim it down by using a slimmer battery behind the rest of the components and trimming off the now unnecessary ports that are on the raspberry pi. However I'm not sure how much thinner that would actually make the components and if that would allow it to fit in the newer generations.  Thanks so much!

  Are you sure? yes | no

NirGi wrote 04/17/2021 at 18:13 point

I've got a 5mm(H) x 34mm(W) x 50mm(L) li-ion battery. Do you think it'll fit well inside the iPod?

What was your battery size?

  Are you sure? yes | no

nassafellow wrote 03/25/2021 at 09:17 point

Guy could you please update the components list and schematics for the new build please?  I am merging your design with Ricardo's build and I am stuck on the internals.  

Thanksl

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates