Week | 5


Electronics Production


How I’m making a PCB for an in-system programmer and learning how to use the milling machine, assemble, solder and program the board.


21 February 2018 09:26:

Last week’s assignment was to fabricate a PCB (Printed Circuit Board) that would be used as an in-system programmer. Fab Academy has a “model” of its own, called the FabISP, which is used to program other microcontrollers by using an usb connector.
I have used a FR1 board, which is basically a plate of non-conductive resin laminated with a cooper layer.
The milling machine is then used to “draw” the circuit path by cutting the cooper layer according to the designed circuit and cutting the board from a bigger piece of FR1 (below).

The image files with the design of the plates are available at the Fab Archive, this one is the model for the traces and this one for the interior of the board (which is actually used to cut the board from a bigger piece of our FR1 piece).
Below, are all the steps I did.

1 - Milling the circuit and cutting the board


In order to generate the toolpaths to mill the board (.rml files), I have used FabModules. It is a platform developed by MIT, created to provide a set of software tools for personal fabrication, intended for use with machines common to fab labs.

There is a more comprehensive and updated version, called Mods.

The platform aim to be a single “software” to offer tools to design 2D and 3D objects, functions to generate 2D and 3D toolpaths and GUIs workflow from design files to machine commands.

More about it here.
To prepare the file:

1 - Go to http://fabmodules.org/
2 - Choose Input Format> and import the file.
3 - Choose the Output Format / Printer> For Fab Lab BCN : Roland Mill
4 - Choose the Process > For Fab Lab BCN : 1/64 for tracing the board or 1/32 for cutting the board
5 - Choose Output Machine > For Fab Lab BCN : SRM-20
6 - Change preset parameters> For Fab Lab BCN : Tracing and Cutting: Change X Y and Z to 0 and X, Y and Z home to 0, 0 and 5, respectively. For the Cutting: Change Cut depth to 0.5, the stock thickness to 1.6 mm (a bit deeper than usual since our result during the group assignment didn’t completely cut the board), the tool diameter to 0.79 and the number of Offsets to 1.
7 - Press Calculate and save the .rml file.

Here are the .rml files.


The machine we use to mill boards at FabLab Barcelona is Roland’s monoFab SRM-20. A small (Work area: 203.2 x 152.4 x 60.5 mm), but, nice subtractive milling machine that fits well the purpose of milling PCBs and small wax blocks for creating moulds. Here’s its manual and a presentation video.

At the Printer (monoFab SRM-20):

1 - Open the lid and remove the support with the sacrificial MDF.
2 - Clean the MDF with alcohol. Make sure there is no left over tape.
3 - Check if FR1 board is flat by placing it over a ruler. If not, bend it slightly. After that, clean the board with alcohol to remove eventual oil left from your fingers.
4 - Put 3 stripes of the double side tape on the back of the board. Make sure you do not overlap the stripes otherwise it would create a bump. The tape should surpass the length of the board, also to avoid any bumps.
5 - Clean again the board with alcohol.
6 - Screw the support back on the machine.
7 - Close the lid.
8 - Go for the computer.
9 - Open VPanel software.
10 - Choose the moving scale parameters and adjust the position in order to be able to insert the cutting tool.
11 - Put the tool (1/64 for tracing and 1/32 for cutting) and screw it slightly.
12 - Place the x and Y “0 0” via the software. - by trying to reach the very corner with a little margin.
13 - To adjust the height (the Z) move the tool via software to roughly 3 cm above the board, unscrew the tool , let it go down gently (by holding it) until it touches the board and then screw it back.
14 - Set origin points (X Y and Z) in software by choosing “User Coordinate System” and pressing X, Y and Z. Then, move tool away from the board in the Z axis, otherwise it might scratch it while moving.
15 - Choose the speed. Start slow with the speed at 10. If during printing, all looks nice (you can check by clicking view on the menu) you can increase the velocity to 70%. No need to go to 100%.
16 - Load the file: pressing the cut button.
17 - Delete all of the previous jobs and then click add to import your file.
18 - And then press output, which should start the job right away.
19 - After the Traces finished, do the same process to cut the plate (by using the interior file and the parameters mentioned above).
20 - Scrap and slightly sand the surface of the board with a tiny piece of steel wool and clean the board with alcohol.

General Recommendations:

  • The tool is very fragile, that is why some precautions are made as the Z adjustments require so much attention. Be careful always.
  • If anytime during the process you wish to see the job, click pause and then view.
  • Never touch spindle velocity. It should be high always for this kind of job.
  • Always print the traces before cutting the plate (interior) otherwise the board will move position with the cutting pressure.

2 - Assembling and Soldering


I have followed the instructions from this page for the assembling and soldering. Here’s the list of components:

  • 1 ATTiny 44 microcontroller
  • 1 Capacitor 1uF
  • 2 Capacitor 10 pF
  • Resistor 100 ohm
  • 1 Resistor 499 ohm
  • 1 Resistor 1K ohm
  • 1 Resistor 10K
  • 1 6 pin header
  • 1 USB connector
  • 2 jumpers - 0 ohm resistors
  • 1 Cystal 20MHz
  • 2 Zener Diode 3.3 V
  • 1 usb mini cable
  • 1 ribbon cable
  • 2 6 pin connectors

As it was my very first time soldering, I think I have reached a fairly OK result, but when I tested for short-circuits I realised there was a problem with the milling, not with the soldering. Some of the lines weren’t cut by the milling machine (like the example below), creating a short circuit that I had to manually cut using a cutter.

Here are some other photos of the process:

3 - Programming


I have followed the tutorial from this page to make the programming of the board.

In order to program the board on my Mac, I had to install XD Developer Tools, Crosspack AVR and download the FabISP Firmware.Unfortunately, I didn’t have an USB hub at the Fab Lab, so that I could connect my board AND the ATAVRISP2 Programmer (which is the programmer that I would use to program the board).

So I had to do it at Fab Lab’s computer using Ubuntu (Linux).

The steps to program the board were:

1 - Install the necessary software (XD Developer Tools, Crosspack AVR) for your operating system and download FabISP Firmware.

2 - Power the board, by connecting the programmer to it and connect both, the programmer and the board, to your computer. This is the moment of the truth to check if your board has any problems or short-circuits. If are not using a programmer like the ATAVRISP2 and there is a problem with your board, you would probably get an error message from your computer that the board is drawing too much power and that the computer is shutting down the USB port. Since I was using the ATAVRISP2 programmer the light displayed on the programmer should give you the following feedback about your board:
Green Light: means that the header is soldered correctly, the board is getting power.
Yellow Light: means that the board is getting power, but most likely the 6-pin programming header is not soldered correctly.
Red Light: means that the board is not getting power - check for shorts.

3 - Edited the Makefile

4 - Set the fuses / program the board

5 - Verified that the board is working properly

And that’s it for this week !