MagSafe: how the magnetic connection between two devices works

MagSafe is a magnetic connection technology developed by Apple for its products. Initially introduced for MacBooks as a secure connection method for chargers, it has also become available on iPhones. The idea is to manage any accidental stress on the charging cable: The MagSafe connector releases easily without damage to the device or cable.

With the introduction of MagSafe per iPhone, the technology becomes a suitable solution to offer magnetic wireless charging. MagSafe-compatible iPhones have magnets built-in devices that allow MagSafe chargers and accessories to magnetically attach to the back of the device for seamless operation. ricarica wireless safer and more stable.

MagSafe technology uses magnetism to align the charger on the back of the iPhone: in this way the positioning is always correct and wireless charging can take place efficiently. The same magnets also allow the attachment of various accessories such as cases, wallets or holders attach magnetically on the back of the phone.

The effect is clearly visible in this video with a MagSafe charger and with an Apple accessory: in all cases, the magnetic force establishes a “strong bond” with the iPhone regardless of orientation.

The secrets of how Apple MagSafe works

An independent researcher says he has always been impressed by the precision with which i MagSafe devices they manage to align themselves on the back of the iPhone. His interest was captured by a particular property of self-alignment of magnets. Thus, we decided to study how MagSafe magnets work by representing their relative ones magnetic fields and the forces generated by them.

Starting from Apple’s guidelines for the design and creation of compatible accessories, the researcher used the package Magpylib for Python in order to simulate magnet array behavior. He built 3D models based on measurements taken from Apple’s schematics and generated visualizations of the magnetic fields, using field lines to better understand their behavior.

Calculation of the forces involved and positioning of the magnets

Next, the researcher tried to calculate the forces generated by magnet arrays. After several attempts with different software and different approaches, he opted to simplify the problem by reducing the three-dimensional magnets to ideal point magnets and using physical equations to calculate the forces between them.

Once he found a suitable equation, he was finally able to calculate and visualize the magnetic forces responsible for thealignment of the magnets MagSafe. He produced animations that clearly show how the forces act on the array.

MagSafe, magnetic field lines of force

Interactive simulation of the magnetic field

When two MagSafe compatible devices are “connected” to each other, many magnetic lines of force allow a strong bond to be established. By applying an external force horizontally, the lines of force tend to separate from the center and at a distance of 6 mm, the magnetic field lines split. You can clearly see it in the animation published above.

To make his simulations more interactive, the expert ported his code from Python to p5.js, a JavaScript framework for creating interactive visualizations and animations. He created a simulation that allows you to move magnet arrays interactively using your mouse or mouse slider to dynamically display the lines of force magnetic waves generated downstream of each interaction.

The simulations and models are publicly available. Indeed, the author of the intriguing project invites users to experiment, explaining that his tests can pave the way for a series of future applications. Think about the possibility of developing and implementing “bimodal” devices which can adhere to different types of products as well as new devices such as a rechargeable MagSafe battery via USB-C.

The images are taken from Kavi’s video and the article “Magnetically Modeling MagSafe“.


Please enter your comment!
Please enter your name here