Skip to content

5. Electronics production

This week I worked on two main tasks on electronics production in order to familiarize with both PCB and desktop milling machine process. These were de assignments:

  • Group assignment:

    Characterize* the design rules for your PCB production process*.

  • Individual assignment:
    1. Make an in-circuit programmer by milling the PCB, program it.
    2. Optionally try other PCB processes.


SUMMARY

  • Have you?

    1. Shown how you made and programmed the board > DONE
    2. Explained any problems and how you fixed them > DONE
    3. Included a ‘hero shot’ of your board > DONE

  • PENDING TASKS

    1. PCB must be recognized by the computer to commit last (to be a programmer) step > DONE


ASSIGNMENTS

Group - Characterize PCB production process

General considerations and values about PCB production process

A printed circuit board (PCB) mechanically supports and electrically connects electronic components or electrical components using conductive tracks, pads and other features etched from one or more sheet layers of copper laminated onto and/or between sheet layers of a non-conductive substrate. (Source)

The way to produce a PCB is by milling the surface of a copper layered board in X, Y and Z axes with a desktop milling machine.
It also includes soldering electronic components on it.

Desktop milling machines usually work with very tiny mills to reach very precise results. Designing grayscale images, vectors and 3D models, machine jobs can be defined; this is known as G-CODE. The mill cuts:

  • Vector: curved and straight lines defined by points and interpolations in the (x, y) coordinate system.
  • Image: areas defined by plain colors in B/W and grayscale modes.
  • 3D model: volumes defined by points and interpolations in the (x, y, z) coordinate system.

  1. How it works

    As a general idea, desktop milling machines work by cutting and wearing materials in 3 dimensions with the support of a mill and a machine-bed that are controlled by computer.
    Lines, areas and colors should be defined in the design during the ‘prepare to machine’ step.

  2. Main jobs and parameters

    Basically, desktop milling machines work with 2 parameters: mill rotation speed and bed displacement/mill header speed.
    There is one basic rule to be considered to use desktop milling machine: mill will enter into the material, so it is a delicate process that must be set correctly for general security reasons. The reasonable rules are:

    • LOW speeds = safe jobs
    • HIGH speeds = risky jobs
    • Jobs are made from inside to outside.

    This is governed by the ‘amount’ of material (mm) that the mill must cut in a time period (s).
    The job total speed depends on the complexity of the design (traces, areas and volumes) and on the material and tools used. In the PCB case, these two are the jobs:

    • Tracing > Mill works just on the material surface, ‘printing’ (wearing) the design on it.

    • Cutting > Mill goes through the whole material thickness to free from the board the pieces defined by design.

Machine description

The desktop milling machine we used to do the assignment is a Roland monoFab SRM-20, which basic technical data is this: (Source)

  • Workpiece table size > 232.2 (X) x 156.6 (Y) mm
  • Distance From Collet Tip to Table > Max, 130.75mm (5.15 in)
  • Loadable Workpiece Weight > 2 kg (4.4 lb)
  • X-, Y-, and Z-Axis Drive System > Stepping motor
  • Operating Speed > 6 - 1800mm/min / 0.24 - 70.87inch/min
  • Software Resolution > 0.01 mm/step (RML-1), 0.001mm/step (NC code) / 0.000039 inches/step (RML-1), 0.000039 inches/step (NC code)
  • Mechanical Resolution > 0.000998594 mm/step - 0.0000393 inches/step
  • Spindle Rotation Speed > Adjustable 3000 - 7000 rpm
  • Cutting Tool Chuck > Collet method
  • Control Command Sets > RML-1, NC code
  • Operating Noise > During operation: 65 dB (A) or less (when not cutting) / During standby: 45 dB (A) or less
  • External Dimensions > 451.0 (W) x 426.6 (D) x 426.2 (H) mm
  • Weight > 19.6 kg (43.2 lb)

