Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ryancdavison/5c705d78cb5c14a809d0ba5a02ab1ba4 to your computer and use it in GitHub Desktop.
Save ryancdavison/5c705d78cb5c14a809d0ba5a02ab1ba4 to your computer and use it in GitHub Desktop.
iPad Pro 12.9 (2020) Magic Keyboard Portrait Mode DIY Smart Connector Cable

iPad Pro 12.9" (2020) Magic Keyboard Portrait Mode DIY Smart Connector Cable

I wanted my iPad Pro to be able to use the Magic Keyboard in portrait mode, but the current Smart Connector configuration does not allow this. With too much time on my hands, I made a short jumper cable using a section of USB cable, 5-pin POGO connectors (the 5-pin works using pins 1, 3, and 5, and removing pins 2 and 4), a small electrical project box, 3mm N52 magnets, and some epoxy and Sugru to pack everything into place. My cable and connections orientation had more to do with the boxes I found to encase the connector (with holes on the small end) than anything else. Obviously, there will be many ways to do this.

WARNING: Getting any of these steps wrong will probably ruin your iPad.

Note: These measurements are for the 12.9" (2020) model. The magnets did not line up and the polarity was different for my wife's iPad Pro 11" (2021).

iPad-Pro-MmagicKeyboard-Jumper-Cable-min See it work here: https://youtu.be/oCA5d8SNOYs

Components:

Connector Prep:

I sanded the connector down just a bit to expose more of the tip of the POGO pins to stick through my case. You could just cut out a matching hole in the bottom of the case and set the connector flush and skip these steps.

  • Use needle-nosed pliers to gently pull the spring-type POGO pins from the connector piece. Don't lose them. i.e. drop them onto the carpet, they're hard to find and hurt when stepped on.
  • Push the magnets out of the connector with the tip of the pliers.
  • With everything removed from the plastic connector, and a bit of material off; not quite 1/16" (1.5mm) should be fine.
  • Carefully push pins back into the #1, #3, and #5 pins cutouts.

Cable Prep:

WARNING #2: Getting any of these steps wrong will probably ruin your iPad.

