I have an old Apple MacBook Pro with a power cable that had frayed near the end with the MagSafe 2 connector. These power supplies are notorious for having the outer cable coating become brittle and crack, as this one had done from nothing more than normal use.
The power supply still worked well so a repair was in order. After trimming off the excess cracked plastic coating, I went looking for some sort of cable protector I could 3D print to keep that portion of the cable from bending and getting damaged any more.
I found cable protector models with slots where you insert the cable after printing the part and models with multiple parts that clip together around the cable. But as I thought about it more, I decided it would be fun to attempt printing around my cable to embed it in the plastic part for a seamless and sturdy solution.
So I grabbed one of the models and modified it in Tinkercad to eliminate the cable slot. Then I printed it while watching for the opportune time to pause the printer, insert the cable, and then resume.
On my first attempt, I paused the printer a bit late and the cable channel had closed too much to insert the cable. The second try was more successful but the plastic cracked when I pushed the connector into place. The walls were too thin for the stress because they were not yet fully printed and supported in all directions.
I let it continue printing to see how it would work out but the connector stuck up too much and got in the way of the print head. I ended up with a mess of filament strings all over the top. The printer eventually detected the interference and stopped with an error.
Clearly, a better approach was needed.
I went back to Tinkercad and designed a new cable support, using the first one as a guide for the size. The new part has thicker walls, holes for the charging indicator light to shine through, and a better shape for printing on its side without supports.
I decided to print this in white PETG filament. PETG has become my go-to material because it prints easily, is odorless, and does not shrink later if it gets warm, like PLA will. It’s also a bit softer than PLA. That tiny bit of flex keeps it from shattering if bent or impacted, which is great for this application.
I went with a 100% infill to help avoid the cracking problem I had with my earlier attempt. It’s a fairly small part so it’s not a lot of plastic but adds extra support through the assembly process.
After slicing my model in Slic3r Prusa Edition, I ran the resulting g-code through Prusa’s online ColorPrint utility to add pauses at two critical points where the cable would be inserted. This technique is not limited to Prusa printers and should work with any 3D printer that supports the M600 filament change command.
As the name suggests, the ColorPrint utility is really made for changing filament colors during a print. It does make you go through unloading and reloading the filament, but it’s a great way to get a reliable pause that later reheats the print head and bed, then resumes exactly where it left off. My Prusa i3 MK3 printer’s display guided me through the whole process and waited for a button press to continue.
I found that the Slic3r layer view was a handy way to find the exact layer height for the best places to pause.
My first stop was at 5.6 mm height, which is about as far as the smaller cable channel can be built while still being able to get the cable through the opening. I could see in the Silc3r layer view that the print head would primarily be going in the direction of the longer length of the part so it wouldn’t likely have a problem colliding with the cable if a tiny bit stuck up through the opening.
Update April 2020: I have switched from Slic3r to PrusaSlicer for most of my slicing needs. PrusaSlicer version 2.2 introduced a pause at layer feature that is made specifically for this kind of task.
After inserting the cable with the connector well out of the way, I taped the cable down to the print bed to keep it from moving or interfering with the print.
The printer resumed perfectly and continued printing over the cable.
The second stop was at 6.95 mm height. At this point, the cable can be pulled through its channel and the connector pressed into place. I knew from the layer view that the sides would be just high enough that the print head would not crash into the connector like before.
The printer resumed perfectly again and began filling in around and over the connector. The connector was pressed in a bit more than in the photo so that it was flush with the top edges. It became the support for the top layers of the print.
Here’s the final version, working perfectly.
Although this was a simple little project, it was a lot of fun because it gave me an opportunity to try a 3D printing technique I had not attempted before. Now I’m thinking of all sorts of other uses for embedding things in my prints. Hardware like nuts, screws, and bearings are obvious choices, as are electronics like LEDs inside of translucent plastic, but I’m sure there are many more creative possibilities as well.