Soemarko Ridwan

iOS & Web Developer ⟡ Coffee Addict ⟡ Scuba Diver


Dactyl Manuform Keyboard Build Guide

hero

There are tons of other dactyl build logs out there, albeit with their own twist. So rather than doing a regular build log, where I show you what I did to make this keyboard, I'm going to do a "teach a man to fish" approach. Hence the title of build guide. I'm going to show you how you could make your very own dactyl. Even though I put mine on GitHub, that's more like a personal archive than anything. You should start from the closest thing you want to build.

This project has a lot of "firsts" for me, it's like the hidden / bonus idea when working on a project, it has to further improve or add a new skillset under my belt. While this is my second mechanical keyboard, this is my first custom one. First time building a keyboard from scratch. This is also my first time post processing my 3D printed things, more on that later. Let's begin;

Read more…


Quick Intro to Custom Mechanical Keyboards

hero

As I write this, I'm waist deep in the custom mechanical keyboard rabbit hole. The space mouse project made me thinking that the ideal input is a trackball. Looking into DIY trackball led me to ergonomics keyboard, guessed what keyboards most of these ergo nerds use? A custom mechanical keyboard.

The word custom is the key here. Mechanical keyboards, technically, are nothing new. They’re just keyboards with Cherry MX mechanical switches. Back in early 00's, Ducky and Topre were considered the endgame keyboard. And not long after that, Jeff Atwood of Stack Overflow partnered with WASD and created the Code Keyboard. Which I considered my endgame keyboard, a well thought out keyboard. Bought it in 2015, liked it, use it whenever I'm home never thought about mechanical keyboard again...

... until now. The word "custom" here has quite a large gamut. Ranging from the very buying each part (think of it like building your own PC — buy motherboard, RAM, CPU, etc. and put it together at home), to design their own PCB and have it fab by jlpcb or oshpark, or 3D print the enclosure and hand solder each pins with wires. Guess where I fall in the ranges there?

Even buying each parts aren't as simple as buying motherboards or case for your PC, no, members of the community design these keyboards, or just a part of a keyboard, then they organized these group buys, where if enough people pre-purchased it, then it can go into a small scale production. It means that these people spent their money and need to wait at least 6-12 months (sometimes even longer) before getting anything in the mail.

On the flip side, if the group buy turns out to be awesome and you missed the group buy, tough luck, you have to pay premium from others who are willing to part with theirs, or hope for another revision of another group buy. Even then, the good ones will sold out within seconds of the launch. Example: Satisfaction75 fiasco. Which is why keyboards youtube videos are more like show and tell rather than reviews. For context: there are people who are willing to buy one of the earliest group buy keyboard for $8000. An $8k keyboard.

This is the most passionate and patience community I've ever come across. They are both elitist and kind / welcoming at the same time. So here I am, printing the case for a Dactyl Manuform Mini while browsing for which key switch and caps I want to use for my next keeb.

Links if you want to dig a little bit deeper:


Last Post of 2020
Last Post of 2020

It goes without saying, 2020 sucked donkey balls! Although we're lucky enough to have traveled quite a bit before, in fact, we left Japan about a few days before they release the Princess Cruise's passengers back in Tokyo. After that the world (well, my world) seems to be on pause. I still have coffee I bought from Japan sitting in my office drawer, haven't return to office since the beginning of Covid. I really missed traveling though, and scuba diving especially. I have bought a new underwater camera that's still in the box.

On the flip side, I've hit my long time New Year's resolution to write more. IIRC the goal was like one post a month started several years ago. This year I've logged at least two posts a month. Build Logs are fun, why didn't I thought of that sooner. Ever since, I started a project with some kind of logging notes. The logging process makes the progress a bit slower, but every single approach / attempts at a problem becomes very concise and planned.

To close out this year, I've decided to add comment section to this blog, some of you has been trying to contact me via youtube comments, I never check those. First I looked at Disqus, see if they're still as terrible as I remembered when I used them on tumblr, and they are. Then I came across utterances, it looks interesting and already has a plugin for Bludit. Going to be implementing it in the next couple of days.

