Tutorials
Teaching Materials
We tried milling test pattern offered in fabacademy official page (link) and found out the capacity of our environment.
For the line thickness, 0.22mm was the minimum thickness that our milling machine (with best condition) can mill.
0.4mm was the minimum for the gap between lines. (as the diameter of the bit used was 1/64 inch = 0.396875mm)
See more info on group page.
Ensuring flat surface in the beginning is significantly important to get accuracy on milling. To do this, you first need to slightly shave the top of the wood.
Procedure is covered in group page, also on this article below.
Get Fab ISP board design data from Archive Fabacademy 2018 week5
hello.ISP.44.res.cad
go to mods
Programms > open server programm > SRM-20 > PCB
Read png > select png
modules > file > save
connect to “Roland SRM-20 milling machine”
->click output then click input in save file
Roland SRM-20 milling machine > origin
set x, y, z all to 0.
mill raster 2D > calculate
rml file will be saved automaticaly
open exported rml and see last line.
If the line in the end of exported rml looked like this, it is an error try again.
PA;PA;!PZ0,NaN;PUNaN,NaN;!MC0;
Change following setting.
set PCB defaults >
Open Vpanel for SRM-20
R1: Resistance 1k ohm (1000) x 1
R2: Resistance 499 ohm (4990) x 1
R3,R4: Resistance 100 ohm (101) x 2
R5: Resistance 10k ohm (1002) x 1
C1: Capacitor 1uF x 1
D1,D2: Zener diode 3.3V x 2
IC1: Attiny 44 x 1
20MHz: Resonator 20MHz x 1
SJ1,SJ2: Wire x 2
J1 ISP: Pin header 2x3 x 1
J2 USB: USB jack
T18-B2 (2mm) : USB jack and 2x3pin header
T18-C1 (1mm) : other parts
Coat with flux
First of all, coat your board with flux right away before its surface get oxidized. Let it dry for a hour.
Start placing and soldering from USB socket
It will be difficult to place after you have other parts on the board as they block the soldering iron.
Solder SPU
*Careful with the direction! Small dot indicates pin1 (which is VCC pin in Attiny44A refer to the datasheet)
Solder resisters, capacitors and diodes
Place crystal
Place 2x3pin header
Follow the instruction in the tutorial above.
In terminal, go to unziped firmware directory.
for example:
$ cd ~/Desktop/fabISP_mac.0.8.2_firmware
Make changes on makefile (you can find it in firmware you downloaded) depends on which programmer you are going to use: other programmer, other FabISP programmer or Arduino.
The line in makefile you need to edit.
#AVRDUDE = avrdude -c usbtiny -p $(DEVICE) # edit this line for your programmer
AVRDUDE = avrdude -c avrisp2 -P usb -p $(DEVICE) # edit this line for your programmer
if you are using arduino:
AVRDUDE = avrdude -c stk500v1 -b19200 -P /dev/cu.usbmodem1421 -p $(DEVICE)
Compile firmware
$ make clean
If successful, you will get following response…
naitoukainoMacBook-Pro:kai-naito kai$ cd ~/desktop/firmware
$ make clean
rm -f main.hex main.lst main.obj main.cof main.list main.map main.eep.hex
main.elf *.o usbdrv/*.o main.s usbdrv/oddebug.s usbdrv/usbdrv.s
Then,
$ make hex
You will get this if the process succeeded.
naitoukainoMacBook-Pro:firmware kai$ make hex
avr-gcc -Wall -Os -DF_CPU=20000000 -Iusbdrv -I. -DDEBUG_LEVEL=0
-mmcu=attiny44 -c usbdrv/usbdrv.c -o usbdrv/usbdrv.o
avr-gcc -Wall -Os -DF_CPU=20000000 -Iusbdrv -I. -DDEBUG_LEVEL=0
-mmcu=attiny44 -x assembler-with-cpp -c usbdrv/usbdrvasm.S -o usbdrv/usbdrvasm.o
avr-gcc -Wall -Os -DF_CPU=20000000 -Iusbdrv -I. -DDEBUG_LEVEL=0
-mmcu=attiny44 -c usbdrv/oddebug.c -o usbdrv/oddebug.o
avr-gcc -Wall -Os -DF_CPU=20000000 -Iusbdrv -I. -DDEBUG_LEVEL=0
-mmcu=attiny44 -c main.c -o main.o
avr-gcc -Wall -Os -DF_CPU=20000000 -Iusbdrv -I. -DDEBUG_LEVEL=0
-mmcu=attiny44 -o main.elf usbdrv/usbdrv.o usbdrv/usbdrvasm.o usbdrv/oddebug.o
main.o
rm -f main.hex main.eep.hex
avr-objcopy -j .text -j .data -O ihex main.elf main.hex
avr-size main.hex
text data bss dec hex filename
0 2020 0 2020 7e4 main.hex
Type
$ make fuse
on terminal, then you will get
You should get this feedback from the system
naitoukainoMacBook-Pro:firmware kai$ sudo make fuse
avrdude -c usbtiny -p attiny44 -U hfuse:w:0xDF:m -U lfuse:w:0xFF:m
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e9207
avrdude: reading input file "0xDF"
avrdude: writing hfuse (1 bytes):
Writing | ################################################## | 100% 0.00s
avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xDF:
avrdude: load data hfuse data from input file 0xDF:
avrdude: input file 0xDF contains 1 bytes
avrdude: reading on-chip hfuse data:
Reading | ################################################## | 100% 0.00s
avrdude: verifying ...
avrdude: 1 bytes of hfuse verified
avrdude: reading input file "0xFF"
avrdude: writing lfuse (1 bytes):
Writing | ################################################## | 100% 0.01s
avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xFF:
avrdude: load data lfuse data from input file 0xFF:
avrdude: input file 0xFF contains 1 bytes
avrdude: reading on-chip lfuse data:
Reading | ################################################## | 100% 0.00s
avrdude: verifying ...
avrdude: 1 bytes of lfuse verified
avrdude: safemode: Fuses OK
avrdude done. Thank you.
if successful.
$ make program
You should get following respond.
naitoukainoMacBook-Pro:firmware kai$ sudo make program
password:
avrdude -c usbtiny -p attiny44 -U flash:w:main.hex:i
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e9207
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "main.hex"
avrdude: writing flash (2020 bytes):
Writing | ################################################## | 100% 5.68s
avrdude: 2020 bytes of flash written
avrdude: verifying flash memory against main.hex:
avrdude: load data flash data from input file main.hex:
avrdude: input file main.hex contains 2020 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 3.36s
avrdude: verifying ...
avrdude: 2020 bytes of flash verified
avrdude: safemode: Fuses OK
avrdude done. Thank you.
avrdude -c usbtiny -p attiny44 -U hfuse:w:0xDF:m -U lfuse:w:0xFF:m
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e9207
avrdude: reading input file "0xDF"
avrdude: writing hfuse (1 bytes):
Writing | ################################################## | 100% 0.00s
avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xDF:
avrdude: load data hfuse data from input file 0xDF:
avrdude: input file 0xDF contains 1 bytes
avrdude: reading on-chip hfuse data:
Reading | ################################################## | 100% 0.00s
avrdude: verifying ...
avrdude: 1 bytes of hfuse verified
avrdude: reading input file "0xFF"
avrdude: writing lfuse (1 bytes):
Writing | ################################################## | 100% 0.00s
avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xFF:
avrdude: load data lfuse data from input file 0xFF:
avrdude: input file 0xFF contains 1 bytes
avrdude: reading on-chip lfuse data:
Reading | ################################################## | 100% 0.00s
avrdude: verifying ...
avrdude: 1 bytes of lfuse verified
avrdude: safemode: Fuses OK
avrdude done. Thank you.
Done!
You need to remove jumper wires to enable the board as a programmer. Take away 0 ohm resister and the solder bridge indicated as “SJ” in the board diagram.
Now FabISP could be used as a programmer.
Check whether FabISP is recognized in MacOS.
Mac > About this Mac > System report
You can see FabISP under USB port if your FabISP is recognized.
The first time I tried $ make hex
, I got this
avr-gcc -Wall -Os -DF_CPU=20000000 -Iusbdrv -I. -DDEBUG_LEVEL=0 -mmcu=attiny44 -c usbdrv/usbdrv.c -o usbdrv/usbdrv.o
make: avr-gcc: No such file or directory
make: *** [usbdrv/usbdrv.o] Error 1
I succeeded to get rid of this by establishing path through.
Here is useful reference for making path…Qiita
Make 6pin head connector we will be using from next week. Will use it to wire Fab ISP(programmer) and IC to write program in.
Insert wires in the right position.
Squeeze it with a cramp to fix wire.
Put a cap on to bend wire 180deg.
Done.