Saturday, December 9, 2017

DIY laptop

Some time ago, laptops have displaced desktops as primary machines for many, perhaps most, users who don't go in for high-end gaming, and I am no exception. Now my trusty Thinkpad T500 has been getting a bit long in the tooth, and recent models coming on the market have been less than inspiring — I had hopes for Thinkpad Retro, but it turned out to be just a very expensive T470 with a better keyboard — so I was toying with the idea of a DIY laptop. This post is a dump of my research (such as there was) and considerations pertaining thereto.

My list of requirements for a DIY laptop is

  1. good 15" display
  2. good keyboard
  3. powerful: good upgradeable CPU, lots of memory
  4. be presentable and approach laptop-class size and thickness

1. For the first point, there is nothing better than the LP154WT1-S* or LSN154YL0* "retina" LCDs that are installed in MacBook Pro 15.4" A1398 models. Like my T500, these are 16:10, a rarity in an age when every other maker has given up and is putting 16:9 (or even wider) movie panels into their laptops. I (and a lot of other people) need the laptop for work, not for goddamn movies! Anyway. These panels have a standard 30-pin eDP interface, but use a rare connector part need a custom board for the lighting controller/power supply. Fortunately for the DIY laptop project, a couple of hardware geeks have figured it out and shared schematics, part numbers and so on. Replacement panels can be bought on panelook and eBay; a bare panel costs $160-$180 and would need diffusers and backlight LEDs, while a complete display assembly is now north of $300 and isn't usable as such anyway due to branding. However, diffusers and backlights from MBPs with totaled LCDs aren't difficult to find. MBP's complete display assembly is 7mm thick in the thickest place — the bulge with the logo — so 5mm is probably a reasonable target thickness for a DIY display assembly.

2. Replacement classic 7-row Thinkpad keyboards with trackpoint are excellent quality, cheap and easily obtainable, and being so popular other hardware geeks have figured out how to connect them to computers. The trackpoint has a PS/2 interface, but the keyboard itself needs a microcontroller with firmware to read the key matrix and generate appropriate messages. This calls for a custom board, but any DIY laptop would need one, so it's not a big deal. The biggest problem with the keyboard is that it has to be screwed to the case, and the geometry can get tricky. More on this later.

3. This basically means socketed server-grade CPUs and slotted memory, and rules out soldered Atom CPUs, Celerons etc. Discrete graphics cards are probably out of the question, but modern integrated graphics should be good enough if you aren't editing video or playing high-end games.

mjolnir.jpg
Cool, but not really what I'd like to pack around.

4. The requirement of laptop-class thickness (say less than 40mm) drastically limits one's choices. A motherboard with DIMM memory is already a hair above that limit by itself; add 5-6mm for the display, 5-6mm for the keyboard and a couple millimeters for the case, and you're looking at something over two inches thick. Barring completely impractical options, this means Thin Mini-ITX motherboards with SoDIMM memory. The motherboard with all components (including memory) is constrained by standard to be at most 20mm thick, and a few millimeters must be allowed for bottom side stand-offs. Unfortunately, the Thin Mini-ITX standard seems to be dead in the water. There are few products on the market that support eDP and Skylake/Kaby Lake (Socket 1151) CPUs simultaneously, and nothing at all for AMD; about the only consumer-grade choice is Asus Q170T and its variants (the V2 upgrade, which is apparently not yet sold anywhere, has a bonus "disable ME" jumper — good to have even though firmware geeks have learned how to turn it off on the firmware level like the big boys in the spy agencies do). For cooling a CPU with interesting (read: more than 15W) TDPs, passive heat sinks are out. Given the stringent height limit, the most reasonable solution I have discovered is Intel HTS1155LP, targeted at half-unit rack servers. Its thickest part — its off-board heatsink, connected to the CPU plate with three heat pipes — measures 26mm. If this turns out to be too thick, heatsinks can be modded with some care.

The basic elements of the design are thus: 16:10 15" display, Q170T motherboard with Socket 1151 (up to i7-8xxx), up to 32GB DDR4-2133 SoDIMM DRAM and a M.2 NVMe SSD, HTS1155LP heat sink, one or two custom boards for display connectors, keyboard controller, battery controller/regulator and incidentals. The tricky part is to find a suitable geometry of all the key components. After some consideration and scribbling some layouts, I have settled on one where the motherboard's I/O shield faces backwards, and the heat sink sits under the left palm rest. (Other options either sacrifice 6-7mm of thickness as the keyboard goes on top of the heat sink, or sacrifice 20% of the heat sink, which I'm not willing to do.) A millimeter of cork or similar thermal insulation on top and bottom of the heat sink should suffice to keep surfaces at reasonable temperatures as long as the fan is working. The hot-air outlet is on the left side. Since the design uses the Thinkpad keyboard, it might as well use the Thinkpad palm rest (with its PS/2 trackpad), the top bezel, and the matching display bezel from a dead "donor" laptop. The keyboard is located mostly above the motherboard, where it can be supported by HTS1155LP's motherboard mount via some struts. Other keyboard mounting holes can be arranged to fall outside motherboard footprint. The bottom of the body (as well as the top of the display assembly) can be cut out of 1mm sheet aluminium, folded, welded together and spray-painted with plasti-dip or similar finish at an auto body repair shop. Body thickness is then 30-31mm — 1mm/case/+1mm/insulation/+26mm/heat sink/+1mm/insulation/+1-2mm/palm rest/. With a 5-6mm display assembly, this is, of course, nowhere as thin as today's ultrabook butter-knives, but neither is it monstrous; T-series Thinkpads measure around 34mm depending on model. As for peripherials, one can add them to taste — front ports, SD and smart card readers, NFC, wi-fi, broadband modem, etc. For the battery, laptop batteries are based on standard 11865 3.7V 3400mAh Li-ion elements anyway, so one can add as many as fits one's desired weight. Six will give 75Wh for 300 grams.