MagSafe 2 frayed cable

A MagSafe Cable Repair Embedded in a 3D Print

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.

MagSafe 2 cable support model
The new and improved MagSafe 2 cable support 3D model.

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.

Prusa ColorPrint Utility
Adding pauses with Prusa’s online ColorPrint utility.

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.

Slic3r Layer View
The first stop in Slic3r’s layer view.

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.

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.

First Stop Insert Cable
The cable inserted, secured, and ready for the next print layers.

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.

Second Stop to Insert Connector
The cable and connector pulled into place for the final part of the print.

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.

Final Cable Support
The finished cable support in use.

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.

Leave a Reply