Skip to content

5. Electronics production


  • Group assignment:
    Characterize the design rules for your PCB production process
  • Individual assignment:
    Make an in-circuit programmer by milling the PCB, check if you can program it.

Group assignment

Our group: Lucasz , Gleb, Marjo and I.

Used machine

The design rules are tested with different milling pits using the Oulu Fablabs monoFab SRM-20.

SRM-20 monoFab, the milling machine of choice.

The Roland milling machine specification.

Model SMR-20
Cuttable material Modeling Wax, Chemical Wood foam Acrylic, Poly acetate, ABS, PC board
Cutting Tool Chuck Collet method
Distance From Collet Tip to Table Maximum, 5.15 in, 130.75mm
External Dimensions 451.0 (W) x 426.6 (D) x 426.2 (H) mm
Mechanical Resolution 0.000998594 mm/step
Operating Speed 6 – 1800mm/min
Spindle Rotation Speed Spindle Rotation Speed
Workpiece table size 232.2 (X) x 156.6 (Y) mm
X, Y, and Z Operation Strokes 203.2 (X) x 152.4 (Y) x 60.5 (Z) mm


The capabilities and design rules were testet using line test image from the fabacademy class site.

The line test checks the quality of the produced dimensions. This includes outer spacing and inner line spacing. The used tool diameter and the accuracy of the machine dictate the possible line and trace spacing. Better accuracy allows for better quality PCB boards.

Line test image.

From the image a milling program has to be made. This can be done easily using Mods The milling program is the set of instructions that the machine follows to mill the PCB. In modss right click on the window and select “programs/open server program/SRM-20(PCB)”. Select your png file. Next delete WebSocket device module and right click on the window and select “modules/open server module/file (save)”. Then set origin coordinates (x, y, z) to (0,0,0) and connect output Roland SRM-20 milling machine and input save file. Open your png file in read png module. Define tool diameter and cut depth in mill raster 2D module and press calculate. testlines.rml is created. Click “view” button to check if the created path is correct.

Mods output is the momement path of the milling pit. It calculates all necessary tolerances and cutting depths.
The programs Cut output visualized.

In Fablab we had several different milling bits. We tested the 0.5 mm, 0.4 mm and 0.2 - 0.5 mm bits. THe 0.5 mm and 0.4 mm are end mills. The 0.2 - 0.5 mm mil bit is V shaped end. The 1mm end mill was used to cut the finished board off. 0.1mm 20 degree bit was nod used.
Used tips

The PCB is made from a copper plated epoxy sheet. The PCB is manufactured by removing parts of the copper plating leaving copper in the form of conductive paths to form the final circuit. The removal of the copper can be done by etching or by milling. For the milling, the PCB blank is needed. The piece is cut from larger sheet PCB blank.

The milled board is made to smaller to just big enough to fit the design. Bigger blank is more difficult to level. Nonlevel board raises the possibility of the milling fail.

To ensure straight cutting a cutting jig was used.

Cut blanks.

The right size PCB blank is then taped to the used milling machine. In case of any differences in thickness, the milling bit won’t go evenly and there might be issues with short circuits. After that bottom part of the plate should be carefully taped (no overlapping lines of tape). After that, we can carefully attach the milling bit inside of the machine.

Lots of boublesided tape.

The mill bit is first inserted to the Collet.

After this the mill bit is dropped. This means that the tool is set to zero point in x and y axis and the y is brought down to very close to the PCB blank and the bit is then losened and allowed to drop on the PCB. after this the Y-axis zero is set. This ensures that the zeroing is correct.

The beginning position can be adjusted with X/Y and Z buttons marked with a red rectangle. X - is moving the table, where Y and Z are in charge of moving the head. Just below increment step might be found. This is extremely important when playing with Z- axis as this requires the highest precision. Continue step must not be used with Z axis! This will most likely break the milling bit if the motion will continue inside of the material! Just after finding the right position in X/Y/Z plane reset the position by pressing corresponding buttons (marked by the green rectangle).


When everything is positioned and reset correctly it is time to press the cut button, marked with an orange arrow. This will bring a window, where the desired file might be loaded. By clicking Add successive files should be added. Mistakes can be corrected with the Delete button. In the end, Save List has to be clicked. The process should be started by clicking “Output”


Milling whit the mill

It Works!

The results for the different milling bits.

