Greetings all! This is my take on a Raspberry Pi-based laptop. Can I call it a cyberdeck? That seems to be in vogue, so I will.

I was originally going to go x86/amd64 with one of these shelled but: 1) It was well-worn and had a loose hdmi port, in soldering that on I ended up loosening some of the solder beads under the eMMC memory and the computer blue-screened when it heated up (which I found out after forcibly removing the eMMC chip when disposing of the unit) and 2) I used the screen for a computer status display, which I came to like and didn’t want to disassemble. Could I have bought new (and ebayed) ones to make a slimmer and arguably better laptop? Sure, but then I’d be spending another $150-$200 on this project that I didn’t want to. If you’re interested in a build with components like that, I’d highly recommend this build log from sudomod.

Back to the pi! I had the following materials sitting around from other projects:

Here’s what I bought specifically for the project:

I’ll start with why I chose the pinephone keyboard, because that dictated the design of the rest of the device. I knew that I wanted something small form-factor. I also didn’t want to use low-profile mechanical switches—it would take a long time to design and get a pcb (I was impatient) and I was worried handwiring for something intended to be mobile would jostle things loose. Maybe that’s silly, but it constrained my design decisions.

I also didn’t want thumb typing. I had a blackberry back in the day and while I loved that phone, it was not the best long-use typing experience. I write occasionally and wanted something I could use for that. *Spoiler and shameless plug: I’m currently making a handheld with an Xbox 360 chatpad for more portable/limited use. If you want to see that, check out my youtube channel where I’ll be doing regular build logs.*

I thought the pinephone keyboard had everything I needed (honestly, it was love at first sight when I saw it) and I’d just be able to swap out everything on the top side of the hinge for the computer module. The keyboard is insanely well documented and is supported by community volunteers (shout-out to Meji who is amazing for developing and running with it). The drivers are open source and Meji made blog-style entries about their work with the phone and keyboard.

I later came to learn that while the pinephone keyboard is revolutionary for making a phone into a pda, it was totally inappropriate for this project. That boils down to two things: 1) interfacing with the pi would have been more difficult that I envisioned, 2) power delivery didn’t work for the pi. That being said, even gutted with the only things left over from the original being the shell + keyboard assembly, I’m still very happy with it and couldn’t find another comparable product. It also challenged me to find workarounds.

With respect to the interface, the funny thing with the pinephone keyboard is that it uses a usb-hid microcontroller (the PEM85F684A) as the keyboard brains but communicates over i2c. The i2c pins were originally exposed for debugging while usb provided the primary hid interface. Meji turned that on its head out of necessity – the pogo pins on the back of the pinephone expose i2c for general interface and usb is used for debugging. Ingenious work, to be sure, but for my uses that meant I 1) needed to get the i2c to work on the pi (despite the pi not having a dedicated interrupt line, which is required by the keyboard) or 2) make my own firmware that used the usb connection.

You’ll notice that my bill of materials specifies a teensy lc as the keyboard controller. That’s because stupid me forgot that you can’t back-charge the IP5209 power bank microcontroller, which is the charge/discharge chip for the pinephone keyboard. It’s included in the documentation in numerous places, so I only have myself to blame. That being said, I fried it by trying to MacGyver a power circuit that would provide sufficient voltage to the pi when plugged in. The IP5209 provides 5v 2a *generally* but when plugged in to a power source only provides 4.5v, which is insufficient to power a pi (or even the stick pc I originally envisioned using).

In any event, it was straightforward enough to just remove the electronics and put in my own. I replaced the 6000 mah battery that came in the pinephone keyboard because it’s really 2x 3000 mah batteries and I didn’t want to have to deal with a balancing circuit and overcharge protection for them. You don’t *actually* need that if the batteries aren’t being used heavily and both start with the same charge from the factory…but it’s kind of dumb to just wing it with what could easily be an explosive situation.

The keyboard uses the teensy-lc darknight keyboard firmware. It’s one of the few premade teensy-lc keyboard firmware, is very easy to just customize and use, and works incredibly well in spite of being designed for a split keyboard. The secret is that it’s wired like a standard keyboard, just with some longer row wires. I actually also built one of those at the conclusion of the pi project; I had an extra teensy sitting around and got a box of Kalih Silvers from EVGA on clearance for $10, so was a no brainer for me. Perfect work setup with my laptop.

The top of the laptop was comparatively easy to figure out. I desoldered the female USB 2.0 ports from the pi and soldered wires to one set of headers for the teensy. The pi is attached directly to the screen which screws to the back of the case. The fan screws to the case, as does the 3.5mm jack and the sd card port. I tacked the ampripper down with some Loctite Fun-Tak I had sitting around. Based on experience from other projects, that provides a good-enough-for-me connection between the case and electronics.

Wiring is relatively straightforward. There’s routing of the fpc cables for the screen and sd card extension—those fold easily and are held in place with double-sided tape. I plugged the 3.5mm jack into the Pi’s jack with a jury-rigged extension cable. The rest of the cables traverse the hinge between the pi and the keyboard:

The wires from the keyboard route into the upper housing, are bridged by JST connectors to wires in the upper housing, and terminate at their respective destinations. If I did a rev 2, I’d swap the JST connectors for smaller ones, but it’s what I had on hand.

All in all, it works pretty well for what I need, which is accessing O365, libreoffice and light coding practice. YouTube works well on it, but with the smaller screen it’s uncomfortable for me to use without my glasses. Text surprisingly isn’t too bad. I use it weekly.

If I had to change anything for a V2:

As I said above, I’m working on a smaller more pocket-sized version built around a pi zero 2, an xbox chatpad (or at least the guts of one), and a pimoroni hyperpixel 4 I have lying around. If you want to see what I think goes into one of these, how I select components, and how I design it then please check out my youtube channel, GamingInSecurity. I play games and talk about information security and law (currently a CISO and was an attorney for some time). I’ll also be doing other electronics projects. The channel’s relatively new, so take that for what you will. I’ll also be posting updates here, or something, when I have the new “cyberdeck” ready.