Fab Academy

Miguel Lourenco

 


 
 
 

 

Electronics Production

Finaly, we received milling tools and made the PCB for FabISP with modela milling machine.

 

Had some problems at first, specially with milling cutting tools and adjustments, but are already solved.

 

Surface-mount SMD components is more difficult than it looks, I started by soldering small regions where need to put components, more precisely their pins.

 

After that, I started soldering the small components, and ends to soldering mini USB socket.

 

We shoud have carefully by not overheat the components, specially integrated circuits, so don't stay much time to melting the soldering alloy.

 

After finishing hardware stutff, we should programing our FabISP, well, that's a problem, we don't have got another programmer but an arduino.

 

I used an arduino duemilanove (atmega 328) as an ISP programmer (arduino ISP), followed instrutions by here:

http://hlt.media.mit.edu/?p=1695

http://hlt.media.mit.edu/?p=1706

 

So, I had programmed de ATiny44 with some exemples from arduino software with success.

 

I tried to transfer the FabISP firmware to my "FabISP" with Ubuntu 12.04, using ardunio as ISP programmer but had some problems to reconize the port. Arduino IDE and 1.0.3 software reconize arduino hardware (both installed in Linux) but, when tried to make all the necessary steps (make clean, make hex, make fuse, make program) using command line, it stops in make fuse command.

 

I added some LEDs to arduino programmer. The green LED is used to signal the arduino as an ISP programmer, the yellow LED flashes when data is sent to the microcontroller being programmed and red is used to signal "problems".

 

 

And yes, I changed makefile for arduino ISP and moved #, but I did not used sudo command for make fuse (maybe it is the cause???).

 

 

 

After all, I get an AVRisp mk II, edited the makefile file and programmed my fabisp successfully (fix, before, a bad contact detected).

 

Ubuntu 12.04

estg@estg-A7C:~$ cd Desktop
estg@estg-A7C:~/Desktop$ cd firmware
estg@estg-A7C:~/Desktop/firmware$ make clean
rm -f main.hexmain.lst main.obj main.cofmain.listmain.mapmain.eep.hexmain.elf *.o usbdrv/*.o main.susbdrv/oddebug.susbdrv/usbdrv.s
estg@estg-A7C:~/Desktop/firmware$ 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.elfusbdrv/usbdrv.ousbdrv/usbdrvasm.ousbdrv/oddebug.omain.o
rm -f main.hexmain.eep.hex
avr-objcopy -j .text -j .data -O ihexmain.elfmain.hex
avr-sizemain.hex
text      data    bss      dec          hex   filename
      0       2020        0       2020      7e4   main.hex
estg@estg-A7C:~/Desktop/firmware$ sudo make fuse
[sudo] password for estg:
avrdude -c avrispmkII -P usb -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.

estg@estg-A7C:~/Desktop/firmware$ sudo make program
avrdude -c avrispmkII -P usb -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% 0.71s

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% 0.60s

avrdude: verifying ...
avrdude: 2020 bytes of flash verified

avrdude: safemode: Fuses OK

avrdude done.  Thank you.

avrdude -c avrispmkII -P usb -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.

estg@estg-A7C:~/Desktop/firmware$

Removed shunt SJ1 and it is ready!

 



PCB soldering stage 1

 

PCB soldering stage 2

 

FabISP programming with arduino board

 

FabISP receiving data trough arduino

 

 

 

 

 

 

 

 

 

Programming FabISP with AVRisp mk II