So, so long 2020, let's hope for a better 2021.


DIY Space Mouse / 3D Mouse

This is a simple one, I don't even have a fun name for it. I showed off the prototype on Arduino subreddit awhile back and have been using and modelling with this ever since. As mentioned there, I just recently learnt about something called a Space Mouse. Literally one company made it, yeah you can find some mouse that incorporate a tiny joystick on it, but that's also cost an arm. It's a niche product that hobbyist doesn't need to get it.

If you ever made a Stream Deck (like I did on the previous post), heck or even just played with a Leonardo (Pro Micro), you basically already know how to make this. All you just need to do is read the joystick and encoder values, then send those value as hotkey the hotkey of your CAD software, and you're done.

The only thing that's missing is that Fusion 360 doesn't have a hotkey for the home view. There are some people who made a screen jacking script to do that on Windows, bet I could do the same with Automator, but I'm not a fan, one of the major key of this build is making something that I can plug into another computer and use it as is.

gambar cutout

The enclosure has issue, if you can see from the cutout above, I only have space to mount the joystick from the left side, it resulted in a wonky and relatively loose joystick. Terrible to use, can't even click it. So, I just add a nub on the lid to press it down and straighten it up, worked like a charm.

However, I won't fix that issue, I'm just going to it as is because... as I write this, I am prepping for MK2. Frankly, I find that a joystick isn't a great input for 3D mouse. I tweaked it, tuned it, every way, it just doesn't feel right. So I'm exploring other input options now, a couple thing that came to mind is a trackball and that recent DIY HOTAS on YouTube. It's 100% 3D printed parts with rubber bands, hall effect sensor, and magnets. Dude is brilliant.

As usual, everything is available on GitHub.


Live Streaming on a Budget
Live Streaming on a Budget

We as a family has lock ourselves down since around end of Feb or early March. We haven’t left the house unless it’s absolutely necessary, so the wife decided that she wanted to live-stream the game she’s playing anyway. Here’s some tips and tricks to up your live streaming game on the cheap.

1. Software

OBS, obvi! Powerful, but it’s also power hog. But free. It is not well optimized on Mac, but it's not like we're swimming with options here. On Windows you can get a certain GPU that’ll make OBS run better on it, but that’s neither here nor there.

2. Capture Card

To stream iOS game, you can actually just use a lightning cable, open QuickTime, select iPhone as source. Then use Loopback to capture the sound. On OBS, add window capture, and add the loopback as another audio source.

iShowU Audio Capture is the free alternative to Loopback, but it’s getting the whole desktop audio, if your computer dings for new messages or email, your audience will hear it too.

However, with just lightning cable, the stream lags. I think OBS just not fast enough to down scale the large iPhone screen to upload in real time. After 3 days of streaming with lightning cable, we sprung for Elgato HD60s+ (and the HDMI dongle). Completely addressed the lag complaints.

3. Stream Deck

A very simple DIY version. Super cheap, like I just need to spend $2 for the Pro Micro. I also print the re-legend-able key caps. This is my breather project while I'm building and fixing Whey. Simple, easy, just follow the guide as is. Use the exact same pins and sketch.

A couple of snags if you use it on a Mac, F14 and F15 were predefined to set brightness. And for some reason F21 and F22 doesn't trigger when I try it. So just go to Settings > Keyboard > Shortcuts > Display and unticks. Then set the shortcuts on OBS.

But I feel like I can improve things here. I have some ideas that I need to test first.

4. Key Light

Simple project that can be done in under an hour for under $10. I just use a cardboard from Coca-Cola, don't even need to cut it, other than making a few holes for mounting and wires. And I just use an old and weak wire iPad stand clamp (something like this, but much shittier -- I bought it for like $5).

5. Green Screen

I actually just use green craft paper, kinda surprised how well it works. Mine is far messier that the one on the video. For something that cost under $2, I'm very happy with the result. Check out the hero image up top, that's the scene for Among Us, bottom left is the webcam chroma-keyed, and top right is Spotify, which brings us to my next point.

6. Spotify

A simple and beautiful little widget to show what song is currently playing on your stream. You can't use Spotify on Facebook (tested it), maybe you can get away with it on a less popular streaming service, maybe Twitch, possibly YouTube. It's just so nice to have. People stop asking what song is this. Accepting song request is a great way to start interacting with your audience.

7. Bonus

Here's what you should never do: Don't use HTML/CSS for animation. I don't know how to make animated video things, but I know HTML / CSS like the back of my hand. So, why not just make HTML animation, and add a Web Source on OBS, right?!

Nope. When we tried that, after streaming for a couple of hours the second-highest-spec 2019 16" MacBook Pro crash. The whole thing crashed. After the second time, I left activity monitor on, turns out OBS were using like 300+GB of RAM.

Maybe you can get away with it for something simple like a lower third that you turn on and off (remember to check the release source or something along that line on the Web Source properties). From there on, I've set it the "right" way, the way OBS is designed for. Scrolling text is Text Source. Simplified a lot of things.

That's it. After having done all of this, in terms of technology, you're already on par with full time streamers. The rests are on your contents and personality. gl hf.


How to Use ADS1232 Like HX711
How to Use ADS1232 Like HX711

We have a problem. Everytime anyone type in load cell arduino, it's always return HX711. I mean, it works if you don't need accuracy just a ball park figure as a trigger for other things, say like a pet feeder. If weight less than 50g, move servo to X until weight is more than 100g. Then it doesn't matter, you might feed 20g more food to your dog. However, for more interesting projects, say a smart cutting board that can weight things according to ingredients listed on your phone, then HX711 is definitely not good enough.

Enters ADS1232, while it is more expensive than HX711, it is not prohibitively so. And the datasheet is quite overwhelming for most. It is not like using HX711 where you plug one end to the load cell and the other end to the micro controller, drop in a library and BAM you've got weighs. So, let's make it like that.

Pictured on top is the simplest form of the ADS1232. On the left side, blob together CLKIN, A0, TEMP, and GND. Then bridge GND across to another GND. Bridge across 3.3V and 5V, then link GAIN0, GAIN1, SPEED, and REFP to 5V. That's it, the ADS1232 is ready to be used like HX711.

  • PDMN, DOUT, and SCLK connect to 3 pins on your µC.
  • VCC and GND out of µC are connected to both the ADS1232 and load cell excitation voltage (red and black).
  • Load cells signal voltage (green and white) connected to AINP1 and AINN1 on ADS1232.

On this mode, you'll need to use my simplified library for Whey. Just download and drop in the ads1232.h and ads1232.cpp onto Arduino IDE.

That's it, you can now use ADS1232 like HX711. Next let's dive a bit deeper so we can use this 24-bit analog to digital converter much better.

  • You'll need 4 more pins out of your µC for A0, GAIN0, GAIN1, SPEED.
  • SPEED pins is how you control the reading samples rate. Set it LOW for 10 samples per seconds, and HIGH for 80 samples per seconds.
  • Gains:
    • 1x: GAIN0 and GAIN1 to LOW
    • 2x: GAIN0 to HIGH, and GAIN1 to LOW
    • 64x: GAIN0 to LOW, and GAIN1 to HIGH
    • 128x: GAIN0 and GAIN1 to HIGH
  • A0 is used to read the second channel. LOW reads channel 1 (AINP1 and AINN1). HIGH reads channel 2 (AINP2 and AINN2).

IMO, these things can be decided prior to soldering things together and simplified your schema. Now that the ADS1232 has been configure, let's get some data out of it.

  1. Power it up: set PDMN pin to LOW and SCLK to HIGH. Reverse values to power down.
  2. Wait until new data is ready: wait until DOUT change from LOW to HIGH and back to LOW.
  3. Next you just need to read the raw 24-bit data. Refer to the library if needed.

Once you have the raw data, it's basically done. To calibrate the scale:

  1. Prepare a known weight, say 100g weight. But don't put it on the weight.
  2. Reset the calibration value SCALE value to 1.
  3. Read and store the value to OFFSET. It's to tare off your platform
  4. Put on the known weight.
  5. Read the value again. Now you can get the new calibration value.
  6. SCALE = (value - OFFSET) / 100, if the known weight is 100g.
  7. Store the SCALE value to EEPROM.

