Skip to content

8 - Electronics Production

Hero Shot

Summary

This week is about learning how to produce PCBs using CNC milling machines.

Assignment

  • group assignment:
    • characterize the design rules for your in-house PCB production process
    • submit a PCB design to a board house
  • individual assignment:
    • make and test an embedded microcontroller system that you designed
    • extra credit: make it with another process (I tried, haha)

At Waag there are two machine's (unless you count the ShopBot) that can be used to fabricate PCB's. The Roland Modela MDX-20 is a small desktop CNC milling machine, basically a mini version of the ShopBot we used last week. Instead of large wooden sheets, it’s designed for precise, small-scale work like milling PCBs, wax, or soft materials. There's a page with instructions on Waag's website, but it's a bit outdated.

The xTool F1 Ultra is a compact laser cutter and engraver that combines speed with precision. Unlike the larger laser cutters, it’s built for quick engraving and small fabrication tasks, using both diode and fiber laser technology. This makes it especially good for working with a wide range of materials, from wood and acrylic to coated metals.

The laser cutter used in week 3 is a CO₂ laser, which operates at a long infrared wavelength (~10,600 nm). This is best for cutting and engraving non-metal materials like wood, acrylic, and textiles, whereas the xTool F1 Ultra uses diode (~450 nm) and fiber (~1064 nm) lasers, making it suitable for both organic materials and metal engraving.

FR1 and FR4 are both commonly used PCB materials, but they differ in composition and machinability. FR1 is a paper-based material that is relatively soft, which makes it easy to mill and ideal for quick prototyping. FR4 is made from fiberglass-reinforced epoxy, making it much stronger and more heat-resistant, but also significantly harder to machine. Milling FR4 produces fine glass dust that is unpleasant and potentially hazardous, and it causes more wear on milling bits. For this reason, at Waag we use FR1 for PCB production, as it is safer, faster to work with, and better suited for the small desktop milling machines used in the lab.

Group assignment

To find the design rules for our in-house PCB production Henk, Leo & Irja showed us to run a clearance and width test on both machines. On the Roland we used a 0.4mm flat and tapered mill. You can clearly see that on the Modela it's possible to make very fine traces, way smaller than the milling bit, cuts on the other hand can not be smaller than the milling bit. On the xTool it's the other way around, it's easy to make very fine cuts, but hard to make fine traces.

On the left the Modela, top: tapered, bottom: flathead. On the right the xTool

My classmate Remco did a great job at documenting our the process of ordering a PCB from a board house. I learned from this process that seemingly trivial decisions, like the color of the soldering mask, can really rack up the price. It seems pretty exciting, I hope some day in the future to actually order some of my own designed PCB's from a board house.

Make a PCB

In week 6 we designed a PCB that in theory we could produce this week. However our local lesson on how we actually do this, made me realize my Honk Please! board was maybe not the best choice. One of the issues is the buzzer, the piezo buzzer I had in mind is a through hole component, and we're only producing a one-sided SMD only PCB this week. It can replace it with a generic speaker connector SMD component, but it feels like that defeats the purpose of this week. Leo also showed me there's a generic Xiao footprint in the KidCad Fab library, which makes it a lot easier to add the stacking header than the way I did it in week 6. For these reasons I decided to draw up a new PCB this week.

Design

To keep it simple I decided to only use a few SMD LED's and a microcontroller and focus on the production side of things this week. A couple of times during class it was mentioned that not all PCB's need to be square. For this reason I looked for an interesting analogy considered things like water, train track, a little lighthouse, but eventually landed on star signs. The way they're drawn, with their vertices and edges, already looks a bit like components and traces. Recently I've been fascinated by dolphins and it turns out one of the smallest constellations is Delphinus: the dolphin – and has a star named Bob.

Image taken from Space.com through Starry Night software

Delphinus consist of 5 stars, so I draw up a schematic with 5 blue LED's. I used a 100 Ω resistor for the blue LEDs because their forward voltage (~3.0 V) is close to the 3.3 V supply, leaving only about 0.3 V across the resistor. Using Ohm’s law (I = V / R), this gives I ≈ 0.3 V / 100 Ω = 3 mA, which is enough for visible brightness while staying within safe limits for the microcontroller. Lastly Henk suggests I add a button to make it a bit more interesting.

I switch to the PCB editor and first have to add parameters we found during the group assignment in KiCad to make sure our PCB design adheres by design rules for our in-house PCB production. In KiCad go to File > Board Setup... to change the default settings. This week we're only making single sided PCB's and we'll be using with a 4mm milling bit, just like during the group assignment. Under Net Classes in the sidebar set the clearance and track width to 0.4mm. Under constraints we update the following settings:

Constraint Value
Minimum clearance 0.4
Minimum track width 0.4
Copper to edge clearance 0.4

In the PCB editor I first use the Place > Place Reference Images option to load an image of the constellation. KiCad by default limit's traces to a 45 degree angle, for a bit I play around with settings, seeing if I can change this. But then it starts to feel like a dangerous rabbit hole, better to save this for another week. I also kinda like the design challenge of working within the default KiCad parameters, so I start placing my components over the constellations stars and start laying the traces puzzle. I add a the little dolphin SVG with the File > Import > Graphics option.

Pretty happy with my design, it's time to do some milling. First I have to get PNG's to feed into modsproject.org which we also used to control the vinyl cutter in week 3. For this I use the Gerber2PNG plugin made in Fab Lab Kerala. I export the top traces and the edge cut, both in black and white. Mods knows that whatever is in white needs to remain, whereas black needs to be removed, and how.

Milling

