Soemarko Ridwan

iOS & Web Developer ⟡ Coffee Addict ⟡ Scuba Diver


USBasp ISP Programmer + ICSP Adapter: The Most Underrated Tool for Electronic Hobbyist

USBasp ISP Programmer + ICSP Adapter

You know that feeling when you broke a thing right after the first time you turn it on? That's what happened to me when I got my CNC 3018. Put most of the things together, enough to test run it, plug it to my computer, tried to connect with UGS, connected, but can't get anything to move. X, Y, Z, spindle, no movement. Dang it, DOA?!

At first I thought it's because my control board still running grbl v0.9 while most tutorial / guides I read and watched mentioned grbl v1.1, so I'd just upgrade it, right? ez pz... boy was I wrong. The flash kept failing, I kept trying by changing the parameters, up to a point I got it to flash up to 3%, then it failed. Did I brick the board? I can't get it to connect to UGS anymore. Nothing on Arduino's Serial Monitor. What do I do now? It's about dinner time, so I took a break while thinking about making plans.

Plan A was to complain to the seller and claim that it's DOA. Plan B was to use my stock Anet A8, see if I can flash grbl into it, it's a spare board that has 4 stepper motor drivers on it. Plan C was starting to look into replacement board. So, as I set plan A in motion, open a complaint ticket to the seller, I started to look into grbl firmware for Anet board. No luck for plan B, worse part I tried to flash grbl to the Anet board anyway and killed it as well.

So, plan C, the cheapest grbl board I found was the Makerbase MKS DLC v2.0 -- it's about $20 without the stepper drivers. Then I realised that I never even look at which board was my CNC runing, it came with a black acrylic cover. So later into the night, it's like 3-4 am at this point, I open up the cover and try to look for a brand or something to see if it's even cheaper than the MKS DLC.

ICSP port

This is where I noticed two things, there's a switch for the 24V supply. That is why I can't get the stepper and spindle to move in the beginning. And, most importantly, I saw this unused, unsoldered ICSP port. And I remembered I have a thing, which turns out it's the thing I bought to burn bootloader into the Anet A8 board so I can flash my own Marlin Firmware.

So obviously, I quickly soldered header pins into it. The crystal oscillator is in the way of plugging in the adapter directly, so I just use jumper cable. Quickly flash grbl v1.1 to it. Voila! It's alive!! I also revive the Anet board by flashing Marlin v1.1.9.1 with stock A8 configuration. Soon after I cancel my complaint, the adrenaline and anger for killing a thing before even using it ceded, and fatigue came in.

Again, the USBasp programmer along with the ICSP adapter, you can get it for $2 on eBay or Ali, have it in your electronic box. You'd never know when you need it. While technically you can hack around and use an Arduino as the programmer, it's $2, get it now before you need it.


Under Desk Headphone Extension Cord

A simple project that birthed not long after I finished my macropad. With the amount of zoom meetings I've been having along with my MacBook just sits on a desk, clamshell mode, behind the screen, it'll make it easier if I can just plug my headphone directly into the desk without needing to reach around and what not.

This is a quick and simple project but you need to solder tiny wires. Here are the things you need:

  • TRRS cable, it can be extension cable, but you'll need to figure out how to mount it.
  • TRRS female connector, plate mounted if you want to use my STL
  • Mounting plate STL
  • Heat shrink tube to cover the soldering job

As you can see in the video, I made note of which pin correlates to which wire. I believe this should be universal, but feel free reconfirm this on your own.

  • Tips -- 2 -- blue
  • Ring -- 3 -- green
  • Ring -- 4 -- red
  • Sleeve -- 1 -- gold

Next all you need to do is:

  1. Solder the wires
  2. Cover it with heat shrink tube
  3. Mount the plate on to desk
  4. Mount the connector on the plate
  5. Plug everything

Done and done.


Renew GPG Key

GnuPG logo

It's almost two years since I posted my guide to PasswordStore, I still refer to that post from time to time. If you follow that guide, you'll hit this problem soon enough. Can't encrypt new password because the public key is expired. Well, here's how.

$ gpg --list-keys
$ gpg --edit-key  <fingerprint>

Use the expire command to set a new expire date:

gpg> expire

When prompted type 2y or however long you want the key to last for.

Select all the subkeys (the primary key, which we just set the expires date for, is key 0):

gpg> key 1
gpg> key 2
gpg> expire

A star will appear before all selected keys.

Since the key has changed we now need to trust it, otherwise we get the error "There is no assurance this key belongs to the named user" when using they key:

gpg> trust

Then we just need to export it again and pass it around to another computer or mobile apps.

$ gpg --list-keys
$ gpg --export-secret-keys --armor <fingerprint> > privkey.asc
$ gpg --export --armor <fingerprint> > pubkey.asc


Whey 2.0 Begins

V2.0 initial design

Well, it's kinda already well underway. Quite a few things already push to the GitHub project. This project basically initiated when I broke v1.0. And since I already have some stability issue with it, which I can't pin point the origin of -- my very best guess was the ESP32 I used, but can't confirm it. Already killed the thing. And the readings stability was also poor, so I went ahead with this v2.0 project.

As mentioned in the GitHub, the grand scheme is basically still the same as v1.0, except this time just done properly rather than cobbled together. Except now it's wireless and I designed and printed the ADS1232 breakout board exactly as the reference design. The PCB has been ordered with Elecrow.

