10 ms·
Macbook charger teardown: Complexity inside Apple's power adapter (2015)
- nilved 10y agoPrevious discussion: https://news.ycombinator.com/item?id=10628212 https://news.ycombinator.com/item?id=10628212
- Someone1234 10y agoMaybe add 2015 to the title. This same blog post has been linked a good amount before.
- sosuke 10y agoAre other laptop chargers similarly complex? Dell, HP, Microsoft etc
- revelation 10y agoOnce your power supply is capable of delivering >=75W, european norm 61000-3-2 requires you to implement power factor correction (PFC), which makes complexity balloon. All name-brand laptop chargers will usually have it.
- vonmoltke 10y ago> requires you to implement power factor correction (PFC), which makes complexity balloon Depends on how much is required and what your size limits are. Apple used active PFC here to minimize the size of the brick. An ATX desktop or server supply might be able to get away with passive PFC, which is not very complicated but tends to be bulky.
- TD-Linux 10y agoAll desktop and server power supplies use active PFC at this point, because the cost of the much bulkier passive components is now higher than the cost of the active ones. EDIT: apparently not quite, I went on Newegg and the non-80plus power supplies still have passive PFC.
- vonmoltke 10y agoSure, simpler active PFC components are pretty cheap now. There isn't much to a valley-fill circuit, though. That should get you below the legal limit on harmonic distortion in most cases. I know it is still the standard PFC in lower-power fluorescent light ballasts.
- unixhero 10y agoHP chargers / bricks for their high end laptops are pure engineering marvels. http://www.terapeak.com/worth/genuine-hp-elitebook-8760w-8770w-probook-4730s-ac-adapter-power-supply-charger/401148587307/ http://www.terapeak.com/worth/genuine-hp-elitebook-8760w-877...
- kens 10y agoI looked inside an IBM laptop charger and it was considerably simpler than the Apple charger. Since it always outputs power, it doesn't include the microcontroller in the Apple charger. The other circuitry was somewhat simpler (it didn't output multiple voltages), and the IBM charger didn't go to as much effort to be compact.
- dewiz 10y ago> One problem with simple chargers is they only draw power during a small part of the AC cycle.[5] If too many devices do this, it causes problems for the power company. What kind of problem?
- fisherjeff 10y agoSee https://en.wikipedia.org/wiki/Power_factor#Importance_of_power_factor_in_distribution_systems https://en.wikipedia.org/wiki/Power_factor#Importance_of_pow...
- revelation 10y agoI think this is referencing what is known as "power factor": https://en.wikipedia.org/wiki/Power_factor#Importance_of_power_factor_in_distribution_systems https://en.wikipedia.org/wiki/Power_factor#Importance_of_pow...
- soneil 10y agoI'm mostly familiar with this from UPSes, but I assume it's basically the same problem on a different scale. Lets say you have a device that requires 110 Watts - 1 Amp at 110 Volts. And you have a UPS that is rated to provide exactly the same. In an ideal world (spherical cows, etc), and a device with a power factor of 1 (e.g., perfect), this works. But if you have "non-sinusoidal current" (as his footnotes word it), your device isn't actually pulling 1 Amp. If you graph the voltage and current draw out, you should see the current draw forms a wave that matches the voltage (in shape, not value). If it doesn't, then at some parts of the wave, you're drawing more current than you claim - and at others, you're drawing less. So you're still drawing 1 Amp on average, but at any given instant, you're probably not. So back to our spherical cow UPS. What looks like a perfect match on paper, goes wrong - 60 times a second, you're drawing more than those 110 Watts and causing an overload condition. And it's an issue that gets horrible when you scale it, because every device is receiving exactly the same wave form - so every device is using more than you think at precisely the same time. Like the trope of people jumping on a bridge at the same time, each consumer causes the same condition in perfect unison with each other.
- 10y ago
- planteen 10y ago> A powerful microprocessor in your charger? > One unexpected component is a tiny circuit board with a microcontroller, which can be seen above. This 16-bit processor constantly monitors the charger's voltage and current. It enables the output when the charger is connected to a Macbook, disables the output when the charger is disconnected, and shuts the charger off if there is a problem. This processor is a Texas Instruments MSP430 microcontroller, roughly as powerful as the processor inside the original Macintosh. I'm not surprised at all. Microcontrollers are ubiquitous. There's little reason to use something like a 555 timer anymore. I wouldn't have been surprised if this had been a 32-bit ARM MCU (or a 8-bit PIC).
- eon1 10y agoYeah, it wouldn't surprise me if this is fairly common, especially when you consider what happens when a lipo battery has a 'problem'. I'd want whatever's charging that up to be as exacting as possible.
- dfox 10y agoAll the charging circuitry resides in the laptop itself, the AC adapter is just a power supply. The reason why there is all this complexity is the MagSafe connector that makes it physically trivial to short the power pins together, which given the power levels involved might very well be plausible fire hazard.
- kabdib 10y agoOn one project I was on, we used a 16-bit MCU for a power controller. Cost less than twenty cents, and we got a lot of functionality out of it (you can cram a bunch of complex logic into 2K of code). Near the end of that project, the hardware engineers came to us and apologized; they had managed to source a part for the same price with twice the code space. Could have used that, would have saved quite a bit of space optimization effort.
- planteen 10y agoShould have had your supply chain people push the vendor/distributor on price of the half code space part to make all of that cramming NRE worth it. ;-)
- jheriko 10y agonow if they can just make it earthed by not lacquering the connector designed for that purpose to make it shiny... maybe macbooks everywhere will stop giving people shocks (!)
- TD-Linux 10y agoDouble-insulated appliances don't need to be earthed.
- jheriko 10y agoa long time ago i used to work in a factory testing fairly low build quality computers, if i did their qa process on macbooks they would fail this 15 year old test because of this. i know that us standards are often different to uk, europe and others in this regard. maybe it is safe and our standards are paranoid, but i don't enjoy electric shocks, no matter how small they are... and from talking to others, this is not an uncommon experience - at least on 2013 and newer macbooks using the UK version of the plug
- beedogs 10y agoA small amount of current leakage is actually normal in a well-designed switch-mode power supply, as odd as that may sound.
- jheriko 10y agonot into my body its not. at least based on my many years of using electrical devices - i've not seen this kind of problem on the same level that i can remember, except for the static build up on old CRT TVs.
- cnvogel 10y agoThere will be some kind of current into the "Ground" terminal on the output (i.e. your computer case) for most small switching power supplies (two-prong without separate protective earth pin). This current is caused by the "Y-Capacitor" which goes between the secondary ground/shielding and one of the power inputs. http://electronics.stackexchange.com/questions/216959/what-does-the-y-capacitor-in-a-smps-do http://electronics.stackexchange.com/questions/216959/what-d... This is needed for proper EMI/RF immunity and because of this you often can measure the line voltage (or half of the line voltage, depending on how the Y capacitor is connected internally) on the output pins with a high-impedance multimeter. No significant current can flow, though, because at the line frequency (50 or 60 Hz) the impedance of the Y capacitor (typically 1nF or so) is pretty high (2.5MOhm). For 230V, this would correspond to 0.1mA.
- bArray 10y agoThe price list at the bottom [1] isn't fair, a company like Apple usually pays more for it's components for "higher" quality (usually a probabilistic reduction in failure rate). Things are so bad in the industry that it's not possible to get some of the higher rated components because Apple has bought them all. [1] List (from reference 19 on the site): Component Cost MSP430F2003 processor $0.45 MC33368D PFC chip $0.50 L6599 controller chip $1.62 LT1460 3.3V reference $1.46 TSM103/A reference $0.16 2x P11NM60AFP 11A 600V MOSFET $2.00 3x Vishay optocoupler $0.48 2x 630V 0.47uF film capacitor $0.88 4x 25V 680uF electrolytic capacitor $0.12 420V 82uF electrolytic capacitor $0.93 polypropylene X2 capacitor $0.17 3x toroidal inductor $0.75 4A 600V diode bridge $0.40 2x dual common-cathode schottky rectifier 60V, 15A $0.80 20NC603 power MOSFET $1.57 transformer $1.50? PFC inductor $1.50? On a side note... I've seen the case where Apple's standards for compliance are set using the components they buy the highest grade of - making it even more difficult for external companies to implement compliance. It was bad enough that the standard chip, recommended circuit and recommended testing tools failed to meet their requirements. NOTE: Apologies to any users where the screen is stretched.
- blackguardx 10y agoThe only parts on that list that would have different grades are the capacitors. It isn't a measure of quality, but the temperature and stability specs of the dielectrics. EDIT: Source: I'm an electrical engineer and design electronics for a living and have even worked with ex-Apple engineers.
- bArray 10y agoI know some processors (mostly of higher end processors) do but I don't know if specifically that processor does. I do know that at least some manufacturers will offer automotive and aerospace grade parts if requested (if not for the extra money). There's also the fact that it's off the shelf completely because there are none left to buy because somebody else already has them. If I remember rightly it can have something to do with the component failure rate on a silicon slate. I've also heard of stories where processors that have a co-processor by design fail for some reason and are sold for their larger processor capability only. I've seen this with an ARM chip.
- rectang 10y agoAn amazing amount of thought went into the design of these power bricks. Now... What does that say about their choice of fray-prone insulation? Obviously they are aware of those of us who have to buy new power bricks regularly because the insulation has shredded. (I have to buy a new one about once a year.) In some proportion, we are either 1. a profit opportunity or 2. collateral damage of an engineering decision to favor that thin insulation for flexibility or whatever. I'd love to know their analysis!
- GuiA 10y agoMy pattern is that I buy a MacBook, use it for a few years, resell it and get a new one. I'm at my 5th or 6th MacBook in over 10 years, and I've always sold the laptops back with their original charger. I have a 2011 MacBook Air that I take everywhere with me - the battery is at over a few thousand cycles (and lasts about 40 minutes) last time I checked. The charger for this one is dirty and chipped, but not frayed. I've seen frayed cables, so I know it's a real problem, but given my experience I can't help but wonder... what are people doing with their chargers?
- josefdlange 10y agoThis! This! I used to lose chargers frequently, when I was in college, but I didn't take good care of them. Knowing how I treated them then (Stuff in bag, and even if I wound it, it was without the slack you're supposed to give the cord coming off the brick) it doesn't surprise me that I destroyed so many. Now, I've had the same charger for three years without issue. I suppose part of that lifespan improvements is I really have two of them -- one for my desk that never moves, and one that's always secured in my bag and well-wound. I wonder if I had just one and moved around with it all the time if things would be different.
- ssharp 10y agoIt could be good fortune but I've been on Macbooks since around 2003 and have had substantially better luck with power adapters since MagSafe came out. I had a few pre-MagSafe adapters fail but the only post-MagSafe adapter I've had break was a knockoff.
- awesomerobot 10y agoAmazing that so much thought goes inside the adapter, but they still manage to completely skip any worthwhile stress relief on the cable ends. One of the reasons I know how to solder wire is because I got tired of buying a new adapter every year.
- jjellyy 10y agoTitle would be less ambiguous if it said Macbook Pro charger, since they have laptop called Macbook and it uses a different charger.
- codecamper 10y agooh yes... a classic read. a perennial favorite!
- j_koreth 10y agoI wonder if its possible to run linux off a power adapter...
- kirrent 10y agoNo implementation for the MSP430 as it stands, but I can't see why not. https://en.wikipedia.org/wiki/%CE%9CClinux https://en.wikipedia.org/wiki/%CE%9CClinux
- monocasa 10y agoMSP430's only have 64K of address space, which isn't enough to run even uCLinux.
- c-smile 10y agoBut it is quite a lot for CP/M - https://en.wikipedia.org/wiki/CP/M https://en.wikipedia.org/wiki/CP/M
- monocasa 10y agoEh, it's low even for CP/M. MSP430s have 64K of address space, not RAM. Even the smallest CP/M machines had that. A lot even had simplistic paging hardware to exceed that.
- hatsunearu 10y agoDepending on the model, it only has 512B of RAM, lol
- pivo 10y agoThe linked video of how bridge rectifier works is enlightening, funny and terrifying. Makes me glad I'm a software developer and not an electrical engineer so I'm in no danger of killing myself if I miscalculate. https://www.youtube.com/watch?v=sI5Ftm1-jik&feature=youtu.be https://www.youtube.com/watch?v=sI5Ftm1-jik&feature=youtu.be
- SAI_Peregrinus 10y agoElectroBOOM's videos are all like that. It's a comedy channel.
- wrigby 10y agoHis videos are extremely entertaining, but his disregard for safety exaggerates the danger a little bit. My understanding is that most bridge rectifiers are put in a circuit after a step-down transformer, so they're operating on a much lower AC input voltage. Also, don't wrap the safety ground pin on test equipment with kapton tape. Just don't.
- hatsunearu 10y agoThey can be, and they are in certain linear PSUs. Linear PSUs generally make ripply DC with linear power transformer -> rectifier and then use active linear analog circuits to get clean DC power. Has very low efficiency but exceedingly low noise. For most consumer things, you use a classic switch mode power supply design. You bridge rectify mains directly, and you switch that really fast to get the DC you need, and you filter it a lot.
- acrefoot 10y ago> AC power enters the charger and is converted to DC. The PFC circuit (Power Factor Correction) improves efficiency by ensuring the load on the AC line is steady. The primary chops up the high-voltage DC from the PFC circuit and feeds it into the transformer. Finally, the secondary receives low-voltage power from the transformer and outputs smooth DC to the laptop. I had a hard time reading this. It sounds like the transformer is getting DC power? Do transformers even work with DC power?
- paulmlewis 10y ago> The primary chops up the high-voltage DC from the PFC circuit and feeds it into the transformer. It chops it up to AC for the transformer.
- yayitscaroline 10y agoAh, this makes sense. Do you know how the "chopping it up into AC"works?
- paulmlewis 10y agoI'm no expert so may be corrected, but I assume just an inverter https://en.wikipedia.org/wiki/Power_inverter https://en.wikipedia.org/wiki/Power_inverter
- qntty 10y agoThis transformer would be a flyback transformer therefore doesn't need to be driven by anything so hard-to-generate as a sine wave. It can be driven by a "switch" (MOSFET) at it's primary which is connected to DC. https://en.wikipedia.org/wiki/Flyback_transformer#Operation_and_usage https://en.wikipedia.org/wiki/Flyback_transformer#Operation_...
- cnvogel 10y agoAll switching power supplies (hence the name) are driven by either full-on or full-off ("switching") transistors. A "flyback" topology is only one of many possible ways to build a switching power supply, but as it's the simplest, it's the most common in low power supplies. See the Switch−Mode Power Supply Reference Manual from ON Semiconductor for info on all the other possible ways to build a switching power supply.
- yayitscaroline 10y agoAmazing that today's laptop chargers have as much computational power as the original mac
- otterpro 10y agoI've owned couple of Macbook and Macbook pros since 2009 and never had any issue with the fraying, but I've seen one case of fraying from a friend's Macbook Pro just few months ago. I didn't think she'd abused her adapter in anyway. On a side note, I had every single original iPhone charging cable fray after less than couple of years of use (including 30pin and lightning cables from iPhone 3, 3G, iPhone 4, and my current iPhone 6). It is very annoying. A good way to fix is to use Suguru (https://sugru.com/how-to/fix-a-broken-cable https://sugru.com/how-to/fix-a-broken-cable), which seems to be made to fix things like this, and stronger than heat-shrink tubing.
- deleted 10y ago[deleted]
- tanqueray 10y agoMine have always lasted for Macbooks, as I never take them out with me. Phones/iPads start fraying after a year or so if you chuck them in bags etc.
- fpoling 10y agoI guess USB-C charger for newer MacBooks is even more complex. Still I wish Apple paid more attention to designing cables and connectors. In my case the cable broke within weeks and after a year the USB-C socket on the power supply became loose randomly disconnecting the cable :(
- tgfgvc 10y ago"plugged in, not charging" problems are very common with Macbooks. Maybe a simple charger would work better.
- zakomon 10y agoCan anyone give me a quick summary?