Quick cyberdeck build: Part 9
Quick cyberdeck build: Part 8
Nothing unexpected slowed me down really, but the level of accuracy needed in modelling the 3D printed enclosure ate lots and lots of time and test prints. I also faffed with not finalising how the charging would be done and having to swap from USB OTG host to USB charging and this led to reprints of the back section of the case.
There's now a slide switch on the bottom that swaps from charging to enabling USB OTG next to the USB socket.
Painting 3D prints is horrible and I hate it. I don't know how cosplay people deal with all the faff. I guess them shifting heavily to resin printers even on things without masses of detail tells you everything you need to know about how awful finishing FDM 3D printed stuff is. The final result on the top fascia is great but I really can't justify it on most of my one-use props. The back didn't come out as well but you're not looking at the back much.
The device is obviously a massive inefficient use of space compared to the phone I built this around but that would be missing the point.I've also decided that there's room inside this one for an RFM95 LORA module to make a LORA messenger, which would be quite cool but it'll have to wait until I've got time to make a second iteration of this. I'd also like to fit a USB hub and the option to plug in USB flash drives etc. A full size USB socket is quite chonky but there might be scope to squeeze one in.
I'm assisting running a Cyberpunk LARP in a month or so and wondering about reworking the 'cyberdecks' I made for the previous instalment of the game. They are just big 3D printed carry cases for Nexus 9 tablets which I've settled on as my standard "issue a tablet to LARP players" tablet because they're cheap and decent.
The game semi-requires of attaching stuff to the 'cyberdecks' with USB OTG cable at one point and once you start down that road adding random buttons and a keypad gets very tempting.
Quick cyberdeck build: Part 7
For a start the phone doesn't know the battery is charging. This sort of doesn't matter but you've also got the issue the charger doesn't know when to stop charging if the phone is switched on, due to the load from the device. This is exactly the sort of stuff I get fussy about in other projects and it's nagging at me that I was not practicing what I preach.
Also the TP4056 is set up for a slightly different chemistry cell with a 4.2v charge voltage. The battery I received has a 4.35v charge voltage and a peer at the images for these Motorola replacements shows they're all the same.
You can't change the charge voltage on the TP4056 it's preset.
This put the nail in the idea of just sticking that TP4056 charger inline and I'm back to charging it via the phone. Which is precluded by the OTG USB needed for the keyboard and trackball.
So I need to make it switchable.
For USB OTG to occur, the usually unused ID pin on the micro USB connector needs to be connected to ground. When this happens it turns the phone into a USB host and it starts supplying 5v on the VBUS pin normally used to charge the phone.
Once in USB OTG mode you can't charge the phone and supplying 5V on VBUS doesn't achieve anything. If you switch out of USB OTG mode while supplying 5V on VBUS with a device still attached this particular phone cycles from charging to not, which I'm not sure is expected behaviour or not but it's what I've got to deal with.
I've done a practical test to verify all this and using a couple of switches means you can swap from charging to USB OTG reliably. I'm sure something could be done with a few MOSFETs to effect the required swaps when you connect a charger but for this project I'm just going with a DPDT switch made out of two small SPDT switches mostly for time reasons. This has the added benefit of allowing me to completely disconnect the USB peripheral if I want.
So I've got to remake the little flat USB OTG cable I made and rework the whole thing, but I think it's worth doing slightly more properly than I'd planned.
Quick cyberdeck build: Part 6
Quick cyberdeck build: Part 5
With no immediate use for my Android Cyberdeck project it got shelved for almost a year but now I'm off to a LARP next month that is using the Discord app. for in-game communications.
So this came back out of storage and progressed somewhat.
To make the XBox 360 chatpad and the little Pimoroni trackball work I've made a custom short flat USB OTG cable by cutting up one of the OTG adaptors I had (so it had the extra pin shorted) and mating it with a micro-USB plug scavenged from a cable. Yes you can buy these things but I'm not in the habit of making my own USB cables so I don't have the parts hanging around.
There's a small nub sticking out of the side of the current enclosure but it's getting cosmetic 'bumpers' I'll use to hide this.
The redesign for more buttons has gone OK. There are now three illuminated tactile buttons which I'm hoping I can make use of for dedicated forward/back as well as the usual click. I could almost do with some more because Android has a surprisingly pleasant mouse button interface that you don't normally experience because frankly how often do you connect a mouse to your phone? I might try and implement some buttons in the side that take the place of a mouse scroll wheel, but it'll be fiddly to physically mount them.Quick cyberdeck build: Part 4
Yet more messing about with the design but I think I've finally roughed out how the front panel layout will work. I think it'll look decent so I've quickly (ha!) printed one off to get a feel for what it's like in the hand.
Printing time is quite long, so iterating the design is slow even when broken down into separate modules.
I've added a button on the left, which will do 'select', allowing you to use the trackball with one thumb and click with the other as push to click trackballs are always a bit awkward.Generally it looks like things will fit easily. In fact I think I'll do a version with two buttons on the left and a third on the right. You almost want four buttons for Android though as you've got 'select', 'back', 'home' and 'task list' so this might force me back to using the trackball to select things.
The battery shown might not be the one I finally use, it's quite old and was recovered from a dead tablet but finding something about the right size shouldn't be hard.The space in the rear of the phone where the original battery went is going to be used for the Arduino Leonardo that turns the keyboard, mouse and buttons into USB HID devices and assuming I continue with the original plan a TP4056 charging board.I'm also going to have to face up to the fact this 'quick' build won't be ready for the LARP this weekend. I could rush it and have a version made up but it's actually a bit too physically large to act as the 'covert portable terminal' that fits what the character needs. So I'm probably going to stick some spray paint on an old Sony Ericsson Xperia X10 mini pro, which is an ancient Android handset with slide out keyboard that will work just fine as that prop.
Quick cyberdeck build: Part 3
I have spent far, far too long messing about trying to get the 3D printed mounts for the trackball and keyboard, well mostly the keyboard, working to my satisfaction.
The keyboard has a kind of rounded kidney shape to it and I don't have the modelling skills to model it exactly so I've done a lot of tweak, print, repeat today.
Also, I did a little more messing with the Arduino library I wrote yesterday and submitted it for inclusion in the Library Manager.Also, I seemed to kill the cheap clone Leonardo board I was testing with so had to dig out and solder up the headers on another. Obviously not before I wasted time wondering what was wrong. They're tough and 5V tolerant so no idea how I killed it.
Also I faffed with the idea of using a different Android phone than originally planned as it's much smaller but it only runs Android 6, which is frankly way too old and won't handle Termux.
Note to self: Do not get involved in trying to install LineageOS on the Moto G4+, it needs to stay working.
Quick cyberdeck build: Part 2
In the cyberdeck I would like to use this little RGB illuminated trackball sold by Pimoroni. There's python support, but no Arduino library support available.
So I wrote an Arduino library for it.
That's essentially a day wasted. The code isn't consequential but instead of smacking it straight into the spaghetti code I'm going to stick on the Arduino inside the cyberdeck case it's now a library with methods for things I don't need like the onboard LEDs.
Quick cyberdeck build: Part 1
The cheapest way to stick a fully featured computer with a screen in a prop is to re-use an old mobile phone and I happen to have a Motorola Moto G4+ which I replaced a few years back. It's still a very usable Android device and mostly I retired it due to charging/battery issues.
After soldering up a connector to the old battery tails it works fine with any old LiPo, within reason.For it to not just be a phone in a case, it needs a keypad and other connections so I started messing around with an M5 Stack card keyboard I have.
The action is pretty nasty but I persevered and ended up with a 3D printable holder and levers to which I tried to add keycaps.
This does just about work but was still very disappointing and even with a lot of finishing work was always going to be nasty to use and probably not very robust.The staggered triangular keycaps were a deliberate Blake's 7-esque choice that don't really work without a surround of some kind.
With a game that could benefit from me having a 'cyberdeck' happening in a week I dusted off the idea again and suddenly remembered I have some old Xbox360 chatpads in a box.
These were bought with similar ideas in mind several years ago and I've done nothing with them. These are significantly better than the M5 stack keyboard and are also illuminated in use.Information on hacking these into other devices is generally very old and often a sea of dead/obsolete links, but I quickly found this video that gives you just enough information to make it work. The example Arduino sketch worked immediately which I call a win.
It's now been tried with the phone and in the dark the illumination works very nicely. That's the keyboard sorted, but I would also like to add the tiny I2C trackball I've got kicking around. Then it needs a case designing and printing. When I started down this road a couple of months ago I made a surround that holds the phone tightly so I just need to do the same for the keyboard and other gubbins.After fitting the trackball there should still be some pins over on the Arduino. So I might wire them up to some LEDs for blinkenlights, or perhaps to have some extra buttons.
















