01
03
07
week 03 | electronics production
08
This week I had to produce a FabISP by myself. I've seen PCB production like etching, milling when Christoph did this in our FabLab/labor all the time. But this time, it is the first time to produce a PCB by myself. Instead of using one of the existing designs, I decided to go through the whole process to learn to design schematics and produce PCBs , while soldering SMD parts (even 0402) is nothing new for me. As I normally use OSX, I wanted to use a native and open-source program which gave me the option to try KiCad.
09
The requirements for this assignment were simple: every FabLab should be able to produce them. This excludes all the wicked stuff and options like solder resist, stencil, ENIG etc. - but it does not exclude the option to make through-hole connections with our toggle lever press, which is very affordable (~$330) and could be replaced with enameled copper wire. I tried to design my whole PCB on a 1-sided PCB, but failed with routing one circuit path, which forced me to use the second side. To reduce the number of holes and save a lot of space, I tried to use as much SMD parts as I could. Under normal conditions, I would solder such PCB in our forced air circulation oven TR60 from Nabertherm. Instead of using this oven, my goal was to verify if this PCB is solderable by hand, because not every FabLab owns a reflow oven.
10
My design is based on David's design with some modifications. I've added two LEDs, changed the Mini-USB-B connector to a USB-B connector and changed some packages. Here is my BOM...
11
BOM:
1 Attiny44A-SSU 68T3711 Newark
1 7A-12.000MAAJ-T CRYSTAL, 12MHZ 84R5400 Newark
2 Zener diode 3.3V 12T1447 Newark
1 3M ribbon cable 28AWG 98K8815 Newark
3 RC0603FR-071K5L 1.5kOhm resistor 68R0045 Newark
1 MCWR06X1002FTL 10kOhm resistor 94X1379 Newark
2 MC0063W0603148R7 48.7Ohm resistor 26M0947 Newark
1 GRM188R61A106ME69D 10 µF capacitor 31Y1762 Newark
1 TE 1734346 USB B connector 31M6448 Newark
1 0.1µF 0603 capacitor (in stock before)
2 18pF 0402 capacitor (in stock before)
2 LEDs 0603 (in stock before)
1 2x3 pin header w/ shroud (in stock before)
12
Download my KiCad files (open with Nightly Builds after Sept'16)
13
Download my modded FabISP firmware
14
After editing a lot of pictures, I decided to seperate the different stages of this assignment.
15
Stage 1: Schematic, create parts/footprints, routing
16
Stage 2: PCB production, milling
17
Stage 3: Soldering, initial startup
18
Stage 1: Schematic, create parts/footprints, routing
19
Welcome to the first stage!
20
After installing KiCad I opened the documentation which is very helpful for a absolutely noob in PCB design. The first step is creating a project - I created my project folder directly into the FabAcademy GIT.
21
The next step is creating the schematic. Now it's the time to add all needed parts like microcontroller, resistors e.g. to the schematic and seperate them in reasonable groups.
22
23
While editing, you have to assign the right footprints to your parts. Just make a right-click on a part, choose properties and search the proper footprint in the library.
24
25
Some parts later, you'll get the first problem automatically - you want to use a part, which is not included in the general KiCad library. So it is your turn to generate a library (a seperate for your project or your own general additions). The first part which was not included was the USB-B connector I wanted to use. - I thought this was the right way to use KiCad, but it wasn't. KiCad seperates schematic symbols from footprints. In my case I only had to generate a new footprint, because the pins were the same. Don't think about it - it was my first time... But as conclusion: generating new parts is easy. :) Just click on the library editor and add a new part, then add or change the values.
26
27
The right way in this case, is just generating a new footprint in the footprint editor. Before using the footprint editor, you have to generate a new footprint library and add the new library in the footprint library manager in the properties of the footprint editor. The KiCad tutorial helped me a lot at this point. After generating the new library, create a new footprint, then click on add pads. The new window which appears shows the pad properties, where you're able to change all the needed settings like pad number, which must be identical to the drawing in the corresponding datasheet, pad type, which defines the type of the pad, like SMD, through-hole, non-plated through-hole mechanical etc. . After setting the number and type, the dimensions and positions must be set. You have to do this in a simple cartesian coordinate system for every pad you need. The last thing for the pads is to assign them to the right layer. I'll show you two diffent pads I created for my USB-B connector. The first one is a normal rectangular SMD pad.
28
29
The second pad for my USB-B connector I would like to show, is one of the mounting holes. This one is a mechanical hole which must be drilled. As you can see, it occupies the bottom layer as well as the top layer.
30
31
Now it is time to add a footprint contour for the silkscreen. Click on the line or circle button and align them correctly in the already used cartesian coordinate system.
32
33
After adding all needed parts, footprints and connecting them to reasonable circuits, the schematic will look like this:
34
35
The next step is to align the parts wise, for example to reduce the length of data circuits, avoid crossings and bring the PCB into the shape you need or want. After exporting the Netlist from your schematic into the PCBnew part of KiCad, you'll get a bunch of parts in the middle of your screen.
36
37
All the white lines you see, are points you must connect and route the circuit paths between. These white lines only show the next possible connection. Don't be shy to push them around, the white lines will always show the nearest possible connection. After unraveling the parts and paths, my PCB looked like this:
38
39
With the routing tool, I started routing the paths. This step took me a long while the first time. I had to realign my parts several times to avoid unwanted crossings or shapes. After routing all paths, there was only one path which ruffled up a bit. I solved this problem by adding two vias. This step gave me the chance to route this path on the bottom layer. Actually my plan was to use only one side but this path had to cross too much other paths. I had the choice to add some 0 Ohm resistors as bridge or apply a via or through-hole connection. As through-hole connections are possible to made with every drill and a cable, I chose this option to save some space. The red lines show paths on the top layer and the green lines show the path on the bottom layer. The grey circles show the vias.
40
41
This is my final PCB design. As you can see, the yellow line is the shape of my PCB.
42
43
Now we have to add a ground plane to both sides and insert some fiducial marks which the PCB mill needs to orientate itself after turning the PCB while milling. KiCad offer a simple tool to add a ground plane, just make a right-click and use the fill/refill all zones tool. This tool uses the inserted or given values for path or track width, via diameter, part dimensions etc. and their clearance to calculate the shape of the ground plane. This is my PCB after adding the ground plane (red= top layer, green= bottom layer):
44
45
46
The next to last step before exporting the files into Gerber, is to do a design rule check. This tool checks if your PCB is in the given range of values for example of pad clearance or if there are unconnected pads. I had no error messages, so I was able to export my files into Gerber to mill my PCB.
47
48
Stage 2: PCB production, milling
49
My second stage of this assignment was milling my PCB on our LPKF S63. This is a specialized PCB mill which comes with special software and tools. Due to the fact that this is my first time using this PCB mill, Christoph gave me an instruction on this machine. Sorry for the german GUI on my pictures!
50
First, I had to choose the right preset, which is double-sided without through-hole plating in this case.
51
52
The second step was to import my Gerber files from KiCad into the LPKF CircuitPro program. In this step, I had to assign all my layers to the program internal layer structure. There is also the option to name the layer direct the right way in your PCB design program, which saves this step.
53
54
The third step is to generate the milling paths, just click on this button.
55
56
The milling path generator gave me the option to select the rubout method. I chose a full rubout. In the second option I decided to use vertical fins, which fit best to my PCB design. There are already the options for horizontal, vertical and horizontal and edge fins, depending on the PCB design.
57
58
In the forth step, I had to chose the position where the PCB mill should mill my PCB. To position the PCB, make a click on mousepositioning, click on the wanted place of your machine bed, de-select the mousepositioning button and just drag and drop your PCB to the origin you set before.
59
60
Some minutes later, the machine asks you to turn the PCB after milling the bottom layer. After turning your PCB, the machine asks you to check if it has detected the right origin through the setted fiducials in the pcb.
61
62
Finished!
63
64
This is the top layer of my PCB before cleaning, directly after the milling process.
65
66
Under our microscope the PCB looks good, too. :)
67
68
Stage 3: Soldering, initial startup
69
Welcome to the third and last stage! Heat up your soldering iron and grab fine solder!
70
After cleaning the PCB, I coated my PCB with solderable PCB varnish to protect it from oxidation.
71
Top layer coated
72
73
Bottom layer coated
74
75
To connect the top with the bottom layer circuit paths, I had to use 0.6mm rivets with our toggle lever press.
76
77
Just insert the rivets into the hole, align the pcb on the punch and press with reasonable pressure. To secure and protect the connection, I soldered the rivets additional to my PCB.
78
79
Due to the fact that I used a lot of small 0603 and some 0402 parts, I had to follow a wise sequence of soldering to not block following parts. I started with the ATTiny. First, I soldered one pin in one edge to fix and align the ATTiny, then I soldered the remaining pins. To solder the first pin, add some solder to your pad on the PCB, press and fix the ATTiny down and align it with tweezers - then heat up the pin and pad. Not that complicate :)
80
81
Just for fun - a comparison between the ATTiny and my 0402 18pF capacitors for the crystal.
82
83
Solder from the middle to the outside, from low to high parts. Use the tweezer method for fixing the parts...
84
85
This is my programming soldering jumper in closed position :)
86
87
Befor using my FabISP I had program it with another ISP. For this step, I followed Anna's tutorial, compiled the firmware with some additions and flashed my FabISP.
88
89
Instead of using the normal given firmware, I added some features. I changed the device name to HRW FabISP and added the code to use the second LED, which flashed until the USB connection is enumerated, then turns off. When the ISP is preparing SPI commands and while flashing other hardware, the LED is even on.
90
91
Finished - and there it is! :)
92
93
My FabISP while programming another PCB.
94
This work by Daniel Bruns is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.