Skip to content

4. Electronics production


Tasks - Must

  • Group assignment: Characterize the design rules for your in-house PCB production process: document feeds, speeds, plunge rate, depth of cut (traces and outline) and tooling
  • Make an in-circuit programmer that includes a microcontroller by milling and stuffing the PCB, test it to verify that it works
  • Produce FTDI USB-serial board hello.USB-serial.FT230X
  • Produce serial-UPDI adapter serial UPDI-3
  • Produce JTAG SWD programmer SWD programmer

Tasks - Nice to

  • Produce USB-serial board (SAMD chip acting as FTDI) USB-D11C-serial
  • Adjust outline of one of the produced PCB’s
  • Add text or a logo to one of the produced PCB’s
  • Re-draw one of the designs by hand and produce it
  • Make a flexible PCB


Precision milling machine

At the Waag we have a Modela MDX-20 precision milling machine from Roland.



Put copper plate in place

If there is already an old copper plate in the machine and it’s fully used I have to remove it:

  • Remove old copper plate & double sided tape with spatula from sacrificial layer
  • Clean sacrificial layer with sticker remover to remove all tape residues

To apply a new copper plate:

  • Apply 6 strips of double-sided tape to the new copper plate
  • Remove bed from machine
  • Put new copper plate on sacrificial layer and apply force to make the two plates stick together well (put cloth under copper plate to avoid scratching)
  • Insert bed into machine & tighten fixing screws (not too tight)
Turn on machine

Press Power button on front of machine

Start mods
  • Press Ctrl+Alt+T to open terminal
    > cd mods
    > bash mods
  • Browser opens mods
  • Right click > programs > open program > MDX mill
Insert milling bit

We use a 0.4 bit for the traces and a 0.8 one for outlines. Insert the appropriate one by loosening/tightening set screw marked by red dot


The 0.4 bits are in the box above. 1 stands for 1 flute, 2 for 2 flute and old mills are in the middle. The 0.8 bit is attached to the front of the machine with a magnet.

Set origin
  • Set an origin and click move to origin. Just start with something like 10/10 and then adjust until mill bit is in a good position to start milling the PCB. If the machine does not move click close socket, close port, open socket, open port
  • Move spindle (Z axis) down by using buttons on machine until it’s ~1cm above max depth
  • Loosen set screw and gently slide down the milling bit until it touches the copper surface. Make sure there are no residues between the mill and the copper.
  • Tighten set screw (It’s a small screw. Don’t tighten too much)
  • Write down the origin (needed when switching from trace to outline milling)

04_EP/mods_move_to_origin.jpg 04_EP/pcb_mill_z_origin.jpg

Set parameters in mods

For milling traces:

  • In the Set PCB defaults (mm) section
    • set cut depth and max depth to 0.05 mm
    • Press Mill traces button

For milling outline:

  • In the Set PCB defaults (mm) section
    • set max depth to 1.55 mm
    • Press Mill outline button


  • Check values in mill raster 2D section & press Calculate
  • In view toolpath section click View and check that toolpath looks OK
  • In websocket serial section click Send file
Check cutting depth

After a bit of milling click the View button on the machine. This will interrupt the milling and move the bed to the front for inspection. Click View again to resume.

Interrupt job if necessary

If the milling is not working as expected (e.g. not enough cutting depth) the job can be interrupted by:

  • Press the up and down button on the machine at the same time for 10 seconds
  • Cancel job in mods
Remove PCB

Once the outline milling is completed simply remove the board with a small screw driver

Group assignment: PCB design rules

In our group assignment we milled test pieces to compare single vs double flute milling bits. Our group milled the single flute test piece.


In this image we can see that the double flute milling bit produced a better result. The small features marked with the red arrow ripped off more with the single flute milling bit than they did with the double flute one.

We can as well see that the smallest trace we can reliably mill is ~0.1 mm and the smallest possible gap between traces is 0.4 mm as that’s the size of the tool.

We used the following parameters:

Parameter Traces value Outline value
Tool diameter 0.4 mm 0.8 mm
Cut depth 0.05 mm 0.6 mm
Max depth 0.05 mm 1.55 mm
Offset number 4 4
Offset stepover 0.5 0.5
Cut speed 4 mm/s 4 mm/s

