Exercise 04 - Electronics Production

Homework Assignment

Group Assignment: characterize the specifications of your PCB production process
Individual Assignment: make an in-circuit programmer by milling the PCB, then optionally trying other processes

Group Assignment

In order to characterize the PCB production process for our machine, the Othermill, we downloaded and used the characterization .png file that Neil showed in last week's class lecture. We cut it with a 1/32" tool. The pictures are below.


The Othermill cutting the characterization .png

Here is the completed test cut of the characterization for the Othermill

As you can see, the vias start to be really clear and defined on the 4th one, which is 0.004", and all the pads on the top are clear and defined. On the Bantam Tools website, the surface mount package capabilities for the Othermill Pro, are outlined on Bantam Tools Surface Mount Package Capabilities.

Individual Assignment

Tutorials

I was fairly nervous going into this week's assignment as I know NOTHING about printed circuit boards. However, I found some pretty good resources that helped alleviate my nerves. I had to go read the BASICS about this, because I did not even know what PCB stood for (having been an Environmental Science teacher, I knew about polychlorinated biphenyls, but I had to read up to learn about Printed Circuit Boards.)

  • Sparkfun PCB Basics - as it says, this is a very basic guide but it helped me a lot. I learned a lot of the terminology and the different parts of the PCB.
  • How to Make PCBs on a Desktop CNC Mill - this guide from Bantam Tools, the maker of the Othermill, which is the desktop CNC machine we have in the Charlotte Latin Fab Lab. This guide moved me forward from the basics and helped even more.
  • Everything you Need to Know about Milling PCBs - this guide was comprehensive (but would have been incomprehensible if I had not read the other two first). By the end of reading this I felt comfortable identifying all the parts of the PCB, how to mill the traces, etc. I still don't know what it's all FOR, but at least I know what they ARE.
  • Charles Fracchia's WONDERFUL YouTube series Tutorial for Milling Circuits - this tutorial was irreplaceable, even though Charles used a different machine (the Modela vs our Othermill), the concepts were almost identical and I was able to walk into our lab feeling like I really knew what I was about to do.
  • Milling the PCB

    Since it was strongly suggested, I decided to use/follow Brian's Excellent Tutorial on Building the FabTinyISP. I read through it repeatedly and then downloaded the two files he provided, the traces and the outline for the PCB. I went to FabModules.org and proceeded to load the traces file into the program. I used the .png file for the input, "Othermill (.nc)" for the output, and "PCB traces (1/64)" for the process.


    The .png file loaded into Fab Modules

    I then pressed calculate to allow it to figure out the tool pathways and saved the file to load into the Othermill.


    Here are the calculated traces

    Now it's time to load the file into the Othermill and make sure the settings and tool for that are correct. I downloaded Bantam Tools for the Othermill onto my computer and loaded the saved .nc file into the Bantam Tools software. I configured all the settings for the 1/64" tool and then realized I had to change the tool.


    Carefully changing the tool to the 1/64" Flat End Mill on the Othermill

    Mapped out toolpaths on the Bantam Tools software for Othermill

    Once I had all the settings configured on the Othermill, it was time to make the magic happen. I sent the file to the Othermill and watched as it began to cut.

    After it cut, I had to load the outline file into Fab Modules and then the Bantam Tools software, exactly as I had done for the traces file. However, this cut was done with the 1/32" tool and I had to change the tool out again before I could do this. This cut went very quickly and was easy compared to the traces.


    The .png file for the outline cutout of the PCB

    Now it's time to remove the PCB from the mill and see how it looks. As far as I can tell, except for a couple of burrs, it looks great.


    Completed, milled PCB!

    Soldering the PCB

    Now it was time to solder. I know, in theory, how to solder, but I didn't have a lot of practical experience. We had some old scrap PCBs lying around and I decided to do a few practice runs before actually trying with my PCB. It went okay... so I decided there was nothing to do but do it. I started soldering from the left side and did all the small surface mount components first, so that I would only have the larger pieces left at the end. I know this goes against the "inside to outside" rule, but for me, I wanted the small pieces done and only the large pieces left at the end.


    All the small components soldered in place

    Soldering the surface mount components in this way worked pretty well. I got the 11 outside tiny pieces soldered and started on the inside pieces, which were the pin header and the ATTiny 45.


    The pin header in place! Everything in but the ATTiny 45.

    I may have made a mistake, as it was kind of difficult to get the ATTiny 45 placed in the midde of the PCB when all the other pieces were in there, but at this point I was committed. I finally got it soldered in place. My classmate, Will, asked if we wanted to test them. I was apprehensive, but I wanted to know if it worked or not sooner rather than later. I plugged it into the USB cable and NO LED. Sarah tried and hers didn't light up either. It was so frustrating! Finally, as we were looking over our work, we realized we hadn't created the solder bridge on the jumper J1. I filled that in and plugged it back into the cable. Success!


    It is ALIVE!!!


    Programming the Programmer
    Again, following Brian's EXCELLENT tutorial, I was able to program the programmer I had made. The first thing I had to do, since I am working on a Mac, was to download CrossPack, which is, according to their website, "a development environment for Atmel’s AVR® microcontrollers running on Apple’s Mac OS X, similar to AVR Studio on Windows. It consists of the GNU compiler suite, a C library for the AVR, the AVRDUDE uploader and several other useful tools." This was needed to make everything work on a Mac and something I forgot to do the first time around and kept getting weird, incomprehensible error messages. Once I downloaded and installed CrossPack, everything worked just fine.

      These are the steps I followed to program my programmer
    1. Download and extract the firmware source code (linked on Brian's page)
    2. Open terminal and change directories to where I saved the firmware source code
    3. Enter the command "run make". This creates the hex file that will be programmed onto the programmer
    4. Check that the hex file was executed correctly
    5. Hook up the programmer to the ISP header and plug in to USB port. The red LED should be lit up. (It was!)
    6. Enter the command "make flash". This will program the contents of the hex file into the programmer's memory and erase what was there previously. Progress bars complete and no error messages!
    7. Enter the command "make fuses". This sets up ALL the fuses except the one that disables the reset pin. That will be done after verifying that the programmer is recognized.
    8. Detach other programmer and attach my programmer to the computer, checking the USB listings to see if it is recognized. (It is!)
    9. Enter the command "make rstdisbl". This will reset the disable bit and means that this programmer cannot be overwritten.
    10. Remove the bridge on the solder jumper (I used solder braid to break the bridge). It's ready to go!


    The programmer hooked up and ready to go


    The hex file being flashed onto the programmer. Green lights are good!


    The programmer is recognized by my computer! (I'm not sure why it says SPI instead of ISP. I suspect a typo in the hex file)

    The text output from my terminal:

    	Last login: Wed May 30 13:05:25 on ttys000
    fmfabianmbp15:~ mary.fabian$ cd mary-fabian
    fmfabianmbp15:mary-fabian mary.fabian$ cd fts_firmware
    fmfabianmbp15:fts_firmware mary.fabian$ make flash
    avrdude -p attiny45 -c usbtiny -P usb -e \
    		-U flash:w:fts_firmware.hex
    
    avrdude: AVR device initialized and ready to accept instructions
    
    Reading | ################################################## | 100% 0.00s
    
    avrdude: Device signature = 0x1e9206
    avrdude: erasing chip
    avrdude: reading input file "fts_firmware.hex"
    avrdude: input file fts_firmware.hex auto detected as Intel Hex
    avrdude: writing flash (2488 bytes):
    
    Writing | ################################################## | 100% 3.94s
    
    avrdude: 2488 bytes of flash written
    avrdude: verifying flash memory against fts_firmware.hex:
    avrdude: load data flash data from input file fts_firmware.hex:
    avrdude: input file fts_firmware.hex auto detected as Intel Hex
    avrdude: input file fts_firmware.hex contains 2488 bytes
    avrdude: reading on-chip flash data:
    
    Reading | ################################################## | 100% 4.45s
    
    avrdude: verifying ...
    avrdude: 2488 bytes of flash verified
    
    avrdude: safemode: Fuses OK (H:FF, E:DD, L:E1)
    
    avrdude done.  Thank you.
    
    fmfabianmbp15:fts_firmware mary.fabian$ make fuses
    avrdude -p attiny45 -c usbtiny -P usb \
    		-U lfuse:w:0xE1:m -U hfuse:w:0xDD:m \
    		-U efuse:w:0xFF:m
    
    avrdude: AVR device initialized and ready to accept instructions
    
    Reading | ################################################## | 100% 0.00s
    
    avrdude: Device signature = 0x1e9206
    avrdude: reading input file "0xE1"
    avrdude: writing lfuse (1 bytes):
    
    Writing | ################################################## | 100% 0.00s
    
    avrdude: 1 bytes of lfuse written
    avrdude: verifying lfuse memory against 0xE1:
    avrdude: load data lfuse data from input file 0xE1:
    avrdude: input file 0xE1 contains 1 bytes
    avrdude: reading on-chip lfuse data:
    
    Reading | ################################################## | 100% 0.00s
    
    avrdude: verifying ...
    avrdude: 1 bytes of lfuse verified
    avrdude: reading input file "0xDD"
    avrdude: writing hfuse (1 bytes):
    
    Writing | ################################################## | 100% 0.00s
    
    avrdude: 1 bytes of hfuse written
    avrdude: verifying hfuse memory against 0xDD:
    avrdude: load data hfuse data from input file 0xDD:
    avrdude: input file 0xDD 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 efuse (1 bytes):
    
    Writing | ################################################## | 100% 0.00s
    
    avrdude: 1 bytes of efuse written
    avrdude: verifying efuse memory against 0xFF:
    avrdude: load data efuse data from input file 0xFF:
    avrdude: input file 0xFF contains 1 bytes
    avrdude: reading on-chip efuse data:
    
    Reading | ################################################## | 100% 0.00s
    
    avrdude: verifying ...
    avrdude: 1 bytes of efuse verified
    
    avrdude: safemode: Fuses OK (H:FF, E:DD, L:E1)
    
    avrdude done.  Thank you.
    
    fmfabianmbp15:fts_firmware mary.fabian$ 
    
    	

    I originally put off programming my ISP programmer and then I ended up forgetting it had not been done. I got so used to using the other programmer I forgot I was supposed to be using the one I made! This is why I am using different programmers in the Hello World assignment.

    Overall, I was really excited and proud of the work I put in this week. I did a lot of studying and prep work before I attempted anything and it worked MOSTLY on the first try. I showed it to my dad, who is a retired manufacturing engineer and was into CAD/CAM very early on. He was impressed and proud, also.