These are the recommended materials. (Source)

  • Modelling Wax
  • Chemical Wood
  • Foam
  • Acrylic
  • Poly acetate
  • ABS
  • PC board

Material description

For this assignment we used FR-1 board.

FR-1 is a hard, flat material that consists of a thin layer of copper over a non-conductive phenolic resin (…) primarily used for making circuit boards. The thin copper layer can be milled or etched away, leaving traces to which electronic components can be soldered. (Source)

Design description

There was a design to be made for testing the desktop milling machine:

The idea with this design is to test the milling precision. We used a 0.4 mm (1/64’‘) thickness mill.

Process

These were the followed steps to do the assignment:

  1. Review material > FR-1 (copper non fiberglass board) (150mm * 100mm). Watch for dirt and scratches, and the possibl ematerial bending
  2. Prepare design > Used prepared (37.337 mm x 12.800 mm - 5000 DPI) .PNGtrace and .PNGcut
  3. Prepare desktop milling machine file(s) > We used fabmodules.org to generate the g-code

  4. Prepare materials in the bed of the desktop milling machine > Recommended to clean the board and put it in the center of the bed with doubled faced tape to reduce milling depth differences (this will avoid many time and material innecesary problems)

  5. Prepare the machine (remember that an opened machine door limits some functions for security and also can freeze the VPanel software until de door is closed again):

    1. Put and fix (just enough) g-code programmed mill into the machine collet (0.4 mm (1/64’‘) thickness). Check the straight rotation of the mill by testing it ‘on the air’ from VPanel

    2. Calibrate (x, y, z) axes to set the job origin > Used Roland provided VPanel software


      After milling so many times and with what I consider low quality 1/64’‘ thickness mills that used to break in any case on the first milling job, I can assure that setting the Z origin to -0.8 mm on VPanel (just by putting it down with the x1 mode) once the mill is attached to collet while touching the board, the mill works well and the process finishes fine in any case
      Another consideration with broken mills is that when losing the flute of the mill, it becomes a V shape mill, so, when entering into the board surface, it will generate a bigger offset on the traces paths, something that can destroy the traces made

    3. Put up the mill in Z axis from the board (use +Z VPanel button in ‘continue’ mode) to avoid accidental scratches

    4. Set initial spindle and axes speeds (40% rpm – 50 % mm/s from VPanel)

      After milling so many times, I can assure that traces milling, set to 4 mm/s at fabmodules.org and 200% on VPanel, works well

  6. Load file to the desktop milling machine > Used Roland provided VPanel software
    (WARNING: pressing ‘Output’ button will begin the job)

  7. Test operation > Watch/Hear if mill slashes the board

  8. Check operation and results > Use VIEW button on VPanel to bring closer to the door the machine’s bed. Check mill tip and material depth worn (copper layer must be completely removed at the design black zones, and both the coloured copper dust and the white board dust must be seen to ensure the milling job was succesfuly done)

  9. Readjust (if needed) machine settings/material/design/laser machine file(s) > If material or mill are changed, machine’s preparation must be done again

  10. Start and monitor job > Press ‘Cut’ and ‘Output’ again
  11. Watch job and wait it to be finished > Use speed controls to modify spin and axes velocity (warning: consider milling rules exposed). Use ‘PAUSE/RESUME’ to stop the job for a while. Use CANCEL to clear the running job
  12. Clean cutting dust on the machine and parts with a brush and and vaccum machine >

  13. Secure the workspace (turn-off the machine, close door…)

  14. Check final design results > Magnifying glass, backlighting, side light to see reliefs,… can be used

Results

These are the testing 0.4 mm (1/64’‘) mill tracing results of desktop milling machine:


Resolution starts to get lost at 0.03 point and down, and functional limit is lost at 0.01.

Conclusions

Roland monoFab SRM-20 desktop milling machine on 1.7 mm FR-1 board reports these main pros/cons conclusions:

  • PROS

    1. High precision
    2. Mill/Bed remote control
    3. Relatively fast jobs
    4. Silent jobs
  • CONS

    1. Lack of Z sensor for calibration
    2. Lack of bed calibration system
    3. Reduced manual operating space
    4. Lack of interior lighting and visibility

