Chapter 2: Parts and the BOM

A project log for Raspberry Pi Phone in a Blackberry Priv Chassis

I'm building a phone out of a raspberry pi compute module 4 into the back of a blackberry priv, to run a full fat linux OS

bethBeth 06/12/2024 at 14:140 Comments

I'll try to keep this section well formatted, because it's half going to serve as the bill of materials, but I'll add my research in, because if you're doing your own variant of this where something that's a dependency for me isn't for you, it may be worth having that information.

Main board: Raspberry Pi Compute Module 4, 8gb RAM, 16gb eMMC, with a waveshare nano (B) carrier board

I had a ton of back and forth on this, and in reality, there's no out and out bad option, but each board I could find comes with problems. 

My main contenders were:

Raspberry Pi 5
Raspberry Pi Compute Module 4
Khadas Edge V
Repurposing an emulator console board
Some Orange/Banana pi board
Onion Omega 2 LTE

I went with a compute module 4 with 8gb ram. You could use an eMMC version or not, you should be able to add your own storage later. It's not too power hungry, but it's not all that powerful either. It gives you a full 4 lane mipi dsi port, and it's one of the smaller boards from the selection. It's also extremely compatible with aftermarket parts/hats, so it really is a middle of the road option that I picked mostly to minimise cost and issues, in the face of having a device with all the bells and whistles - after all, my bells and whistles are going to be HID devices and mech-eng.

The raspberry Pi 5 unfortunately requires a 25 watt power supply, so for portable devices, you're limited to either using an absolutely huge battery, with extra power needed for peripherals, or having maybe 2-3 hours of use time. That's fine for a heavier gaming rig like a steam deck, where you're only going to have a little time to sit down and play, but for a device you need for utility, that's not going to work. 

The Khadas Edge V was actually a pretty good option. The manufacturer's power board did seem a bit limiting, but if I can power over USB, that's mostly problem solved. What held me back was lack of support and community, as with orange and banana pi boards. Immediately, you lock yourself out of a huge chunk of any market that offers arduino and raspberry pi compatible hats and expansion boards. Similarly, as Jeff Geerling notes, the OS updates are thin on the ground, where the pi foundation supports their old boards, and is continually releasing updates. I know there was an orange or banana pi compute module in the shape of a CM4 that was particularly appealing to me, but again, this project is possibly my largest to date, the wheels need greasing if I'm going to finish this ever, and to labour the metaphor, them's some rusty wheels.

As for an emulator (or other) board, those actually did have me thinking for a while. They're high powered enough for games, but specifically designed for handheld use. The catch, is that I'd already decided on a form factor, which is a blessing in narrowing down my options, but a curse as far as locking me out of options like this goes. Perhaps something for someone else to consider? Either way, while I'm not scared of motherboard trimming I promise, it does seem wasteful having to slice off perfectly good buttons for fundamentally no real reason.

The Onion Omega 2 is actually begging to have a phone built around it with its built in LTE module. Something for someone else however, because for all its selling points, it's extremely underpowered with 128 MB memory, and 32 MB storage among other issues. Once you start meddling with memory, the convenience of a single board computer is somewhat undermined, so something for someone else to try expanding on I think.

Worth a mention are the raspberry pi zero 2 based devices. A raspberry pi zero 2 is a fantastic option for low power usage, and if you can make concessions on other processing intensive parts of your project (screen resolution/graphical interface, some other utility), something like the tinydeck or lillygo t-deck might be worth investigating. I would also recommend looking up the sharpikeebo, BlakRpi, and any other such project. Lastly, there's the SQFMI Beepy, but that seems to have been in pre-order for a while, so may be a tad thin on the ground.

Modem: Waveshare Sim7600H 4G Dongle

If you want to make calls without wifi, you need a modem, simple as. Initially, I was considering something from pitalk, after all, it's in the name, pi talk, obviously built to make phones with, however, I want to leave the GPIO unused where possible, I'm saving that for when I get to USB expansion, and their dongle remains out of stock, or overpriced. 

Then of course, we have the M.2 options, of which there are tons, however, I am without m.2 port. I could absolutely stick a port on there, but that eats into GPIO usage, it's an awkward form factor with everything else, and it is just a tiny bit more expensive.

There are also hats, but many of them run the audio out of the hat itself, rather than through the onboard sound card, and I'd rather manage sound myself, so to that end, the dongle works best at the cost of a port.

Anyways, if you're not limiting yourself with the form factor, you might be better off with the likes of an MCUZone 4g io board, where the M.2 slot is available (and it can ship with a 4g modem), or simply any other board with more ports, however, for my use case, this blocks off access to holes in the chassis for cables, and takes up space I could use for other components (although, the dimensions would make this a potentially viable base board for anyone who wanted to replicate this project)

