BMOW title
Floppy Emu banner

Building a 12V DC MagSafe Charger

Now that I have a solar-powered 12V battery, how can I charge my laptop from it? An inverter would seem absurdly inefficient, converting from 12V DC to 110V AC just so I can connect my Apple charger and convert back to DC. It would work, but surely there’s some way to skip the cumbersome inverter and charge a MacBook Pro directly from DC?

Newer Macs feature USB Type C power delivery, a common standard with readily available 12V DC chargers designed for automotive use. But my mid-2014 MBP uses Apple’s proprietary MagSafe 2 charging connector. In their infinite wisdom, Apple has never built a 12V DC automotive MagSafe 2 charger – only AC wall chargers. There are some questionable-looking 3rd-party solutions available, but I’d rather build my own.

Step 1: Cut the cord off a MagSafe 2 AC wall charger. Yes that’s right. Being a proprietary connector, there’s no other source for the MagSafe 2. Fortunately I already had an old charger with a cracked and frayed cable that I could use as a donor. Snip!

The choice of AC wall charger matters more than you might expect. Inside the MagSafe 2 connector is a tiny chip that identifies the charger type and its maximum output power. The Mac’s internal charging circuitry won’t exceed this charging power, no matter what the capabilities of the power supply at the other end of the cable. Pretty sneaky, Apple! Official MagSafe 2 chargers come in three varieties of 45W, 65W, and 85W. My donor MagSafe 2 has the 85W id chip inside, so I can charge at the fastest possible rate.

After cutting the charger cable, inside I found another insulated wire which I assumed to be the positive supply, surrounded by a shroud of fine bare wires which I assumed to be the ground connection. I’m not sure why Apple designed the cable this way, instead of with two separate insulated wires for power and ground. The braid of fine bare wires was awkward to work with, but I eventually managed to separate it and twist it into something like a normal wire. I soldered the power and ground wires to an XT60 connector and covered them with electrical tape and heat shrink. I also repaired the cracked and frayed cable sections.

Step 2: Get a DC-to-DC boost regulator. The input should be 12V, with a few volts of margin above and below. But what about the output? What’s the voltage of a MagSafe 2 charger? My donor charger says 4.25A 20V, but I couldn’t find any 12V-to-20V fixed voltage boost regulators. Happily I think anything roughly in the 15-20V range will work. For comparison, I have a 45W Apple charger that outputs 14.85V and a 3rd-party MagSafe 2 charger that outputs 16.5V. I chose this 12V-to-19V boost regulator with a maximum output power of 114W. At 85W, I’ll be pushing it to about 75% of maximum.

Step 3: The moment of truth. Would my expensive computer burst into flames when I connected this jury-rigged DC MagSafe charger? I held my breath, plugged in the cable, and… success! Of course it worked. The orange/green indicator LED on the MagSafe 2 connector worked too.

Opening the Mac’s System Information utility and viewing the Power tab, I could see that my charger was correctly recognized and working. The “Amperage” status also showed the battery was charging at a rate of 1737 mA (positive numbers here indicate charging, and negative numbers discharging). This seemed low – with the battery at 12.2V, that implied it was charging at roughly 21W instead of 85W. But when I connected an AC wall charger in place of my DC charger, the charging rate was almost identical. Because my battery was almost 100% charged, I think the charging rate was intentionally reduced. I’ll check again later when my battery is closer to 0%.

Goodbye, inverter. With just a few hours of work, I had a functioning 12V DC MagSafe 2 charger. Time to sit back, enjoy a beer, and celebrate victory.

 
Checking the Numbers

I like numbers. Do you like numbers? Here are some numbers.

This charging method is about 95% efficient, according to the claimed efficiency rating of the boost regulator. I can also leave the regulator permanently connected, since its no-load current is less than 20 mA. In comparison, charging with an inverter and an AC wall charger is about 77% efficient (85% for the inverter times 90% for the wall charger). And an inverter probably can’t be left permanently connected, since it has a constant draw of several watts even when no appliances are plugged in.

My “12V battery” is actually a Suaoki portable power station with a 150 Wh battery capacity. How many times can I recharge my MacBook Pro from this? Checking the Mac’s System Information data, I infer it has a 3S lithium battery with an 11.1V nominal voltage. System Information says the battery’s fully-charged capacity is 5182 mAh (which means my battery is old and tired), so that’s 57.5 Wh. A bit of web searching reveals that a fresh battery should have a capacity of 71.8 Wh. That means I should be able to recharge my MBP from 0% up to 100% twice, before exhausting the Suaoki’s 150 Wh battery.