Note: These measurements are for the 12.9" (2020) model. The magnets did not line up and the polarity was different for my wife's iPad Pro 11" (2021).

  • Cut the ends off the cable and trim it to about 8.25in (21cm).
  • Cut the cable's external insulation back a little more than 0.75in (2cm).
  • On both ends, trim the internal insulation, plastic divider, and other wires back to the external insulation, leaving 3 wires: Red, White, and Black
  • On cable end "A":
    • Remove the insulation from the Red wire to expose about 3/16in (5mm) of copper wire for the solder connection.
    • Trim 3/16in (5mm) off of the Black and White wires.
    • Remove the insulation from Black wire to expose about 3/16in (5mm) of copper wire to solder.
    • Trim another 3/16in (5mm) off of the White wire.
    • Remove the insulation from White wire to expose about 3/16in (5mm) of copper wire to solder.
  • Cable end "B" must be opposite of end "A" for the correct layout.
    • Remove the insulation from White wire to expose about 3/16in (5mm) of copper wire to solder.
    • Trim 3/16in (5mm) off of the Black and Red wires.
    • Remove the insulation from Black wire to expose about 3/16in (5mm) of copper wire to solder.
    • Trim another 3/16in (5mm) off of the Red wire.
    • Remove the insulation from Red wire to expose about 3/16in (5mm) of copper wire to solder.
  • The cable should Reflect:
 Side A)                                                           (Side B
      R --- B --- W -- =========================== -- R --- B --- W     

Case Prep - POGO Pins - Side A

Note: These measurements are for the 12.9" (2020) model. The magnets did not line up and the polarity was different for my wife's iPad Pro 11" (2021).

  • On the exterior of the box mark the layout of the pins according to the measurements. POGO-pins-measurements
  • Drill the 3 pin holes with a 1/16in (1.8) mm bit.
  • Test the alignment of the case with the holes drilled against the POGO pins on the iPad Magic Keyboard to make sure the alignment is correct/close.
  • Test fit the POGO pin connector (with the #2 and #4 pins removed) in the case to make sure the POGO pins stick out enough to make contact.
  • Use 3 of the 3mm x 1mm N52 magnets and test the polarity of the magnet layout on the iPad (not the Magic Keyboard). Unfortunately, I do not remember the polarity layout. POGO-pins-magnets
  • I removed one magnet at a time, put a little epoxy into the case where the magnet goes, and placed it back and pressure fit it into the hole using non-magnetic pliers.
  • Repeat for the other magnet locations.
  • Stack additional magnets (3 high??) with a little epoxy against the inside of the case to help keep them in place.
  • Let this sit with the magnets keeping the unit in place for the epoxy to harden.
  • After the epoxy is hardened, I added more to make sure all magnets will stay in place. Make sure to leave room for the POGO pins.
  • I thought the magnets might scratch the iPad and that the magnets would be strong enough, so I left them inside the case without drilling holes for them as done in the next step. They aren't strong enough. Drill the holes and pressure fit them into place as done in the following steps.
  • You should be able to add additional magnets to the layout as seen in this iFixit photo of a scan from the Magic Keyboard from iFixt | Dang, The iPad Pro Magic Keyboard Looks Cool in X-Rays.
    • I will absolutely add more magnets next time; not drilled and pressure fit but just inside the case.
      MagicKeyboard_X_magnets MagicKeyboard_X_watermarked-scaled

Case Prep - Flat Contact Points - Side B

Note: These measurements are for the 12.9" (2020) model. The magnets did not line up and the polarity was different for my wife's iPad Pro 11" (2021).

  • On the exterior of the box mark the layout of the pins according to the measurements. FlatContactPoint-layout
  • Drill the 3 contact points and 2 magnet holes with a 1/16in (1.8) mm bit. MagicKeyboard_X_magnets
    • Next time, I will add additional magnets (not drilled and pressure fit) to the outside area as seen in the photo.
  • Drill with successively larger bits up to 3.0mm.
  • Pressure fit the 3mm N52 magnets into the two magnet holes.
  • I used 3 of the (weaker) 3mm magnets from the POGO connecter as my contact points and pressure fit them into the 3 flat contact point holes using non-magnetic pliers.
  • Carefully epoxy the pressure-fit-into-place magnets and contact points into place and let the epoxy fully harden.
    • Do not get epoxy on the top of the contact point where the solder connection will be.
    • I fully epoxied the non-contact point, working magnets, into place against the case walls.
    • I fully covered the joint between the case and the contact points to keep them in place.
    • Make sure the case, magnets and contact points are all pressed down and lying flat on the working surface. They should not be recessed at all.

Solder the POGO Connector

WARNING #3: Getting any of these steps wrong will probably ruin your iPad.

  • Solder the White, Black, and Red wires to the POGO connector pins based on the following configuration. Do not solder the Flat contact point yet.
 A - POGO Pins)                                                       (B - Flat Contact Points
  +--------------------+                         +--------------------+
  |   R     B     W    |=========================|   R     B     W    | 
  +--------------------+                         +--------------------+
  • Lay the POGO-pin case (case piece A) flat onto a working surface with the 2 magnets opposite of you and a single magnet closest to you. (The cable will go to the right)
  +--------------------+
  |  ◯   .  .  .   ◯ |
  |                    |===
  |◯                  |
  +--------------------+
  • Carefully epoxy the POGO connector into the case without getting epoxy on the POGO pin heads and let the epoxy harden.

Solder the Flat Contact Point Connector

WARNING #4: Getting any of these steps wrong will probably ruin your iPad.

  • Lay the POGO connector pin-side up and place the Flat Contact Point case (case piece B) onto the working surface with the contact point side down with the two magnets closest to you and the single magnet side opposite of you. The POGO pins end and Flat Contact Point end need to be on opposite directions for the cable to work well and remove the need to twist the cable.
                                                 +--------------------+
                                                 |◯                  |
                                              ===|                    |
                                                 |   ◯  *  *  *  ◯  |
                                                 +--------------------+
  • Solder the wires to the contact points. These must be in the same Left-to-Right order as the POGO pin side
 A - POGO Pins)                                                       (B - Flat Contact Points
  +--------------------+                         +--------------------+
  |   R     B     W    |=========================|   R     B     W    | 
  +--------------------+                         +--------------------+

Test your cable.

WARNING #5: Getting any of these steps wrong will probably ruin your iPad.

  • The cable should work now, allowing the iPad to utilize the Magic Keyboard while it is in portrait mode.

Close up the case

  • I packed the dead space in the case with Sugru to keep things from moving around. Keep a little bit of Sugru aside to close the unused cable gap in the case.
  • Snap the case shut.
  • Fill the unused cable gap in the enclosure with the remaining Sugru.

PXL_20220907_145345154 PXL_20220907_145425462 PXL_20220907_150900993 PXL_20220907_145437042 PXL_20220908_010227794 PXL_20220908_010333539

@twentysyl
Copy link

Can’t I use just copper wires soldered to the pogo pins ? Using the wires inside the usb 3.0 A to A is forced?

@ryancdavison
Copy link
Author

@twentysyl, probably. I just did it the way I did it because that's what I came up with at the time.

@fruitbow1
Copy link

So absolute long shot, I’ve got a 12.9” keyboard case & an 11” 3rd gen pro that doesn’t charge through the port 😅 I wanted to know if I could adapt this to work just for charging, am I likely to run into an issue where when establishing a data connection through the 12.9” keyboard and my 11” it will reject the accessory and won’t charge?

@ryancdavison
Copy link
Author

@fruitbow1, Oh, that's interesting. I bet you could adapt this to work.

@joelai99
Copy link

joelai99 commented Aug 15, 2024

@ryancdavison I am using a transparent case without the smart connector 3 pin. Can I drill 3 holes on my plastic case and glue with a copper metal on top of my iPad 3 pins to increase the thickness, so that it will connect with the Magic keyboard? Since I want to close the gap between the keyboard and the transparent case to the iPad pins.

@ryancdavison
Copy link
Author

@ryancdavison I am using a transparent case without the smart connector 3 pin. Can I drill 3 holes on my plastic case and glue with a copper metal on top of my iPad 3 pins to increase the thickness, so that it will connect with the Magic keyboard? Since I want to close the gap between the keyboard and the transparent case to the iPad pins.

@joelai99, I think so if I'm understanding correctly. Can you post a photo?

@TheLepo1305
Copy link

I wanted to know if by connecting only the ground and power cable you can charge the iPad Air 4? Does it follow the same diagram?

@ryancdavison
Copy link
Author

I wanted to know if by connecting only the ground and power cable you can charge the iPad Air 4? Does it follow the same diagram?

I don't know, sorry. One would have to test that the wiring is the same. I don't have an iPad Air to test this, but it should work the same if you are just trying to make a charging cable.

@TheLepo1305
Copy link

I wanted to know if by connecting only the ground and power cable you can charge the iPad Air 4? Does it follow the same diagram?

I don't know, sorry. One would have to test that the wiring is the same. I don't have an iPad Air to test this, but it should work the same if you are just trying to make a charging cable.

I mean, is it possible to charge the iPad without connecting the data cable?

@ryancdavison
Copy link
Author

I wanted to know if by connecting only the ground and power cable you can charge the iPad Air 4? Does it follow the same diagram?

I don't know, sorry. One would have to test that the wiring is the same. I don't have an iPad Air to test this, but it should work the same if you are just trying to make a charging cable.

I mean, is it possible to charge the iPad without connecting the data cable?

I've never tested that, especially with this type of cable connecting to the Smart Connector connection. It should work.

@SLKale07
Copy link

ipad_pro_2021_test_9

Thanks for the great post. Helped a lot. Just one question looking a the picture in this comment what is the pinout? from left to right is it: Ground ; Power(12V) ; data ?

@ryancdavison
Copy link
Author

Thanks for the great post. Helped a lot. Just one question looking a the picture in this comment what is the pinout? from left to right is it: Ground ; Power(12V) ; data ?

Sorry, I don't remember.

@bartosz-777
Copy link

bartosz-777 commented Nov 15, 2024

ipad_pro_2021_test_9

Thanks for the great post. Helped a lot. Just one question looking a the picture in this comment what is the pinout? from left to right is it: Ground ; Power(12V) ; data ?

definitely not 12V, more likely 5 like USB,
and I've found this image, it's for older iPad but I don't think the pinout has changed, for the orientation it's simple, if you have a multimeter connect USB C cable to iPad, set multimeter to continuity and with one probe touch metal shield of usb c cable with other touch SC pads to see if left or right one is ground

edit: pinout is most definitely correct, I just checked with led and its blinking between GND and DATA pins, probably iPad probing for accessory communication

BTW I was researching this cause I thought it would be cool idea to charge iPad like this but im scared to try, lmk if it works if you try it

https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Ftse1.mm.bing.net%2Fth%3Fid%3DOIP.aNAcyqQFT-Yh44H61OrruwHaCZ%26pid%3DApi&f=1&ipt=d87317f5754b1ac86df2b475d65e74267d5b22074e9e6b541fa34f407025793f&ipo=images

@ryancdavison
Copy link
Author

I've found this image, it's for older iPad but I don't think the pinout has changed, for the orientation it's simple, if you have a multimeter connect USB C cable to iPad, set multimeter to continuity and with one probe touch metal shield of usb c cable with other touch SC pads to see if left or right one is ground

edit: pinout is most definitely correct, I just checked with led and its blinking between GND and DATA pins, probably iPad probing for accessory communication

BTW I was researching this cause I thought it would be cool idea to charge iPad like this but im scared to try, lmk if it works if you try it

I would be scared to build my own charger as well.

https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Ftse1.mm.bing.net%2Fth%3Fid%3DOIP.aNAcyqQFT-Yh44H61OrruwHaCZ%26pid%3DApi&f=1&ipt=d87317f5754b1ac86df2b475d65e74267d5b22074e9e6b541fa34f407025793f&ipo=images


Just showing the image in page

@bartosz-777
Copy link

I've just tried it, doesn't work, I think it needs to communicate through data port or maybe even an resistor pullup/ pulldown, also checked and when I connect power it doesn't blink the diode on data port so it would most likely be waiting for some input, maybe @ryancdavison you could make some measurements with your keyboard connected to charger

I might make some more research if I find something I'll come back

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment