For a guy who's spent most of his life with his fingers connected to the home row, adding this USB keyboard that I can really touch-type on has made a huge difference in the usability of the XO. This is "phase II" -- putting the cable inside the case and hard-wiring it into one of the XO's USB ports. The instructions for this phase should work for adding any USB device to your XO.

Even though I extirpated it from my OLPC laptop and yeah, I poked a little fun at it in Phase I, I really love the design of the XO's soft green keyboard. There's no Caps Lock key, which is brilliant, it gives you access to all kinds of useful (and fun) extended characters, and the Sugar interface keys simply look cool. I will probably have mine framed, now that I'm not using it.

This part of the project is relatively benign compared with Phase I; there's no dremeling, no squeezing of parts together, just a little solder that should be pretty easy to undo later if you really need to. That said, you have to be very careful in this phase for other reasons: this time, you're working with the heart of your XO laptop. It would be very easy to cause a short circuit with some stray strands of wire or to melt a PC board with the soldering iron if you're not careful. One worry I didn't have going into this was that I might bump the clock backup battery. I should have been worried about it! Turns out that Firmware version q2d06 will never boot again if the clock battery is dislodged while you're poking around in your XO, so upgrade to q2d07 before proceeding!Thanks, eden!

Things you'll need:

1. A jeweler's large phillips screwdriver (hopefully you haven't lost yours since Phase I)
2. The needliest needle-nosed pliers you can find
3. A pair of wire cutters or very small tin snips
4. A wire stripper set one notch below "angel hair"
5. A pair of scissors
6. A multimeter or a battery soldered to two wires and an LED, for continuity testing
7. One piece of cellophane tape (sorry cello fans)
8. A soldering iron
9. Solder (preferably lead-free)
10. Something to block the USB port your new keyboard will now permanently occupy, or a good memory for which port never, ever to use again
11. An OLPC XO laptop, preferably one that has an unsightly USB cable hanging out the back

Step 1: Skull Saw, Nurse

Luckily for me, I don't have to write any instructions on how to take apart your XO; all you need to do is visit the OLPC wiki:


You're trying to get to the USB ports, which are at the back of the XO's "head." Unfortunately, you can't just pop the back off and start digging, because the screws that keep the back panel from falling off are underneath the LCD. Follow the instructions through the third page. When I got to the LCD, I just removed it from the machine and set it aside on my desk on some of these things for safekeeping while I did the rest of the work.

Once you get the back cover off, though, you'll see that the geeks at OLPC must have wanted you to hack your XO this way; one of the USB ports is not like the others -- instead of being mounted perpendicularly to the motherboard, it's flat along it, which means that the pins are all visible and practically screaming out to be soldered to something: a hub? a 3G modem? Maybe my next project should be an internal USB aquarium...

Step 2: Cut the Cord

The only way we're going to get rid of that ugly usb cable hanging out the back of your XO laptop is to run it through the conduits in the XO's hinge. And the only way we're going to get the USB cable through those conduits is to cut its head off. It always makes me cringe to take a system from a working state to a non-working state, so if you're like me that way: don't worry, it will be okay! Have a lollipop.

Cut the cable at least 5 inches from the end, so you can fold the it over and put both ends next to each other. Let's call this piece of cable "Stumpy." We're not going to throw Stumpy away just yet; he can teach us some things about USB cables and give us some practice handling these wires before we start modifying the end of the cable that will actually be part of the machine.

Now, take the part of the keyboard cable that's still attached to the keyboard (and by extension, your XO), and carefully thread it through the side of the hinge. Pull the cable all the way through, then feed it up through the top of the hinge into the head of your XO. If the cable gets stuck, needle-nose pliers will really help. Don't worry about damaging the very end of the cable; we're going to cut a lot of that off.

There's a nice heat shield covering most of the motherboard that provides a great place to run the keyboard cable. Just lay the cord along the bottom of the heat shield, pull it through the support at the left edge. To make it around the corner, I had to unscrew one of the heat shield supports (as shown in the third photo).

