5. Electronics production

  • Group assignment:

Characterize the design rules for your PCB production process.

  • Individual assignment:

Make an in-circuit programmer by milling and stuffing the PCB, test it, then optionally try other PCB processes.

5.1. Group assigment

The Group Assignment page is at the following link.

The pcb milling machine we have is STEPCRAFT 420.

It has interchangeable modules (laser engraving, 3d printing, milling machine, …) so it is very versatile. We had never used it to mill pcb so the assignment has been laborious.

Important!!! In the initial tests the mills were always broken shortly after starting to mill. This was desperate. Mills broke because they were so long. When we bought the good ones, 2mm long, we were happy.

5.1.1. Resolution test.

This is the image to test the resolution of the machine.

With the purchase of the milling machine we obtained the Vectric Cut2D software to generate the gcode and the UCCNC software for Stepcraft to control the milling machine.

Below are the steps to mill PCB with our software.

5.1.2. GCODE generation with Cut2D.

  • Open Cut2D.

  • Configure the material.

  • Import the bitmap for plotting.

  • Adapt vectors to the bitmap.

  • Configure the machining operation. Select “Recessed Strategy”.

  • Select the tool and its parameters. Since we had never used the milling machine to make circuits we have looked for values to take as a reference for the parameters. In mods we saw that they use a feed rate of 4 mm / s for the Roland. We found another fablab with our same machine, Lakaz Lab, which used 0.5 mm / s. So we have tested different speeds (4, 3, 2, 0.5 mm / s) and the best result at the highest speed has been obtained with 2 mm/s.

    Feed rate = 2mm/s.

    Cut depth = 0.2mm.

    Speed spindle = 12000rpm.

I have also tried with this other type of mill with the same parameters.

  • And click on “calculate”. The GCODE is generated and we can visualize the operation.

  • Save the GCODE in a text file.

5.1.3. Machine preparation and control with UCCNC.

  • Open UCCNC.

  • Click on “LOAD FILE” to open the gcode.

  • Prepare the material and the mill. Use double-sided tape to fix the PCB to the milling table.

  • Move the milling head manually with the left panel in UCCNC. Place the mill without tightening. Move the head closer to the top surface of the PCB. Loosen the mill and drop the mill until it touches the PCB. Use your finger so that the mill does not fall suddenly or it will break. Squeeze the mill. And mark the zero machine of the z axis. Raise the head a little and move in x and y as far as we want to place the zero machine.

  • Turn on the spindle and click on “CYCLE START”

5.1.4. Results

The following parameters have been used: - Feed rate = 2mm / s. - Cut depth = 0.2mm. - Speed spindle = 12000rpm.

  • Using the engraving Bit 0.005 ”resolution 0.004” on the outside line and 0.011 ”for the inside line.

• Using the Flat End Mill 1/64”, the resolution 0.011” on the outside line and 0.016” for the inside line.

5.2. Individual assigment

This week we have to make a programmer. There are different types of programers.

Our instructor has recommended us to make the type ISP (AVR) Attiny45 version made by Brian, since it is easier to build.

I have followed this tutorial to build it.

5.2.1. Milling

I have used Cut2D to generate the GCODE and UCCNC to control the STEPCRAFT 420 milling machine.

Using the Flat End Mill 1/64” for traces and using the Flat End Mill 1/32” for outline.

The steps I have followed are more detailed in the group assignmet.

In the first attempt of milling the area of the circuit closest to the right edge of the milling machine did not reach the necessary depth of cut. This is because the work surface is slightly uneven and I made the zero machine of the z axis in the area on the left.

To solve it, set the zero machine of the z axis in the area closest to the right edge.

5.2.2. Solding

To solder the PCB I first made a sheet to organize the components and identify them quickly.

Then I have pre-stamped some pins to be able to paste the components in their position (one pins per component). And finally tin all the pins.

The most complicated thing was to weld the ATtiny45, the pins are very small. I had already welded bigger things before, but with this PCB my pulse was shaking …

5.2.3. Programming

I have first set up the environment by following this tutorial for Windows.

Problem! When editing the path make sure the path is correct. The tutorial indicated:

C: \ Program Files \ avr8-gnu-toolchain \ bin

But in my case I had to put:

C: \ Program Files \ avr8-gnu-toolchain-win32_x86 \ bin.

And if it doesn’t, close Git Bash and reopen it and perfect.

I continue with the programmer’s tutorial and I had no more problems.


Finally, I try to use my programmer with a hello board using the Arduino IDE. To do this, load the libraries for attiny programmers.

I try to load the sample sketch “Blink”. It goes up without problems but the hello board did nothing. After half an hour checking connections, we found the decision with the help of fablab Leon’s teammates. I had to change the LED pin, for this board it is 7. And it worked correctly !!!

In this video you can see the test programming.