Skip to content

5. Electronics Production

assignment for the week

  1. Characterize the design rules specifications of your PCB production process
  2. Make an in-circuit programmer by milling the PCB (/make a PCB by milling) (program it, so that you can use it to program your board in Electronics Design week, and in other weeks)
  3. Optionally, trying other processes (of making PCBs)

learning outcomes

  1. Describe the process of milling, stuffing, programming, and de-bugging
  2. Demonstrate correct workflows and identify areas for improvement, if required

have i

  1. Shown how I made and programmed the board
  2. Explained any problems and how I fixed those
  3. Included a ‘hero shot’ of my board

characterizing the design rules specifications of our PCB production process

This week I will be using a pre-designed circuit to mill a circuit board, I will not be designing one. Hence, I will leave out that portion of the PCB production workflow. This week, the workflow will be from the point when you have 2 image files, one for traces and pads and another for outline, and you input those, one at a time, in to fabmodules.org and generate toolpaths for milling. In the Electronics Design week, I will re-draw another pre-designed circuit in Autodesk EAGLE and that is where I will talk about CAD for drawing and/or designing circuits, exporting those circuits as image (.png) files, and further processing those images in an image editing program (optional). I will then integrate steps from this week to present the complete PCB production workflow.
Machining or milling PCBs, as explained by Neil, is a multi-step process as follows: To machine a board (Figure 5.0 A), you first have to attach it to the bed (Figure 5.0 B), and that is done in a surprisingly crude way (at least on these little precision milling machines). We use 2-sided tape (Figure 5.0 B), and the reason we do that is if you clamp the board, it bows a little bit, and the flexing and the tension can break the tool. By using a tape, we hold it from below, and that keeps the board nice and flat, and keeps it relaxed. Mounting a bare board on to the sacrificial layer of the milling machine is called fixturing (Figure 5.0 C). Here, let me grab an example … so here is an example of the boards you will be making, and you can see the fine features and the traces that you will be cutting out. So the board has to be nice and flat to make those fine features that we need. An important precaution while fixturing is to avoid any air bubbles between the tape and the board, and between the tape and the underlay. I started out with a single-sided blank FR-1 board, 4 in * 6 in (Figure 5.0 A). Technically, these are bare single-sided copper-clad laminates in paper phenolic material. Under your board, there is an underlay (Figure 5.0 D), there is a sacrificial material, and that is so that when you cut through your board, you don’t cut in to the machine, you cut in to that sacrificial material. Those materials have a lifetime. Once the sacrificial gets old, it doesn’t hold down your board very well, and you need to replace it. So depending on how busy your lab is, maybe once a month you put in a new sacrificial layer. When you do that everything needs to be clean and smooth so that the layer lays flat, and so if you have an old sacrificial layer on a dirty machine, your board will move around, and again that will break the tool, and your board will not have a good finish. If you have a fresh sacrificial layer (Figure 5.0 E) on a clean machine, everything will be smooth (orientation), and it will cut nicely. Then, you need to set the tool right on top of your board. We are only going to cut a few thousandths of an inch deep, and so zeroing (Figure 5.0 F) is where you set the machine (actually the end mill) right on top of your stock/board. All the steps I am describing are shown in this nice series of videos from Charles Fracchia (Neil’s student). The way we zero it is you lower the tool to the surface, it helps to tap it a little bit just to make sure its in good contact, and then you tighten the set screw. And we have to get that very close to within a few thousandths of an inch. Now, one thing that can go wrong is if you don’t hold the tool while you tighten it, it can move a little bit. So you hold it with one hand and tighten it (Figure 5.0 G). Another thing that can go wrong is when you lower the tool, if you drop it, it can actually shatter. These are hard but brittle so you lower it gently. Then the set screw, this is a common beginner mistake, there is a set screw in the collet that holds the tool. I have got a spare one here. This is the part of the machine that holds the tool (referring to the collet) and there is a little tiny screw that goes in to hold it. You do not tighten it as hard as you can. If you do that you actually strip the threads (of the set screw). It is just snug. You tighten it up snug, you don’t tighten it so hard you are stripping the threads. If you have an old collet that has been over tightened the set screw does not hold very well, the tool wobbles, and again that will break the tool. Then when the tool is brand new, it is so sharp you get very fine shavings. After a little bit, it gets slightly dull and curves, and it actually machines more smoothly, and then when it gets very old, it doesn’t machine nicely anymore, it just sort of smooshes the copper around and you get rough edges. That is a sign you need a new tool. I have come on people in fab labs who are actually trying to machine with a broken tool, and they say its not working well, and there tool is broken, it actually doesn’t have the end (tip) of the tool there. And so you should look at your tool and make sure its in good condition, and be aware that it has a lifetime. To cut traces on the board (removing copper from the board, .07 mm thick), and perimeter of the board (basically, cutting through the copper and substrate layers on these bare boards, 1.7 mm thick), I used 2 different kinds of end mills (Figure 5.0 H): a v-bit (tip size, angle, equivalent to a 1/64 in end mill) 1/64 in end mill for cutting traces, and a 1/32 in end mill for cutting perimeter of the board. Once you machine your board, there will be fine shavings left behind, and so you need to deburr it (Figure 5.0 I), and the way I like to do that … this is a stainless steel rule that has a very straight sharp edge, and so when I am done machining I just use this, I pull it across, and it removes all the fine burrs, you can use a fine abrasive too. And then the last step is you clean the board (Figure 5.0 J). There are oils on your fingers that over time will begin to actually tarnish and then etch the board, and then there is the fine shavings. Oils from fingers also create problems during soldering components to the board. And so, you wash the board in soap and water before you assemble the circuit. So, those are all the steps you are going to go through to make your board by machining. And I want everybody to machine a board. I want you to learn this milling process because you can do it on a $ 1000 machine, the waste is just a little bit of dust, its easy to clean up, and its a very quick turn process.