Individual - In-circuit programmer

The idea with these designs is to fabricate a PCB capable to program other PCBs. The in-circuit programmer to be made is the FabTinyISP (ATtiny45) shared by Brian:

The FabTinyStar is yet another version of an AVR ISP programmer/board that can be produced in a fab lab using a milled PCB and readily available components.

The device you’re building will become an AVR programmer, but you also need a working AVR programmer in the process of building it

Material description

For this assignment I used FR-1 board.

FR-1 is a hard, flat material that consists of a thin layer of copper over a non-conductive phenolic resin (…) primarily used for making circuit boards. The thin copper layer can be milled or etched away, leaving traces to which electronic components can be soldered. (Source)

Components >

  • 1x ATtiny45 or ATtiny85
  • 2x 1kΩ resistors
  • 2x 499Ω resistors
  • 2x 49Ω resistors
  • 2x 3.3v zener diodes
  • 1x red LED
  • 1x green LED
  • 1x 100nF capacitor
  • 1x 2x3 pin header

Design description

There were 3 designs to use/follow for producing the PCB:

  • Tracing


* Cutting-off


* Soldering components

Calibration

According to first results, machine’s bed calibration must be made, so I put this process here at the beginning because of the priority and the importance to make it before wasting time, mills and material.
The way the machine works needs a bed well calibrated to avoid Z distance differences, which would return some parts more worn than others or some parts even without being worn. (See details about this issue on Results section)
All non machine bed-parts were removed and replaced with ones.

Then, a 1 mm cut was made on the material to ensure the same Z distance on any part of the bed. It was done with a bigger mill in two Z=-0.5 mm passes. The g-code was generated in Cut2D Pro.



This is the result of a new well calibrated bed-machine in where to put the material for PCB production.

Process

I followed this tutorial to complete the process. It includes:

  1. milling the PCB
  2. soldering components on it
  3. programming it and switching it to programmer mode

Milling files

The PCB milling is made in 2 jobs, one for tracing tracks and nodes, and another one to cut and free the piece from the board. I’ve used a 0.4 mm (1/64’‘) thickness mill for tracing job and a 0.79 mm (1/32’‘) thickness mill for the cutting one.
To ensure the job precision, tracing one has to be made first, then the cutoff one.
The steps are exactly de same as shown in ‘testing group assignment’, so here are the main differences and matches between both set by default in fabmodules.org:
(note: consider next info just to set up the changes needed in the process you start)

Different settings:

  • Thickness mill > Tracing: 0.4 mm (1/64’‘) / Cutting off: 0.79 mm (1/32’‘)
  • Axes speed > Tracing: 4 mm/s / Cutting off: 0.5 mm/s
  • Cut depth > Tracing: 0.1 mm / Cutting off: 0.6 mm
  • Number of offsets > Tracing: 4 / Cutting off: 1

Similar settings:

  • Z security distance in transporting the mill between processes (zjog): Considering the 1.7 mm material thickness (the maximum distance the mill will pass through material) the mill would only need about 2 mm to ensure its transportation to the next mill process without damaging the material, but 12 mm are recommended. This feature is very important to be considered in 3D milling.
  • X, Y, Z axes coordinates must be set to 0, 0, 0 because the origin will be set in VPanel
  • Offset overlap > 50% ensures the mill passes over the 50% of the last trace to obtain a regular wearing. This only works when there are more than 1 offset

The idea is to generate milling files (instructions for the machine) to produce the board in 2 steps. First, the traces, and finally the cutout to extract the milled PCB from the board.

Here I show some captures describing the process I followed on fabmodules.org:

  • Preparing the tracing g-gode

    Save file to local:

  • Preparing the cutout g-gode

    Save file to local:

