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 20 comments and join the conversation 

20 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.

  11. Niels - October 6th, 2020 3:05 am

    Great project, I will attempt the same. However, I have one small doubt. Without a load, the power pins provide 3V on a normal adapter and \”the full voltage is provided after a ~40 kOhm load is applied for one second\” (https://en.wikipedia.org/wiki/MagSafe). In this solution, 19V is always on the power pins. Would this cause any additional risk/danger when either connecting the magsafe2 to my macbook or when having the connector hanging around disconnected?

  12. Jay - November 26th, 2020 9:58 am

    Yes, it will continue to put out the full voltage no matter what, which is what an actual MagSafe adapter avoids in case of any type of issue. This is one of the main ways you can determine if a MagSafe adapter is fake or not. And yes, there’s a remote chance of fire (and compounding damage to the computer) in the case of failed components or liquid-damaged/shorting, etc. It’s extremely low, but not something I want to experiment with. Unless your new DC power supply has short-circuit protection, no matter what happens with the computer, it will just keep pounding full DC voltage into the computer. Genuine MagSafe adapters are, necessarily, complex inside.

    The reason the MagSafe light is staying orange, fading or not doing what it would normally do is because there is communication between the logic board and the MagSafe telling it when to turn on or off. Green means the computer is charged, so it sends the ‘turn off’ signal. The idea of it never switching the voltage down/off makes me uncomfortable. I would rather tear apart a genuine MagSafe adapter and see if I could bypass the AC input and tap into the internal protection circuitry, send my fixed DC voltage there, THEN go out to the computer. I think I will give that a shot.

  13. Steve - November 26th, 2020 10:28 am

    I’m not sure that’s correct. The build I described here uses a salvaged tip from a genuine Apple MagSafe charger, and so it includes the tiny IC inside the tip that talks to the Mac and controls the power and the LED. The green LED works normally when the computer is finished charging. There’s no communication between the tip and the DC power supply portion of the charger – it’s just two wires for power and ground – so I’m fairly sure there’s no “turn off” signal.

    My hunch is that the DC supply portion of the original Apple charger has some circuitry (independent of the IC in the tip) to switch the output voltage between 16V and a 3V standby voltage, depending on the current load. There’s more information about this here: http://www.righto.com/2013/06/teardown-and-exploration-of-magsafe.html

    I’m not sure there’s much cause for worry, because “full voltage no matter what” is how nearly every other DC charger works, including all chargers for PC laptops and virtually all other electronic equipment. Any decent charger will contain short-circuit protection circuitry.

  14. Jay - November 26th, 2020 5:13 pm

    Interesting stuff. So I’m confused then how it goes from 3V up to 16V once it’s plugged in. The power adapter is changing its voltage level based on a signal from the MacBook. I’m not quite sure how that signaling process works. Your idea of a current sensing circuit inside the power adapter makes sense. I’m going to have to tear one open and see if I can find it.

    As far as the DC power supply you’re using, I noticed after responding that it says it has all the necessary protection. Whether it does or not is, of course, uncertain. If someone is completely comfortable that their DC supply is protected then they would also need to be completely comfortable shorting positive and negative and seeing what happens. I don’t enjoy explosions or electrical fires so that sounds a little scary to me, but there’s no other way to know what would happen in case of a spill or short on the logic board so I would definitely recommend whoever is working on this to do that before trusting a power supply.

    Either way, very interesting stuff. I’m glad you’re pushing into it.

  15. Jay - November 26th, 2020 5:30 pm

    Ok, now that I’m thinking about it, the ISL6925 chip inside the Mac should work fine with 12V as input so would it make sense to just run a line directly from the battery (car, RV, etc) through a genuine MagSafe connector and just run a fuse inline?

  16. julien - November 30th, 2020 11:17 am

    Hi, do you have a scheme of how to create your DC magsafe charger ?
    thank u

  17. julien - November 30th, 2020 11:20 am

    Can I use the DC to MagSafe 2, from Omnicharge with an adapter 5.5×2.1mm to USB for exemple to plug in the 12V usb charger in my van ? would that work ?

  18. Shibuyaku - January 26th, 2021 8:33 pm

    Thanks for sharing. I bought up some ‘broken’ 85w chargers in my area for cheap and built DC-DC chargers using the salvaged cables.
    Given that my big inverter also is not the most silent piece of equipment, this is a nice improvement in energy efficiency and noise level.

  19. Mostafa - April 12th, 2021 8:56 am

    My car has a “12V – 120W” power socket for charging peripheral devices.

    The output of my macbook air 2014 charger is 14.85V – 3.05A

    Do you think I can buy a magsafe2 cable like https://www.ebay.com/itm/251525127886 and connect it directly to the power socket of my car?

    Or a 12V to 14.85V DC-to-DC boost regulator is needed?

  20. Steve - April 12th, 2021 9:17 pm

    I think you need a boost regulator. The car’s 12V is also likely unregulated and may be lower than 12V.

Leave a reply. For customer support issues, please use the Customer Support link instead of writing comments.