Figure 5.0 A: A single-sided blank FR-1 board, 4 in * 6 in. Technically, these are bare single-sided copper-clad laminates in paper phenolic material.

Figure 5.0 B: 2-sided tape used for mounting a bare FR-1 board on the sacrificial layer of the milling machine (also known as fixturing).

Figure 5.0 C: A bare single-sided FR-1 board mounted (or fixed) on the sacrificial layer of the milling machine.

Figure 5.0 D: Image showing an acrylic underlay (also known as a sacrificial layer) fixed to the bed of the milling machine.

Figure 5.0 E: Image showing a freshly surfaced underlay.

Figure 5.0 F: Image showing an end mill zeroed on an FR-1 board.

Figure 5.0 G: Image showing a (collet) set screw being tightened to hold an end mill zeroed on an FR-1 board.

Figure 5.0 H: 1/64 in and 1/32 in end mills used to mill traces on the board, and cut the board, respectively.

Figure 5.0 I: A milled and cut PCB being deburred using a stainless steel rule.

Figure 5.0 J: A milled and cut PCB being washed with dish soap and tap water.

PCB fabrication/production by milling is one of several ways to produce PCBs. My laboratory has a monoFab SRM-20 compact desktop milling machine (basically a miniature CNC mill, Figure 5.1) from Roland DGA Corporation (Irvine, California, United States), and that is what I used to produce PCBs for myself. The mill is computer-controlled through a program called VPanel for SRM-20 (Figure 5.2), also from from Roland DGA Corporation. It is used to output toolpaths (cutting data) to the mill. The toolpaths were created at fabmodules.org.

Figure 5.1: monoFab SRM-20 compact desktop milling machine from Roland DGA Corporation.

Figure 5.2: VPanel for SRM-20, program to control monoFab SRM-20, is used to output toolpaths to the mill.

PCB production process

Here are the steps:

Generating a toolpath to cut traces and pads on a bare board:

Google Chrome > fabmodules.org > click on input format dropdown menu > select image (.png) > this opens Finder > navigate to locate 5_3__fts_mini_traces.png (Finder > Downloads > FabAcademy2019 > week 5 electronics production, Figure 5.3) > select file > Open > this opens the image in the browser, also reveals its properties (input specifications, Figure 5.4), and also the output format dropdown menu > select Roland mill (.rml) > this reveals output settings (Figure 5.5), and also the process dropdown menu > select PCB traces (1/64) > this reveals process settings (Figure 5.6).

