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

sebakitzing wrote 02/05/2021 at 03:23 point

Hey! I really loved this project. I'm gonna try to do it myself so wish me luck haha! Only thing is that I'm buying an iPod form the US or UK and ship it to Chile...

  Are you sure? yes | no

Tobias wrote 02/04/2021 at 15:20 point

Thumbs up for your great project. I just re-discovered my broken 2009 classic iPod and directly started stripping it. But unfortunately the ribbon cable is so so so so tiny, soldering to that is just not possible with my skills (and fat fingers) :-/ 

  Are you sure? yes | no

Steve wrote 02/03/2021 at 17:53 point

This is FANTASTIC..  I NEED to find my old iPOD now.. or go grab one at a pawn shop (I'm sure your product has raised the going rate on ebay!!)    That UI is awesome - I was convinced somehow you had used the original apple UI..  Surprised to hear that click wheel is so smart, but I guess it has to be to be useful with so few pins.  I'm also wondering if that haptic motor is taking a lot of your battery?  I guess the screen is probably much more in the big picture though.

Anyway, great job.. I'd love to build one!

  Are you sure? yes | no

Guy Dupont wrote 02/03/2021 at 19:06 point

It's hard for me to estimate how much juice the haptic motor is actually using up in practice. According to Amazon, it should draw 70ma at 3V (I'm using it at 5). But the pulses are only a few milliseconds long. So it reaaaally depends on how much you're scrolling I guess.

  Are you sure? yes | no

Sai Khurana wrote 02/04/2021 at 04:53 point

why don't you use a transistor and buzz the original buzzer for that same old click sound

  Are you sure? yes | no

zapwizard wrote 02/03/2021 at 17:19 point

Just dropping by and give some respect on your iPod conversion! I am probably one of the first folks to ever gut and modify a click-wheel iPod. 

I converted the front from plastic to wood back in 2005: http://www.zapwizard.com/blog/projects/the-real-wood-ipod/

At the time I was news enough to get on CNN, and NPR news.

I don't think I would make it streaming, but I do have the urge to update it just to keep it working.

Also, I had no idea the zero could output composite video! 

You may have just saved my Pip-Boy project! The Pi foundation won't document their MIPI drivers, and I am not a deep level programmer, so I just haven't been able to figure it out. But I can hack a old composite LCD into fitting.

  Are you sure? yes | no

Guy Dupont wrote 02/03/2021 at 19:04 point

thanks for sharing, that's so rad!!
And yes the composite video was sooo handy for this.

  Are you sure? yes | no

Garnt wrote 02/03/2021 at 08:35 point

Couple things I want to put out there Is why not use a usb c charging connector like this?https://www.adafruit.com/product/4410?gclid=CjwKCAiAsOmABhAwEiwAEBR0ZoLpgZe2Wheodo3Qti25UNHYcGC7NK_sbLtBCqEyIOH6zi_WWXl58xoC538QAvD_BwE

Also YouTube Music has a unofficial sdk... Just saying

Other than that absolutely beautiful work of engineering, couldn't have done it better myself.

  Are you sure? yes | no

Guy Dupont wrote 02/03/2021 at 14:03 point

Thanks! I literally ordered one of these on Friday!

  Are you sure? yes | no

marshallwandersen wrote 02/02/2021 at 18:32 point

Hey this is awesome man! You know I've actually still been using my old classic ipod ever since I got mine in the early 2000s, and I've recently wished I could somehow access spotify with it (and fm radio, my oldest complaint for those old ipods). I was a smart phone user for about 6 months before I got frustrated and went back to a dumb phone and now I only use spotify at home. I think it would be great if there was also way to access music from a micro sd card. I'm relatively new to linux, python, and C++, but not stranger to circuits, I might have to take a crack at this project. Really great work.

  Are you sure? yes | no

Sai Khurana wrote 02/01/2021 at 15:21 point

You can use a small USB DAC to get better quality audio. also, did you consider node.js for this project? whatever experience i have with Node has been so much better than Python. 

  Are you sure? yes | no

Guy Dupont wrote 02/01/2021 at 15:27 point

I'm working on doing exactly this, though I'm not convinced the $7 DAC I got is going to sound "better" : ). The BT audio is not bad enough that I'm distracted by it.

So I also personally prefer Node.js to Python, but my experience with it on the Raspi Zero has not been great. And I was worried that doing a browser-based front-end would have more overhead than tkinter via Python. I never really dug into that though, honestly.

  Are you sure? yes | no

Sai Khurana wrote 02/01/2021 at 15:34 point

yeah, I was thinking the same. even a basic chromium instance would hog pi's memory and as a result, would also consume more power. I wish I knew a better lower-level/ performance-oriented language. and this is an amazing project. unfortunately, i don't have access to an iPod classic 4th gen as it was never really a popular iPod in India

  Are you sure? yes | no

Kakoub wrote 02/03/2021 at 16:36 point

Might be a way to use the pre existing 3.5 jack on the ipod ?

  Are you sure? yes | no

Guy Dupont wrote 02/03/2021 at 17:01 point

@Kakoub I plan on it! Gonna rip of the included one from the DAC module.

  Are you sure? yes | no

Gabriel wrote 02/01/2021 at 09:10 point

Always said an portable player like an ipod with spotify would be great! As I understand it now, it is only possible to stream in the Wifi? So offline usage would be the next level?

  Are you sure? yes | no

Guy Dupont wrote 02/01/2021 at 12:19 point

Yeah, although I don't think it would be practical to get Spotify downloads working, the underlying library does not support it. Could definitely pull in local mp3s though! And it would be easy to sync over WiFi.

  Are you sure? yes | no

HannesBro wrote 02/04/2021 at 23:06 point