First millied PCB - FTDI

The first board I decided to produce is the FTDI USB-serial board. As there were multiple of us wanting to produce this board we made a small batch production: We milled the traces of 4 boards, changed the tool and then cut all the outlines. By doing so we did speed up the process because a lot less tool changes and Z origin settings were necessary.

The FT230X board is pretty small and it’s pins are close to each other. I wasn’t sure how easy it would be to solder but by following the technique showed by Henk it turned out to be relatively easy:

  • Put a bit of solder on one pad
  • Put component in place
  • Reheat pad with solder and give the solder time to flow to the pin of the component. Now component is hold in place by this one solder joint
  • Apply flux to the other pins
  • Melt a little bit of solder on the soldering iron tip
  • Touch each pin with the tip: The solder flows from the tip to the pin and the pad (When necessary add more solder to tip)

Hold board in place

It greatly helps to hold in place the board you’re working on. Other-ways the boards will move around when touched with the iron’s tip. An easy way to hold the board in place is fixing it to a piece of paper with double sided tape.

I tested the board by plugging it into a USB hub and checking that it was recognized as a serial device by the computer by using the ioreg -p IOUSB command.

04_EP/ftdi_board.jpg 04_EP/ftdi_recognised.jpg

Draw serial-UPDI adapter design by hand

One of my ideas for this week was to re-draw one of the circuits by hand. I decided to start simple and draw the serial-UPDI adapter circuit:


As the circuit is going to be pretty small I decided to draw it double-sized and resize it once scanned. To get the pad sizes and spacing right I printed the original design (double size), cut out the pads and used them as reference.

I created the final PNG’s following these steps:

  • Create drawing (traces + outline)
  • Scan drawing
  • Crop scan (GIMP)
  • Create two copies of the file (traces, outlines)
  • For traces
    • Remove outlines with Erases tool (GIMP)
    • export png (GIMP)
    • invert black/white with ImageMagick convert input.png -channel RGB -negate output.png
  • For outlines
    • Remove traces: Select with Free Select Tool and then Edit > Clear (GIMP)
    • Fill area around outline in black with Bucket Fill Tool (GIMP)
    • export png (GIMP)
  • Reduce size ob both png files with ImageMagick convert input.png -scale 50% output.png

These are the resulting files:

04_EP/gimp_traces.png 04_EP/gimp_outline.png

Flexible serial-UPDI adapter

I want create a flexible PCB by vinyl cutting a cooper sheet. To keep things simple to start with I will create the straight forward serial UPDI-3 adapter.

As a first try I did cut the traces of the provided design in vinyl.

04_EP/updi_adapter_vinyl.jpg 04_EP/updi_adapter_custom_vinyl.jpg

In the original design distances between some of the traces are too small to successfully create a circuit on the vinyl cutter. In the design of the adapter that I did draw by hand there is more distance between the traces so I decided to try that one and the first cut looked promising.

The copper sheet doesn’t stick to it’s backing material really well. I did therefore stick the copper sheet on a different backing to which it adheres better (As Neil suggested). I simply used some Vinyl as the new backing and put the copper in the cutter already applied to it’s new backing. The cut went well, weeding was rather easy and I eded up with a nice result :-)

04_EP/updi_adapter_custom_copper.jpg 04_EP/updi_adapter_custom_complete.jpg


When weeding I made some cuts with the knife to divide the part to remove in multiple sections. Smaller sections were easier to weed but at some point I did cut through the backing. It wold make more sense to include this cuts in the design instead of doing them by hand


When I soldered the components the Vinyl backing melted a little bit around the pads. I haven’t found another backing material which is more heat resistant yet.

The circuit functions but it’s a lot more fragile than a traditional PCB. Probably it would help to add another layer of vinyl on top with cutouts for the pads. If I have some time left this week I’ll try that.

Modify outline of existing design

I modified the outline of the JTAG SWD programmer with the following steps:

  1. Open interior.png
  2. Make canvas bigger: Image > canvas size > Adjust with to 1400 > Click Center > Click Resize
  3. Maker layer bigger: Right click on layer > Layer boundary size > Adjust with to 1400 > Click Center > Click Resize
  4. Fill areas which were newly added due to resize black with Bucket fill tool
  5. Make selection with Free select tool (one of the wings)
  6. Fill selection white with Bucket fill tool
  7. Repeat steps 5. and 6. for second wing