Then the outline milling to release the board.

Result Tip image Tip specs
0.4mm endmill.
0.5mm endmill.
02-05mm 90deg V tip

The 02-05mm 90deg V tip does the best job. This is used in the individual assignment.

The steps for milling PCB
* Selecting the used milling pit.
* Making the milling program(RML-file) from the circuit image for the milling pit.
* Cutting and fastening the PCB blank into the milling machine.
* Carefully attaching the mill pit and adjusting the zero point.
* Load the RML file and start milling
* Change the milling pit for the cut out pit(1 mm) and load the RML program to cut loose the PCB.
* Clean the machine.
* Drill holes(if needed)
* Clean the PCB. Steel wool rub with isopropanol alcohol.
* The PCB is ready to Ready to solder.

Individual assigment

Selecting the ISP

For individual assignment was to make ATTiny 45 based In-system programmer, ISP. The manufactured version was the Brian’s version of the board.

Fabrication method.

For the fabrication method the new Mods was used.
firts the boards traces and the outline cutoff was downloaded.

The Traces and the outline cutoff images.

The FabTinyISP consist of Attiny45 and some passive components.


Component layout.


The Mods was used as in the group work and the milling pattern was obtained for the 0.2-0.5 mm 90 degree V - shape milling pit.


The milling of the board was done in the same method as the group work test boards.


FabTinyISP milled 0.2-0.5 mm 90 degree V - shape. used 0.3 mm trace widht and 0.106 mm cut depth.

Materials needet in soldering.
* 1x ATtiny45 (or ATtiny85) microcontroller U1
* 2x 49Ω resistors [49R9] R3,R4
* 1x 100nF capacitor C1
* 2x 3.3v zener diodes D1, D2
* 2x 499Ω resistors [4990]R2, R5
* 2x 1kΩ resistors [1001] R1, R6
* 1x red LED D4
* 1x green LED D3 ISP
* 1x 2x3 pin header

The parts were scoursed from the Fablab inventory.

The parts ready to be soldered.

Rules to hand solder PCB
* the hardest to the easiest
* the lowest to the highest
* the middle to the edges

Next, there are some steps shown in the soldering.

Testing the fit of the IC.

soldered IC.

Added resistors.

The board with rest of the components soldered.

The extra copper around the USB port is removed. It may help avoid shot circuit upon insertion to USB port.

Programming the board.

I’m using Ubuntu 18.04 for the programming. The programming toolchain avrdude was already installed to the computer. If it was not installed it would have been easy to install with apt-get.

sudo apt-get install flex byacc bison gcc libusb-dev avrdude

The programmers firmware was downloaded and unzipped to the directory. The Directory was accessed by writing to the console:

    cd fts_firmware_bdm_v1

In the directory, the firmware is first compiled by:


This creates the binary(.hex) -file. Because I use a FabTinyISP I don’t need to make any changes to the Makefile, but it is always a good idea to check the name of the programmer from the Makefile:

PROGRAMMER ?= usbtiny

If a different programmer is used, this needs to be changed accordingly.

I used Mikko’s programmer provides the needed power to the board. This removes the need for external power to the programmed board.


The FabTinyISP is plugged into another FabTinyISP for programming.The programming cable between was inspected for right polarity. The red indication led comes on when the cable is connected right.

First, the firmware is programmed by command.

make flash


Then fuses are programmed with the command.

make fuses



During programming, the green led can be seen light up from both FabTinyISP’s. It is a sign for something working.

Then the programmer is removed from the other programmer and inserted to the computer’s USB port. After executing lsusb you should read “Multiple Vendors USBtiny”.


Then the reset disable bit is set that the ATTiny45 cannot be reprogrammed anymore by accident. The board was tested by before the resetfuses command.

make rstdisbl


The solder jumper was removed using solder wick. The extra solder was also removed from the USB contacts.

3D printing case for the FabTinyUSB

I designed case for the FabTinyISP. I used Inventor 2019 for the design.

The case was printed using Raise3D PRO2 and the printing material was generic bulk ABS.


The finished support case on buildplate with raft.


The raft that helps with the buildplate adhesion and the straightness of the final part releases from the case easily by little bending.


The 3D printed case fits nicely to the FabTinyISP. Press fit is enough. No glue is needed.


The finished product.

All used files can be found on my gitlab repository