Step 3: The Leg Wire's Connected to the Hip Wire

Remember Stumpy? You saved those last few inches of cable, right? Use your wire cutters to nibble into the insulation around Stumpy's cut end until you can peel the insulation back an inch or so, exposing a thin metal sheath, a lot of stranded wire, and four wires with colored insulation around them. Find the setting on your wire stripper that takes off the colored insulation from these colored wires without pulling out any strands of actual metal.

After you strip each end, roll the bare wires in your fingers until the strands of wire are twisted around each other. This will keep loose strands from one wire from accidentally making contact with another wire and ruining your day.

Use your wire cutters to open the housing on Stumpy's USB connector, so that you can get at the four pins inside the end. A little like opening a can of beans. Mmm, shiny conductive beans.

Now we're going to test continuity so we can find out which pins inside the USB connector go with each color wire inside the cable. Put your multimeter into resistance mode (ohms) or continuity mode, and clip or press Stumpy's wires to either lead. With the other lead, touch each pin until you see a low resistance reading or the continuity alarm sounds. Write down which color went with which pin. You can start numbering them from the top, bottom, left, or right. My list looked like this when I was done:

Red - pin 1
White - pin 2
Green - pin 3
Black - pin 4

And what about that big mess of stranded wire? Test it against the connector's housing -- bingo!

Hold Stumpy's connector up to the USB socket we found in step 1 as if you were going to plug it in. Note how your numbering scheme lines up with the circuitboard pins leading to the USB port.

Step 4: Measure Twice

We're just about ready to make this permanent!

Pull the cable backwards along the heat shield toward the hinge to give yourself the maximum amount of extra that can comfortably fit, just in case you make a mistake and need another inch of cable later on.

Cut the cable about an inch and a half longer than it needs to be to reach the USB port pins.

Just as we did with Stumpy, we're going to peel back the cable, but this time we're going to have to trim things carefully to get the wires to land on the USB port's pins. Twist the bare, uninsulated wire into a bundle, and cut away the foil shielding with a pair of scissors, but don't strip the colored wires yet.

Fan the wires out like fingers in the proper order; black, green, white, red, with the bare wire as the "thumb" of the hand. Turn the cable around to approach the four USB pins from the edge of the case, avoiding the heat shield altogether.

With the bare wire "thumb" on the USB port housing, see how long the wires will have to be to reach the USB pins on the motherboard. Marking them with a pen would be a good idea; I didn't, and had to pull a bit to get them lined up right after stripping and cutting.

Strip, twist, and cut each wire to the appropriate length to reach its pin, but make sure you do it away from the motherboard. If any of those strands gets into your system, it could cause a nasty short circuit and that could be the end of your XO. The wires will be different lengths, just like your fingers -- wow, this analogy is really good. Give each wire another twist after you cut it to make sure there aren't any stray strands that might touch other pins, the motherboard, the housing of the USB port, etc.

Step 5: Suture With Solder

Time for the closing act of this here brain surgery. Pre-heat your soldering iron!

