Home About Final

Week 6: Electronics Production

Week 6: Electronics Production

This Week's Assignment

Following on from last week where I designed my PBC, this week was about actually creating the PCB itself. This is something I have never done before and probably didn’t think I would as ordering PCBs online has now become pretty common and fast, plus of course it relies upon a lot of specialist hardware.

The first step was to prepare the PCB design for milling. Before anything, I gave my file a double check which was a good idea as I found a connection between 2 pins that I had drawn by mistake!

Next, as my design file was in Fusion, so as a first step I had to export as a Gerber file. This is a bit hard to locate, but is found under Manufacturing —> Export —> Export Gerber.

This creates a compressed folder with many files within it. For my design, and to avoid complexity, I was working with 1 layer only (top). However, as I had partly used Fusion autorouting, without checking the settings there were 2 issues.

  1. My Traces were probably too thin (<16mm)
  2. My design had multiple layers (a top and bottom)

So before proceeding I redesigned my board to only have 1 layer. Now I was ready to finally export my gerber file and move towards a few steps to prepare my files for milling.

Given that I had a design with 1 layer, some holes and a simple shape, essentially what we need is the following:

  • The board outline (to cut the shape from a piece of material)
  • The board’s traces design
  • Any holes that need to be drilled

Fortunately, Quentin has created a tool to help with the first step of preparing our files for the milling machines by converting the gerber files to PNG.

Tool: https://quentinbolsee.pages.cba.mit.edu/gerber2img/

For my board I had to create 2 files:

  1. Profile of the board with the traces in black and white
  2. Drilling holes on the board

If you simply drag and drop the images one by one, the machine will say no and create files that won’t work together. The process has a subtle logic:

  1. For the traces, drag and drop in the board profile file and the traces design file at the same time. In my zip file this was the copper_top.gbr and profile.gbr
  2. For the holes, similarly, drag and drop both the drill_1_16.xln (hidden in DrillFiles) and profile.gbr

This ensures everything has the same dimensions and you get consistent ready to mill files like this:

Aesthetically pleasing.

Next we have to use another tool, this one was kindly created by Neil Gershenfeld and is called https://modsproject.org/

To run the necessary operation use the following steps:

  1. Right-click on the initial blank page
  2. Select program > open program
  3. Carvera —> mill 2D PCB

The Cavera is the milling machine we were using which is a very luxurious machine in the words of Alfonso. Neil’s tool looks appropriately intimidating initially, but it is pretty simple to use for the operations we need:

Drag and drop your trace file into the top node, the hole file into the bottom node and hit calculate! Then as if by magic, you will get an exported file (.nc). All that’s left to do is to load this to the Carvera on the PC in the shop.

Before we do that, we can load a piece of copper onto the milling machine. We of course ensure that it is securely held in place by tightening the screws and fixations around the copper. We also ensure that there is a ‘sacrificial’ piece of copper underneath creating a second layer.

The interface for the Cavera is quite simple but not very intuitive. Open file —> Upload files —> choose your file —> click upload.

Once uploaded, close then select the file and hit the select button, this will open your file in the software and give you a 3D rendering of it.

Give your file a check to make sure it is as expected e.g. everything is within the traces.

Next you select the initial position for where you want to mill. Click on the settings looking button in the bottom left corner, this will bring up the milling profile preview. Here you can set the margins for milling.

Hit the config button and set the margins e.g. 5mm from the origin and this will show you in the preview where your board will be milled.

Important! Make sure that ‘auto-level’ is selected when using the Carvera to make sure the machine knows where the z-axis is.

Next we close the lid of the Carvera, and hit run. Similarly to the laser cutter it will show us with a laser the boundaries of our job so we can make sure it is within range of the material itself. Thus I created my first board! It came out looking very nice indeed.

However, there were a few problems with this board.

  1. I hadn’t properly considered placement of XIAO ESP32 microcontroller, simply placing it in middle of board. This was ok as USB slot was accessible but not best practice; should be closer to edge for easy access.
  2. Marcello showed me boards where microcontroller affixed underside with pins exposed to layer with traces which makes more sense. Could not flip board due specific pin layout.

I decided to redesign my board! Flipping the microcontroller around in Fusion is simple but the routing no longer worked. It created issues where ground/connections overlap and ended up with a radically different design.

Once redesigned I followed the same steps as above. I watched a video I had made of Marcello operating the PC software as it's very unintuitive during first use. My second PCB was thus milled.

I then moved onto the next step which was soldering components. It’s been a while since I soldered anything, but I am familiar with the process. I started by soldering some pins to my ESP32 which was relatively straightforward. Then I tried to solder the pins to the board. This was quite tricky for a number of reasons:

  1. No clamps hold board place
  2. Soldering iron head thickness vs. trying delicate work

In any case I gave it a go, and soldered it into place. At some point I made a big mistake where part of the solder was applied to the casing of the microcontroller, I removed it using the strip material that Kye and Alfonso showed me how to use. I noticed that also my copper would bubble and discolour while soldering, potentially the soldering iron was too hot but I’m not sure why that was.

Next I was ready to test this first component on my XIAO ESP32 board. I followed the getting started instruction:here

Here’s what I did:

  1. Connected XIAO USB C <> USB C cable Macbook Air
  2. Opened Arduino IDE
  3. Tried to run the blink program

It did not work. The error I received was that there was no connection. When I checked the ports indeed, I could see that there was no serial port being established between my laptop and the device. I tried a few more cables and the same problem occurred. Of course I wasn’t sure if these cables were appropriate and capable of data transfer. As I had no other cables to hand, I looked into the problem on the Internet.

One response that came up was to install some Drivers, specifically: CP210x USB to UART Bridge VCP Drivers which are availablehere

After installing the drivers, you also need to set permissions for the drivers to run, as your computer blocks the installation. To do this open System Preferences > Security & Privacy and allow the CP210x drivers to be installed. This will then lead to you needing to boot in recovery mode (holding down power for silicon Macs) and reduce the security settings while enabling the option which refers to ‘kernel’.

To verify installation you should then in theory:

  1. Run ls /dev/cu.* in Terminal with the ESP32-S3 unplugged
  2. Plug in the ESP32-S3 and run ls /dev/cu.* again
  3. Check if a new port appears, like /dev/cu.SLAB_USBtoUART

It didn’t work, so I figured why not try on a PC? So I went home and tried on a PC I have which meant I had to install Arduino IDE and various drivers on a quite slow and angry PC.

Unfortunately, the fairytale did not happen and it still refused to connect, the PC actually did not detect any ports at all. At this point, it was pretty clear I lacked the correct cables, but it was now Tuesday around midnight.