book collections email follower instructable user
Picture of Repurpose Optical Drive With RPi

This project came about after my beloved laptop's optical drive started to misbehave. The CD tray would repeatedly pop out whenever I gave my laptop a push or moved it about in any way. My diagnosis of the problem was that there must have been some loose connection which was tripping the eject switch whenever it was moved about. This became more and more irritating and finally, I decided to do something about it. I had only once used the optical drive in the 2 years of having my laptop so I thought I could probably do without it altogether.

Removing the tray meant I had a large hole in the side of my computer so I needed to fill it with something. I had seen that you could buy bays that you can slot a second hard drive into for your laptop. I didn't really have the need for that so instead, I went about designing and 3D printing a replacement blank part with the same dimensions as the original dive, with a space that I could fit passport sized notebook that I kept all my project ideas in. This was a fun little project and conversation starter and worked perfectly. It got me thinking though, that you could probably fit other things into this new found real estate inside my laptop. I thought about what I could put in there instead and realised I could embed a Raspberry Pi inside my computer that I could use for projects on the go and more programmable IO for my computer. As this idea evolved I came up with the idea of powering the Pi form the power provided by the laptop to run the optical drive and connecting to the Pi from my laptop using VNC. This meant that I could access my Raspberry Pi's desktop anywhere without needing all the peripherals that go with it. This Is a bit like the pi-top however, here I am still able to use my laptop as it was originally intended except for the lack of cd drive.

In this Instructable I'll go through how I went about building this project and the problems I encountered and overcame. It won't really be a traditional instructable where I go through every step that should be followed religiously because I think that it is quite niche, as very few people nowadays have removable optical drive bays in their laptop. Instead in this Instructable, I hope to show how I overcame different design problems so that no-one else has to when working on similar projects.

I will provide links to parts and all the 3D files I used, so if anyone does have the exact same laptop (Lenovo ThinkPad T420) or compatible that they can build the project too. If at any specifics are unclear please feel free to comment, and I will happily help out.

Step 1: Parts Used

Picture of Parts Used

For this project, only 3 main parts were really needed:

A raspberry pi with a fresh install of NOOBS with right angle pins soldered on. I went with the Pi Zero W for the small form factor and the fact that I wouldn't need any additional networking hardware. As an afterthought, I realised I might have been able to fit a standard sized raspberry pi in there such as the Pi 3 b+ if I desoldered the large connectors like the USB and Ethernet ports.

A 28 x 132 OLED I2C display. This displays the IP of the pi so that you can connect more easily with SSH or VNC. I bought some cheap ones from China because I didn't want to worry about breaking them but you can also get some nicer ones from Adafruit. Luckily the Adafruit library for their product can also be used for the Chinese one.

A male to female slimline SATA cable. This is used to take the power from the laptop. It needs to have all the wires coming from the power section (more on that later).

RequirementsR2 months ago
does it work well with it Raspberry Pi Zero V1.3
The Zero (non-W) doesn't have Wifi or Bluetooth connectivity. Unless you added specific hardware to supply a connection and modified the STL, the Zero would fit but you couldn't connect. It would be a glorified case.
TaranA46 months ago
what's the perpose of this?
marlin_maker7 months ago
That’s really nice, thanks! Independent of your
instructable, I thought of modifying my t420s ultra bay with something similar.

-Do you happen to know max ampere that can be drawn from this sata plug?

-Have you tried employing the 12V that should be there to charge batteries?

ollie242 (author)  marlin_maker7 months ago
Hi marlin_maker, thanks for your comment. I have also been looking into drawing more current from the SATA power connector for another project. I read somewhere in the SATA spec documents that the 5v pin has to supply at least 2A. I'm not sure though whether this is the same for slimline connectors too. The Slimline doesn't have a 12v line at all.
Thanks :) as I have a t420s, I might just use the battery port in the ultrabay. If I tackle it, I will post an instructable...
ollie242 (author)  marlin_maker7 months ago
No way! I didn't realise the t420s had a battery connector. I think it's time for a new laptop!
"new" :) I love my t420s. The ultrabay is thinner I think but I will have to see what I come up with.
I think t430s fit ultrabay battery's as well...
Onairam9 months ago
Nice and useful!
It would be interesting to try using a Sata-usb cable for powering it easily as well as using the usb-ethernet capability of the pi zero to not depend on a wifi network to connect to it.
dgoadby9 months ago
Just a brilliant idea! A Raspberry PI on tap all the time. I will make one for sure.
shillinout9 months ago
Great inspiring project. Now I'm considering doing something similar with an empty HDD bay. Thanks for taking the time to share.
thegrendel10 months ago
As an alternative to 3-D printing an enclosure/baseboard for the Pi, how about gutting the optical drive and using the metal shell? That way, if you're clever enough, you don't even need the SATA cable because the connections are on the shell.
pjcrux10 months ago
What do you use to plug the hole to the GPIO pins when they are not in use? I looks to be an awesome way for FOD (Foreign Objects and Debris) to get into your system. :)

Great post! Why a Pi Zero instead of a regular Pi B+? I'm think the USB headers could've fit but I can't remember the size of the T420 as I haven't had one in 7+ years.
ErayK31 year ago
Brilliant! You could add a switch connected to the 'run' pins on the pi to be able to not boot it when unnecessary. Also, to make the HDMI and USB ports accessible on the pi, you could position the pi the other way around and solder cables to the gpio header to locate another header on the side but I guess you couldn't fit the screen then.
selp1 year ago

awesome !

I also have a t420 laptop

I've a second hdd in the optical bay but i'm going to put as raspi in it !