Bonus: if you expose all those pins to Arduino, you'd better use the original library by HammidSaffari, it's just plug and play.


Whey: DIY Coffee Scale
Whey: DIY Coffee Scale

The prototype was done wrong. If you clicked through, you can see my original design. After the load cells arrived, I've spent almost 2kg of PETG to get that design to work. But it just doesn't. First, plastic flex. That design would probably work if I can laser cut aluminium (I've actually looked into a laser cutting service). But I have another problem when I mounted the OLED on the platform, when I put something heavy, the wires actually pushing the platform up making the measurement not accurate. Which made me not wanting to pursue this design any further with aluminium or other means.

On to the final design. Well, "final". I went with 2-part concept, the controller was the best I can come up with quickly, without desoldering or making any other changes to the electronics part. If you were to build this, I highly recommend you redesign this part. This has wires rat nest inside, which I believe it becomes the source of the noise (which makes it still jitters at ±0.1g). I have better stability on the original design when it worked. Which means, a better controller should be coming soon.

Build guide, codes, and STLs are available on GitHub.

Load Cell: I bought 2 from Ali, a $15 one and a $25. Neither are stable enough at 0.01g. The $25 one are more sensitive to noise. I went with the cheaper one because it is shorter, I'll have more room below the portafilter.

TTGO mini32: went with this one, mainly for a couple reason. Mainly, it has the LiPo charging circuit built in. And it's ESP32, so it has WiFi and Bluetooth built-in. WiFi is useless in a scale, but Bluetooth was great in MK1. I can't use the same app as before, but I do have plan for it in the future.

ADS1232: faster and less prone to noise than HX711 makes it a no brainer option. It should be way more popular because of it. The lack of resources online makes me think that it deserves its own post.

That's it. Put those 3 things together, add a battery, and you're done. With the exception of the controller, I'm quite proud of the design. It has 3 modes:

  1. Filter mode, which as a platform that fits the silicone cover from my old scale. filter mode
  2. Portafilter mode, a diffrent clip that can hold the portafilter. portafilter mode
  3. Espresso mode, just look that the picture. Super happy with it. espresso mode

This design also means that I can just get a super accurate (and very cheap) 500g/0.01g load cell and just plug it into the controller. 10 seconds to recalibrate, and it's done. Another bonus since I code things myself (and the fact that ESP32 has built in RTC), I added a countdown for the timer. Technically unnecessary to brew a good coffee, but it very much soothes my OCD bone.

Final thought, now that I'm not size bound, it'll definitely worth it to work on a better controller. Maybe even just make the exact ADS1232 reference design or add a bunch of filters. Or simply just solder them together instead of rats nest in a box.

I need a bit of break first, this build was much harder and took waay longer than expected. I'm glad that it works, have made many delicious coffee with it. The countdown totally makes the brewing feels less hectic, especially when pulling espresso shots. Again, the build guide, codes, and STLs are available on GitHub.


ESP32 RGB LED Controller MK2
ESP32 RGB LED Controller MK2

A small but significant update. I ordered a few photo resitors, aka LDR (Light Dependant Resistor) right after I finished writing MK1. It’s quite common for me to get ideas pop into my head as soon as I write things down.

Adding the LDR to the controller is a super easy task. I just modified the enclosure lid to have 2 tiny holes towards the edge, so it’ll pick up on the room light. The energy saving with this tiny sensor is significant. MK1 will automatically turn itself from 5pm to 11am, this will cut that on time by at least 50%.

Wire it to the ESP32 is also simple, just remember that we can’t use ADC1 when we need the WiFi. Any pins on ADC2 will work. On the code I also added more colours, so it’ll also lit up if I darken the room for nap time.

Sidebar: if you notice in the sketch, I also tried to use the mounting screw as capacitor button to turn all the LEDs into bright white (all 255s) to quickly brighten the room for a bit. But I'm having issues that it won't turn off consistently. I left the code in, I just don't wire the pins to the mounting screws.

Updated code and enclosure are at the same links: GitHub & Thingiverse.