>> Week 04, Feb 19: Electronics production
Make the FabISP in-circuit programmer
> About ISP (in-system programmer), FabISP
> Materials List (Including equipment)
> PCB Fabrication (Method Machining)
> Assembly the components (Surface-mount)
> Programing (AVRISP2 programer)
About ISP (in-system programmer), FabISP
scroll upFor some information about "In-system programming", click on the following link: ISP
About FabISP: "The FabISP is an in-system programmer for AVR microcontrollers, designed for production within a FabLab. That is, it allows you to program the microcontrollers on other boards you make, using nothing but a USB cable and 6-pin IDC to 6-pin IDC cable. It's based on the USBtiny and V-USB firmwares, which allow the ATtiny44 to perform USB communication in software. Programming can be done through avrdude." David A. Mellis in http://fab.cba.mit.edu/content/projects/fabisp/
In this assignment, I made "hello.ISP.44" with crystal, the source files can be found in the assignment instructions: http://academy.cba.mit.edu/classes/electronics_production/index.html
Materials List (Including equipment)
Electronic Components List:
x1 | IC1 | ATtiny44A-SSU - IC MCU 8BIT 4KB Flash 14SOIC | |
x1 | 20 MHz | Crystal 20MHz 8pF SMD | |
x1 | J2 USB | Connector Receptacle Mini USB2.0 5 contacts | |
x1 | J1 | Male Pin 3x2 - Bergstik Headers 2X3P UNSHRD HDR 30 microinch gold | |
x2 | D1,D2 | Diode Zener 3.3V 500mW SOD123 | |
x2 | C2, C3 | Capacitor ceramic 10pF 50v NP0 1206 | |
x1 | C1 | Capacitor ceramic 1µF 50v X7R 10% 1206- | |
x1 | R1 | Resistor 1kΩ - RES 1.00K OHM 1-4W 1% 1206 SMD- | |
x1 | R2 | Resistor 499Ω - RES 499 OHM 1-4W 1% 1206 SMD- | |
x2 | R3, R4 | Resistor 100Ω - RES 100 OHM 1-4W 1% 1206 SMD | |
x1 | R5 | Resistor 10kΩ - RES 10.0K OHM 1-4W 1% 1206 SMD |
Others materials:
- Dual side adhesive tape
- Machineable PCB, Single side circuit board, FR1
- Solder wire
- Paste
Equipment:
- MDX-20 milling machine
- Solid Carbide End Mills: 0.0156" DIA 2FL SE BALLNOSE AlTiN 1/64
- Celestron 44302 Handheld Digital Microscope
- Fan Fume Absorber Benchtop
- Tweezer Curved Precision TIP
- Soldering Station, TIP Single Flat 0.015"
- Computer with SO Ubuntu
- Programmer AVR in System
PCB Fabrication (Method machining)
scroll upI use milling machine: Roland MDX-20 | |
Use: End mill, size 1/64 Advertencia: La Fresa de 1/64 es fragil, hay que tener mucho cuidado al momento de calibrar la Modela y al momento poner los parametros en Fab Modules |
|
Fix the PCB with the help of double-sided tape | |
Using Adobe Photoshop (or any other software), the circuit can be customized. Then, using "fab modules", proceed with milling. | |
Was the first time I used the milling machine and I did some testing with "fab modules". | |
I used the following parameters: Diameter 0.2; Offsets 1.5; Overlap 0.4, 2D threshold 0.5; error 0.001; 2Dz -0.2; speed 4; jog 1.0 | |
PCB final | |
Finally, to use: End mill, size 1/32. for sending the job to cut out the board | |
Assembly the components (Surface-mount)
All electronic components should be ready to be used. | |
Given the size of the electronic components, you may need a magnifying glass or microscope to identify them correctly | |
Enable welding station | |
With patience and good cheer to weld | |
Finished | |
Programming (AVRISP2 programer)
I used AVRISP2 programer
Download drivers
Then, begin the programming steps in the Ubuntu terminal:
root@tecsup-N56VZ:~# apt-get install flex byacc bison gcc libusb-dev avrdude
Leyendo lista de paquetes... Hecho.....
root@tecsup-N56VZ:~# apt-get install gcc-avr
Leyendo lista de paquetes... Hecho......
root@tecsup-N56VZ:~# apt-get install avr-libc
Leyendo lista de paquetes... Hecho......
root@tecsup-N56VZ:~# apt-get install libc6-dev
Leyendo lista de paquetes... Hecho.......
Programing FabISP
We are ready to connect to AVRISP Programming and computer. Then in the terminal of Ubuntu start the steps for programming.
root@tecsup-N56VZ:~/Descargas/firmware/fabISP_mac.0.8.2_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
root@tecsup-N56VZ:~/Descargas/firmware/fabISP_mac.0.8.2_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.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
root@tecsup-N56VZ:~/Descargas/firmware/fabISP_mac.0.8.2_firmware# make fuse
avrdude -c avrisp2 -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.00s
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.
root@tecsup-N56VZ:~/Descargas/firmware/fabISP_mac.0.8.2_firmware# make program
avrdude -c avrisp2 -P usb -p attiny44 -U flash:w:main.hex:i
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
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.70s
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.58s
avrdude: verifying ...
avrdude: 2020 bytes of flash verified
avrdude: safemode: Fuses OK
avrdude done. Thank you.
avrdude -c avrisp2 -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.00s
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.
root@tecsup-N56VZ:~/Descargas/firmware/fabISP_mac.0.8.2_firmware# cd..
cd..: command not found
root@tecsup-N56VZ:~/Descargas/firmware/fabISP_mac.0.8.2_firmware# cd ..
root@tecsup-N56VZ:~/Descargas/firmware# cd ..
root@tecsup-N56VZ:~/Descargas# cd ..
root@tecsup-N56VZ:~# cd ..
root@tecsup-N56VZ:/home# cd ..
root@tecsup-N56VZ:/# lsusb
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 003 Device 007: ID 03eb:2104 Atmel Corp. AVR ISP mkII
Bus 003 Device 014: ID 1781:0c9f Multiple Vendors USBtiny
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 1bcf:2883 Sunplus Innovation Technology Inc.
Finally remove the 0-Ohm resistors (they could be removed with the desoldering wire)
Note:
For programming, I followed the steps included in the Toshiro Tabuchi's tutorial.
http://fabacademy.org/archives/2013/students/tabuchi.toshiro/assignments/assign04.html