The Arduino sketch has gone as far as it can until the PCB arrives. At this point, all I can do is just designing and testing a bunch of case for the plate. Pictured on top is my very first design for v2. Seems a bit tight. We’ll see how it goes.


Hexaleaf: DIY Hexagonal Nanoleaf Moodlight

I'm trying something new this time around. I'm going the youtube route for this project. While I don't have a personality to be a YouTuber, the Space Mouse demo I posted there had waay more interactions than anything I posted here. While the visitors to this site is growing, getting comments / questions are fun too. And recently I enjoy a lot of ASMR build / restoration videos with subs and listening to a lot of ChilledCow while working, so since there are no enjoyable sound out of a soldering iron, please enjoy my build video with royalty free lo-fi beats.

And, this is a very visual project, it kinda makes sense to do it on YouTube. While there are many other similar project to this, all of them just telling you what they did instead of showing you how. Most of them has that "rest of fucking owl" in their videos. This prototype video is uncut, I just sped it up during the boring / repetitive stuff, but you can still see everything clearly. This is the obvious step one if you are building your own mood light.

Parts:

  • eSun Cold White PLA+ (cold white has a bit of bluish tint compared to regular white)
  • STL
  • NeoPixel LED strip
  • Arduino Nano (any Arduino compatible micro controller really)
  • Capacitor and a resistor, basically this sample project
  • Power Supply, 5V 1A is enough for the prototype which is just one leaf and Arduino.

I'd consider the prototype is a success. However, I have put on a pegboard on the wall where I planned this for. So, this project is shelved for the time being.


DIY QMK Powered Macropad

hero image

Ever since finishing my Dactyl Manuform, I've been really inspired with QMK. Another idea that pops almost right away is a macropad. Something that'll match the look of my brand new sit/stand desk controller.

Went through all the search results for macropad, found this thing as the best one. Printed it out, it has issues;

  • It uses the header legs as mounting point, pointed up, how the hell do I mount the pins from the switches?
  • It has no mounting point to the desk, although, to be fair, the thing it's cloning, the Pikatea has picture of it mounted underneath a monitor.
  • Another thing, it's too thick and has terrible tolerances. Encoder doesn't fit. The switches can be forced in, but that will bind the switches. It clicks down, but doesn't bounced back up.

My Remix

belly view

Thingiverse

So I just pull out my calliper, and design my own with Fusion 360. I still tag is as a remix just because it's not 100% my original idea. And I also includes the STEP files so other can easily remix it. QMK Firmware source for Pro Micro is also available on my QMK fork. The default functions are quite obvious from the keymaps, except for the left most key, it's a custom shortcut to mute/unmute Zoom meetings (been having a lot of it recently).

As pictured, mine features:

  • Thinner front plate so the switches will just click in, instead of snug fit.
  • Screw holes for under desk mounting.
  • Mounting place for Pro Micro, a bit snug, but you actually want it snug here.
  • Better tolerances for EC11 rotary encoder.
  • The knurled knob is also 3D Printed.

Final Thoughts

wide view

I love it, especially now I use my Macbook Pro in clamshell mode, I no longer have access to the TouchBar, this helps a lot rather than accessing like fourth layer on my DM. And QMK is friggin brilliant. While this macropad is quite simple to do with Arduino firmware, I doubt I can make it so damn stable with layers, ease of remapping the keys.

After using it for a couple of weeks, the only thing I regret not adding is headphone jack extension on it. But it's okay, I have a better idea for it. It's not like QMK support it so I can just use one cable to the computer.


Post Process 3D Printed Things: Spray Paint

money shot

I mentioned this in passing the previous post on my guide to make your own Dactyl Manuform Keyboard. Spray painting your printed things is as easy as it seems. Three things, filler / primer, color, and clear coat. Sanding in between layers. That's it.

Step 1: Filler / Primer

starting point

They're the same thing, you just want the grey stuff. Very easy to sand. I started with 240 grit sand paper for the first 2 layers, and 400 for the third / final layer.

Step 2: Color

primed

I chose copper color paint, 2 layers, sanded with 400 grit then 800. Then another thin layer before clear coat.

Step 3: Clear coat

painted

I picked glossy coat for that metallic look, just a couple of thin layer with minor sanding with 1500 grit just to smooth things out. And we're done.

Bonus: Weathering

I personally not a fan of glossy shiny things, so I'm going to weather everything with my dark teak wood stain leftover from my keyboard project. This part is also simple enough, spread everything until it's black, then quickly wipe everything off with dry rag. The remaining stains will give the thing its grungy look. I also added the matte clear coat to make it looks older. The result is pictured on the top of the page.


InterPlanetary File System (IPFS)

So, I recently learn about IPFS, this thing is interesting. The video above is a good primer on IPFS, and feel free to click through and read more about it, but the way I like to think about it is, it's like public Dropbox meets BitTorrent meets blockchain. Of course there are other interesting implementations for it like OrbitDB.

But, I'm just going to use it as my image host replacement. Imgur is sometimes blocked (depends on the ISP) in Indonesia, Imgbb is just meh. So we'll see how IPFS fare as public image host.

Sidebar: I'm currently helping out a couple of startups, so personal projects are going to be shelved, which means this blog is going to see a lot less posts. Even though I have a couple of posts lined up, I still need a bit of time to polish it up.