Musings of a Fondue

DIY PCB Etching

I wanted to learn how to etch PCBs at home. (Read as too cheap to pay someone else to do it). I was pleasantly surprised by the results.

- Board prep -

I lightly sanded the copper layer with 800 grit sandpaper (it was the finest grit I had on hand) to remove the oxide layer. I then rinsed it with water and wiped with isopropyl alcohol.

- Transfer -

I used the “printer toner and iron” method to transfer the design onto the copper. (Why - cheap). Steps:

  1. Tape magazine paper onto regular paper
  2. Print your design onto said magazine paper using a laser printer
    • make sure to mirror (vertical flip) the design before printing. I forgot to do this.
    • when printing, select the highest resolution (dpi) your printer offers
  3. Place the paper on top of the copper board
  4. Iron it
    • this transfers the toner to the copper board
    • I had my iron set to the highest temperature but ymmv

When it seemed like the toner had transfered, I soaked the board in water then gently peeled off the magazine. See this video for an example.

The design:

The toner transfer:
toner transfer

I then touched up spots missed by the transfer using a permanent marker:
sharpie touchup

Phone Repair: Part 2 - Screen

After what feels like years, the screen finally arrived!

I ordered the screen and frame assembly. Though it costs more and you loose the OEM frame, installation is much easier. Rather than trying to peel off the cracked screen and glue in a new one, you can “just” swap components from the old frame to the new one.

The quality of the assembly is great for a replacement and the price I paid. The flex cable looked a bit worn… maybe the screen was a salvage? The frame is of a lower quality than the OEM frame, but this is to be expected.

Tools useful for this repair:

  • spudger (essential for removing the back cover and battery)
  • heat gun (or blowdrier) for softening adhesives
  • 300LSE double sided tape (not critical but nice to have)

In the image below, I am testing that the screen works before moving components from the old frame to the new one:

IMG_20180915_191854

Phone Repair: Part 1 - Power Button

I dropped my phone one too many times. This time the screen gave in and shattered.1 Whether related or not, my power button soon failed after and my phone was unable to boot. It would get about a second into the boot process before restarting again, as if the power button was constantly being pressed. The behaviour was the same even in recovery mode indicating that it was likely a hardware rather than software problem.

A Google search revealed that failure of the power button is a common problem with the Nexus 5. I tried the easy solution of partially disassembling the phone to get at the button and clean it, its rubber pad, and the surrounding area with isopropyl alcohol. Unsurprisingly, it didn’t work.

In my search, I came across this awesome article by Gregor van Egdom. It has a great explanation and photos of how this particular button works and why it likely fails. His solution is to replace the button. So I went ahead and ordered a replacement from Ebay ($5 with shipping from the US (I could have gotten it cheaper but I wanted it now rather than later as my phone was unusable)).

James Molloy OS Tutorial

I wanted to get my feet wet with regards to writing operating systems from the ground up. I came across this awesome tutorial by James Molloy. In it, he walks through the creation of an ultra minimal unix-like operating system.

— Setup —

Setting up my environment took quite a bit of time. The setup instructions are aimed at a Linux/macOS environment whereas I am running Windows. Luckily, Windows Subsystem for Linux (WSL) is a thing and I was able to continue along. However, there was a catch - WSL does not have a graphical user interface (GUI).1 This meant I could not use Bochs (the emulator used in the setup instructions).2

Intel 8080 Emulator

I started down this journey a bit randomly. I was researching how the Game Boy uses memory bank switching when I came across this video1 in which the author attempts to emulate the Game Boy. Since the Game Boy’s CPU is a hybrid of the Intel 8080 and Zilog Z80 processors, they start out by implementing the 8080’s instructions. Though my initial intent was to learn about memory bank switching, seeing this inspired me to set off and create an 8080 emulator.

I lucked out in my choice to emulate the 8080. It turns out that retro CPUs are orders of magnitude simpler to understand than modern ones and that the 8080 is one of the earliest. As a byproduct of this simplicity, their documentation are detailed while remaining reasonable in size (i.e. readable). (Contrast the less than 300 pages of the 8080 User’s Manual with the almost 5000 pages of Intel’s current 64 and IA-32 Developer’s Manual!)

FFmpeg Snippets

Scripts for useful FFmpeg actions. Posting for future reference. Perhaps others will also get use from them.

Games for the Computer

I hope to run some of the games for the PICO-8 fantasy console on my Homebrew Computer. For example,


The developers have spent a lot of time writing the code, designing the graphics and gameplay, and creating the music to make the games beautiful and fun. While they are not as CPU/GPU intensive as your typical AAA titles, it would be quite an achievement if my computer can run them at a decent frame rate!

A VHDL Take on Ben Eater’s CPU

IMG_20170903_132332

As part of the Homebrew Computer Project, I have been exploring other CPU architectures and their implementations in order to broaden my understanding of CPU design.

An awesome one that I came across was Ben Eater’s 8-bit computer. It is well documented through a series of videos on Youtube and also on his blog. The architecture is simple which allows you to get a firm understanding of all its components.

Since it is a known working design, I saw it as the perfect opportunity to practice implementing a CPU in VHDL.