Electronics Production

Assignments Goals

  • Make the Fab (tiny)ISP in-circuit programmer
Week's Lectures

FabISP Schematic and Layout

Our FabLab instructor provided us with a modified version of the FabISP created by David Mellis. After looking at the schematic and the board layout I decided to use it as base, to create my version of the FabISP.

My version is not so different from the original, but I substituted the Mini USB port with a full size one, to avoid the usage of a USB cable, and a 20MHz resonator. I didn't want to use the PCB version of the USB connector (as seen in Andy's version), because of the problems people had about the thickness of the board, leading to a not tight fit inside the PC port.

So after a bit of tinkering with Eagle CAD, and almost a full redesign of the board layout, I came up with the final version of my board, as you can see in the images below.

For this version of the FabISP, below you can find the BOM (Bill of Material), with links to Mouser distributor.

ID Component Value Package Mouser
C1 Capacitor 0.1 uF 1206 80-C1206C104KAR
C3 Capacitor 10 uF 1206 963-GMK316F106ZL-T
D1, D2 Zener Diode 3.3 V SOD123 621-BZT52C3V3-F
R1, R2 Resistor 68 Ohm 1206 603-RC1206FR-0768RL
R3 Resistor 1.5 kOhm 1206 603-RC1206FR-071K5L
R4, R5, R6, R7 Resistor 0 Ohm 1206 603-RC1206FR-070RL
R10 Resistor 10 kOhm 1206 603-RC1206FR-0710KL
Q2 Resonator 20 MHz - 815-AWSCR-20.00MTD-T
IC1 Microcontroller AVR ATTiny44 SOIC14 556-ATTINY44A-SSU
U1 ISP Header 2x3 SMD - 649-95278-101A06LF
U2 USB connector - SMD Type A Plug 806-KUSBXSMT2AP1SB

Work files links

Schematic and Layout of my version of FabISP
GF_FabISP.zip

G-Code Generation

In order to produce the board with the mill, a Roland Modela MDX-40, we used a plugin form Eagle Cad, called pcbgcode. This plugin, generates G-Code from the layout of the board, so that the mill can etch the board.

The plugin is quite simple to use, but initially we had a lot of problems because the Roland can't parse the command F (for spindle feedrate) if it is in the format with decimal points. So after reading the user manual of the plugin, we modified the EMC profile to generate the feedrate parameter without decimal points. After that, the machine started to work flawlessly.

We used a 0.4 mm burin, so we entered in the plugin form the parameters shown in the images below, with a Z depth of -0.05mm. Moreover below you can see the generated path for etching and outline milling.

One of the problem I noticed with the plugin, it's that it doesn't cope well with a layout that has a ground plane, because the process it uses to generate the paths, create a fictional plane on the fly.

Work files links

G-Code generated by pcbgcode plugin, for top side etching and top side outline milling
GF_FabISP_Gcode.zip

PCB Etching and Milling

For the first attempts, we used the version of the layout board that our FabLab instructor gave us.

After fixing the problem with the feedrate parameter, it was time to actually produce the board! Folling Neil advice, we tried to use bi-adhesive tape to hold the board, but because the build plate of the CNC mill is made of MDF, the bond wasn't strong enough and the board edges weren't exactly horizontal. So we used some metal scrap screwed to the plate to hold the board in place.

Having the board stuck in place, we calibrated the Z origin, using a "high technological solution" made out of a battery pack, a LED and a couple of crocodile tweezers, so that when the burin would have touched the board, the LED would light on ;) .

Finally we set the XY origin, and spread a bit of grease on the board surface, to help the etch process.

We waited for the mill to do its work, that took approximately 45 min. The result was really bad. The etching process had removed too mach copper, so that the traces were really really thin, or even non-existent. We investigated the causes and we found that we calculated a wrong dimension for the tool diameter, hence the generated g-code was expecting a different size for the burin head.

We corrected the value and recalibrated the machine. The second attempt was better, but because the board was not exactly horizontal, the Z level was not the same all over the surface of the board. That lead to a result where some part of the PCB was etched too much and others were not etched at all.

For my board I decided to use an alternative method to try to uniform the Z depth all over the surface. I bought a piece of mirror, and cut the board almost the size of the final result so that the error due to convex or concave surface would minimize. Then I used bi-adhesive tape to stick the board on the mirror. Finally I blocked the mirror on the mill plate with metal springs. In this way the error on the Z axis, along the board surface was about 0.02 mm.

The result, this time was quite good. There was just one problem on one trace, that was not completely etched. So instead of repeating the process once again, I removed the excess copper by hand with a burin. Finally, to remove any residue of etched copper from the traces, a used sand paper and washed it with soap.