Then I made steps 2. to 4. for traces.png (to have interior.png and traces.png of the same size)

04_EP/gimp_add_wings.jpg 04_EP/swd_programmer.jpg 04_EP/swd_usb_tape_spacer.jpg

The board is a bit too thin to fit in a USB port. To make it fit correctly I simply added a little bit of double sided tape to the back of the USB connector.


Don’t plug the new board straight away into your computer to test it. Use a cheap USB hub instead. In case the board damages the USB port it’s better if it’s not the one of the computer. And remember to remove the extra copper around the USB connector with a knife before testing it.


At first the board did not work. After a bit of trouble shooting we discovered that there was a connection which was not supposed to be there. A small section between two traces was not milled away because it was too narrow for the mill. At this point the design was already adjusted to avoid this problem. Once the problem was identified it was easy to fix by just removing the unwanted section with a knife.

Improved sun tracker

In the second week I built a pan tilt head as a first prototype of my final project.

Last week I extended it to be a sun tracker.

This week I want to re-build the sun tracker circuit with one of the new techniques I learned this week.

First I was thinking of producing the board on the milling machine but as that machine was constantly used I decided to use the vinyl cutter instead.

Last weeks design consisted of a cross structure to make shade and a circuit. My vision for this week is to combine the two in one and have the circuit being part of the cross structure. I can’t really think of a way to create structural elements with the vinyl cutter I can get pretty close to my vision by creating a structure and then sticking the circuit to it.

I started by laser cutting a cross structure really similar to last weeks one in acrylic.


Next I had to design the circuit. I decided to draw the circuit in Inkscape. We will spend an entire week on electronics design in the future so I will leave the specialized programs for then.


This is the schematic from last week. I will rebuild only the part in the red square and this time I will use phototransistors instead of photoresistors.

That means that the circuit is going to consist only of resistors, phototransistors and connector headers. I checked the phototransistors we have in the lab and I was happy to see that I can use the same pad sizes/spacing as for resistors. I measured the size and spacing of resistor and connector header pads in one of the boards I produced earlier this week and recreated them in Inkscape.


Once I had the footprints I placed multiple of them where I wanted the components to be and then just connected them with lines. To know how big the circuit can be and where there would be cutouts for jointing the parts I opened the base that the circuit is going to stick on (PDF export from fusion drawing) as a separate layer. This is the result:


The 4 squares are the positions where the cross section will joint in.


First I designed a circuit with 0.5 mm traces. But when I did first cut it in vinyl it failed.

04_EP/sun_tracker_failed_circuit.jpg 04_EP/sun_tracker_failed_circuit_traces.jpg

I re-designed the circuit to have 1 mm traces and that worked. But even 1 mm traces feel rather on the small side. For vinyl cut circuits I will stick to traces >= 1 mm

Once I successfully cut the circuit (with vinyl backing) I did cut through the backing with a knife around the 4 squares which were included in the circuit. I used these 4 cutouts to align the circuit when sticking it to the base of the laser cut structure. The round outline of the backing vinyl was simply cut with a knife once it was applied to the base.

04_EP/sun_tracker_circuit_on_base.jpg 04_EP/sun_tracker_tape_cables.jpg

One of the downsides of circuits produced with the vinyl cutter is that they’re quite fragile. Especially traces connected to connection headers are really easy to rip off when connecting cables to the headers. To decrease the risk of damaging the board I taped the cables connected to the headers to the back of the base. In the future it would be interesting to experiment with epoxy encapsulation to make the boards more robust.


I did choose the resistors in the circuit in a way that they would lead to good measurements when using the circuit indoors and shining on it with a flashlight. When I tried it in the sunlight it didn’t work as the environment was too bright to accurately distinguish between sun and shade. To make the circuit work in the sun I’d have to change the resistors.

This weeks board compared to last week’s one:



It has been really interesting to learn how to use the precision milling machine and how to make circuits with the vinyl cutter. By trying both fabrication methods I was able to experience pros and cons of each method. It was really satisfying to get multiple boards working and learn how to solder tiny SMD parts.

Last update: June 18, 2022