Is the charging current over-taxing the Suaoki? How much current am I actually drawing from it? 85W of output power with 95% efficiency implies about 89.5W of input power to the boost regulator. At 12V that would be roughly 7.5A drawn from the Suaoki battery. But the Suaoki’s lithium battery falls to about 9V before it’s dead, and at 9V it would take 10A to reach the same number of watts. The Suaoki’s 12V outputs are rated “12V/10A, Max 15A in total”, so in the worst case I’d be running right up to the maximum.

What happens if I charge my MacBook and charge a couple of phones from the Suaoki’s USB ports at the same time? Would this be too much? I wouldn’t be exceeding the maximum rating of the USB ports, and (probably) wouldn’t be exceeding the maximum rating of the 12V ports, but the combination might be too much. At 85W for the MacBook, and maybe 10-20W each for two phones, the worst-case total could be as much as 125W. The Suaoki manual says “the rated input power of your devices should be no more than 100W”, but I think this refers to the AC inverter, not the system as a whole. Powering 125 watts from a 150 Wh battery is a discharge rate under 1C, which seems quite reasonable for a lithium battery. It’s probably OK. Now, back to charging!

Read 10 comments and join the conversation 

10 Comments so far

  1. Byte Knight April 17th, 2020 10:57 am

    Cool project! I can’t justify cutting up an expensive MagSafe though. I’ll take the energy loss with my MacBook Pro power supply plugged into the inverter of my solar-powered Jackery 160, especially since it’s free (mostly) energy!

  2. Dave April 20th, 2020 12:47 pm

    I did this Magsafe trick for my first gen Macbook back when it was new. I was starting with Peace Corps in a location that didn’t have reliable power and wanted to bring along a computer. Magsafe 1 was brand new and there was no automotive adapter available yet.

    I used a few portable rigid solar panels (about 12″ x 30″ each), a charge controller, a 12V 12Ah lead-acid battery and a boost regulator for the laptop. I chopped the Apple charger cable and added connectors so I could connect it to either the boost regulator or the original AC power supply. The whole getup fit in my luggage but was quite heavy. I got a little extra attention from airport security but they let me through.

    The only strange thing using the Magsafe cord this way was that the green indicator LED never turned off, even when the Magsafe connector was unplugged from the Macbook. Evidently the shutoff is in the charger and the LED is lit as long as the cable is powered.

  3. Steve April 20th, 2020 2:04 pm

    Neat! I see a slightly different behavior with the green indicator LED on the MagSafe connector. It stays on for maybe 10-15 seconds after unplugging it from my Macbook, then it slowly fades out. Capacitors are probably keeping it alive during that time.

  4. Darko April 23rd, 2020 10:53 am

    Did you tried with hooking it up directly?
    You mentioned that some Apple charger outputs 14.85V, maybe MB is able to charge from as low as 12V.

  5. James W April 24th, 2020 10:12 pm

    Re “battery was charging at a rate of 1737 mA […] This seemed low – with the battery at 12.2V, that implied it was charging at roughly 21W” — While the input to the DC-DC boost regulator is ~ 12 V, its output to the MacBook Pro is 19 V, which times 1.737 A is about 33 watts. The draw from the 12 V battery at a 33 W level 95% efficient would be 33 W / 12 V / 0.95 = 2.9 A which is about an amp more than the draw at 21 W.

  6. Àlber April 27th, 2020 2:04 am

    In response to Jame W message, actually the charger is supplying current to the battery AND the Macbook electronic circuits. The current indicated by System Information is only the current provided to the battery. We don’t know how much current is provided to the Macbook. Therefore, the charger might be providing more than the 21 W that Steve calculated.

  7. Steve April 27th, 2020 6:35 am

    I can rearrange some components to measure the current directly. The Macbook draws about 0.6A from the battery when it’s not connected to external power. I’ve also checked the current through System Information when the battery is closer to empty, and it shows numbers that imply battery charging about 40-50 watts, not including the extra power for the computer itself that Àlber mentioned. I get similar numbers when connected to a regular AC wall charger, so I think it’s normal. Perhaps 85 watts is only reached on the 15 inch MacBook Pro; I have the 13 inch model.

  8. DrBunsen April 28th, 2020 6:09 pm

    There are Magsafe and Magsafe 2 leads available for cheap on ebay, with your choice of bare wire or a DC socket at the other end. In my experience they ID as real to the Mac’s charge controller.

  9. DrBunsen April 28th, 2020 6:11 pm

    I noticed the same slowly fading green LED behaviour that Steve mentioned on my rig, too.

  10. MLewus May 1st, 2020 7:56 am

    Apple did not make a Magsafe2 car charger but at least one third party manufacturer did make a Magsafe (“one”) charger, and there are (or were, anyway) Magsafe-to-Magsafe2 plug adapters available to allow you to use your old charger on a newer MacBook. I have used one for years on my 201t MacBook Pro. But those adapters were very expensive, I think I paid $70 for mine, so this is still a very useful project.

Leave a reply. For customer support issues, use the Contact page instead of comments.