Sound card: Fiio E10K with casing removed, and modified headphone jack and controls
One of the most important parts for me. I'm intending to use this device as a daily driver for music playing, and while I don't tend to go out of the house in anything too difficult to drive, it's not all about volume. I'm a long time fiio user - anyone with portable devices should be, and as such, that was an easy first port of call. 

My next issue was power, and how surprisingly expensive and annoyingly bluetooth fiio have become. By limiting myself to older devices, I was able to narrow it down significantly. Further still with form factor. I have a Q1 sitting on my desk at home most of the time, and that's worked quite nicely for at least 8 years now. One factor that drew me to the Q1 in the first place though was the built in battery. It lasts ages, and it sets the Q1 apart as a hybrid USB Dac/Headphone amp. Well worth a look.

The E10k ended up being my choice for this project however, as it's just that little bit smaller, and more crucially, it's a dedicated USB device with no onboard power. There's a case to be made for taking a load off the battery  by using an onboard battery for the DAC, and that may be worth investigating. For me however, I found that the idea of modifying additional circuitry (beyond the extensions on cabling to the volume control and jacks), especially power circuitry which I'm far less familiar with, a little too daunting and a little overcomplicated. Not to mention, batteries have been known to explode (not on fiio devices afaik, but still), and while I don't take my own personal safety all that seriously, I dread to think how an exploding phone will look either as a marketing device, or on a packed morning commute. Not to mention the potential damage to any of my more expensive clothes. 

For anyone that has a bravo audio v2, I'd love to see a version of this project with a tube amp (and the 10 minutes of battery life you'd get out of it)

Camera: Raspberry Pi High Quality Camera Module (C/CS Mount)
I have been debating what to do about any potential front facing camera (I'm toying with the concept of a small usb camera mounted to an extendable pointer, with the cables running inside), but for now, the main issue to solve was the main rear camera, as I do actually use a phone camera as a utility at the very least. 

I could have gone with basically any camera from the raspberry pi store, and for anyone not fussed about photography, I'd heartily recommend it if you just need a camera for utility. They're a bit cheaper, and much smaller. However, I do like photography, so I had another problem to solve: "Why do I never use my phone for actual photography?".

The short answer is "I have actual cameras", all of them infinitely more interesting than using a phone. Half the fun of photography isn't the photo you get on the end, it's the contraption you take it on. However, given this is a contraption of my own design, I'd be remiss to not at least try to solve my phone photography problem, after all, I go to nice places pretty frequently, but I don't always have a dedicated camera on me. 

I had toyed with the idea of integrating this into the back of the phone:
It'd give me full support for virtually any lens I wanted to get, but it does add a lot of bulk. Also, this is a design more for sensors without housing built in, and requires some extra work. It's definitely something I'm intrigued by, and I probably will have a go at some point, but for now, it's a little overkill unfortunately.

I'd love to see a version of this device - maybe one from someone who didn't care so much about audio quality/battery life/form factor - that uses this mechanism and maybe builds on it, but I realised my main problem with phone photography is just the lenses. Ultimately, smartphone lenses are desperately dull. Generally the more complicated they get, the more they're dedicating themselves to being smart, quick and accurate, which is absolutely fantastic for taking a regular photo. Not so much if you want a great photo though. So by going with the C/CS mount, it gives me an opportunity to use some of the lenses from my 16mm film cameras (the ones I use least given the difficulty of developing the film), and hopefully make quick phone snaps just a little more interesting. Perhaps later down the line once the assembly is complete, I'll try adapting a Holga lens for this, as they're pretty flat, and they look fun to use. 

Chassis: Blackberry Priv
This has simultaneously been the bane of my life, and the greatest source of inspiration on this project. It's just about my favourite design for a phone. Maximising screen real estate and utility, while incorporating that greatest of mechanisms: the slide. 

I'm not really going to justify this choice - I can't, it's ultimately just kinda stupid - however, it's made choosing parts that much easier. Everything I went for has to fit underneath the footprint of this phone. However, that's also been absolutely horrible at times, given how limiting it is for what parts I can and can't use. I'll be using this phone mostly for the externals, minus the back, as that's far too thin, and I highly recommend that if someone else wants to do this project using a blackberry priv chassis, assuming I get it to work, follow my parts list as closely as you can, because picking for this device took months.

If you want to make a tensioned sliding device, and don't need it to be based on a priv however, firstly, I'd like to congratulate you on being a sensible person, and secondly, sliding mechanisms are surprisingly thin, intuitive and easy to come by. I'd recommend going as wide as you can (but don't go 1 millimetre over), and do a cardboard prototype. Slide mechanisms have a certain amount of travel, so if you're replicating my qwerty keyboard approach, you'll want to make sure the travel distance is at least the same as the keyboard height.