In my case a copper plate was already on the machine, so I got straight to setting up my job. In Mods under programs go to Roland > MDX mill > PCB to find a mods setup that translates SVG's and PNG's to G-code specifically for PCB milling on our machine. Although following the blue arrows in Mods it's pretty easy to understand what's going on, Mods can be a bit finicky and sometimes gets stuck. If you're seeing unexpected things it's better to restart Mods and start over.

Setting up the mill:

  • upload your file to Mods
  • turn on the last output to Webserial
  • click Get Device on the bottom right panel and connect to the mill through USB
  • on the Roland MDX / iModela panel change the X and Y coordinates to where you want your job to start, write them done just in case
  • on the machine press the Down button until the milling bit is a mm's above the material (make sure you leave enough space on the arms of the machine for the actual milling)
  • lower the milling bit onto the material by unscrewing the little nut in between the two stickers on the spindle and let it rest on the material
  • in the mill raster 2D panel add your milling bit settings, we used:
    • tool diameter: 0.4mm (flathead) or 0.6mm (tapered)
    • cut depth: 0.3mm
    • max depth: 0.3mm for traces or 1.5mm for the edge cut (measure your copper to be sure)
    • offset number: 4 for traces or 1 for the edge cut
    • offset stepover: 0.5
  • click calculate and inspect the toolpaths in the 3D viewer that pops up
  • if these look like you expect, click send to device on the last panel

The offset number determines how many passes the mill makes around each white shape (trace) in your image. The offset stepover controls the spacing between those passes. If the offset number is set to 0, all black areas will be milled away.

Time to do some milling: I go through all of these steps, send my file, butttttttt the mill goes to completely the wrong place. I'm pretty sure I've worked cleanly and gone through the steps in the right order, but I must have updated the origin coordinates and forgot to press calculate again. Time to start over again! When you turn off the machine and then turn it back on again the instructions are still in the machine, to stop it from continuing the previous job press the up and down button at the same time, till the machine light starts flashing. Then unplug the USB from the computer and wait a little bit before plugging it back in.

The next two tries don't go much better, the second time I didn't screw in the milling bit firm enough, the third time the milling bits head breaks off. I'm thinking it's maybe something in the complexity of the design (spoiler: it's not) I decide to just do the edge cut with the tapered bit and try the traces on the xTool laser. It takes an hour and 20 minutes, but after a full day off fucks up, I have the outline of my PCB. I end the day by designing a really small PCB with just one LED and a button, just in case I run out off time this week (I don't end up using this).

One of the failures, you can see only the first two pads on the left are milled deep enough

The next day I talk to Henk about how my day went and Henk spots the reason why the milling bit broke off: our copper plate wasn't attached well enough to the machine at all. We realize we didn't go through this part of the instructions last week, as some material was already attached to the bed. Henk takes the bed out of the machine, the material off the bed and shows us how to take off all the old tape with a pallet knife and clean it with sticker remover. Then he puts the copper plate face down on a towel on a table and uses a lot more tape than we did, making sure it doesn't overlap. He then presses it on to the bed, using the towel to protect the bed and material, pressing with his weight firmly down on the table.

Amount of double sided tape to use

Then Henk helps me setup the xTool to try and engrave the traces on the edge cut made the day before.

Setting up the xTool:

  • make sure the ventilation switch at the back is turned on, you will see lights on top indicating the machine is on (unlike the CO2 laser or ShopBot you won’t hear noise yet)
  • open the green protective shield and remove the lens protection cover inside
  • make sure the computer and screen are on, then open xTool Creative Space (XCS) and start a new project
  • in the interface choose New Project and select Process on surface
  • import your file
  • place the material under the lens
  • set the material thickness, the machine will auto focus and the red and blue dots should overlap
  • if needed, refocus manually using the Frame option on the control pad and adjust with the up and down buttons until the dots overlap
  • select Engrave and use these settings:
    • mode: engrave
    • laser: fiber laser (IR)
    • power: 100%
    • speed: 650
    • passes: 4
    • lines per cm: 300
    • advanced settings: cross hatch (if not double the amount of passes)
  • use Frame to preview and align the job, the camera will show a blue outline
  • start the job with Process in the bottom right, close the lid first and confirm on the control pad

Unfortunately this also doesn't go as smoothly as hoped. The first time we didn't use a sacrificial layer and stopped the job quickly when the bed was getting burn marks. The second time something must have been off with the focus, cause the traces are a little bit visible, but the engraving was nowhere deep enough. The third time the material starting flaming and Henk suggest we switch back to the mill and finish this experimental process later.

So with Henk's help I actually setup the mill correctly and trace the day away. We use a tapered bit just to make sure the head doesn't break again. This time the edge cut only takes 8 minutes, instead of 1 hour and 20 minutes and I realize I didn't set the offset number to 1 yesterday, within half an hour my PCB is milled and cut out.

Soldering

Finally it's time to solder on the components. Henk shows me how a multimeter can be used to quickly check whether a resistor or LED is properly soldered on. For resistors, you can switch to resistance mode and measure across the component to see if the value roughly matches its expected resistance. For LEDs, you can use diode mode, placing the probes in the correct polarity; if the LED lights up, it is oriented and soldered correctly. If there is no reading or inconsistent results, it may indicate a bad solder joint, incorrect placement, or reversed polarity. You can also use continuity mode, where you lace the probes on each end of the component or along the trace to confirm there is a good electrical connection; a beep indicates the joint is connected.

Once everything is soldered on correctly I use ChatGPT to generate some different LED modes that you can run through by pressing the button. In theory the LEDs could be programmed to display for instance rain fall predications or stargazing conditions, but that is out of scope for this week.


What would i do differently

Files & resources

Leftovers previous week

  • which tasks from last week need finishing up?
  • which previous weeks can be marked as done?
  • nueval feedback respond
  • answer ricardo on mattermost

Further exploration

  • finish the xTool engraving on unfinished PCB