Objective
The task this week was to manufacture a microcontroller development board that you’ve designed. This means milling a board, soldering all parts to it, and then testing and debugging it.
Group Assignment
The group assignment this week served as an orientation to the milling machines and a walkthrough of how to actually put together our PCBs.
For the uninitiated (as I was), milling a circuitboard involved taking a thin plate of copper and then using a machine to carve out the area around your wires and pads. This is a bit different from the circuitboards we’re used to seeing; most of the ones in our home electronics are mass produced using plastic boards and then superheating the wire to lay them. This requires much more advanced machinery and also produces a number of harmful gases, hence why I’ll be milling this board.
The thing that surprised me about milling a circuitboard is that it’s a relatively low-tech process. Tape is used to hold the copper in place (more on that later), and Mods, the software used to communicate with the milling machines, is far less polished than it is functional.
Setting up the milling machine is also a very manual process. Mills must be changed manually (like on a drill), and finding the right height for the milling to ensure it doesn’t go too deep involves a series of minor adjustments and guess work in Mods before manually lowering the mill until it just barely touches the copper sheet.
After setting everything up, we were finally ready to mill. As a group, we wanted to test the design limitations of the machine, so we milled the following to see how narrow of tolerances the machine could handle.
We also went over the basics for soldering. Soldering is essentially melting small amounts of conductive wire to create connections between pads on the board and components. The solder joints both hold the components in place and serve as connections in the circuit.
My main takeaway is that soldering is a bit of an art that takes some time to get used to. Some people prefer to place the part on the board and then gently add the solder joint, while others prefer to add the solder to the board first, and then use one hand to position the part and the other to re-heat the solder joint. Whichever way you choose, it takes some practice.
Milling My Board
As I mentioned in Week 5, I opted for a basic design with opportunities for increased complexity. On the right side, I have a simple switch and light in series that will test my basic abilities to get a PCB working. On the other side, I will have 3 more switches each attached to their own GPIO. If there is enough time this week, I will build a second PCB with an RGB LED and use these buttons to test bluetooth connectivity (press a button on one board, display a certain color light on the other).
Staying consistent with my final project concept, I’m using a XIAO ESP32-C3 for my microcontroller. A bonus: the USB-C connection makes this very easy to program.
Setting up the milling machine was simple, but I still had some errors. First, even though I thought I was very thorough on the tape, my copper sheet immediately came loose when the milling started. I needed to flip it around and really press it on before it finally stayed put.
Next, while I thought I’d selected all the right options, I accidentally had the milling machine set to outline instead of etching. This meant that my circuit was completely cut out of the board rather than just being etched around.
The next try was far more successful (though the tape came loose again at the beginning), aside from a few quirks:
-
First, I didn’t pay enough attention to the origin setting for the milling machine, and so milling started further in on the sheet than I anticipated. My PCB still fit, but just barely.
-
Second, I had trouble getting rid of the plus values in Fusion when converting my design to a png. In most cases this wasn’t a big issue, but it did mean I needed to use a utility knife to remove an unintentional connection where the LED would go.
Soldering the Board
After washing off the PCB to remove any hand oils and extra copper flakes, I was ready to solder. I gathered an XIAO ESP32, four tactile switches, a 100 ohm resistor, and a small white LED.
I started with the tactile switch in my main circuit, initially using the method of placing my switch and then adding solder. This worked decently well, though I found it very difficult to not nudge the switch.
Since the resistor was so much smaller, I decided to put the solder down first and then reheat it. This was much harder to control than I expected; while it was helpful being able to hold onto the resistor while heating the solder, it was difficult to position both ends because the solder hardened so quickly. The result was a resistor that looked like it was trying to do a kickflip.
For the LED I needed to consult the part’s datasheet to determine which direction it needed to face. I learned that the cathode mark was for the negative side of the LED. Since our current flows positive to negative, this meant the cathode mark would point towards ground.
By the time I started soldering the microcontroller, I was starting to feel much more comfortable soldering. The joints on the XIAO and the extra switches were much cleaner, so I went back and tried to do the same for the joints in my initial circuit. Ultimately I struggled to clean up the resistor, so I ended up removing it entirely and reattaching from scratch.
Testing the Board
I started by plugging in my board. I didn’t think it would work without any programming…and I was right. There was no voltage flowing through my circuits, likely because most pins on the microcontroller are by default turned off.
I used Arduino IDE to write the software, largely because it made it very easy to manage the boards I was using without needing to flash new firmware onto the ESP32. My goal was simply to enable voltage to flow through the basic circuit with the switch and the light, so I only set the D7 pin to high.
When I did this, I still did not see any immediate results. There still was no voltage measured between the D7 pin and the ground pin, and the light would not turn on. I started to think my solder joints could be an issue, but tried unplugging the ESP32 and then plugging it back in just in case…
…AND IT WORKED!
I never thought I’d be so happy to see a light turn on.