Figure 5.3: Monochrome image of traces and pads of the “FabTinyISP Minimal” in-system programmer circuit (source: http://fab.cba.mit.edu/classes/863.16/doc/projects/ftsmin/fts_mini_traces.png).

Figure 5.4: Properties of the above monochrome image as read by fabmodules.org. Properties revealed are file (name and format or extension), resolution of the image in dots per inch (dpi), and size of the image in pixel (px), millimeter (mm), and inch (in).

Figure 5.5: Output settings for the toolpath generated at fabmodules.org. Machine, speed (mm/s), and x0 (mm), y0 (mm), z0 (mm) are specified by the user. Rest of the settings are left to default values.

Figure 5.6: Process settings to generate a toolpath to mill the image input earlier. Direction (of cutting), cut depth (mm), tool diameter (mm), number of offsets, and offset overlap (%) are specified by the user. Rest of the settings are set to default values.

The most important settings/parameters, important for PCB production by milling, and discussion about the same is as follows:

Machine: Fab modules has four options, meaning you can output toolpath to four different machines. SRM-20 was selected here.
Speed (mm/s): This refers to the linear speed, basically the feed rate (how fast the tool progresses). The feed rate of a router to the workpiece (or vice-versa, if used in a router table) is very important to the longevity of the tool and the overall quality of cut. This had a default setting of 4 mm/s once the process was selected. An optimum feed rate is important. Always keep the tool moving. Allowing the tool to dwell in the cut will cause burning and reduce tool life immensely.

Direction (of cutting): Climb machining was used for a good finish.
Cut depth (mm): How deep each succeeding pass goes. As a rule of thumb, you go down roughly the diameter of your tool. This setting determines how deep each individual cutting pass will be. You can make this smaller (for a finer cut) or bigger (for a rougher cut), depending on your model. The finer the cut, the longer it will take to mill the model. A cut depth of .11 mm was used.
Tool diameter/Cutting diameter (mm): The largest cutting diameter of your tool (in mm). A cutting diameter of .4 mm was used.
Number of offsets/Offsets: It is the number of passes the end mill goes around the circuit trace to remove the material. This was set to a value of -1. At -1, the end mill removes all the material except for traces and pads no matter how many passes it takes. An offset value of 4 means the end mill goes around traces four times only creating a space between traces and the rest of the copper layer.
Offset overlap (%): This was set to 50%. This is the extent to which each successive pass overlaps the immediately preceding pass (for efficient removal of material).

Once the above parameters are set to their desired values, click on “calculate” toolpath. It takes a few seconds to calculate the toolpath for milling traces. If it takes any longer than that, there is a problem with the (.png) input file. If you look at the calculated toolpath image, you will see many thin lines running parallel to each-other, and around the traces. Why many? This depends on the value of the number of offsets. An offset of -1 means the end mill will remove all the material at the specified cut depth except for traces and pads no matter how many passes it takes. An offset of 4 means the router will mill around the traces 4 times at the specified cut depth. Another important thing to note at this point is that you should look at your image file with traces and pads, and the toolpath image side by side (Figure 5.7). This juxtaposition is very helpful in several ways: (1) check if the toolpath image has traces and pads in the same places as in the input image; (2) check clearances (pad-pad, pad-trace, trace-trace) to make sure traces and/or pads have not merged (or shorted). If these conditions are violated, do not proceed to milling. Instead, go back to the board view (.brd) in EAGLE to adjust clearances, re-route some connections, and go forward from there (meaning generate a new .png file, and recalculate toolpath). When satisfied, “save” the calculated toolpath as a .rml output file for the SRM-20.

Figure 5.7: Comparing the toolpath generated at fabmodules.org against traces in the input image to ensure that the toolpath will create traces and pads in the same places as in the image, and that traces and/or pads have not shorted.

Plug and switch on the SRM-20, and on the computer connected to it, fire VPanel for SRM-20. Install the 1/64 in end mill in the router for milling traces and pads. Before milling, origin of the router on the bare FR-1 board has to be set, and the end mill has to be zeroed (on the board).

Setting origin of the bare FR1 board, and zeroing the end mill: The origin (0,0) of the file created in fab modules is in the bottom left corner of the mill. This step sets the origin for the output (.rml) file on the actual physical board. VPanel for SRM-20 > Move the router in the XY plane by clicking on the +/-X and +/-Y arrows until the end mill is on top of the desired position/location on the board (typically, a few millimeters inside from the edge of the board at the bottom left corner). As you do this, notice the changing values in the X and Y fields to the left of the arrows. Also, be careful not to bump the end mill in to anything as you move the router around. Else, you will break the end mill. > Set Origin Point > Click on the X/Y button > This changes the values in the X and Y fields to 0.00 and 0.00, respectively. This sets (x,y) to (0,0). This is the router’s origin now. This will serve as a reference when cutting the outline/perimeter later. > Using the -Z arrow move the end mill down slowly until it is about 2-4 mm (max 5 mm, if needed) above the board. > Using a hexagonal wrench (or Allen wrench) of size 2.3 mm, loosen the collet screw holding the end mill in place, and let the end mill gently land on the board. > Slightly press down on the board (about .5 mm). > Tighten the collet screw to secure the end mill in the collet while holding the end mill between your fingers, and at the same time pressing on the board. > Back to VPanel for SRM-20. > Set Origin Point > Click on the Z button > This changes the value in the Z field to 0.00. This sets (x,y,z) to (0,0,0). Origin of the bare board is now set, and the end mill is also zeroed.

Further, in VPanel for SRM-20, click on Cut > This opens a new window titled “Cut” > Click on Delete All if there is/are any file/s listed under Output File List > Click on Add > This takes you to Finder > Navigate, and locate your output (.rml) file for traces (fts_mini_traces.rml) > select file > Open > Back to the window titled “Cut” > Click on Output > The spindle will start turning, and milling will start momentarily.

Do not remove the board from the mill when done.

Generating a toolpath to cut an outline around a printed circuit:

Google Chrome > fabmodules.org > click on input format dropdown menu > select image (.png) > this opens Finder > navigate to locate 5_8__fts_mini_perimeter.png (Finder > Downloads > FabAcademy2019 > week 5 electronics production, Figure 5.8) > select file > Open > This opens the image in the browser, also reveals its properties (input specifications, Figure 5.9), and also the output format dropdown menu. These input properties of the outline image file must match those of the traces and pads image (Figure 5.4 above) exactly. > select Roland mill (.rml) > this reveals output settings, and also the process dropdown menu > select PCB outline (1/32) > this reveals process settings (Figure 5.10).

Figure 5.8: Monochrome image of outline/perimeter of the “FabTinyISP Minimal” in-system programmer circuit (source: http://fab.cba.mit.edu/classes/863.16/doc/projects/ftsmin/fts_mini_cut.png).

Figure 5.9: Properties of the above monochrome image as read by fabmodules.org. Properties revealed are file (name and format or extension), resolution of the image in dpi, and size of the image in px, mm, and in.

Figure 5.10: Process settings to generate a toolpath to cut out the PCB milled earlier. Direction (of cutting), cut depth (mm), stock thickness (mm), tool diameter (mm), number of offsets, and offset overlap (%) are specified by the user. Rest of the settings are set to default values.

The most important settings/parameters, important for PCB production by milling, and some discussion about the same is as follows:

Machine: Fab modules has four options. SRM-20 was selected here.
Speed (mm/s): This had a default setting of 4 mm/s once the process was selected.

Direction (of cutting): Climb machining was used for a good finish.
Cut depth (mm): A cut depth of .6 mm was used.
Stock thickness (mm): This refers to the thickness of the bare FR1 boards used. Our boards are 1.7 mm thick.
Tool diameter/Cutting diameter (mm): A cutting diameter of .79 mm was used.
Number of offsets/Offsets: This was set to a value of 1.
Offset overlap (%): This was set to 50%.

Once the above parameters are set to their desired values, click on “calculate” toolpath. It takes a few seconds to calculate the toolpath for cutting the perimeter. If it takes any longer than that, there is a problem with the (.png) input file. If you look at the calculated toolpath image, you will see 1 thin line running to make a perimeter around the entire circuit. Why 1? This depends on the value of the number of offsets. An offset of 1 means the router will cut only once. However, as a result of the above settings, the end mill goes around three times once at each of the following depths: .6 mm, 1.2 mm, and 1.7 mm. Another important thing to note at this point is that you should look at your image file with outline, and the toolpath image side by side (Figure 5.11). They should look the same, except for the thickness of the outline. When satisfied, “save” the calculated toolpath as a .rml output file for the SRM-20.

Figure 5.11: Comparing the toolpath generated at fabmodules.org against the perimeter in the input image to ensure that the toolpath will cut the board in the same place as in the image.

Before cutting the outline (or after traces and pads are milled), you need to change the end mill to the bigger 1/32 in end mill to cut an outline/perimeter around the traces to separate the PCB from the rest of the board. VPanel for SRM-20 > Move > To Origin > click on the X/Y button. This takes the router to the same (x,y) position that was set as the origin on the bare FR-1 board before milling traces and pads. Once the router is at that position, the values in the X and Y fields change to 0.00 and 0.00, respectively. This confirms that the router has returned to the origin set previously. The machine remembers the (x,y) position on the bare board from the previous step. However, the Z needs to be zeroed again as the end mill has been changed. Using the -Z arrow move the end mill down slowly until it is about 2-4 mm (max 5 mm, if needed) above the board. > Using a hexagonal wrench (or Allen wrench) of size 2.3 mm, loosen the collet screw holding the end mill in place, and let the end mill gently land on the board. > Slightly press down on the board (about .5 mm). > Tighten the collet screw to secure the end mill in the collet while holding the end mill between your fingers, and at the same time pressing on the board. Finally, in VPanel for SRM-20, click on Cut > This opens a new window titled “Cut” > Click on Delete All if there is/are any file/s listed under Output File List > Click on Add > This takes you to Finder > Navigate, and locate your output (.rml) file for outline (fts_mini_outline.rml) > select file > Open > Back to the window titled “Cut” > Click on Output > The spindle will start turning, and milling will start momentarily.

You should have your (unstuffed) PCB now (Figure 5.12). Use a spatula to pry it out/separate from the sacrificial material. Finally, vacuum away metal and substrate shavings in the machine, and return all tools (hexagonal wrench, both end mills, double-sided tape, and spatula) to the designated place.

Figure 5.12: Unstuffed PCB for the “FabTinyISP Minimal” in-system programmer circuit.

No other process of PCB production, other than machining or milling, was tried this week.

deburring the PCB

The fine shavings left behind after machining the board have to be removed, and so you need to deburr it (Figure 5.0 I), and can be done using a stainless steel rule with a very straight sharp edge. After you are done machining you can use the rule, pull it across, and it removes all the fine burrs. Alternatively, a fine abrasive can be used.

cleaning the PCB

The last step in the fabrication/production workflow is cleaning the board (Figure 5.0 J). There are oils on your fingers that over time will begin to actually tarnish and then etch the board, and then there is the fine shavings. Oils from fingers also create problems during soldering components to the board. And so, you wash the board in soap and water before you assemble the circuit.

visual inspection of the PCB

There are two instances where you should visually inspect your board: immediately after the production workflow, and after stuffing or assembling the board.

At this point, the milled PCB should be compared against its schematic to ensure all connections are correct, and also against its board layout (or input image) to ensure that all traces and pads are in the same places as in the input image. Also ensure that traces and/or pads are not missing and have not merged (or shorted).

stuffing the PCB / assembling the PCB by manual soldering

The next step in the workflow is stuffing/assembling the board with components. This was done manually, one component at a time, by soldering.

The process is as follows: Apply excess flux to the area on the PCB where components are to be soldered > With solder in one hand and soldering iron in the other, melt some solder and apply a blob on each pad > Now, with a tweezer (in the same hand as the solder), place a component on its pads, re-heat the solder blob, and gently push the component onto to the pads so that it lays flat. The order of soldering should be from complex (e.g. ATtiny45) to simple components (so you have the most access while soldering complex/difficult components), and from the center of the board to the outside. Another important thing is that after soldering, the solder surface should always be smooth and shiny. Also, be careful not to apply too much heat in one spot for too long as it may damage components. Uniform heating is the key.

Components (Figure 5.13) and other items required are as follows:

1x ATtiny45
2x 1 k-ohm resistors (102)
2x 499 ohm resistors (4990)
2x 49.9 ohm resistors (49R9)
2x 3.3 V Zener diodes
1x red LED (the red LED lights when the target circuit is powered)
1x green LED (the green LED lights when the programmer is talking to the target) 1x 100 nF capacitor
1x 2x3 pin header
flux
solder
soldering iron
tweezers
magnifying lens

Figure 5.13: Components for the “FabTinyISP Minimal” in-system programmer PCB.

Solder components in the exact manner as they are shown in the reference picture (Figure 5.14 A, source: http://fab.cba.mit.edu/classes/863.16/doc/projects/ftsmin/fts_finished.jpg) below:

Figure 5.14 A: Stuffed “FabTinyISP Minimal” in-system programmer PCB for reference.

Additionally, remember that for ATtiny45, Zener diodes, and LEDs, you have to consider the orientation or polarity of the components while soldering the same to the PCB.

  1. ATtiny45 comes etched with a dot next to pin 1.

  2. Zener diodes have a line on them close to the cathode pin. This matches the vertical line in the symbol for diodes.

  3. Surface-mount LEDs with a “green-colored T” on their underside have their anode close to the head of the T, and cathode close to the leg of the T.

If ever in doubt about polarity of components, use a multimeter in the diode check mode, e.g. an LED will glow when the red probe (positive probe) is touching the anode and the black probe (negative probe) is touching the cathode (this is also useful for determining color). If it does not light up, try swapping the probes.

  1. Solder the ISP header at the end as it is large and can get in the way of soldering other components if done earlier.

Finally, use solder to create a bridge on the jumper (J1) near the ISP header thereby temporarily connecting VCC of the microcontroller (ATtiny45) to the Vprog pin on the ISP header so that the header can be used to program the ATtiny45. The programmee board (board to be programmed, which is “FabTinyISP Minimal” that I milled earlier) supplies voltage on this pin (to the programmer, which is another “FabTinyISP Minimal” but pre-programmed, or could be an Arduino board) and the programmer detects it. Once the programmee board is programmed, this bridge will be removed to turn the board into a programmer (rather than a programmee) board.^ The newly programmed “FabTinyISP Minimal” in turn can and will be used to program more “FabTinyISP Minimal” boards and other boards as well.

My “FabTinyISP Minimal” in-system programmer PCB (Figure 5.14 B) is now ready.

Figure 5.14 B: MY stuffed “FabTinyISP Minimal” in-system programmer PCB.

visual inspection of the stuffed / assembled PCB

A visual inspection of the board at this stage is necessary for several reasons as follows:

  1. To ensure all components that have an orientation or polarity (e.g. ATtiny45, Zener diodes, and LEDs) are installed correctly.
  2. There is no shorting where there should not be.
  3. All solder joints should look shiny and smooth and should not be drawn to a point. Reflow any solder joints that look cold (not shiny and smooth).

testing continuity and diagnosing shorting

In addition to visual inspection, it is a good idea to test for continuity of traces, and also diagnosing (and fixing) any shorting using a multimeter. Ensure:

  1. power (Vcc) and ground are not shorted,
  2. there is continuity between the pins of the microcontroller and the ISP header, and that there is no continuity (or shorting) between adjacent pins or traces,
  3. there is no shorting on the power line,
  4. pins on the six pin programming header (ISP header) are not connected to each other.

In case of any shorting, remove excess solder using flux and desoldering braid and disconnect the pins.

programming the board^

downloading and installing the necessary software toolchain

Downloaded and installed avrdude (the programming software) on Mac OS X(source) as follows:

  1. Press Command+Space Bar and type Terminal and press the return key. This opens a Terminal window.

  2. In Terminal, copy and paste: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null and press the return key. If the screen prompts you to enter a password, enter your Mac’s user password to continue (when you type the password, it won’t be displayed on screen, but the system will accept it) and press the return key (In my case, I did not get a prompt for a password.). Wait for the command to finish.

Ashishs-MacBook-Pro:Users sawhneyashish$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null
==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew
==> Downloading and installing Homebrew...
HEAD is now at 4cb88b7e1 Merge pull request #5911 from blankenberg/user-dir-write-permission
Updated 1 tap (homebrew/core).
==> New Formulae
buildkit        go@1.11         mdbook          pyinstaller     triangle
ffsend          kcov            operator-sdk    s2geometry
gitleaks        llvm@7          proper          solr@7.7
==> Updated Formulae
atk ✔                                    libpulsar
boost ✔                                  libqalculate
cmake ✔                                  librealsense
freetype ✔                               libsoup
glib ✔                                   libssh2
gsettings-desktop-schemas ✔              libswiften
gtk+3 ✔                                  libtermkey
openssl ✔                                libtorrent-rasterbar
sqlite ✔                                 libuv
ack                                      libvirt
adwaita-icon-theme                       libyaml
allegro                                  libzip
amazon-ecs-cli                           lldpd
ammonite-repl                            llvm
amqp-cpp                                 lolcat
angular-cli                              lsd
ansible                                  ltc-tools
apache-zeppelin                          lynis
armadillo                                mandoc
atomist-cli                              mariadb
aws-sdk-cpp                              mat2
awscli                                   menhir
azure-cli                                mercurial
azure-storage-cpp                        mesa
baobab                                   metaproxy
bash                                     minio
bazel                                    minio-mc
bettercap                                mitie
binaryen                                 mkl-dnn
bind                                     mkvtoolnix
bit                                      mlkit
bitcoin                                  mmark
bitrise                                  moarvm
bnd                                      monero
boost-bcp                                monit
boost-build                              mono
boost-mpi                                mpfr
boost-python                             mutt
boost-python3                            nats-streaming-server
btfs                                     ncmpcpp
bundletool                               needle
caddy                                    neo4j
caffe                                    netcdf
cargo-completion                         netdata
cataclysm                                netpbm
ceres-solver                             nghttp2
chakra                                   nicovideo-dl
chapel                                   nifi
checkbashisms                            nnn
chronograf                               node
clojure                                  node-build
compcert                                 nqp
conan                                    nspr
conserver                                nss
convox                                   ntp
coreutils                                ocamlbuild
cpprestsdk                               ocrmypdf
cromwell                                 octave
crowdin                                  opencoarrays
csvkit                                   openfortivpn
cucumber-cpp                             openimageio
dbhash                                   openrct2
dep                                      openvdb
digdag                                   orc-tools
dnscrypt-proxy                           osquery
dnsviz                                   osrm-backend
docfx                                    pandoc
double-conversion                        pandoc-citeproc
dtc                                      parallel
easyengine                               parallelstl
elasticsearch                            pcl
embulk                                   pdftoedn
emscripten                               percona-server
erlang                                   pgloader
eslint                                   pgrouting
exiftool                                 php
exomizer                                 php-code-sniffer
exploitdb                                php@7.1
fastqc                                   php@7.2
ffmpeg                                   phpunit
fifechan                                 picard-tools
file-roller                              pius
flann                                    plantuml
flow                                     platformio
fn                                       podofo
folly                                    ponyc
fontforge                                postgis
fonttools                                powerman
frugal                                   ppsspp
fwup                                     prometheus
fx                                       prototool
gdal                                     proxychains-ng
gedit                                    pspg
geocode-glib                             pulledpork
gexiv2                                   pulumi
git-flow-avh                             pygobject3
gitbucket                                pypy
gjs                                      qalculate-gtk
glib-networking                          qt
glibmm                                   r
glm                                      rakudo
glog                                     rawtoaces
gloox                                    rbspy
gmic                                     re-flex
gmsh                                     rebar3
gmt                                      redis
gmt@4                                    redis@3.2
gnome-builder                            redis@4.0
gnome-latex                              rke
gnupg                                    rst-lint
gnuradio                                 rtags
go                                       ruby
go-statik                                ruby-build
gobject-introspection                    ruby@2.5
gocryptfs                                rustup-init
godep                                    s3fs
gomplate                                 s3ql
goreleaser                               salt
gr-osmosdr                               scalariform
gradle                                   sceptre
grafana                                  scrcpy
graph-tool                               securefs
grpc                                     serveit
grpcurl                                  serverless
grv                                      servus
gtkmm3                                   sfcgal
gtksourceview3                           shadowsocks-libev
gtksourceview4                           shellshare
gtranslator                              ship
gucharmap                                shmux
gwyddion                                 simple-scan
hdf5                                     skaffold
hebcal                                   slackcat
helmfile                                 solr
hg-fast-export                           source-highlight
hledger                                  sourcery
homebank                                 speedtest-cli
i2pd                                     sphinx-doc
imagemagick                              sqlcipher
immortal                                 sqldiff
instead                                  sqlite-analyzer
ipython                                  sundials
istioctl                                 supersonic
jasper                                   swi-prolog
jenkins-lts                              swiftformat
jetty                                    taskell
jetty-runner                             tbb
jid                                      telegraf
jpeg-turbo                               teleport
jsonrpc-glib                             template-glib
juju                                     terraform
kafka                                    terraform-inventory
krakend                                  terragrunt
ktmpl                                    thors-serializer
kubeprod                                 tmux-xpanes
kubernetes-helm                          tokei
kustomize                                tomcat
ledger                                   tomcat@7
leptonica                                tomcat@8
lgogdownloader                           topgrade
libbi                                    treefrog
libbitcoin                               ucloud
libbitcoin-blockchain                    uhd
libbitcoin-client                        unbound
libbitcoin-database                      upscaledb
libbitcoin-explorer                      v8
libbitcoin-network                       vala
libbitcoin-node                          valabind
libbitcoin-protocol                      vifm
libbitcoin-server                        vim
libbluray                                vte3
libdazzle                                vultr
libdill                                  watchexec
libdvdread                               wesnoth
libetpan                                 widelands
libfabric                                wildfly-as
libgeotiff                               winetricks
libgosu                                  wolfssl
libgpg-error                             wtf
libgtop                                  xapian
libgweather                              yarn
liblwgeom                                yelp-tools
libosinfo                                you-get
libosmium                                youtube-dl
libphonenumber                           yq
libpointing                              zenity
==> Renamed Formulae
gloo-ctl -> glooctl
==> Deleted Formulae
at-spi2-atk     go@1.4          monax           solr@6.6        zxing-cpp
at-spi2-core    go@1.8          solr@5.5        tmux-cssh
==> Installation successful!

==> Homebrew has enabled anonymous aggregate formulae and cask analytics.
Read the analytics documentation (and how to opt-out) here:
  https://docs.brew.sh/Analytics

==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
  https://github.com/Homebrew/brew#donations
==> Next steps:
- Run `brew help` to get started
- Further documentation: 
    https://docs.brew.sh
  1. Run brew install avrdude. This completes installation of avrdude on your computer.
Ashishs-MacBook-Pro:Users sawhneyashish$ brew install avrdude
Updating Homebrew...
Error: avrdude 6.3 is already installed
To upgrade to 6.3_1, run `brew upgrade avrdude`

3a. Run brew upgrade avrdude (date of upgrade: 3.24.2019). This completed updation of avrdude on my computer.

Ashishs-MacBook-Pro:Users sawhneyashish$ brew upgrade avrdude
Updating Homebrew...
==> Upgrading 1 outdated package:
avrdude 6.3 -> 6.3_1
==> Upgrading avrdude 
==> Installing dependencies for avrdude: libhid
==> Installing avrdude dependency: libhid
==> Downloading https://homebrew.bintray.com/bottles/libhid-0.2.16.high_sierra.b
######################################################################## 100.0%
==> Pouring libhid-0.2.16.high_sierra.bottle.1.tar.gz
🍺  /usr/local/Cellar/libhid/0.2.16: 18 files, 180.5KB
==> Installing avrdude
==> Downloading https://homebrew.bintray.com/bottles/avrdude-6.3_1.high_sierra.b
######################################################################## 100.0%
==> Pouring avrdude-6.3_1.high_sierra.bottle.tar.gz
🍺  /usr/local/Cellar/avrdude/6.3_1: 14 files, 1.9MB
Removing: /usr/local/Cellar/avrdude/6.3... (14 files, 1.9MB)

Downloaded and installed CrossPack for AVR Development (development tool for AVR microcontrollers, (source) (date of download: 4.6.2018).

Downloaded and installed XCode (for Make), (source: Mac App Store, date of download: unknown). A version of Make is installed by XCode.

Downloaded, unzipped (extracted) and built the firmware: Downloaded the firmware source code (date of download: 3.24.2019). The zipped file was (auto-)extracted. cd into the source code directory through the terminal of the computer: cd /Users/sawhneyashish/Downloads/fts_firmware_bdm_v1\ 3.

Ran make. This will build a hex file that will be programmed onto the ATtiny45 on the board. If the command completes successfully, which it did, a file called fts_firmware.hex will be created in the source code directory. If, however, the command does not complete successfully, something is wrong with your toolchain installation. Consult the error messages for information that will help debug those errors.

Ashishs-MacBook-Pro:Downloads sawhneyashish$ cd /Users/sawhneyashish/Downloads/fts_firmware_bdm_v1\ 3 
Ashishs-MacBook-Pro:fts_firmware_bdm_v1 3 sawhneyashish$ make
avr-gcc -mmcu=attiny45 -Wall -DF_CPU=16500000UL -I. -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Os -Iusbdrv -c main.c -o main.o
main.c:109:13: warning: always_inline function might not be inlinable [-Wattributes]
 static void delay ( void )
             ^
avr-gcc -mmcu=attiny45 -Wall -DF_CPU=16500000UL -I. -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Os -Iusbdrv -c usbdrv/usbdrv.c -o usbdrv/usbdrv.o
avr-gcc -mmcu=attiny45 -Wall -DF_CPU=16500000UL -I. -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Os -Iusbdrv -c usbdrv/oddebug.c -o usbdrv/oddebug.o
avr-gcc -x assembler-with-cpp -mmcu=attiny45 -Wall -DF_CPU=16500000UL -I. -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Os -Iusbdrv -c usbdrv/usbdrvasm.S -o usbdrv/usbdrvasm.o
avr-gcc -mmcu=attiny45 -o fts_firmware.elf main.o usbdrv/usbdrv.o usbdrv/oddebug.o usbdrv/usbdrvasm.o
avr-size -C --mcu=attiny45 fts_firmware.elf
AVR Memory Usage
----------------
Device: attiny45

Program:    2488 bytes (60.7% Full)
(.text + .data + .bootloader)

Data:         75 bytes (29.3% Full)
(.data + .bss + .noinit)


avr-objcopy -j .text -j .data -O ihex fts_firmware.elf fts_firmware.hex

programming the ATtiny45

Updated/edited the file called Makefile for the type of programmer I used to program my board. The Makefile, by default, assumes that you are going to use a programmer in the usbtiny family (e.g. another FabISP board). If you are using a different programmer, first find out what avrdude (the programming software) calls it and accordingly update the Makefile. For the small translucent blue programmer, change usbtiny to avrisp2. Edit the Makefile using a text editor intended for programmers. I used TextEdit on Mac OS. Make sure to save it as a plain text and not RTF (and make sure no “.txt” gets added to the filename). Generally speaking, whatever you use to edit your HTML code is alright.

Near the top of the file, find the line that says: PROGRAMMER ?= usbtiny and change usbtiny to avrisp2.

In the absence of USB ports on my MacBook Pro, I had to power my board indirectly through an Arduino board as follows: The Arduino board was connected to another computer through a USB port. > This powered the Arduino board. > I then connected the positive (or, Vcc) and negative (or, ground) terminals on my board to Vcc (providing 5 V of DC power) and GND (ground) terminals on the Arduino board through red and black jumper wires, respectively. > This powered my board as the red LED on the board lit up. If not, check the solder jumper and make sure that it is bridged. If your computer complains about a USB device drawing too much power, and that the computer is shutting down the USB port (this is known as the smoke test), unplug the board and check for shorts. > I then connected my board through its six pin header to the avrisp2 programmer ensuring pin 1 on the board is connected to the slot in the plastic connector on the programmer cable that is marked pin 1 (there should be a small arrow, dot, or manufacturer’s name marking the corner with pin 1). This is important as there are two different orientations in which you can make this connection; it is imporatant to get pin 1 in the right place. Pin 1 is marked in the board diagram (Figure 5.15, source: http://fab.cba.mit.edu/classes/863.16/doc/projects/ftsmin/pcb.png) with a dot and has the MISO signal connected to it. Note that there’s no enforced standard for which direction the cable comes out of the connector, so look for the pin 1 marker. > The avrisp2 programmer was in turn connected to my computer through a USB-C to USB adapter (plug the USB-C end of the adapter into a USB-C or Thunderbolt 3 (USB-C) port on your Mac, and connect the other end of the adapter to the avrisp2 programmer). Figure 5.16 below shows all these connections I just described.

Figure 5.15: Board view of “FabTinyISP Minimal” in-system programmer PCB for reference.

Figure 5.16: Connections made to program the microcontroller on my “FabTinyISP Minimal” in-system programmer PCB. Another computer > Arduino board > USB port on FabTinyISP > Through its six pin header, connected FabTinyISP to > avrisp2 programmer > my computer.

Having completed the connections, ran make flash. This erased anything on the ATtiny45, and programmed its flash memory with the contents of the .hex file created earlier. You should see several progress bars while avrdude erases, programs, and verifies the board’s microcontroller (ATtiny45).

// code block

My “FabTinyISP Minimal” in-system programmer PCB is now programmed.

If, however, things did not work as expected, check:

-that the programmer is connected correctly and pin 1 on the connector matches up to pin 1 on the board,
-that your Vcc and ground of the USB on the FabTinyISP Minimal are connected to Vcc and ground on the Arduino board, and that the soldering on the USB side is strong,
-that the ATtiny45 is installed in the correct orientation,
-that your soldering on the ATtiny45 and ISP header is alright (note that shorts can happen where the traces run underneath the connector),

If, even after checking all of the above you still can not program your board, use a multimeter to verify that there is continuity between the pins on the chip and the ISP header, and that there is no continuity where there should not be (shorts between adjacent pins or traces).

Ran make fuses.

// code block

testing USB functionality of the programmed “FabTinyISP Minimal” in-system programmer PCB

Figure 5.17: to be written.

blowing the Reset Fuse

Ran make rstdisbl.

// code block

testing the “FabTinyISP Minimal” in-system programmer PCB

The “FabTinyISP Minimal” PCB just programmed will be used to program another board during the Electronics Design week. Until then, I will assume that my “FabTinyISP Minimal” is a working in-system programmer (ISP).

problems faced

  1. Absence of USB ports on my MacBook Pro
  2. Programmed board did not show up as a USB on my computer

debugging

What else would I like to document for this week?

// discuss importance of milling linetest.png; also discuss linetest with rough traces
// surfacing the sacrificial layer;
// SRM-20’s specifications;
// why these components in FabTinyISP?
// test cuts: perform and document
// solder shd flow, tinning, tacking
// whats special abt avrisp2 and other such programmers?
// I am missing a reference
// .rml and .pdf files
// debugging

^ source: http://fab.cba.mit.edu/classes/863.16/doc/projects/ftsmin/index.html
^^ source: http://macappstore.org/avrdude/