Components Soldering

Before starting to solder the components on the board, I checked with a tester if there was some broken or shorted trace, but there was none. So it was time to solder it!

At my workplace, I solder SMD components all the time, so I think I'm quite skilled in the process. I started tinning one pad for each component. Then I placed the components on the already tinned pad after melting it, and soldered the other pad.

The Weller iron we have at the FabLab is really good, but maybe with a sharper point and a thinner solder wire, the result would have been better. Anyway the final PCB was good and I was happy with it.


Compiling the firmware and programming the board

In order to program my board I needed another programmer, but since I've been working with Atmel and AVR microcontrollers for a long time, I had the AVR Dragon in my drawer, ready to be used!

Moreover, to compile the firmware and have the tools to flash the firmware I downloaded the toolchain, that for Windows is WinAVR. Once installed, you have AVR-GCC compiler, Make and AvrDude to flash the firmware on the microcontroller.

If you want to use AVR Dragon with AvrDude, you need to install some additional drivers on Windows: libusb-win32. Furthermore, to install unsigned drivers in Windows 8 and Windows 10, you have to put your OS in Test Mode! Follow this simple tutorial

Having installed correctly the AVR Dragon, I checked with AvrDude if my GF_FabIsp was recognized, using this command. Note that the parameter '-t' starts AvrDude in terminal mode.

user@work-pc:~$
avrdude -c dragon_isp -P usb -p t44 -t

I programmed manually the FuseBits (you can use the make fuse command too), with the values selected to use an external 20 MHz resonator, and checked the write operation. Then I compiled the firmware with the command:

user@work-pc:~$
make hex

and finally flashed the firmware using the command:

user@work-pc:~$
make flash

Everything went smooth, so I unplugged my GF_FabIsp and the AVR Dragon, and re-plugged the GF_FabIsp after desoldering the R4 0 Ohm resistor. The device was recognized correctly by Windows, as shown in Device Manager from the image below.

Work files links

Firmware with source code, makefile and binary output
GF_FabISP_Firmware.zip

Conclusions and thoughts

This week assigment was interesting, because I've never produced a PCB with a mill before. I'm quite skilled in PCB production but I always used toner transfer paper and chemical etching to make my boards.

However in my opinion the procedure involving the mill is too much prone to error, the calibration is quite an hassle, and it's time consuming. Even though we learned to use the Roland quickly, we spent a lot of time trying to calibrate the Z axis to overcome the convex nature of the copper clad, and the build plate error. Moreover the milling process is quite slow, and from our tests we had to do the boards almost 3 times to have a good enough PCB.

Using this technique, even an error of 0.01mm on the Z axis could potentially lead to a failure and the error is amplified if the tool used has not a cilindrical tip but a conic one, because the more the error on Z axis, the more the etched copper will be among the traces, and the thinner the traces will be. This could be not much of a problem if the traces are wide enough, but for thin traces such as the Mini USB ones, this could be a real drawback.

Chemical etching is less ecological friendly for sure, but gives better results, you can produce a batch of boards at the same time, and is less prone to errors and there's no need for calibration.

Disclaimer

I have extreme respect for environment and everytime I use chemical etching I go to a electronic distributor near me that provides safe hazardous waste disposal, even if I use less than 5ml of ferric chloride!
I have respect for my safety too, so I pay extreme attention when using nasty chemicals, I wear glasses and lattice gloves.

Moreover, I wanted to improve the GF_FabISP Design, to have a couple leds and a DIP Switch to enable and disable the traces that were previously controlled by the 0 Ohm resistor (or the solder bridge on the original FabISP design). That because in my opinion is a more quick and versatile way to reprogram the board if needed, than resoldering and desoldering once again the solder bridge.

This time, to route all the signals and keep a compact layout, I had to come up with a 1.5 sided board, because there's one wire bridge. The firmware remains the same of the first version of the board I made.

Below I posted some images of the updated version of my GF_FabISP, produced with chemical etching in about 15 minutes, and the result was perfect at the first attempt. Even ultra-thin traces are ok (as you can see in the top-left corner). Finally I coated the board with a specific green paint that dissolves when soldered.

The soldering and programming went smooth for this PCB too, so I decided to try to use the new GF_FabISP_V2 to reprogram the other GF_FabISP.

Work files links

Eagle Cad Schematic and Board Layout of GF_FabISP_V2
GF_FabISP_V2.zip
Firmware with source code, makefile and binary output
GF_FabISP_Firmware.zip

Assignments Outcomes

  • Describe the process of production
  • Demonstrate correct workflows and identify areas for improvement if required

Have you:

shown how you made the board
explained any problems and how you fixed them
included a hero shot of your board