tinyDeck
A small computer device which has a screen and keyboard. Sounds simple? You already have a phone, why even have this bulky box? For fun mostly. Most cyberdecks imo, are for fun devices. This one is no different, albeit much smaller than most cyberdecks you'll find around, and hence the name.
Features
tinyDeck is essentially a console programmer. It has a decent sized screen and a nicely made keyboard driver (*cough* shameless pitch for the driver I wrote *cough*) on which one can try and reminisce of the era where once phone keyboards had actual, physical buttons. Though this one is powered by a Raspberry Pi Zero 2 W, and can be used to quickly connect to hardware devices (it exposes the I2C Qwiic connector), write code in Vim or nano or emacs for that matter. It can be powered from external devices or use internal batteries. With little work, it can also work to view the Raspbian GUI and look up images or connect to the internet even.
Why was this device made?A look in to its components.
As mentioned above, why even make a device which is a brick (I'm serious, look at this thing, it's not the prettiest cyberdeck out there). It was mostly a learning exercise for me. It started with me fiddling with fbdev and fbtft with small embedded devices using Yocto and Buildroot. Once I was comfortable with that, an idea got stuck in my head, if a tiny screen, why not a tiny keyboard too, make a tiny computer. It was then when I came to know such unorthodox computers are called cyberdecks. I tried finding small keyboards, most of which were bluetooth and/or USB. Which is nice, you get far better features with those input devices. However, they were often wider, bigger, even bulkier for my taste. I found Solder Party's Keyboard PMOD by chance, and started working on it. Turns out there was a rudimentary keyboard driver for it written by the creator. But I wanted more, a driver with which I could use Vim and write programs on the small screen I made use of. And thus, a large part of this project went in to writing my first Linux Device Driver. I shorted the SDA and VCC lines on that single keyboard pmod I was so graciously gifted, free of charge by the creator. Dun Dun Dun...
Without loosing heart (says the guy who ate an entire pizza to feel better), I bought a Keyboard Featherwing from the same creator (Check out Solder Party's Website. Arturo182 is one of the best and friendliest creators out there, and there are some amazing new products coming out from their website). With this, I finished the driver for the keyboard. Next task was to get the LCD working. Luckily, juj's fbcp-ili9341 project was of great help for this task. All it took was to match the raspberry Pi's SPI0 CLK, MOSI, CS, and DC lines matched with that on the Keyboard FeatherWing. This worked in under a day. Here's a video of me watching Youtube Streamer's God of War live play through on the screen.
For the above two steps, this is the hardware connections I used (Also mentioned on Keyboard Driver's README.MD). If you do not wish to use the PCB, you can use these connections. The pins for the LCD_DC pin and the Keyboard Interrupt pins are changeable, just make sure to use the correct BCM PIN numbers in the LCD cmake and dts file of the keyboard.
3.3V on Pi ----> 3.3V on Keyboard FeatherWing.
GND on Pi -----> GND on Keyboard FeatherWing.
SCLK(Pi Pin 23/BCM GPIO 11) ---> SCK on Keyboard FeatherWing.
MOSI(Pi Pin 19/BCM GPIO 10) ---> CO on Keyboard FeatherWing.
CE0(Pi Pin 24/BCM GPIO 8) ---> LCD_CS on Keyboard FeatherWing.
GPIO9(Pi Pin 13/BCM GPIO 27) ---> LCD_DC on Keyboard FeatherWing.
3.3V on Pi ----> RST on Keyboard FeatherWing.
SCL(Pi Pin 5/BCM GPIO 3) on Pi ----> SCL on Keyboard Pmod or SCL on Keyboard FeatherWing.
SDA(Pi Pin 3/BCM GPIO 2) on Pi ----> SDA on Keyboard Pmod or SDA on Keyboard FeatherWing.
Pi Pin 15/BCM GPIO 22 on Pi ----> INT Pin on Keyboard Pmod or KBD_INT on Keyboard FeatherWing.
The next step was to remove 10 wires connecting everything up and make the design more compact. For this, I designed a kicad PCB. The two layer PCB made it easy to add an I2C ADC to read the analog Light Sensor on the Keyboard FeatherWing. [I've never uploaded KiCad projects easily to GitHub before. I'll try and add these soon].
Satisfied with the dimensions and orientation of components, I sent the PCB Gerber files for manufacturing at jlcpcb.com I've ordered with them before, and I'm very happy to say, they have always provided me with quickest and cleanest PCBs. The silkscreen is clear, not one trace is wrong, the dimensions are exact to my specification, the solder mask is green but that's on me, they can do far more colours and even have impedance matched traces (to be used in the next version of this project). Before this project, I used jlcpcb.com only for PCB manufacturing. But they have started offering two more services.
First, their component Assembly service. I was sceptical if I'd get the same quality of products as I'm used to ordering from mouser and digikey, but shakes hands and bad soldering tip have made me realise I have much to learn in field of soldering anything smaller than 0805 packages. With jlcpcb.com's assembly service, I got the few components I needed quickly in their parts list, make sure they are from reputable manufacturers as well as find the associated Datasheet for the required ADC in my design, and get it assembled on two of the five PCBs their website made for me. In hindsight, with how cheap the PCBs are, quick turnaround, and with the added coupons for the parts, I should have chosen to get all five PCBs assembled. There is always next time to order from there, which I'll surely be doing, because the next new feature from jlcpcb.com is even cooler to me. These guys have started providing 3D printing services! I'm not just excited to write about it, but it's cheap enough for me to try it out more often. Even the cheapest materials are industrial quality SLA prints, so no layered texture of FDM printers. They even contacted me politely on what could go wrong in the print because I made one of the inner pegs of the 3D case (more on it below) a little too thin. A single correction and the people at their support got it under production in no time. I've not gone to my University and used their printer since I've been spoiled by this quality of jlcpcb.com's work lol.
And now to end, a few good pics of the tinyDeck.
Known Issues
The keyboard has a major flaw when working under X (no such issue when working in console mode only). Given how few keys are available, one needs to switch to alternate modes for second level keys. That means any thing other than a digit or an English letter will require some effort from the user. As much as I'd like to remove this issue, I've not been able to find a good solution to it.
The trackball mouse driver does not exit gracefully from the kernel under X. It might be because of how the driver kills its work queue, or because the read write functions require a mutex. It should be fixed in coming days.
The PCB design has a flaw that the header pin for the trackball is too deep in, making the connection to the trackball impossible unless I find a wider connector. I did not measure twice, hence the issue. It should be removed in future iterations. Luckily, the driver for the trackball does not use the Interrupt line on it and can work off from the Qwiic connector on the Keyboard FeatherWing.
The UART connector is not populated.
The battery holder is not pinned to any surface, rather held tight in the body by weight of the two parts. This should be fixed in future iterations. I'd like to use a Lipo battery in those versions.
I've still to write a driver for the ADS1000 ADC.
In the next version of the PCB, I'll make the pads for connections on the back surface. That way, even if the PCB is fixed to the FeatherWing, it should be configurable.
In the next version, I'd probably use the raspberry pi without extended headers and place the zero2go omini rev2 on the PCB itself. That was the plan with this version too, but there were size complications to it.
I'll definitely get all my PCBs assembled next time so as to make more than one prototype unit for my friends.
Adding a Slot for the camera in the case itself would be cool too.
Thanks for reading so far.If you have any questions or issues, please reach out to me on GitHub on the drivers or here itself.
Have a wonderful day.
Comments