I have also done the process on mods:

  • traces/cutout .PNGs, downloaded


  • Roland monoFAB SRM-20 module, added




  • output module, added




  • traces reference, loaded

  • traces milling config, set



  • traces milling, calculated and downloaded

  • cutout reference, loaded

  • cutout milling config, set

  • traces milling, calculated and downloaded


  • I also moved the mods modules to have a better view of the whole process (recommended):



    This is the best display I could setup.

Milling process



Trace/Cut/Extract


Non reliable tests


Final, but broken after soldering, PCB



Final PCBs that today are ISPs

Also, I could customize my PCB:

Component soldering process

These are the components needed:

  • ATtiny45
  • LED (x2)
  • Zener diode (x2)
  • 49 Ω resistor (x2)
  • 499 Ω resistor (x2)
  • 1 k(Ω) resistor (x2)
  • 100 nF capacitor
  • 2x3 male pin header









I used a support holding the board high to make it easy access with the soldering iron and to rotate it.

I tried to put some tin in every board soldering point (footprint) before fixing the components.

Also, I removed the excess copper from the top of the board with a cutter.

Then, the components would be welded just by holding them on those tin spots on the board and pushing them down with the tweezers while the soldering iron heats and melts the tin under the component connectors. This method helped me to fast attach the components to the board.

I began soldering, as recommended by Prof. Neil G., from the center to the outside of the board.

I used soldering paste flux

And this was the result:

This is the second board I made (customized) to be programmed with my own one:

Programming process

The programming process in MS Windows plattform required this previous steps to be followed:

  • Install Git
  • Install Atmel GNU Toolchain (extract the files to C:\Program Files)
  • Install GNU Make (default location for the installation)
  • Install avrdude (unzip the archive to C:\Program Files)
  • Update PATH (add)
    • C:\Program Files\avr8-gnu-toolchain\bin
    • C:\Program Files (x86)\GnuWin32\bin
    • C:\Program Files\avrdude
  • Install Drivers for Programmer
  • Sanity Check

Once that steps are completed, I followed this steps:

  • Get and Build the Firmware
    Download and extract firmware
  • Open terminal into the source code directory
    (Use right click on the folder you want and press Git Bash here to avoid commands and errors)
  • Run make to build the hex file that will get programmed onto the ATtiny45.
    It generates a file called fts_firmware.hex.
  • Program the ATtiny45
    Check/Update the Makefile for the type of programmer to use to program the board. (Use text editor intended for programmers)
    PROGRAMMER ?= usbtiny (Use this setting on any fabbed board with an ATtiny on it)