Here's where our single piece of cellophane tape comes in; lay the "hand" in position, then tape the fingers down. All "fingertips" must be in place, each touching its respective pin on the motherboard, with the thumb lying over the USB port's metal housing (where you're about to solder it). Make sure there isn't any excess wire anywhere that could fall over the edge and touch the motherboard.

Solder the "thumb" into place anywhere on the metal housing of the USB port, then rip the tape off of the fingers and start soldering them into place. Tinning the fingertips by heating them and applying solder before you actually make the joint will help you avoid cooking the motherboard too much (sorry the second picture's so blurry).

Hook up the monitor, make sure nothing is plugged into the USB port you just modified, and power it up! Getting the "USB Keyboard" message on boot seems a little weird with nothing plugged into the USB ports, doesn't it?

Step 6: A Few Last Touches

Check to make sure everything still works; you should be able to access your wireless network, the other two USB ports, and you should be able to close the laptop or flip the screen around to tablet mode without forcing anything or feeling any tightness.

If everything's good, reassemble your XO and bury Stumpy out back next to "Cheeks" the hamster!

I made myself a little sticker to cover the USB port so I wouldn't absently plug a thumbdrive or USB plasma globe into that port by mistake.
It may be easier to just plug stumpy into the USB&nbsp;port and then test continuity directly from the stripped wire ends to the solder pads on the PC board.<br /> <br />
Cool job. Is this going to be the last Phase? These laptops are really cool, I could have one in my room on my table, then I could Instructable anytime I want!
you dont have your own computer?
I have 2 computers. No laptop.
why dont you put yours in your room?
Parents won't let me.
lol, i have 2 desktop computers (a MicronPC monster running XP Pro and a Compaq running ubuntu , 1.7Ghz Pentium4, 20 GB HDs in each, neither one plugged in), a G3 tray-loader iMac (333Mhz, runs Jaguar (10.2) excellently, beats my laptop in speed) and my HP laptop that i got for free because it didnt work. I fixed it and it runs perfectly now (2.8Ghz Celeron) :P :D
that sucks, i think i know whats going through their mind, PORNO! PORNO! PORNO! like a siren, not trying to be mean or anything
my parents won't let me for that reason. but then again, theyre right...
na man that's whats going through <strong>my</strong> mind<br/>
Errrr...for GM? thats a little weird..
no lol for me hahaha jk
I guess there could be one more phase, if I really wanted to stretch it; I have been pondering some keyboard remappings...but that's probably not as interesting. =)<br/>
Great instructions! I wonder if it is necessary to use one of the external USB ports though? I thought I saw somewhere that the OLPC motherboard has 4 USB ports, 3 of which are connected externally. I actually thought of trying to add a bluetooth adapter to the 4th one, if it exists that is...
There IS an unused 4 pin connector on the mobo near the upper right corner of the south bridge. I can't find documentation on it ANYWHERE. I really want to soldier a USB drive to it and lay it over the codec chip if that is in fact a USB port in disguise..
Thanks!<br/><br/>Yeah, I looked into that before I went ahead with this, and it turns out that the USB host controller in the XO does support four ports, but if I understood correctly, one of those is used by the Wi-Fi interface.<br/><br/>OTOH, it would be pretty easy to fit a small hub into the machine to handle multiple internal peripherals. Bluetooth would be nice for a mouse -- it would be cool to build-in one of those bluetooth fabric keyboards and dispense with routing the keyboard cable altogether. =)<br/>
Always using bluetooth for the keyboard sounds would probably drain the battery a bit faster. Are you sure about the fourth port being used for the WiFi interface? Any references? Another question. Are you still able to close the lid of the OLPC with the new keyboard? When you do, are any keys being pressed? If there are keys pressed, it might interfer with the ability to use the OLPC in tablet mode.
Pretty sure...my reference was a PDF (maybe from laptop.org?), but I can't find it again now...should've del.icio'ed it. In tablet mode, the screen does hit the keyboard. That's because the back of the "head" of the XO is convex, vs. the concave front. So, if you use tablet mode, you're probably better off simply disconnecting your stuck keyboard and always using an external USB model. Of course, one of those fabric bluetooth keyboards would not have this problem, but from playing with one, I don't think the feel of those is as good as the basic XO keyboard. However, the lid does close and latch; not as readily as before, granted. I have noticed that keys are often pressed while closing it, but as far as I can tell, they don't stay pressed while it's closed. Hopefully, the upcoming suspend mode software update will make closing the XO useful. *grin*

About This Instructable




More by labelreader:Cat-Powered Automatic Cat Feeder Finishing the Job: Installing a USB Keyboard into an OLPC XO Laptop, Phase II Installing a USB Keyboard into an OLPC XO Laptop, Phase I 
Add instructable to: