5. Electronics production¶
Introduction¶
This week I worked on PCB Fabrication and Assembling to build FabTinyISP whish is the a circuit programmer board.

Group assignment:¶
- Characterize the design rules for your PCB production process: document feeds, speeds, plunge rate, depth of cut (traces and outline) and tooling. document your work (in a group or individually)
For the Group Work please check the Group Page for more details.
Individual assignment:¶
- Make an in-circuit programmer by milling and stuffing the PCB, test it, then optionally try other PCB fabrication process.
For this assignment I’ll make FabTinyISP and following the instruction in this link: Building the FabTinyISP
Requirements for this project:¶
Tools:
- Roland SRM-20
- Soldering Iron kit
- Multimeter
Electronics Components :
- 1x 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
PCB Fabrication¶
- Download the below PNG files for the traces from here

- Download the below PNG files for the board outline from here

- Go to http://fabmodules.org to generate the cutting file for the machine.
Board Traces¶
- select image (.png) and upload the traces file

- Select Roland mill (.rml)

- Select PCB traces (1/64)

- Select machine “SRM-20” and set X0,y0 and z0 to 0

- click calculate

- Check the file and click save
Board Outline file¶
- select image (.png) and upload the board outline file

- Select Roland mill (.rml)

- Select PCB outline (1/32)

- Select machine “SRM-20” and set X0,y0 and z0 to 0
- click calculate

- Check the file and click save
Desktop Milling Machine¶
Use the Desktop Milling Machine Roland SRM-20 to cut the PCB
- For making PCB I used fr1 board
- Add double sided tape to the fr1 board and stick to the milling board.

- Before starting install mill bit (1/64) in the machine.

- Start Roland VPanel for SRM-20 software and move X,Y and Z to Home position and set Origin Point.


- Click Cut and upload the trace file (*.rml)
-
Check the traces after finishing the milling
-
Now Change the milling bit to (1/32) and move it to surface of the fr1 board and set Z origin to ZERO.


- Click Cut and upload the outline file (*.rml)
- Check the outline after finishing the cutting.

-
Remove the PCB from the machine and check the traces

PCB Assembling¶
For the PCB Assembling you need the following components:
- 1x 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
-
Use A4 paper and double sided tape to stick the components.

- Switch on solder iron and set temperature to 330 degree

- For soldering I follow this nice SMD Soldering Tutorial
- Start adding solder to one side of the component part

- Solder one side of the component

- Now solder the other side of the component

- Repeat the same steps for other components

- For the Attiny85 solder one leg first and then solder the other legs

- Attiny85 is hard to solder and I have soldered two legs together because they are very close to each other. To fix this issue I used solder wick to remove the solder.
-
Use multimeter to check connectivity and if there any short circuit

-
Use Knife cutter to remover extra copper

- Plug the USB Tinny board to USB port and check the power light

Programing with Arduino¶
For programing the FabTinyISP I used Arduino Uno as programmer and follow the instruction from the following tutorial Programming ATtiny85 with Arduino Uno.
- I connect ISP header of FabTinyISP to Arduino Uno
| Arduino UNO Pin # | FabTinyISP ISP Port |
|---|---|
| 12 | 1-MISO |
| 5V | 2-VCC |
| 13 | 3-SCK |
| 11 | 4-MOSI |
| 10 | 5-RST |
| GND | 6-GND |

https://en.wikipedia.org/wiki/In-system_programming
- Add ATtiny boards to Arduino IDE. Open File -> Preferences and in the Additional Boards Manager URLs give this url https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json

- Go to Tools -> Board -> Board Manager, then search for “attiny” and click install

- Go to Tools and chose the Board:”ATiny25/45/85”, Processor: “ATiny85, Clock:”Internal 8 MHz”:

- Create new programing sketch in in Arduino IDE
void setup() {
pinMode(2, OUTPUT);
}
void loop() {
digitalWrite(2, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(2, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
- Go to Sketch and clink on Upload Using Programmer

- Wait for Done Uploading message and check the board
Programming the FabISP¶
To program the ISP board I follow this tutorial as guide and Meha documentation
-
Install Git for Window
-
Install Atmel GNU Toolchain for Windows
- Install GNU Make
-
Download avrdude and extract to c:\Program File

-
Download avrdude-6.3-mingw32.zip and replace the files in “C:\Program Files\avrdude”

-
Download and install WinAVR

-
Update PATH

-
In order to program the attiny you need another USBtinySPI board and ISP cable
-
Download and lunch Zadig to install the driver

-
Download and extract the firmware to desktop
-
I’m using ATtiny85 for this board so I have to edit the MCU in the make file of the firmware and make sure it’s attiny85

-
Open Git bash and change the directory to firmware folder.

- Run the following commands and check if there is no error.
Make -v
Avr-gcc –version
avrdude -c usbtiny -p t85

- make

- make flash

- make fuse

-
make rstdisbl
-
Now plug the FabTinyISP and open Device Manager and you should find USBtinyISP

-
Open Arduino IDE, Go to Tools ==>Programmer==>USBtinyISP

-
Go to Sketch and clink on Upload Using Programmer

- Wait for Done Uploading message and check the board