2024-04-13

DeeDee

A portable wireless programmable ergonomic ortholinear split keyboard.

ongoingkeyboarddiyelectronics3d-print

vision


DeeDee ⌨️

Ooo.. What does this button do..

Main objectives

  • Frankenstein my own DIY keyboard from the shared wisdom of the internet.
  • Write/use a firmware for it.
  • Document it well and share parts of it.

Design requirements

  • DIY!
  • Column staggered monoblock split (Absolem like)
  • Low profile Kailh Choc v1 Sunset 36key: 2x 18key(15 + 3 for thumb cluster ).
  • Addressable LEDs
  • 2 rotary encoders EC11. Perhaps EC12 for low profile.
  • Cirque trackpad.
  • 64×48 OLED(Seeed Studio Grove SSD1306 0.66")
  • Controller that could run as USB or BLE HID
  • Bluetooth

Goals that define basic success

  1. Designed and 3d printed case
  2. Wiring:
    • Plan A: Designed and ordered pcb with reset buttons, power leds and switches broken out on the case etc etc etc.
    • Plan B: Handwired.
  3. Encoder, trackpad and display in place even if they aren't going to be connected.
  4. Connected through USB

End goal of unachievable completion

  • Runs on keyberon rust firmware
  • Secondary parts support
    1. Trackpad
    2. Encoders
    3. Display support
    4. LEDs

yak-shaving


The Process/Pr(👹)ss

Things to do so I would not do... Things

  • Learn Blender so I could design the cases.
  • Learn KiCAD so I could design needed PCB.
  • Learn things like I2C, USB HID
  • Learn programming embedded
  • Probably need to also learn debugging..
  • Nixos has to support needed tooling
  • To be continued...

The beginning

It was like a big bang. It started with a tiny spark and instant chain reaction got me in a chaos of parallel sub big bangs. If that makes sense... 😅 One thing was clear - I wanted to make a keyboard that I could attempt to run with Rust based firmware. I kept finding myself spending hours trying to solve emerging obstables, but then they would branch out to the point that I would need to step back and start from the beginning. I'm only going to mention a couple of them, but there were many and on every corner.

Handwire or go PCB way

It was so tempting to just grab a carton, stick some switches in it and start figuring out how to program a controller. And I did, picked a keyboard shape that made sense to me and 3d printed an outline where I could stick those switches. After spending 6+ years with ergonomic keyboards(2+ years with split) I knew I wanted it to be as small and column staggered, but I wanted it to be monoblock. So when I saw Absolem and an article about it, it solved all the things I was trying to solve. I don't have much experience making PCBs apart from a project from 25 years ago when I made a stroboscope that included painting with nail polish traces and etching the rest of the copper with an acid. Handwiring was very appealing, since designing a pcb felt overcomplicated and daunting. But handwiring meant higher profile as well Cherry MX, while I wanted hot swappable Kailh Chocs. And there I was split between two paths. Learning about both processes and changing my opinion which way to go pretty much every two hours.. For over a week. In the meantime I was trying to solve all other problems like...

Picking an MCU

What a journey here. Initial requirements were - Rust firmware support. I did not even know if this project would be more about making a keyboard or a way to learn Rust in embedded.

After a week I just thought I will order a couple of all controllers that were considered and make this decision later as I will actually start doing something and stop planning. With Current Esspresif PRO-Rust mindset I wanted to go with ESP32 RISC-V based MCUs, I already had ESP32-C6 devkits that I could just pick and use. Apparently not, I learned from specs they couldn't be programmed as HID devices.

Quickly it became a battle between Promicro, nice!nano, nfr52, stm32, rp2040 based devices. I couldn't make up my mind yet again. Go wired or Bluetooth. Some supported by QMK, some by ZMK, some limited by licenses, some too old to base my future on. At this point I had already given up the idea to program it in Rust. Eventually found a GH user who got Keyberon firmware on nice!nano. That gave me confidence, at least for now, so I started shopping for...

Keyboard features

Since all of these considerations were happening in parallel, a list of features kept increasing and decreasing every couple of hours. Switches, LEDs, rotary encoders, BLE HID, trackpad, trackball, OLED screens, battery.


I knew that this was a big bite and I knew that to successfully swallow it, I need to chew it really well. All I had to do is put time and effort at a steady pace and eventually things will stop branching out and instead will start falling into places.

Standing questions
  • where to add vias

the-story


A placeholder for a story about a man who got into a rabbit hole. For now let's just say there was ESP32, STM32, nrf52840 and RP2040

This drafty story supposed to log the journey. Not the destination. Other pages should be browsed for TL;DR

⚠️ I will try my best to not make it a big rant, but during this journey I learned a lot of words that are mostly used for swearing so let's see how it goes.

Past

A few years ago I saw my friend buying ZSA Moonlander and I checked it and it looked fancy and I ordered it too. At that time I did not know but it was the beginning of my ergo keeb journey. I received mine first and I started creating layouts. Investigating what would be a community liked layout. That quickly led me to ColemakDH. Because I was on 5 week paternity leave looking after newborn meant that my day will be like a Swiss cheese. I had random 15min time windows scattered all over the day(and night). Because I was time constrained and too tired to pick up any bigger task that was perfect time to go cold turkey and switch away from qwerty. It turned out that 20 years of etching those qwerty patterns into my brain was not that easy to unlearn, however accepting upfront that it's just a long process helped. After all it's the same thing, whether it's delivering a complex project at work or learning a music instrument or learning to surf. Learning a new thing and doing it good you just need time and motivation. By the time my friend received his keyboard I was already going wild with mine. Then quickly he got very disappointed by it. ZSA turned out to have more closed source than he would accept from the company that delivers devices that handles your input. It was one of those 'once you see, you cannot unsee' moments for me. As I started browsing for alternatives I discovered Keyboardio 100 kickstarter that I just couldn't pass on. I loved everything about them and what they stood for. So I joined the waiting list. At the same time shortages of chips and abundance of viruses started happening but eventually that keyboard was in my hands. At the time when I was customizing my Keyboardio 100 I already knew - I want my keys to be silent even if it meant loosing tactile/clicky properties. When the keyboard came, it was almost exactly what I was hoping for. I am using it for 1.5 years and I am still loving it. However after 3 years of ergo mechanical keyboards now I got a taste of what I like and want to keep and what I would like to improve on. I should mention besides my keyboard obsessions I am learning nix(os), programming in Rust, electronics, Blender, KiCAD. I am a DIY minded person who loves creating things. I love modeling with CAD programs. Working with wood, electronics, 3d printing and professionally I am obsessed with adjectives like autonomous, automated, declarative. So this keyboard project feels like it was a missing piece to connect all of those passions together and I am really enjoying the journey I made with it so far.

Present

For the last few weeks I have been trying to figure out the missing pieces on how to make my own keyboard and I have to admit I am balancing on a breaking point. I am feeling this project has consumed me. It feels every path I am trying to take brings me to another dead end and every objective that I have set myself I need to drop as a ballast to keep myself afloat. However talking helps. A lot. And during one of my desperate rants to my wife, she gave me this brilliant idea. To document my struggles. Perhaps then it would give me some clarity. A map of things that need to happen that I could systematically crumble into smaller tasks and tackle them rather than keep everything in my head and from 5 a.m. be awake and in an infinite loop try to hop from one problem to another without getting anywhere. And here we are. This is my effort to do so. I am very bad at taking notes. I scribble some words that make sense at a time, but when I try to retrieve information from them that text by then is alien to me and I have no idea what I meant when writing those things down. But there are few ways to go about I am very bad at... things. Over my years I learned that this just means that I need to put time and effort. Yes, it's that easy, just time and effort 😅 So here I am, trying to lay down this information in my head into some structure, a plan, a story and if this will be helpful for me alone, this already have been a success. If that will help some other lost soul, all the better.

Future

As for the future. It really depends on previously mentioned time and effort. But if I will have those, I am hoping to have a very interesting ride.


morning-after-burnout


Just put time and effort...

Famous last words... Of mine... It appears putting time and effort only continuously kept uncovering more things that I don't know. To the point that one evening I picked up Zelda TotK and disappeared for 7 months. I could not go back to the tangled mess that has been waiting for me where I left it. And with every day it was harder and harder to come back to it.

The break happened because a couple of things. A night before, I was up till 3 a.m. I spent perfecting trace paths and connecting the nets. I wanted to finish because next morning we were supposed to go for a 2 week vacation and this was like a milestone I wanted to complete. That was a bad idea. Milestone gives a tiny sense of completion. That and a little break was a perfect coctail to not want to come back to where I left.

Stockholm syndrome

It was forsaken, but not forgotten. Eventually psychological bond established with my captor came through and I picked it up again. While people were busy working on AoC, I went back to where I left. It took me a few days to remember where was I and what I was doing before I stopped. i.e. just ergogen config was already 800+ LoC that I did not know how to navigate anymore. But I did get there. This time calmer and with confidence. And this is exactly why I love declarative approach. I was able to just jump into the nix dev shell and continue editing/adding.

Electronics 101

I had the main parts wired, i.e. Keys, diodes, rows, colums, LEDs. Now I wanted to add remaining parts before I will move to ordering. It appeared that I had no idea about even most basic parts of electronics. I spent many hours watching YT about traces and its return path. To the point where I realized - all that pristine trace wiring work that I've done should go through the window and I need to rework it from scratch. This time however instead of slowly steering a horse with a carriage, I was was on a racing bike. Just in couple of days wiring has been completed.

Electronics not so 101

To add the screen and the trackpad I had to start diving into datasheets. These pdfs surely know how to explode in your face. Not sure why, maybe because of tens of different voltages while I would expect one, or that all the info was in Mandarin... By then I already picked nice!nano mcu but now there were more things to consider. Can one controller drive all this. After I had all pins assigned to components I had zero pins left. Questions like - can a low speed digital pin drive data pin for 36 addressable LEDs? Do I have to add all this fluff for components like capacitors to stabilize power? Would it still work if I didn't? For how long? Will these LEDs light up with 3.3V even if datasheet is telling to use 5V, but controller doesn't output that. And the questions were all over the place. If I would check keyboard forums, they would skip many of recommended parts, while in electronics forums they would do it by the book.

This time however I just kept rolling. I had no deadline, no milestone to fulfill. Just one day at a time get one step closer to the end.

Follow one's footprints

Just like in life, you can only go so far following someone's footprints. Very quicly I realized that if I want to keep using ergogen, I will have to be creating footprints myself. Thousands of products they all come so similar and so slightly different. That was such a daunting job I hoped to avoid, but was happy to learn that apart from tedious copy pasting work it wasn't nearly as bad as I have feared. I should mention however that at this point I have spent many hours in KiCAD and I started getting more and more familiar with it. Some I downloaded and templated some I had to create myself.

One Goose’s Delight, Another’s Disgust

In the begining I was all about creating something that could be picked up and used by anyone who'd be interested in it. However organizing everything with that in mind soon made little to no sense. This is such a niche product and there are so many keyboards that were popularized and already widely adopted and nowadays you just order a kit, solder it and upload the kit and there you have it. Therefore I decided that if some one person will be interested in it, I would rather walk them through rather than create a fully consumable product that no one will ever even see.

The leap of faith

And there it was. The keyboard that has been on my head for so long. Now it was feature complete. I was ready to place an order and get it manufactured. But there was tingling feeling that maybe something is still wrong and I will realize it right after I will send my order. And I checked. Tens of times. And every time I would find more things to fix. This made it really hard to just close my eyes and go for it. Eventually it happened. But I am happy I took the time to do it.

Then there was silence

The waiting began. Now that project had a pause, I had time to start preparing myself for the next steps. The firmware. I thought I would need to fork repos and rewrite the software and deal with all the hell that will pour on me. Lucky for me, this was not the case. It does take time to get familiar with these things. But after all previous work this was a pleasant walk in the park. Still is. I'm not done.

Due delivery day

Not much to comment here... Only maybe THAT IT WAS THE BEST THING EVER! That smile on your face when you unpack the pcbs and just look at them. How shiny, how perfect, how real they are... Boards haven't even had a single part on them and it already felt like my job there is done...

Soldering

I grab a stencil, mount the board, start spreading the paste and... The paste is tough. It doesn't stick to the stencil or on pcb. Dragging it on one end, pulls from another. Starting to realize that all these YT videos advertising amazing led-less solder pastes and reflow heat plates is a LIE! Well it isn't if you know what you're doing. But After a couple of days me trying to solder everything with the paste and heat plate and cleaning it all with isopropyl alcohol and perfecting it over a digital microscope just to realize that keys work only if you twist the keyboard slightly... Constant reheating and resoldering most likely created tiny cracks or leftover solder paste was shorting something but I decided that it's time to take the second board. Along the way I also learned how tiny is the 0805 and how shaky my hands are. This soldering saga continued for a week or two.

Rolling to production

After finally all rows and columns started working. After all keys started responding. After layout was created and configured. After LEDs started giving a nice xmassy feeling... It was time. Time to put the keyboard to a test. To monkey the type out of it. At this point I was already happy. I started thinking how I should just put a full stop on making it and start enjoying it. It worked! And as much as I was afraid staggering these colums so drastically, in the end it only took me 30 minutes to get back to my typing speed. My new split but not split keyboard... I should end here.

The end is never the end is never the...

And here we are today. Case is still not designed. Encoders glithing and triggering without being touched. Cirque that community is still in the process of taming. OLED screen that is most likely not going to work until a few lambs will not be sacrificed for the Gods. And me in front of it all already thinking about DeeDee v2. Or at the very least DeeDee v1.2...


links-credits


Help & Inspiration


What got me into this

https://github.com/joe-scotto/scottokeebs https://zealot.hu/absolem/

What gave me hope

https://github.com/simmsb/keyboard - for his profile status - I will put rust on your microcontroller, and you will enjoy it. https://www.youtube.com/@therustybits - where I got confidence I can program 1key keyboard. https://www.youtube.com/@rhymu - for 80h+ of streams where he's walking a similar path. With some notes taken along the way

Before that, I thought the only way to get anything from this project is to use QMK/ZMK and obey their requirements.

Where I started sketching (declaratively) my layout

https://flatfootfox.com/ergogen-part1-units-points/ - one stop shop to learn about the unofficial ergogen tool: https://ergogen.cache.works/


I haven't used resources bellow. But good to know there are alternatives. http://www.keyboard-layout-editor.com/ https://kbfirmware.com/

Beautiful projects to get inspired from

https://github.com/sadekbaroudi/barobord https://github.com/AlaaSaadAbdo/battoota - for it's collection of models https://github.com/ianmaclarty/ik - for it's low profile https://github.com/GEIGEIGEIST/KLOTZ - a-z product delivery https://github.com/Bastardkb/Dilemma - LEDs, encoders, trackpad. Beautiful assembly guide https://github.com/beekeeb - a bakery of opensource keyboards.

https://fingerpunch.xyz/product/faux-fox-keyboard/ - not much to learn from this url other than where to buy it, however I was shocked to see how close it matched what I've been sketching for myself for a couple of weeks now.

Not everything has to be created by me

https://github.com/pseudoku/PseudoMakeMeKeyCapProfiles - sculpted keycaps

Ergogen magic
Learn by guides:

https://flatfootfox.com/ergogen-introduction/ https://nilnil.notion.site/Convert-Kicad-Footprints-to-Ergogen-8340ce87ad554c69af4e3f92bc9a0898

Learn by yaml examples

ceoloide/corney-island JackMatanky/kb_snak Klackygears/ergogen efyang/dovetail-kb chrishoage/spleeb

Ergogen footprints

https://github.com/ceoloide/ergogen-footprints - nice nano, LEDs, rst/pwr switches https://github.com/Virginia2244/ergogen_footprints https://github.com/infused-kim/kb_ergogen_fp

MCU related

https://tinygo.org/docs/reference/microcontrollers/nicenano/ nice!nano pinout


gallery


Project Gallery

Some visuals from the project.


⌨️ PCBs have arrived!

Which PCB to pick... It's such an uplifting feeling when your DIY home project gets a proffesional physical shape.


🎨 Personal touch

Artwork 😍 A non functional requirement!


🪑 Hell's kitchen

Soldering begins A microscope, a soldering gear and a lot of...


🤩 A final product in its temporary shape

It's alive! 🌈, or 🦄 didn't happen...