• Chapter 3: Eureka (or the keyboard design process)

    Beth2 days ago 0 comments

    Every 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...

    Read more »

  • Chapter 2: Parts and the BOM

    Beth06/12/2024 at 14:14 0 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...

    Read more »

  • Chapter 1: Why

    Beth06/12/2024 at 11:33 0 comments

    At 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...

    Read more »