So you think that the library could be extended to feature downloads? That would be the thing that would totally convince me to rebuild this beauty.

When you do changes, will I see them all here online? I mean, will you keep this Projekt updated  or the GitHub page or both?

  Are you sure? yes | no

Guy Dupont wrote 02/04/2021 at 23:11 point

@HannesBro I will try to keep both updated. But to be clear, I do not think Spotify downloads are going to work. Spotify Connect devices do not have this capability, as far as I know. I don't plan on working on it - seems like a good way to get in trouble : P

  Are you sure? yes | no

HannesBro wrote 02/04/2021 at 23:16 point

Thank you, for your answer! Can I ask you what you use it for in your daily live? You always need WiFi to use it, so just use it at home?

  Are you sure? yes | no

Guy Dupont wrote 02/05/2021 at 00:39 point

@HannesBro I keep it hot-spotted to my phone, but I haven't had to go very far with it anyways thanks to Covid!

  Are you sure? yes | no

paul wrote 01/31/2021 at 23:00 point

hi

i love this project and am inspired to try myself

in the gallery in photo number three - near the haptic - there is a component guessing this is the 2N3904 NPN Transistor ? but what is the board and configuration occuring - that black electrical tape is covering it - this portion is stumping me. as a novice i literally trying to do the hardward portion as per the image :-) thanks in advance and thanks again really inspiring hack!

  Are you sure? yes | no

Guy Dupont wrote 02/01/2021 at 12:20 point

Correct on the transistor. I will put a schematic up this week if I get a chance.

  Are you sure? yes | no

Kakoub wrote 02/01/2021 at 18:25 point

+1 It could be so nice! :D

  Are you sure? yes | no

pierre.viau wrote 01/30/2021 at 10:52 point

Guy this is a fantastic idea, and an even better execution. If you do upgrade following Aravind's suggestion, I'll definitely check it out too.

Sorry for the shameless lazy request, but if somebody reading here is willing to build one for me, I'm willing to discuss proper compensation. Just message me.

I can do software, but not hardware, I would probably manage to solder my glasses to a chair while trying. I'm ok to try learn, sure, however I am renovating a 400-years old house and the iPod project would take a backseat for at least 2 years...

  Are you sure? yes | no

NirGi wrote 01/30/2021 at 09:42 point

Really nice project. Great job - made me want to do it myself :)

Can't find the same 8 pin FPC cable breakout board u showed - can you post a link to one as well?

  Are you sure? yes | no

Guy Dupont wrote 01/30/2021 at 13:04 point

Hey, just added a link to the components list. It's for a 10-pin, but works fine. I just typed "FPC breakout" into amazon, if you want to look at other options. 

  Are you sure? yes | no

NirGi wrote 01/30/2021 at 15:45 point

Ty, got it

  Are you sure? yes | no

n_d_swann24 wrote 01/30/2021 at 09:24 point

Very interested in this project! Is there a step by step to the video? 

  Are you sure? yes | no

Guy Dupont wrote 01/30/2021 at 19:02 point

Not yet!

  Are you sure? yes | no

Aravind Vinayakan wrote 01/29/2021 at 20:25 point

First off let me say this, this is a fantastic project! This thing is absolutely killer! Have you considered designing a custom PCB, one that could possibly interface with the clickwheel and headphone/hold switch PCB? I know Adafruit has a lot of their schematics on their github, you might even be able to include the display driver board in a custom PCB. Would make for super easy install, people could probably even just buy replacement parts to put one together, so no functioning iPods are harvested for parts. 

  Are you sure? yes | no

Guy Dupont wrote 01/29/2021 at 21:36 point

Yes, great idea. I started discussing this with friends today.

  Are you sure? yes | no

Aravind Vinayakan wrote 01/29/2021 at 22:45 point

Glad to hear it! I've been thinking about how to accomplish this nonstop since I saw your video!

  Are you sure? yes | no

Baz Baruah wrote 01/29/2021 at 20:03 point

This is amazing. I’ve just bid on a 4th gen iPod so I can start building my own (and happy to help with the software too). 

One question - do you have the dimensions of the screen, or a link to the one you used?

  Are you sure? yes | no

Guy Dupont wrote 01/29/2021 at 21:36 point

It's Adafruit item 911. Easy to remember lol.

And please, PR away on the software, its kind of a mess.

  Are you sure? yes | no

Baz Baruah wrote 01/29/2021 at 23:35 point

thank you. 

Just got an iPod (for parts) off eBay for £15. And just ordered most of the other parts too. 

  Are you sure? yes | no

amauryhubault wrote 01/29/2021 at 18:26 point

I'm absolutely in love with the idea and the result is stunning!
I have questions or ideas:
Do you know if this idea is possible into a smaller iPod, like iPod Video?
Also, does it work with Spotify connect?

  Are you sure? yes | no

Guy Dupont wrote 01/29/2021 at 19:15 point

I think using any smaller of a case would require a custom PCB, tbh. The squeeze is pretty tight here. And yes! By default this is a Spotify Connect device. Soon as it connects to wifi, it shows up in all my device lists.

  Are you sure? yes | no

Sai Khurana wrote 02/01/2021 at 15:29 point

The problem with iPod video is that the click buttons are not on the click wheel itself and I also think apple changed their protocol after this version. 

  Are you sure? yes | no

Guy Dupont wrote 02/03/2021 at 19:07 point

Yeah it seems like every version is vastly different, even just from a hardware perspective.

  Are you sure? yes | no

sanfordjd wrote 01/29/2021 at 15:58 point

would love to hear more about this ... have a more detailed "how to"?  i've been looking for something to do with my old iPod ... 

  Are you sure? yes | no

Guy Dupont wrote 01/29/2021 at 19:15 point

This is something I would like to do! Won't have time for a bit though.

  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