Find out the definitons of all new-looking terms, and full-forms of abbrevations.
Understand the milling process.
Design a purpose-ful board.
Mill the PCB
Solder and attach the electrical components
Take care of the programming part, thereafter
Group Assignment
Tools:
Modela MDX mill
Copper-clad board
Fab Mods
1/64 and 1/32 mill
Soldering iron
Multimeter
Flux clay
Copper Braid
5. Definitions, on-the-go:
Eutectic: Eutectic mixture(EM) is defined as a mixture of more than one substance that does not interact individually to create a new entity but in a particular ratio that exhibits a lower range of melting point than it had in individual.
ROHS: Restriction of the Use of Hazardous Substances --> Orginally used in a EC directive.
FTDI: Future Technolgy Devices International Ltd, they make chips and drivers that implement USB protocol stack for the purpose of serial transmissions.
ISP: In-System Programming, also known as In-Circuit Programming, serial programming, allows programming and re-programming of microcontrollers, EEPROMs already soldered on a target PCB.
EEPROM: It stands for electrically erasable programmable read-only memory and is a type of non-volatile memory used in computers, integrated in microcontrollers
JTAG: JTAG stands for Joint Test Access Group and is an association that was formed initially to derive a specification to test connectivity between chips in a PCB.
Colloquially JTAG refers to the debug and programming dongle that is used to communicate to a microcontroller during development/hacking.
UPDI: Unified Program and Debug Interface
GPIO: General Purpose of Input-Output
MISO: Master In Slave Out
HEX File: A HEX file is a hexadecimal source file typically used by programmable logic devices, such as microcontrollers in remote controls, office machines, and automobile engine control systems. It contains settings, configuration information, or other data saved in a hexadecimal format.
Note: Most helpful videos I could find on Bootloading, ISP, UPDI, JTAG: Video 1 & Video 2
6. Modela MDX milling machine:
7. Our lab is equipped with Roland Modela MDX-20 milling machine. To put it simply, it is composed of a base platform, which includes
the bed, which can be solely moved in y-direction, and the carriage which holds the mill, moves the mill in x-direction. The core working
mechanism is same as any other plotter, nothing fancy there.
8. The bulk of the work is done using the mills of two sizes 1/64 and 1/32:
From Sir Jogin Francis's Documentation
9. Tracing the PCB:
10. I never milled a PCB before, nor did I used a PCB milling machine. But I always wanted designing a circuit and etch a PCB.
I am fabricating FabTinyISP by Bryan. Here are the related files:
Click on the image to download.
Click on the image to download.
Part 1: Setting up the Modela MDX:
Unscrew the sacrifical layer. Take a required amount of copper plate. Clean it up using adhesive tapes.
Stick the cleaned copper plate on the unscrewed sacrificial layer, and screw it back onto the machine.
Change the mill to an appropriate one - 1/64 for tracing the FabTinyISP and 1/32 for cutting it out. Untighten it using a hex key, and let it drop onto your fingers. And screw the wanted one back in.
Set the z-height accordingly.
Turn on the machine and let it go through the origin calibration process.
Part 2: Fab Mods
Access the computer with fab mods installed locally, and connect it to the machine using USB
Start the local server.
Open Mods > right click > programs > open program > MDX mill > PCB
Select the MDX milling program.
Load the PNG image.
In the 'set PCB defaults' module choose the appropriate mill size - For tracing 1/64 and for cutting 1/32. 1 pass for tracing and 3 passes for cutting.
Set the tool diametrer to 0.4. Cut depth to 0.1016, and max depth to 0.1016, which would do the work in 1 pass. When you're going to choose 1/32 for cutting, the machine will have to do 3 passes, because the max depth would be 3 times the cut depth.
Offset number is the number of lines you would want the machine to cut away outside the traces. I chose it to be 4, and 'tis recommended.
Set the origin to the intended position using Roland MDX/ iModela module
Now calculate the toolpath
Go to WebSocket pyserial module. Use the defaults. Open the port. Open the socket. Send File. Let it unfold.
Remember the origin.
Part 3: Cutting out the PCB.
Follow the same process as mentioned above to change the mill to 1/32.
Load the cut PNG image.
Reflect these new changes in the set PCB defaults module, and click on calculate.
Use the defaults for Max Depth and Cut Depth. DPI should be 1000. Offset number is inconsequential here.
Set the origins to the same exact co-ordinates you used for tracing the PCB.
Send the file.
The machine will do 3 passes
Pluck the PCB out.
There it was my first PCB.
11. Soldering:
First and foremost, we have to make a document regarding the components we would need. These were the ones:
1x ATtiny45 or ATtiny85
2x 499Ω resistors
2x 49Ω resistors
2x 3.3v zener diodes
1x red LED
1x green LED
1x 100nF capacitor
1x 2x3 pin header
Now I do have some experience in soldering, but never as full-scale as this.
First, using multimeter in the connectivity mode, check if the continuity and discontinuity is working as intended.
Start the soldering process. Choose a soldering iron with a sharp tip, clean it, and melt some iron on to the PCB to hold the component in place
Place the component, and now completely solder it.
Be mindful of the polarity of LED, ATtiny45, and zener diodes.
After some careful study of the schematic - here, and soldering and de-soldering many a times, I managed to solder all the components.
Finally, check for any unintended connections cuz of excessive solder.
Paste some tape on the bottom of the PCB or put some solder on the top of the PCB, so as to make it fit the USB slot.
If you did it all right, and followed the schematic provided by Brian Mayton, avoided unnecessary connections, took care of the polarity, the red LED should be glowing gloriously by now.
12. Checking:
After a fruitful discussion with my instructor Jogin Francis regarding programmers, and programmees, we flashed my device to check if it's being detected by devices.
It was.
Here we see the PCB being recognized as the USB by the computer.
Note: But I have to note that I did not actively engage in this process. Therefore, I decided to go through the process all over again.
And maybe program the PCBs of my friends using my programmer.
13. Programming:
Download AVRDUDE - 'Tis a utility to download/upload/manipulate the ROM and EEPROM contents of a AVR microcontroller using the ISP technique
Download the firmware source code and extract it.
Go to that directory, and run make
This will generate the hex file
Now, take a pre-existing programmer, take a USB extension cable, plug one end into a power source, plug the programmer into the other end.
Using a jumper cable connect the ISP header of the programmer to the programmee.
Both, programmer's LED and programmee's LED, should be blinking.
Run make flash.
This will erase the target chip, and program its flash memory with the contents of the .hex file you built before.
Now, run make fuses. This will set all the fuses in the microcontroller,
To answer the follow-on question of "are they physical fuses or are they software programmable", the answer is neither. All modern Atmel and Microchip microcontrollers store the "fuse bits" in nonvolatile memory cells -- physically the same as SLC flash cells.
When you use a chip programmer to download a new program into the microcontroller program Flash memory, it also erases and re-programs those fuse bit memory cells.
However, the software running on a microcontroller cannot change the fuse bits -- not even if you are using a "self-programming" microcontroller -- i.e., a microcontroller that allows bootloader software running on it to re-program its own program flash memory.
Some Atmel processors (especially the low-power ones) allow software running on them to change the clock source on-the-fly by writing to some configuration register -- but whenever they are reset (or the power goes away and then comes back), they go back to using the clock source specified in the fuse bits. The only way to change those fuse bits is with a chip programmer.
Decades ago, those configuration bits (and the program memory as well) were actually stored in fuses -- a bunch of thin strands of metal; appropriate ones were selectively "blown" by applying 12 V until the metal melted and disconnected and the bit became non-conductive. As you have probably figured out, that make the microprocessor one-time programmable (OTP) -- the only way to un-blow a fuse was to throw the entire microprocessor away, pull out a fresh new one, and start all over.
We still call those configuration bits "fuse bits" for historical reason -- much like we often call the program memory "ROM" (even though it's not really "read-only" on a self-programming microcontroller), and we have "solid-state relays" that have no moving parts, and "telephone companies" that spend only a small fraction of their time actually dealing with sound, and "computers" that spend most of their time displaying pictures and playing music rather than, you know, computing numbers
Now pluck your USB out, and insert it into a computer, and see if it recognizes the device. You can use lsusb command in linux terminal to ascertain that.
If it is being recongnized, good.
Now you can set the fuse, which permanently seals the fate of your USB as programmer on it's own right, and it can't be altered further. That is called Reset Pin {I stronly recommend going through the above stackexchange link to understand fuses.}. Run make rstdsbl{Tread with caution here. It can't be reset. Run this command only if your device is being recognized as a USB.}
Then, try running make flash again. It should deny you. If it does so, Voila! you have built a programmer.
Now, try using your programmer to program some nascent PCBs.