Connect with us

Using Macbook Magsafe Chargers

Discussion in 'General Electronics Discussion' started by yrhaid, Aug 15, 2013.

Scroll to continue with content
  1. yrhaid

    yrhaid

    2
    0
    Aug 15, 2013
    Hi Guys

    Short intro to my project: (main problem in bold below)

    I am attempting to do a project that involves replacing the innards of an old macbook with a raspberry pi. To power this, as well as a powered usb hub and possibly a micro arduino, I would like to use the standard magsafe charger. The problem with this is that there is a very specific interface that the charger must undergo before supplying power. This was documented by Ken Shirriff in his blog as follows:

    1. The charger provides a very low current (about 100 µA) 6 volt signal on the power pins (3 volts for Magsafe 2).
    2. When the Magsafe connector is plugged into the Mac, the Mac applies a resistive load (e.g. 39.41KΩ), pulling the power input low to about 1.7 volts.
    3. The charger detects the power input has been pulled low, but not too low. (A short or a significant load will not enable the charger.) After exactly one second, the charger switches to full voltage (14.85 to 20 volts depending on model and wattage). There's a 16-bit microprocessor inside the charger to control this and other charger functions.
    4. The Mac detects the full voltage on the power input and reads the charger ID using the 1-Wire protocol.
    5. If the Mac is happy with the charger ID, it switches the power input to the internal power conversion circuit and starts using the input power. The Mac switches on the appropriate LED on the connector using the 1-Wire protocol.

    I am fairly confident that the 1 wire protocol can be ignored, but even if it cant be, I could probably sort something out with a digital I/O on a micro arduino.

    The main problem that I need to sort out is to build a circuit that will provide 39410 ohms of resistive load for 1 second before switching the power to the main circuit. I was thinking that maybe I could use some sort of transistor, but I am quite new to this sort of think, and as such I am coming here to ask for advice.

    Many Thanks,

    Alex


    Further information: you can find the details of the magsafe connector and associated pins here(wikipedia)
     
    Last edited: Aug 15, 2013
  2. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,497
    2,838
    Jan 21, 2010
    Do you need to remove the load?

    It seems to me that you might be able to get away with having the "correct" resistance permanently across the power rail.

    Then you simply detect the voltage rising above 10V or so to turn on a series mosfet. You should be able to do that with a 10V zener and a resistor.
     
  3. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,497
    2,838
    Jan 21, 2010
    This might work:

    [​IMG]

    R1 provides the "magic" load. R2 is between 1k and 10k. Z1 is a 10V zener diode. Q1 is an appropriately rated mosfet.

    If your load is high, the mosfet will be subject to some heating as power is applied. It should be capable of dissipating some power, but a heatsink should not be required.
     

    Attached Files:

  4. yrhaid

    yrhaid

    2
    0
    Aug 15, 2013
    Thank you steve, that is a great help

    Just one quick question, what sort of load will these components need to be rated for? Assuming I'm playing it safe and going for something that won't burn up at 85w.

    Thanks again,

    Alex
     
  5. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,497
    2,838
    Jan 21, 2010
    R1 and R2, 1/2W should be aple.

    Z1, anything from 400mW up should be fine. You're right on the edge if R2 is 1k, make it 4k7 and you'll be fine.

    Q1 should be a logic level mosfet with a Vds(max) of at least 30V and an Id of at least 8A. It should have a Ptot of 30W or more and if it's in a TO-220 package you shouldn't need any further heatsinking.

    I can't guarantee this is going to work, but if there are no more timing considerations than you specified, it should.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-