WEEK5: ELECTRONICS PRODUCTION
ASSIGNMENTS:
- Make an in-circuit programmer by milling the PCB. Then optionally trying other processes with ATtiny 45 or ATtiny44.
Group assignment
- Characterize the specifications of your PCB production process
LEARNING AND EXPLORING PCB MILLING MACHINE
- To start with this week, we need to make our own ISP by milling PCB board, so its very essential to learn how to mill pcb board. So we started with group to explore this machine.
- Work flow I have identified for micro milling machine is that one has to choose right milling bit based on material thickness, bed should be leveled with uniform height, importing right PNG file (for tracing or cutting), setting tuned cutting depth, overlap, cutting speed and error value, using different bits for cutting and tracing and set right height when changing bit.
- Detailed description how we experimented with different parameter values and learning outcome has been described here as Group assignment work
MAKING IN SYSTEM PROGRAMMER- FAB TinyISP
- As this was completely new to me I have l started from very basics of ISP, and what is it.
- I have refferred Rapahel's website where I learned a lot to learn fundamentals of this week's work as suggested by Regional mentor Ohaadino haad. Link is here
- I understood here that In system programmer (ISP), one can make either of two MCU(Micro controller unit) which is ATtiny 44 or ATtiny 45.
- I chose to make ISP with ATtiny 45 MCU as my lab didnt have stock ATtiny 44, we ordered from long time but its still in transit or something.
- So, for ATtiny 45 based ISP, I referred Fab Academy turotial for ATtiny ISP.
- Zarec's page was very helpful for me to understand connection overview of ATtiny 45 based ISP.
STEP01: COMPONENTS OF FAB TinyISP
- After getting general idea and introduction what Fab Tiny ISP is, I have listed down components which are going to use for making this In system Programmer.
- This requires 6 resistor i.e 2 pair of 49 Ohm, 1k Ohm and 499 Ohm. Apart from resistor this will need 2 3.3V zener diode, 2 Light emitting diode i.e. Red and Green, 100nF capaciotor, 2*3 Pin header, and ATtiny 45 MCU.
STEP02: DESIGN OF FAB TinyISP (TRACE and CUT)
STEP03: PCB MILLING TO MAKE FAB Tiny ISP
- Milling for this board I have first open linux terminal in laptop which is connected with Modela MDX-20 machine. And I opened Fab module for micro milling.
- First I prepare my board for milling, for this I clean to make sure there is no oild or dust on it. Secondly, I apply double sided tape to stick it on milling machine bed
- Load the trace PNG file in module, and chose milling bit as 1/64th inch.
- Once board is mounted on machine, I changed 1/64th inch milling bit to trace the PCB board.
- After that I have set values of diameter, offset, cut intensity, and cut depth. These parameter we experimented at different values in group work, so now I have actual working values of parameters.
- Moving on, I set X and Y zero value by enetering Xmin and Ymin value in Fab module, and set at corner of PCB board.
- Once ready with this, I generated path and hit "make rml" i.e. Readline Markup Language to start milling.
- After mounting bed I chose 1/64th inch bit and mount it in spindle. I set Z-height by bringing down spindle upto calibrated mark, and touch the tip of bit to board to set z-zero value.
- Here I have used old fab mods to work on modeal MDX-20, but later in coming weeks I have used new fabmodules, documentation of this is done by me here
- After that I have set values of diameter, offset, cut intensity, and cut depth. These parameter we experimented at different values in group work, so now I have actual working values of parameters..
- Moving on, I set X and Y zero value by entering Xmin and Ymin value in Fab module, and set at corner of PCB board.
- Once ready with this, I generated path and hit "make rml" i.e. Readline Markup Language to start milling.
- After trace gets done,I have changed milling bit for cutting and run the machine same way as mentioned above for cutting the TinyISP board from pcb board.
- Once milling got complete, I removed the front cover of machine, clean the bed with brush and after that by vacuum cleaner.
STEP04: COLLECTING COMPONENTS FOR SOLDERING
- Once we have milled board next thing I have to do is to collect all the listed components required to TinyISP.
- As I mentioned earlier in the component list, my lab has stock of all the components required for TinyISP. I have collected all components and arranged it to make it ready for soldering.
STEP05: SOLDERING - MAKE AND LEARN
- This was the first time I was soldering SMD components on PCB. So before starting I have read some tips and tricks which needs to be take care before soldering.
- Also our instructor give some advice and warning for soldering like one should breath out while soldering wire/flux is on soldering iron tip to prevent inhale.
- First of all, I have mounted my Tiny ISP board on soldering stand and arrange it in front of properly so I can easily reach and solder from my chair.
- I used Soldron soldering soldering station with adjustable temperature setting, and soldering wire for soldering SMD components
- To start with, I open Schematic diagram of Fab TinyISP from Brian's website in my laptop for reference to see connections and components.
- Initially I have found very difficult to hold components on pcb board, also I even couldn't able to hold soldering iron in one hand while soldering wire on another.
- After some trail and error I find some base rule for soldering, that is,
- Put component at its place on pcb board by sharp end tweezer,
- Apply solder on soldering iron tip,
- Hold the component with tweezer, and apply solder with soldering iron at one end.
- Ideal time I found to hold soldering iron on board is 4 to 5 second.
- Initially I did very uneven soldering and also apply solder in between the board which I had to remove with desoldering braid.
- For practice and to make programmer and I did soldering on new board with 2*3 pin header, initially I used 3*2 pin header, which placement was very difficult..
- Final ATtiny ISP board ready to test with another programmer.
- Once board is ready with necessary componenet soldered on it, I have test the connections with multimeter, by setting probe on sound mode, so I can here beep once connection establish between two point.
- After all connection gets right I connect TinyISP board with Atmel AVR programmer to check if my board is right or not.
- Atmel AVR is having LED color indication to check board connection and functionality checking.
- Different color indication significance are as below, take from Atmel AVR website
- At first check I have got Orange blinking, that means reversed target cable, or connection is loose at some points.
- I went back and check my circuit at each point.
- After checking soldering at each connection and I did re-soldering at legs of IC which I thought might be problem.
- But still it was showing Orange LED, after analysing I got to know that there is one jumber connection of header which connect it with Vcc in pcb board, which is kept to program another, I didnt solder it at first.
- I apply soldering there and check with Atmle AVR MK2.
- And yes! Finally I got Green LED, which means my ISP is ready to program!
PROGRAMMING FAB TinyISP BOARD
- Now in order to program my ISP, I will need one functional programmer.
- At my Lab we didnt have ATtiny based programmer, so we use Atmel AVR MK2 programmer, which comes in blue translucent box.
- Thid programmer has one USB cable and 6 pin to 10 pin converter attached to it, so one has to connect 6 pin header of TinyISP to header 6 pin female header of AVR programmer.
- Apart from programmer we need one computer system with necessary firmware. I chose to program with Linux based system.
- So, in general to program my Tiny ISP I should be ready with AVR MK2 programmer with 6 pin header converter and usb cable, linux based computer system, and Fab TinyISP board.
A)
- Now first step is to install firmware i my computer by typing below line in linux Terminal: sudo apt install avrdude gcc-avr avr-libc make
- Firmware source code files can be dowloaded from this link
- Once downloaded this firmware, extract this in one folder in system
B)
- Now, next thing I have to do is open my terminal and cd into source code folder
- Here I have to run make, this will produce .hex file which will be programmed into ATtiny 45.
C)
- Next is update makefile with USB name, for this, run gedit in terminal, open makefile in your firmware folder, edit the name usbtiny to avrisp2. And save the file.
- Because we are using AVR programmer to program our board..
D)
- Next is to run make flash, this will erase target board, and program its flash memory with content of .hex file which we produced earlier
E)
- If all goes right, then run make fuses, this will set up all fuses except one which disable reset pin.
- If error comes in this step use sudo dmesg -c to analyse error.
F)
- After fuses completes successfully, we should remove AVR and our TinyISP from system, and insert TinyISP in USB 2.0 port of the system.
- In terminal run lsusb, if you get "Multiple Vendors USBtiny" device, it is being successfully programmed.
- I didnt get this in first time, I went back and check my connection, connection in ATtiny 45 was not proper, so I tried to de-solder MCU and replaced it, but it didnt work. So, I made another ISP by milling the board and solder it again with maximum possible care.
- This time I cross checked twice with multimeter for all connection, once it got okay, I proceed for programming.
- Any Yes! this time USB gets detected at the end.
G)
- Final step is to turn board's reset pin to GPIO pin to convert it permanently into programmer. Before doing this one should verify two times because after that we cant program our TinyISP.
- To execute this one should run rstdisbl, this will fuses all the pins.
- Once done, remove jumper bridge solder from ATtiny45 to use as programmer to program another such board.
H) PROGRAMMING another board with FABISP
LEARNING CONCLUSION and ORIGINAL FILES
- PCB micro milling machine gives best output under perfect tuning of cut depth, overlap and milling bit height based on board flatness.
- I have learned clearly in this week's work that normal wire soldering is not same as SMD component soldering, it require strategy and attention. Temperature, time and right hand movement achieves right results.
- Programming requires perfect connection establishment of components, mainly of resistors, diode, mcu and header.
- Original files of week 5 are here as package.
INDIVIDUAL CONTRIBUTION TO GROUP WORK
- As electronics was complete new to all of us at my fablab class, we all worked in a group to learn about milling machine and how to operate it.
- We started with some tutorial on youtube such as Adam Harris youtube videos.
- So, for experimental miling we have used board of local instructor Rudrapalsinh.
- I played major role to set tracing and cutting parameters.
- For 1.6 mm thick FR-4 copper board we have used speed 4mm/sec, overlap 0.5 and error 0. For cutting we have used speed 2 mm/sec.
- At this stage we have used old fab modules, but later throughout the course we have used new mods online.
- For this week I also took responsibility to document the group work.
For detailed documentation of development of library of various material please refer our group work website by clicking here
Go to Week 6
Go to Weekly work page