5. Electronics production¶
Individual Assignment:
- Make an in-circuit programmer by milling and stuffing the PCB then testing it.
Group Assignment:
- Characterize the design rules for your PCB production process: document feeds, speeds, plunge rate, depth of cut (traces and outline) and tooling. For the group assignment, please visit this link.
Individual Assignment¶
Schematic¶
This week’s task was to fabricate and program FabTinyISP. I used the below Files from the Fab Academy website:
Trace file:
Outline file:
First step was to prepare files by using FabModules to convert from .png to .rml - This step is important because milling machines only read files with .rml extensions [Red line markup language file].
I first uploaded the image as a .png file and converted the file as follows:
-
selected the milling machine I will be using (Roland mill) as the output
-
Then I selected the trace process - this part is where we choose what we are processing (traces or outlines). I will be doing this step twice, the below image is of the traces (1/64) which refers to the trace milling bit size.
-
Finally, I changed the output machine on the left bar to SRM-20 and changed the X0, Y0, Z0 values to 0 mm.
Calculated the file to get the mill trace:
For the outline, the same settings apply but changed the process to PCB outline (1/32) which refers to the outline milling bit size.
Milling¶
The machine used is Roland SRM 20 machine to mill the FR1 [copper clad Flame Retardant 1]. I unfortunately don’t have pictures of setting up the machine and soldering process. However, below is the process I followed.
The first step is to tape the FR1 on the fiberboard using double sided tape, this ensures the plate is secure and levelled when milling.
To calibrate the machine, I followed the steps below:
-
I then inserted the MDF board in the machine and tightened the screws. There are four screws in total, to ensure an even surface, I tightened the diagonal screws (2 at a time) at the same time.
-
I changed the bit to trace (1/64 inch) first, then once completed, I will switch to the outline bit (1/32). The milling bits I will be using are 1/64 SE 2FL ALTIN COATED milling bit for the traces, and 1/32 SE 2FL ALTIN COATED milling bit for the outlines. When doing this, it’s always important to remember that you should complete the engraving process before cutting. If not, the chip will be released from its place making the engraving process extremely difficult.
-
Using Ronald software Vpanel for SRM-20, I changed and set the coordinates of X and Y to my starting point.
-
To calibrate the Z axis, I lowered the bit closer to the board (it should not be touching the board), manually unscrewed the bit and lowered it to touch the surface lightly, then tightened the bit securely. Doing this ensures the bit will be close enough to the surface for propper engraving without breaking the bit.
-
Once the callibration is set, I hit the cut button. This will open a new window, I uploaded my .rml engraving file and clicked output to launch the machine.
we can then click on the cut button which opens another window. Then the existing operations should be deleted and we should add our traces pattern file in .rml and finally click on output to launch the machine.
- I began the traces milling process first, however, the first try the cut wasn’t deep enough:
I adjusted the bit and lowered the Z axis when setting the Z origin, it worked:
- I then cut the outline using the (1/32) bit size following the same machine set-up and software process used for tracing.
Soldering¶
I gathered the parts needed and labelled them:
The components used were:
-
ATtiny45
-
2x 1k Ohm Resistors
-
2x 499 Ohm Resistors
-
2x 49 Ohm Resistors
-
100 nano-Farads Capacitor
-
2x 3.3v Zener diode.
-
Red LED + green LED
-
2X3 Pin Holder
To begin the soldering process, I used the below schematic and board image as a reference:
This is my first time working on electronics production and soldering was difficult at first. I made sure my station was well lit and well ventilated to avoid the toxic fumes. I stared with the largest part, ATtiny45, then the 2x3 pinhead and continued with the remaining parts. To know the orientation of components, some have indicators where or at which orientation to connect it tot he board. The Attiny for example has a dot on the first pin that let’s you know its orientation on the board.
One issue I came across was over soldering, or applying too much solder melt. The solution to that was to use the de-soldering wire to remove the extra melt. This is important to use to avoid shot circuits.
below is an image of some of the assembled parts:
The final outcome:
Finally, I used the multimeter to check if there are any short circuits:
Programming¶
I downloaded and installed CrossPack. I tried to check if it was installed by using avr-gcc –version but there was an error message:
I followed this tutorial to set up AVR-GCC toolchain on my Mac. The problem was that CrossPack was not compatible with the new Mac update. My colleague who used Mac suggested I use this tutorial, they faced this issue while working on it previously. Below are the steps to proper installation:
- Install Homebrew
I then opened the terminal in Mac and typed the below:
-
brew tap osx-cross/avr
-
ruby -e “$(curl -fsSL https://raw.githubusercontent.com/ Homebrew/install/master/install)” < /dev/null 2> /dev/nul
-
brew install binutils
-
brew install gcc
-
brew tap osx-cross/avr && brew install avr-gcc
-
ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”
-
brew install avrdude
I then restarted terminal and typed avr-gcc –version again to confirm installation and Make -v to ensure the make command is working:
The final step is to extract the zip file with the source code, to do so I selected the directory I wanted to save my file in and typed make in terminal and a .hex. file was created.
Activating the programmer¶
I used a hub to connect to my laptop because the USB port in my computer is USB 3 and FabISP only works with USB 2. I chose the directory where the .hex. file is saved and ran the make flash in terminal so I can connect the FabISP to my laptop. This step uploads the program (.hex file) on the microcontroller via the ISP.
I then ran make fuses to program the fuses on the microcontroller chip. I then checked if my Mac recognised the FabISP in Mac’s system report. The final step is to run the make rstdisbl, this will blow the reset fuse and after doing this I will not be able to reprogram the board in the future.
It worked!