-
Chapter 6: Disaster/Why I haven’t updated in a little bit
08/27/2024 at 13:22 • 0 commentsFor anyone who’s been following along, particularly those who want to have a go at doing this themselves once it’s finished, I’m sure you’ll have noticed that at some point in the last few logs, I mentioned things getting easier from that point on. Unfortunately, I was mistaken.
Firstly, the replacement screen I found straight up just will not work with the compute module. I must have spent 5-6 hours on it, and I think there’s more I could try, but realistically, it’s over for that one, which is a real pain in the butt, because according to panelook, it’s one of the few in 5.5” that’s both available to buy as individual units, and also has touch built in. I did find another screen (another 3-4 to be precise), so I’m starting cheapest first, and I’ll update back when I get anywhere with that one (I did a ton of research though, and it uses the same driver IC + pixel format + pin arrangement as a range of TTL monitors available on adafruit, so I think I’m in with more of a chance this time).Then there were the parts. The modem is just too damn big. Having taken it apart in hopes of finding a tiny little circuit board with lots of empty space and some roomy LED circuitry, that’s unfortunately not what I found, which is frustrating, because the damn thing is about as long as the priv, which means either a lot less space for batteries, or it’s got to be about 5-6cm thick. Not to mention, in sticking with the DAC I’m insisting on, I’m losing quite a lot of space there too, especially with the cables I’ve got to use. Also, a USB hub I decided on isn’t available without a header, which butters precisely 0 parsnips.
However, I’ve still never really been taught how to give up, and I’ve got so much to do these days, that I simply don’t have the time to sit down and figure that out, so instead, I’ve come up with a battle plan to deal with all of these new issues.
as previously mentioned, I’ve changed the screen. It’s kinda good too, because this one is a much lower resolution, which means much lower power. For anyone who insists on 4k or even 1080p, first off, why? 30” 1080p monitors are perfectly acceptable with a pixel density of approx 73ppi, and 854x480 in 5.5” is 173ppi. But also, I’d investigate one of the sharp 5.5” monitors, I think I’ve heard of the LS055R1SX03 working with the cm4/rpi4 but there’s no touch.Then for the modem, I’ll be pivoting back to a hat (kinda). Should have seen that one coming, but you live and you learn, and the whole point of this is to both document that process, be able to explain why my pitfalls are pitfalls, and be able to provide you the reader with a definitive method + ingredients for achieving the end goal. I believe wave share has similar sim7600 4g hat (specifically the B one) which looks perfectly acceptable, and significantly smaller, downside is on the cm4, it’s still a usb dongle, and therefore comes with all the limitations of needing a USB port + cable and space requirements.
HOWEVER! I had another brain wave (apologies to everyone involved), when is a non hat not a non hat? (When it’s a hat, dune is so good).The waveshare sim 7600g modem (B) is designed for USB usage in all other pi models than the zero, which it’s designed to stack with, maybe you can see what I’m getting at now.
After seeing the Nokia N95 that got blender on it, a lot of my preconceptions of what’s possible have kind of been blown out of the water, and I’m determined to do more with less computing power. Not to mention, the pi zero 2 w fixes a significant issue with the maximum wattage, where the cm4 can run at a max of 10w during heavy use, the pi zero 2 maxes out around 2.5w, theoretically quadrupling the battery time, while also freeing up much needed physical space.
considering I already have the cm4 + a working version of postmarket OS, I’m not falling over myself to make this change, and I think it will introduce significant functionality challenges (I was eyeing up a Nokia n95 to see what hacking could be had, but fell short when I got scared off with lack of WhatsApp API), but should the battery prove too weak, or the space requirements too much, I can see this being a worthy sacrifice. Not to mention, it reduces the BOM by a whopping £85.Finally, the spring on the slide mechanism is going to throw up problems. Not everyone is going to be able to get a used blackberry priv for cheap, and while the current price of a replacement spring is £10, it’s not always going to be that way, and I suspect the day is fast approaching when you won’t be able to get one at all. To whit, I’ve started drawing up plans for DIYing the spring. I’ve got my eyes on some ribbon wire that’s not too expensive (about £2 for a roll of 10m), and I took a good long look at the spring to see how it’s actually constructed, so hopefully, I should also be providing instructions on that. (I may add it as a separate project as well, because it could be valuable for priv owners).
anyways, in summary:
0) wait until I have some spare money (Sorry folks, life is boring like that, but I’ll see what I can do for cheap or free)
1) talk to some people about spring construction, and see what I can achieve there (end goal is a fully diyable, like for like part that’s not too hard for users to make)
2) when the screens arrive, look into driver boards, I have no idea why finding a 5.5” tft screen is proving such a challenge, but it is, and I do have several more solutions (the sharp monitors, and then downsizing to something known to work)
3) get my hands on the smaller modem, and start testing functionality once that arrives
3.5) get some diffuser film for the keyboard and see if I can’t get the LEDs to play nice (very much a side goal), also get the camera module and other bits I’ve not really spent too much time or mental energy on (vibrate motors/speakers/mics)4) start work on the battery and assembly. It’s been a long time coming, but hopefully not too long now. I have estimated minimum required Watt-Hour values for batteries to achieve 10 hours at max capacity, so I’ll be working from there backwards to see what I can’t do between power management and different battery options, and of course switching between the different boards if it comes down to it on space/power.
Realistically, this may be it for the next month or two, perhaps longer, we’re creeping into the most expensive part of the year, and unfortunately I have other things that need funding too. I’ll do what I can when I have time and money though.
I’m not giving up
(I’m such a drama queen) -
Chapter 5: The screen and top frame
07/07/2024 at 20:40 • 0 comments(preface: two logs in one day, aren't I productive)
I have now attempted to order this screen 4 times:
https://www.waveshare.com/6inch-hdmi-amoled.htm
Granted not from waveshare, you can't buy it from there (I even messaged customer support, and felt very silly the entire time about it). Spotpear, the company that waveshare works with (subcontracts? Buys parts off? Who knows) does have them listed, but will inform you they're discontinued after purchase. Aliexpress has it listed 3 more times, one with a shop that has since delisted it (it's called shop and then bunchanumbers), and then another two from smeiier (I tried purchasing once, and I got nothing).It's extremely annoying, because this screen almost exactly fits the dimensions of the blackberry priv's top frame, and would sit nicely underneath the curved glass, however, it was not to be (seriously though, if anyone finds one for sale that isn't discontinued, and you actually manage to get one to show up, please send details my way).
So, that leaves me with two options, both of which have huge downsides and upsides. Either I try to fit a screen between the glass and the top frame, or I design my own top frame (and glass). Both of these have pros and cons, and again, I wouldn't be posting if I hadn't already made a decision, so I'll try to keep my reasoning concise, and I'll say now, I went for designing my own top frame (STL/Blend files will be included, I had to redo the damn thing 8 times, which I guess is about the mileage I can expect when I use a clothes tape measure to try to reverse engineer professional design with low tolerances, but c'est la vie and all that).
Pro doing your own top frame:
-Blackberries are dying out. I know it's already a dead platform, but they're well past the dip into obscurity (by like 2-3 years I think), and slowly peaking upwards into collectible territory, which means they're rarer and expensiver. I'm glad I could get the priv I got (working before I got my grubby mitts on it too), not to mention the replacement parts, but I don't count on them being available in the planned life-cycle of this phone (50-70 years+). Having your own STL files available to print off new parts as and when makes things a lot easier
-Current screen availability makes choosing for the current frame a nightmare. Either I'd be picking something vastly smaller than the existing screen, or experimenting with/damaging past warranty expensive flexible screens. By doing my own flat top frame, I expand available real estate from 65mm x 138mm to 72mm x 137mm, with room to increase (I printed the bevels a bit wider than I had to). It might not sound like much, but at the dimensions we're dealing with (betwixt 5 and 6.1" diagonal screens), the extra with is what stands between a 1mm bevel, and a 1.5cm bevel, and a £50 screen or a £300 screen.
-It's fun. This project is very much a showcase of everything I'm mediocre at, and more importantly, a chance to improve. Having never owned a 3D printer before, going back over my blender knowledge, and doing it in a more functional way dusts the cobwebs off those braincells. For anyone having a go at their own version of this, I'd recommend you don't download the STL files, go for the blends and make your own version. Curve the edges. Adapt it to your screen
-diy screen layering. I'm sure this will come up later as an issue I've seriously overlooked, but for now, I'm in such a great position to laugh (hubristically so) at smartphone manufacturers choosing ultra-thin glass lenses for their screens. As far as I know, capacitive touch works through about up to a centimetre, maybe slightly less. According to this, just 0.5mm more would make phones "unbreakable". I'm more than happy to go for glass a few millimetres thick (like 2-3 maybe), so we'll see how that plays out, although I've just had a quote for £60...
Pro re-using the priv's top frame:
-You don't need to do so much engineering. It is less work, the only thing you'll really need is a dremel for fitment, a ruler for checking available screen real estate, and a fresh glass.
-preserves the look of the original. I was kinda bummed when I realised this was the path I was going down, in my humble opinion, the priv is one of the slickest phones blackberry ever designed, real swan song type stuff. I'd be lying if I said it wasn't part of the reason I even figured I would want to do this in the first place. Granted you'll have a much bigger bezel than before, but what's to stop you getting creative with additional e-ink displays, or LED arrays.
-the original is made out of pretty sturdy aluminium. Dremmelling the top frame down was a battle for me, whereas PLA is somewhat more malleable. It's a great choice for strength if you can stomach the screen size.
-Glass isn't a challenge. After all, you've already got some tailor made for the screen. Designing my own top frame had me looking into corning/gorilla glass (£220 for the amount I'd need!!! £60 if it was more normal glass), and I believe I paid maybe 1/20th that for the 2 glass covers I got as a replacement? By going with the original, not only do you preserve the look, you preserve the ability to get OEM parts. Granted not a permanent solution, but for right now? You're pretty much golden.
Anyways, that's about your lot for pros and cons. For me, it came down to screen size (not resolution mind you). Ultimately, phones are small enough as they are for me, and I'd rather have as much screen space as I physically can, especially if I'm going to be using an experimental OS. Using steam deck in desktop mode is bad enough for me (I know you can adjust it, but it is a bit of a pain in the butt).
A few notes for the STL/Blend, it does slide up and down without too much fuss, but it's more rickety than I'd like, and I've not yet ordered the screen (this is the one I'm thinking of going for), so I'm going to have to model cut outs for the ribbon cable and speakers when I get round to it. It's more so I could make sure I've gotten the engineering right on the back, but broad strokes, I'm very much on the home stretch with this part of the project
(Also, I've gone here for now for a perspex cover, rather than a glass one. I should be able to find a tempered glass cover for it too, so hopefully that'll give me the best of both worlds, but again, we'll see) -
Chapter 4: How it works: Keyboards
07/07/2024 at 17:55 • 0 commentsI promised it'd be days not weeks last time, and I think legally that's still technically true (your honour), but for anyone that needs an excuse, I had a nasty headcold for a few days midweek, so there.
Now that that's dealt with and we're all happy, here's how to get the keyboard working!You will need:
-To read through this: https://hackaday.io/project/164232-thumb-keyboard (read through all of the project logs, oldest first, it's an amazing comprehensive breakdown of the entire process, with photos and parts and just about everything you'll need)
-the code in here (I'll github it later dw): https://pastebin.com/jzaQqKbf
-like 100 2 pin momentary buttons (maybe 4 pin is better, but I used 2, I've probably shot myself in the foot there a little)
-a few breadboards
-some wire (really any will do, I used a bunch of old stuff I had from another project a while a go. Not one I came up with mind, I just needed a mixer for cheap)
-a soldering iron
-your priv's keypad.
-two pi picos (one with headers soldered, one without)
-electrical tape
-a single/double AA battery holder
-a box of LEDs
-a bunch of female to female dupont cables
-mu editor installed
-pimoroni trackball
Step 1:
Once you've familiarised yourself with the entire process of making a keyboard, thanks to David Boucher, you're going to want to consider a couple more things (and I will update this with photos later). Firstly, you need the button layout to sit underneath the priv's keymat. To achieve this, I did a rough layout through the breadboard, bent one pin on each switch, and then started soldering so they would stick without wobbling. If you wanted to be really need, you could use some sort of glue too, may I recommend super. Secondly, you'll have to consider whether or not you want to have lighting. Now, I absolutely do, I love typing in the dark, but I also love being able to see which key I'm going to press, so factor in room for your lighting on the board there too (and how you're going to make it play nice with the pico, I'd recommend looking into neopixel lights)
Step 2:
Solder your rows and columns. Be very careful with these because you're not going to have a ton of space to avoid shorting them together. I'd recommend soldering the rows together, and overlaying with electrical/insulation tape, then doing your columns afterwards. I'd then check your soldering by attaching the rows to one end of the battery holder, an LED to the other end, and then attaching all the columns to that part of the LED. It's a pretty quick way to debug your solder, which if you're trying to underlay the priv's keymat with, you will absolutely make mistakes, double so if you're using your dad's old soldering iron with no temp control, and a poorly fitting tip that you crimped on with some pliers.
Step 3:
Look up the instructions to load circuitpy on your pi pico (the one with the headers), and get blink working. It's turned into a bit of a superstition for me, but frankly, I've gotten through a silly amount of boards doing this project, including an actual release of the magic smoke from an arduino uno r4 minima (it's still working too), so just check the actual process of making the pico do things is working. You're gonna want to use Mu for this too. I did try using Thonny, but I didn't get all that far, where Mu was much more plug and play. It's not a nice editor by all accounts, but considering I am not a microcontroller expert, it's been a friend in time of need.
Step 4:
Now that you've got your pico working with blink (very cool), connect up your trackball to the pico (connect 3-5v to 3v3, sda to gp20, scl to gp21, and gnd to the gnd above the 3v3 pin. We can leave int for now). To do this, I would solder on some of your wire, and then make the ends long enough to connect up to the duponts (whatever you do, just make sure they're making contact, this is the most expensive component in this step).
Copy and paste this: https://pastebin.com/jzaQqKbf
Into your code.py for circuitpy. Now, if you're not doing a trackball (shame on you), get rid of all references mouse and i2c, because that's what that's doing, and you'll get an error if there's no i2c connected, but now you should be able to get keypresses out when you connect row pin to any column pin.
Step 5:
Once you get bored of all that, you can start soldering your buttons in, taking care to take note of which rows are connected to which pins (and same with the columns)
I'll upload a photo later, but you should have something like what I made earlier (or hopefully better):
Now, due to having used 2 pin buttons instead of 1 (I think), and probably a certain amount of ineptitude (or just being new to this if I'm being kind to myself, it is self-care-sunday after all), I actually can't get my keyboard to press more than 1 key in any give column at the minute, which is more than a little frustrating if I want to press sym + M/K/I, however, for a keyboard I whipped up for about £15, I'm not going to complain too much.
This log comes with a whole bunch of todos of course, astute observers may note the lack of LED code among other things:
1) figure out a way to fix the column issue
2) add LEDs over GPIO
3) create a program to control this keyboard over the host device (e.g. a little gui to change the RGB values from the rpi)
However, that's a problem for later on in the project when more important things have been taken care of, as none of these are critical path. I have a keyboard that works nicely with just about any device that accepts HID!
I'd also like to say a huge thanks once again to David Boucher. I've avoided going too far in depth on the keyboard creation process because for me, 99% of it was following his work: https://hackaday.io/project/164232-thumb-keyboard, and adjusting for myself as necessary, and I don't think I'd do that side of the project any justice if I wrote it out myself, beyond just what you need to adjust to make his work fit under a blackberry priv. Granted I did port some of the code on circuitpy myself, but again, mostly cobbled together out of existing work, and emulating functionality found in David Boucher's work. -
Chapter 3: Eureka (or the keyboard design process)
06/29/2024 at 00:53 • 0 commentsEvery good project deserves its Eureka moment, and it's safe to say I've had mine.
I am not an electrical engineer. I'm not an embedded engineer, and as far as software engineering goes, I have many shortfalls (for example, the fact that I haven't touched python since a program I made for an artist friend of mine a few years ago). But I've gone and whipped up a keyboard mouse device.
I want to type up a more detailed log later, detailing exactly how I did it, and showing you the reader, not just how to make this specific device, but how to make something adjacent, or adapted; so for example, where you'd be looking for potential issues. After all, as someone who's had to learn this from basically scratch, I'm in a fantastic position to be showing people the pitfalls that I've spent so long rolling around in.
However, it's my log, and I'll cry if I want to, but I may as well be somewhat productive about it, so here's how I went about solving my biggest challenge on the project.
To build your average keyboard, you're going to need:
-a whole bunch of buttons
-some pcb
-some wire
-some solder
-a controller of some variety
-an awareness of the ports you're using
-some electrical tape
-some milk (for when you drop your soldering iron and pick it up by the hot end)
-maybe 3-4 tutorials
For this project, the first main problem was mostly trivial. Pull off the keymat, figure out how much wiggle it has, and see if I can press different buttons through it (yes, I can, marvellous). My next problem was software. After all, I have no way (or money) to print custom PCBs, so I'm working fully store bought, this means that anything I make has to both run on whatever I build it on, work properly with the wiring of the keyboard, and be able to talk to the poor device it's plugged into. After much to-ing and fro-ing, I worked off of four main pieces of information:
-https://hackaday.io/project/164232-thumb-keyboard David Boucher's thumb keyboard. It's just about the best tutorial around, and just about the easiest mini keyboard to put together (i.e. still difficult, but easier than some others)
-https://dronebotworkshop.com/pi-pico-circuitpython/ a nice handy guide on getting you started with most of what you'll need to make your device
-this video-https://www.hackster.io/TomoDesigns/the-super-easy-pico-keyboard-989e7d#toc-step-15--the-code-16 this is where I actually found how to use the above video in circuit python
Through the magical power of all of this guidance, I was able to produce something that works maybe about half as well as any individual of them, and has an eighth the utility (so far)
I will be releasing (and explaining the code) once it's much neater and adds some functionality, but this log is for explaining my process.
Of course, it wouldn't be a me project if I didn't go one further, and another key issue I felt I needed to solve, is the pointer device. Anyone who's anyone knows offhand that since the blackberry passport, blackberry devices have had built in trackpads on their keyboards (disregarding being hamstrung based on region locking, the one I ripped to shreds was stuck as a scrollpad). Now, perhaps there's not quite so much utility in these phones having trackpads. Especially not large ones. However, picture yourself trying to use linux on a 5" touchscreen, and suddenly, at least for me, some sort of manual, non-touchscreen pointing device may be useful, at least for those of us who haven't quite yet transcended gui such as myself.
I had 4 solutions.
1) reverse engineer blackberry's approach
I actually had I think 3 ways I could do this one. Capacitive trackpads are surprisingly intuitive, and come in a range of decades that they look like.
For example, for a 70s looking approach: https://www.hackster.io/gatoninja236/capacitive-touch-sensing-grid-f98144, I would love to see anyone include one of these sandwiched between buttons and a keymat. They seem easy enough to do, requiring some amount of adaptation into a bonafide trackpad, but I think for someone with less shaky hands, who maybe doesn't find coffee so delicious, this might be a good shoestring budget approach.
Then there's capacitive touch foil. I did actually order some, but unfortunately, it was very stuck to some perspex, and I didn't fancy my chances of removing it. I didn't spend too much, but I also didn't have the time. Again, perhaps a good choice for someone else. Much more plug and play
Finally, we've got these: https://bela.io/products/trill/
I actually don't know how well they'd work for this project, I don't know how flexible the trill square is (although it's relatively inexpensive for anyone who wants to try), so I don't know if it would work between the buttons and the keymat, but I thought it was worth putting out there, because they seem to be good quality, and more importantly, they have reams of documentation.
2) the lenovo rocker mouseYes I know none of you are used to hearing it called that, but this is a family website(?). The little red dot in the middle of the think pads. Might have been a good solution, and for anyone who can find a decent rocker mouse, again, please do your own variants of this project, I would love to see one reused as a pointing device for this.
3) the galaxy s-penMy second favourite phone of all time (or model of phone) is the galaxy note. Any of my friends reading this knows I send out diagrams with some regularity, and having a note (a note 4, may its dodgy flash and searing hot battery rest in peace) made that process about as easy as it could be. I love drawing little technical doodles to cement my ideas, or find out if I wasn't checking them hard enough in my head, and as for pointing devices, it's much more precise than a finger.
Sadly, it's not very one hand use, and it's a part that could go missing. I'm actually not ruling out some sort of wacom stylus however (the type of stylus on the s24). I do still think they're very cool devices, and I know I personally would get heaps of use out of one, so I guess watch out for a stylus log.
4) the blackberry trackball.
Finally, this is a blackberry. I did still need a pointer. I was a bit flummoxed at first, because there's not a ton of clearance betwixt screen and keyboard, not to mention, travel distance doesn't really leave enough room without significantly damaging the now 10 year old plastic on the priv's keymat, and after an unfortunate run in with the retainer on an fpc connector on a psp, I think I'm happy to leave that alone.
I'd not had a lot of luck with the trackpad, and with how long I've taken on the keyboard, the touchpad was starting to look like a stretch goal, so I did approximately three seconds of thinking (i.e. mimed holding my phone), and tried to work out where I'd put this trackball, and of course, naturally, on the side where my thumb sits!
Not to mention, there's been somewhat of a blackberry revival of late, which is a massive confidence boost when I see people talking about how much they love some of my favourite devices (see, I'm not crazy), but more importantly, it means that parts aren't just available, they now exist in convenient forms for makers, such as this delightful board from pimoroni:
https://shop.pimoroni.com/products/trackball-breakout?variant=27672765038675
I'm not actually sure how much of their description is tongue in cheek, vs how much they've actually literally been harvesting blackberries for their trackballs, but either way, this solves a few problems at once:
-no difficult layering to dampen keypresses
-no sliding around the screen while I'm trying to type (or more likely, half hacking together a sort of solution)
-RGB
-you only use a single port for pointer and keyboard
It was crazy how easy it was too. After a lot of back and forth about which board to use (I'm currently on to a pi pico, 1 of 2 I bought), all I had to do was see how the device communicates (i2c), check which pins are i2c on the pico (ground, 3v3, 20, and 21, int is optional), then find a way to make it work in the same language I was doing the keyboard (I'm talking a single file for the whole thing).
Now, so far I'd had the most luck getting keypresses out of circuit python, so I figured I'd start there, and immediately:
https://github.com/jspinella/pimoroni-trackball-circuitpy
I did have to make a few changes, but all in all, the code was pretty great. I've added a little of my own functionality, and I need to do some tidying up, but I managed to test both the trackpad being used, and the keyboard pressing keys at the same time, and it works, which I suppose is what I want, but feels downright peculiar after the number of boards I've gotten through.
I do have a few stretch goals for the keyboard, but these are to be done in post.
-RGB LED key lights. It would be extremely helpful to have some lighting under the keyboard for texting in the dark, and it would be fun to choose the colour
-a program for the motherboard that can control the pico's light colours. Probably already exists, but a gui to change what colour is showing would be lovely (gonna use neopixel lights, so I'm 99% sure something exists)
Anyways. I'll type up the technicals sometime this weekend. Expect the logs to come maybe days apart rather than weeks from here on out though. -
Chapter 2: Parts and the BOM
06/12/2024 at 14:14 • 0 commentsI'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: https://hackaday.io/project/189579-openslr
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 awfulBattery: 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.
Keyboard: https://hackaday.io/project/164232-thumb-keyboard
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. -
Chapter 1: Why
06/12/2024 at 11:33 • 0 commentsAt some point, what I want in a phone started diverging from what was available. First to go was the headphone jack. Then replaceable batteries, hard keyboards, moving parts, interesting cameras (no amount of cameras will ever be cooler or more usable to me than the samsung s3 zoom), expandable storage, and even styluses. Not to mention the bloatware, and plethora of unknown goings on the average smartphone has. Why does my calculator need to access my contacts? Why do I have to ask to not be tracked? How come I'm looking at new tech and feeling absolutely nothing? Where did the slide mechanism go, and who decides what's "transitory".
There are three solutions to these issues.
1) revert to feature phones.
Feature phones, or unkindly, "dumb" phones don't need the tracking, the internet connection, or any of the arbitrary nonsense smartphones require out of the box. They still have headphone jacks (some of them), replaceable batteries, and generally, they actually still work, minus the updates that seem to be sneaking in every other night. Some of them look very unusual too, so I'm sure I could find one that satisfies my need for something a little different (and slidey). They also don't always have cameras, expandable storage, or much functionality beyond just being a phone in many cases. I admire every single person who's gone down this route. There's some fantastic offerings, immaculately well maintained in many a bedroom drawer available to anyone who wants this, but it's not for me. I want a computer that goes in my pocket.
2) grin and bear it.
Smartphones have stopped being exciting and new, and started to be borderline necessary to participate in society. QR codes pop up just about anywhere. Tap to pay works on the trains and busses. Something something homework schools (I have absolutely no clue, but it's conceivable). Yeah the battery life is never what we want, and there hasn't really been anything exciting or new since maybe QI charging, the folding touch screen (which I do not like), or when 5g got normal-ish, but for the most part, these devices work, they're not slow, and they do pretty much everything most people want. I'm not most people, nor am I satisfied with "most", especially when actually it's maybe half.
3) DIY
There's something appealing about living on the fringes of society. Half participating, but mostly doing my own thing. Granted the extent of that is making my own phone and looking a tiny bit kookier than some people, but it makes me happy and fills up my weekends- if only the same could be said of my bank account. It does mean however that I can tailor a device to my own needs; bring back the functionality that has been deemed "transitory" or unnecessary.
I wouldn't be posting on hackaday if I was going for 1 or 2, so here is the criteria for any device I want to make:
-Great audio
I hate bluetooth earbuds, I will not use them, I will not buy them, and I think they're a step backwards in technological development. We were relatively done with bluetooth outside of game controllers in the mid to late 2000s and early 2010s before Apple saw potential for money making in both removing a feature, and selling the solution. Prior to that, wireless headphones were seen as a gimmick, and rightly so. I don't want to have to charge a device that should be passive. I don't want to rely on a soundcard smaller than a penny. Furthermore, before the removal of the headphone jack, companies were doing their darndest to half ass the sound as it was. It's recognised in the audio community that iPods pre-2012 use better soundcards, same with the phones. I refuse to cowtow to the kind of industry nonsense that's directly contributed to my ears being less pampered, and as such, I will use an amazing sound card, preferably with extra jacks too, just in case I want to use it on my home sound systems, and partially just to be able to show off ("oooooh does your phone not have a line out or rca? ewwww" and other sick burns). Not really so fussed about speaker capability, but I will add some for utility.
-Replaceable parts
I've lost count of how many dead charging jacks I've had to waggle a cable about in before drip feeding life into a failing device. All outward facing parts will be replaceable. All internal parts will be standalone modules. I don't want to have to pay the cost of an entire device to replace anything on this. Every part in this device will be easy to find spares and repairs for, and furthermore, none of it will be OEM where avoidable, and I will not be visiting a mobile repair store to pay silly money for a piddly little aftermarket battery.
-Good battery life
Somewhere around 2010, it was decided that we want thin phones. I guess they never checked in with me though, because what I wanted was good battery life. I do not care if my device is thicker than 2cm, I want to be able to USE IT for more than a few hours, and I especially don't want it running out of charge at crucial times. I will be dedicating a significant portion of this project to figuring out the batteries on this thing. If I have to start using a bag to carry it, so be it.
-Exciting
Kind of flies in the face of my other requirements, but by and large, phones are boring in a way they really didn't seem to be back when touchscreens were the new hotness. Blame it on ubiquity, or a lack of new human interface devices (or their removal), or just the fact they've been around for a bit now, but I remember when I could get excited about new phones, and I remember precisely when that stopped too (end of 2018 back when I had an opportunity to get a priv, but didn't, because they had a whole bunch of issues, and I was better off getting something that didn't have those same issues, but wasn't exciting). As such, my phone should have all the stuff that I actually think is cool. An interesting camera lens - maybe interchangeable, a vertical slide mechanism, external ports, replaceable housing e.t.c. A friend at work summed it up very nicely: Phones aren't contraptions anymore, and that's what I want.
-PC Utility
I'd be happy to say that most of what I've outlined is the kind of thing people would froth at the mouth for if apple announced ("they invented a phone that you can do your own battery replacements on? What will they come up with next" they might say), but I feel like this one I might even regret just a bit. In spite of my criticisms of smartphones at large, the mass adoption of a vertical 16:9 (or adjacent, and 9:16 I suppose) format has meant most apps are much better designed than they used to be (also, this is why I refuse to go for a horizontal slider. Having to turn your phone on its side is something that should be reserved for very good videos that you need to watch on your phone, and taking photos). This is more for the times I'm frustrated that I can't do something on my phone that I could do on my computer, and right now, there's more things I'm frustrated about not being able to do, than there are things convenient enough for me to want an out and out mobile OS for. This might bite me in the butt, but I'll change my metaphorical trousers and wear the bite marks with a stubborn, self-satisfied pride.
-Expandable
Give me ports! I want this device to be dockable. I want to be able to use it as a full computer as and when I want to. I want to be able to connect ethernet, and external displays, and full size keyboards, and usb sticks, and whatever other device I feel like using. I know it's not something that phones ever did massively, but laptops sure did, and I'm just as annoyed about the way those have gone, and I know I'd like if phones started doing this.
-Hard keyboard
I have never in my life typed quite so fast and accurately on a mobile device, without the need for auto correct as when I did on a hard keyboard. It wasn't even a blackberry either. This was an Orange Rio, a cheap feature phone, available sometime pre-2012.