Check:

  • the ATtiny45 is installed in the correct orientation
  • soldering looks okay on the ATtiny45 and ISP header
  • use multimeter to verify continuity between pins on the chip and the ISP header, and that there isn’t continuity where there shouldn’t be
  • the programmer is connected correctly and pin 1 on the connector matches up to pin 1 on the board
  • the board is well-seated in the USB port
    Plug the board into a USB port (USB 2.0 port and a short USB extension cable to reduce built-in USB ports damage risk Red LED should be lit up now.

Connect the programmer to the ISP header on board. (get pin 1 in the right place, look at the plastic connector on the programmer cable)

Run make flash to erase the target chip, and program its flash memory with the contents of the .hex file built before. (avrdude erases, programs, and verifies the chip)

Run make fuses to set up all of the fuses except the one that disables the reset pin.

NOTE:
set the configuration fuses:

  • set the fuses that control where the microcontroller gets its clock source from to check that the board works as a USB device. (USB requires the clock to come from the PLL, and not be divided by 8)

  • confirming USB works, set the fuse that disables the reset pin and turns it into a regular GPIO pin to program other boards. (not easily reversible, check everything else works first!)

Test the USB Functionality

Check to make sure that the USB on board works. (Windows lists USB devices in Device Manager)
I FAILED AT THIS POINT. Different computers did not recognize my PCB, so I had to test it again to ensure that there was not any physical problems.
At that point, my PCB broke and I had to redo it before arriving at this step again.

Update:
After re-producing the board, I realized that the tin bumps on the 4 USB footprints, maybe was giving to me the connection issues. So, this time, I decided to not put tin on that parts of the board. Connections were succesfully since that decision. Here is the result:


(Use a folded piece of paper or something similar to make the board press-fit into the USB port when connecting it)


Blow the Reset Fuse
ATtiny45 on the board has the code loaded onto it and is working correctly.
Turn board into a programmer:

  • Run make rstdisbl to change the bit that will turn the ATtiny45’s reset pin into a GPIO pin. (Connect ISP programmer to board).
    avrdude will never be able to talk to this chip again through the ISP header.
  • disconnect VCC from the Vprog pin on the ISP header by removing the bridge on the solder jumper.

Test Your Programmer
Try programming another board
These are my to PCBs, one programming to the other:

And both working as FabTinyISP:

Results

These are the 0.4 mm (1/64’‘) tracing and 0.79 mm (1/32’‘) cutting-off PCB milling results:

This is the PCB with components soldered:

Many mills broke, specially de 0.4 mm (1/64’‘) ones, even just at the first contact with

This is my broken PCB



Make a previous machine bed calibration to avoid Z differences that give you some headaches and this kind of results:

Also, I recommend to always in VPanel press +Z a bit in ‘continue’ mode before running jobs. This elevates the mill on the z-axis, avoiding the mill scratches your board.

Error 007
Sometimes, when using Roland monoFab SRM-20, the job stops and Vpanel reports this error pop-up during the milling process.

‘Resume’ continues the job for a second but inmediately stops and the pop-up returns again and again, until pressing ‘Cancel’.
I’ve searched on the web for solutions but nothing was useful to me. I’ve read here and here something about ‘g-code system’ incompability between g-code generator (in this case fabmodules.org) and g-code runner (VPanel). We’re pretty sure that fabmodules.org g-code generation and VPanel settings match.
Also it is mentioned something about drivers update and USB port changes. No suggestion/solution worked in our fablab, but the drivers update by the administrator is pending.
I’ve reported this on GitLab Fab Academy 2019 Class Issue tracker to share possible solutions (check it).

Fortunately, although this error appeared many times in different jobs, I could totally mill my PCB.

  • UPDATE: I realized that there’s a way to, at least, continue the initiated job without losing the work done. You must be very attentive at the moment that error is going to appear. It’s so easy, because always does the same. Mill goes down and when ‘continues’ the job, inmediately goes up to pop up the 007 error. Just in the moment that error appears, press RESUME very fast and go to the PAUSE/RESUME VPanel button and press it to pause it. Then, press again the same button to resume, and the job will continue.
    Starting from the point that VPanel warns you that you are responsible from the error onwards, the fact is that VPanel software freezes in a loop error, preventing you to continue unless you cancel the job on curse.
    A possible solution would be to have access to the g-code to skip the line that causes the error. This solution also would allow other job advantages.
  • UPDATE 2: I paste this from the issue tracker topic:
    Asako wrote:
    Did you check RML on text-editor?
    In our case, the last line in the code, there were wrong value like “NaN” or something.....
    All data were created from mods has same value at last line. (I think it’s original point of SRM-20), so we copied last line from correct data, so it was fixed.

And here is the ‘hero shot’ of my first PCB (FabISP) working!

Conclusions

FabModules and Roland monoFab SRM-20 on 1.7 mm FR-1 board report these main pros/cons conclusions on milling the FabTinyISP:

PROS

  1. Very clean and precise tracks
  2. G-CODE fast and simple generation
  3. Between 15-30 minutes total milling process

CONS

  1. Lack of FabModules notification messages
  2. Lack of VPanel G-CODE viewer/editor
  3. VPanel ‘Error 007’ delayed PCB milling much time
  4. Lack of interior lighting and visibility


Credits


Tools
- mods
- Fab Modules

Tutorials