Screen: Waveshare/Spotpear 6" amoled flexible screen
There's a reason this section comes after chassis (and it's not good)

The first thing I did when I realised I wanted to cannibalise a blackberry priv was to start investigating my screen choices, and truthfully, it's all pretty bad, so here are your options:

1) massive bezel
Your easiest option is to get a TFT display that can interface with the raspberry pi. Perhaps multiple if you're feeling it. You can fit it underneath the flat portion of the screen: approx 63mm x 125mm, and while the bezel will be large, you will have a functional display that doesn't cost the earth. Probably what I'll do if the one I've ordered doesn't fit

2) Hack the existing display
This was the longest part of this project, and regretfully, I found extremely little. I've made notes of virtually every single marking on anything attached to the screen if anyone wants them, and I've found pitifully few specifications, but long story short, getting anything Mipi to work is either going to involve an electrical engineering degree, and specialised equipment, or paying Mipi alliance a lot of money for the datasheet. You could try using a generic adapter board, but they're not as cheap as I wanted, and by that point, I'd already violently pried the original screen off to remove some of the other innards I wasn't using, so I didn't see the point

3) Flexible screen
In terms of practicality, this is pretty rubbish really. There aren't a ton of options, as thankfully curved displays are still somewhat a rarity, so they're very expensive. Furthermore, I had to dremel out some of the raised sections on the upper frame, and there's now a hole in part of it where there really shouldn't have been. I also had to remove the stuck on bezel from the glass cover (buy two glass covers if you're going down this route, just in case you break one, I removed it by soaking in isopropyl for an afternoon and then pulling, I probably should have been a bit more sensible), after which, I'll be reapplying some blank PET film on the under and over side, and drawing a bezel around the new screen. 

The screen I went with is one of those annoying ones that requires a board to adapt to HDMI and USB for touch screen, and it hasn't yet arrived, so I don't know exactly how well this is going to go, but I'm anticipating best case scenario, it just about fits, there's a significant bezel on the curved part of the screen, and I won't have much room for the earpiece speaker.

Truthfully, if you're insisting on using a blackberry priv chassis, there's no great option, but hopefully the one I've taken won't be too awful

Battery: Not done 
Somehow, I think this might be the hardest part of the project, at least for time consumption. I went through all the components I have, tried to find their max power consumption, and tried calculating what my max wattage is going to be, and came out with 25 watts give or take. For reference, the switch uses 7 watts while gaming supposedly. On talking with a friend, I've realised it's because there's such a huge gulf between the most and least power intensive usages, going between "skype calling the surface of the sun" (a white screen at max volume while playing video and using LTE" and standby.

As such, I intend to leave the battery until I'm completely done with the rest of the assembly. The benefits here are:
-it will allow me to evaluate how much physical space is left/how thick I'll be making it
-I can test on an existing power bank to estimate an average usage 
-I will most likely be able to prove that I am not an electrical engineer, and shouldn't have been left to work out the calculations on my own.

Ultimately, this device is not dissimilar to the uConsole CM4 (and if you don't mind the width and lack of sliding mechanism, I'd honestly just buy one, they look amazing, they have most of the parts this does, and truth be told, if nothing I build works, I'm getting one too, because I already have the pre-requisite CM4), and supposedly you can get up to 10 hours out of that off the back of only 2 18650s, so this might be better than I'm assuming.

Unfortunately, in using the blackberry priv, I pretty much confined myself to using the keymat that comes with it (which isn't a huge problem necessarily, it's a nice keymat, just means I have virtually no market choices). This was basically the best tutorial I found, and while I've begun work, to date, I've fried 2 MCP23017s, and 3 ESP8266s. I've got a poor unfortunate arduino uno in the post to test out my wiring later today, and after that, hopefully I'll be able to try again with some more boards (once I've proven it wasn't the button wiring), but at the very least, the parts you need for this are very cheap.

To add further complication, I'm intending to add an LED or two for backlighting while the device is open, and a capacitive touch foil, with which I'll be doing some surgery on (supposedly you can cut them down to size) to use as a trackpad. 

If you're not going down the priv route, I'd recommend checking out tindie and lillygo. There are so many great options for thumb keyboards. The blakrpi boards are particularly aesthetically pleasing in my opinion, and soldering buttons is pretty easy, so that's certainly a viable alternative.

Mic: I will use a lav mic (they are cheap and easy), prosound has a USB one for £20

I'll update on the speaker situation when I get to that as well. There's a relatively complex chain of command that needs to be followed, and I still haven't decided how that's going to end up, but this should be enough for now.

Hopefully, my next update will be talking through assembling the device to some extent. I anticipate the screen won't arrive for at least 2-3 weeks, but as far as I can work out, about half the device will be arriving today, so I should have a working keyboard relatively soon, which means I can start to layer on the additional components there.