Week 3. Electronics production

FabISP

This week we learned how to make electronic circuits, with an emphasis on machining FR1 for surface mount devices. We applied these techniques to make our own in-circuit programmers!

Board production

I followed the FabTinyISP tutorial by Brian.

Milling the board

To mill boards, I generated toolpaths using default settings on mods.cba.mit.edu with a 1/64" endmill for traces and a 1/32" endmill for outlines. For traces the settings were

Tool diameter 0.39624 mm
Cut depth 0.1016 mm
Max depth 0.1016 mm
Offset number 4
Offset stepover 0.5
Direction Climb
Path merge 1
Path order Forward
Sort distance Yes
Speed 4 mm/sec

Soldering components to the board

I used solder SN63PB37 #66/331 .020" OD. I set the temperature of the soldering iron to around 600 F. The initial set temperature was 650 F, which seemed too hot: the plastic substrate seemed to be melting a bit, some of the copper traces temporarily delaminated from the plastic substrate, and the board make crackle sounds on occasion.

Note that the line on the Zener diode denotes the cathode, and the anode should be connected to ground, so the side without the line should be connected to ground. The cartoon representation of diodes has the triangle pointing to toward the cathode side and the line on the cathode side. Here is some information on polarity of diodes and LEDs.

Neil pointed out my board did not have good solder contacts. In particular, the solder had not wet the pads, and the surface of the solder appeared diffuse rather than specular and shiny. Can use the solder iron to reheat the pad. Note that you should get the pad hot, then you have nice surface that slopes to the pad. Can put some solder on the tip in order to improve thermal contact between the soldering iron and the pad and component. Also use a wet sponge to clean the soldering iron. Neil also pointed out probably best not to use unlabeled solder.

Board programming

I am using Mac OS Version 10.10.5. I downloaded CrossPack for AVR Development

Grace showed me to install Homebrew and pip, which are package managers. Homebrew contains a formula for avrdude, and it also has the libusb dependencies etc.

After using homebrew to install avrdude, I checked the version of avrdude again using avrdude -v and it was still version 6.0.1. I noticed that avrdude from Homebrew was downloaded to a different directory, to /usr/local/Cellar/avrdude/6.3 whereas the avrdude associated with CrossPack was downloaded to /usr/local/CrossPack-AVR-20131216 I next uninstalled avrdude from CrossPack using sudo /usr/local/CrossPack-AVR-20131216/uninstall and then when I ran avrdude the Terminal replied -bash: /usr/local/CrossPack-AVR/bin/avrdude: No such file or directory so seems avrdude in the Terminal references avrdude in a specific folder. Thus I searched for the more recent version of avrdude in the Homebrew Cellar. I navigated to the folder /usr/local/Cellar/avrdude/6.3/bin and then again typed avrdude -v which gave the same error message as above, because Terminal continued to reference the previous installation which was no longer there. So then I typed ./avrdude -v to reference the local copy, which worked and confirmed this was version 6.3. I then confirmed that version 6.3 had the programmer using the command ./avrdude -c ? to list all the programmers and saw that atmelice_isp was indeed one of the options. This was a good reference. Then I ran this code to reassign the alias alias avrdude='/usr/local/Cellar/avrdude/6.3/bin/avrdude' to the existing version of avrdude. Now time for the moment of truth. I navigated back to the folder containing the Makefile, which was corrected to have atmelice_isp as the programmer. This time I got the error message usbdev_open(): error claiming interface 0: Permission denied

According to this forum, this is apparently an issue with Macs, that “another process has the device open for exclusive access." Then I found this page which describes a kernel extension for Mac OS X called a Kext file. Gave the error message “The system extension “/System/Library/Extensions/AtmelICE.kext” was installed improperly and cannot be used. Please try reinstalling it, or contact the product’s vendor for an update."

Note the board appears as usbtinySPI in About This Mac → System Report ... → Hardware → USB but does not appear in the directory /dev.

I changed the programmer in the Makefile from atmelice_isp to usbtiny, and using the command avrdude -c ? I confirmed that the usbtiny is one of the programmers. I first plugged in the new, not-yet-programmed board, and then I plugged in the older, already-programmed board. At first I was concerned that the LED did not turn on, but then I remembered that I broke the solder joint, and figure that might be responsible. To check, I unplugged the new board and checked for the device in the USB menu as above. Sure enough, it showed up in the System Report, which is good news.

I ran make flash and it worked! ☺ Then I ran make fuses and that worked as well. As before, it appears as a device in the System Report thing.