' 4:-Electronics Production

Fab2016

Sibu's FabAcademy 2016 Documentation Home

Electronics Production

Objective for this module is focused on make an In-System-Programmer, a Fab-ISP. I have already made this during the one month long Pre-Academy. I first made Neil's version and then the USB key version (when I found that USB-mini cables are hard to come-by), using the components from the original board. So I'm not making another Fab ISP, but I'll modify the existing design and add more features. Also I'm thinking about exploring something new and help fellow students to make their ISP.

Since I made the board before, I'm writing about that same experience.
First lets talk about the machine we are using.

Roland MDX-20 Mill

Perhaps the most used machine in the Fablab!. This machine can be used for making the PCB (milling and drilling), carving simple 3D structures in machine wax. The machine can be considered as a mini CNC mill. The workpiece is attached on a detachable plate which moves along the Y-axis. The drilling/milling tool (end mill) or the engraving tool is attached to the head which moves along the X-axis. The end mill is attached to a DC-motor (10 W) which is mounted on a carriage that allows the the movement along the third axis, the Z-axis.

The motor (spindle) and the end mill spins at high RPM to remove the material from the workpiece as small chips. The milling bit primarily moves along the X-Y plane except for the beginning and the end of each section being milled. The end mill is designed such that it cuts into material from side, ie. the material removal happens during the lateral movement of the tool. The drilling bit has the main cutting edge at the end of the tool, which allows it to make holes in the workpiece. The tools will have flutes (spiral cut in the body of the end mill) along the length of the tool to facilitate in chip removal and sometimes to allow the flow of the coolant liquids(not for this machine) to the cutting area.

PCB mill
The Mini CNC mill, Roland MDX-20.. The user manual is available here and here.

This machine has a few more tricks under it's sleeve. It can be used as a 3D scanner using an Active Piezo Sensor. The machine is capable of scanning objects at 4 to 15 mm per second with a resolution of up to 0.05 mm. And the machine can also be used to mill soft metals like aluminum. So this machine is going to be explored further during the future modules on 3D-printing/scanning, and CNC milling.

RAPS
R.A.P.S, Roland Active Piezo Sensor, sensor for converting MDX-20 to a 3D scanner.

There are a few thing to be careful when you are using the machine

So with this machine we were supposed to make FabISP. Our FabGuru for the Pre-Academy Luciano showed us how to use the machine once, during the Pre-Academy.

Fab-ISP

The final ISP with LEDs for indicating communication and power can be found at the bottom of the page.

I made the FabISP not once but twice, first time this one,

FabISP original board
Unpopulated FabISP board, fresh from the mill (With my name, added using gimp)
and then the FabISP key by Andy, because the mini USB cables are not as popular as micro. I was trying to replace the 'mini USB' port with the 'micro' and found that the pitch of the pins is not right. So I searched for other designs with micro USB port, and I came across this one. This second version can be plugged into the USB port directly, no need of any mini/micro USB cables. So decided to make it, less cables the better.
FabISP key
The FabISP key I made and the original ISP board from which I took the components, The thick Solder on the USB connector is for making it thicker for a better fit.

FabISP key2
Backside; Notice the Blue Vinyl I added this to make the USB connector slightly thicker for a snug fit.
I didn't want to make a new board with new set of components because that will be a waste of components. Instead I just de-soldered components from the original ISP one by one and soldered them on the new board. All components except the IC and the ISP connector were removed using the soldering iron. IC and the ISP connector was removed using the heat-gun.

Now I want to talk a bit about my methods of soldering and de-soldering, it may or may not be the right way, but works best for me (may be till I see a better method from someone).

The soldering first.
Most important thing is that you need a clean surface to solder on, if the PCB is not clean enough, we have to do that first. The flux will help, but only to an extend. The flux used in the lead-free solder is a nasty stuff and recommended NOT TO BREATH it. I use a flux pen to dispense the flux in small quantities, the flux pen has rosin (comparatively safer, and is a natural substance) dissolved in a solvent (isopropyl alcohol). By the way, I made this mixture myself. Apply the flux only if necessary, too much is not good. Also keep in mind that the solder wire itself has flux built into the core.

Begin the soldering from the center and move out, smaller components first. But the order is matter of personal choice, important thing is that the soldered components shouldn't hinder access to the new components being soldered. For components like SMT resistors and capacitors, start by putting a bit of solder onto one of the pad, place the component, melt the solder and align. Don't solder the other lead, not yet, you better wait till you place most of the similar components and verify once before soldering the second pads.

For ICs, I start similarly, start with soldering one pin to the pad and align the IC properly while keeping the solder melted. Once aligned, remove the iron, you are now free to solder the remaining pins. I do drag soldering. Beginners can use the help of the solder-wick. Brush flux on all the pins of the IC, take a small piece of solder wick and wick enough solder on it. Now drag the iron along the pins with the solder-wick between, the wick will release just the right amount of solder to the pins. The flux is used to reduce the viscosity of the solder, to ease the flow of molten solder. Break the unwanted the solder bridges by touching up with the soldering iron or by wicking off the excess. I prefer the biggest tip (chisel type) bit for drag soldering. And with experience you will not require the solder wick, except for touch-up.
Some may suggest against this method, saying it uses more flux and all. But I don't think so. First of all the process is quick, with experience you can solder a 64 pin IC in less than a minute, and the excess solder applied is only very little. Also keep in mind that the flux within the lead-free solder is more hazardous than pure rosin based flux (but cleaning maybe necessary). Also in most cases the solder used will be less, as soldering each pin one by one tends to use more solder which causes a lot of bridging and require wicking off the excess.
By the way, I forgot to take videos of my process but this is a video that demonstrates the process of drag soldering, instead I'll show where I learned the trick from.

This one is another video demonstrating the method I use for soldering the SMT capacitor/resistor.

How to de-solder?
One can either use the heat-gun or the soldering iron to remove the components. But for the IC or any component that has more than two pins you may want to use the heat gun.
Using the heat gun is very easy, just start it, aim it toward the component to remove (don't forget to move it around to distribute the heat, else you will burn the component or PCB) and once the solder is melted just use the tweezers to remove the component. Applying light upward force during the process will cause the gravity to do the work.
Using the iron to remove the component is bit tricky, you need to heat both pads alternatively and as fast as possible, this will keep the solder on both the pads molten and you can use the iron itself to push the component away.
Once again I don't have the videos of my process, so I'm embedding a video of the same process.

Programming the Fab-ISP

Basically I followed this guide, with a minor edit, the make fuse command is redundant, make program does it anyways.

If all the connections are proper, and the components are all okay, the programming will be extremely easy. Like someone said "if you know what to do, its very easy". If everything works perfectly, the programing involves

The Linux command dmesg and lsusb comes very handy during this stage. dmesg will give some idea if the board is working or not. You will get some kernel messages when the computer detects the new hardware.

I tried Atmel ICE first, but no success. It was my first time using that hardware and was a bit complicated. Then I tried another ISP, with my friend Yadu. Which worked just fine, I ran make clean && make hex, which compiled the source to generate the hex code, make program, which flashed the hex code to the chip, burned the fuse-bits and verified. Next step was to remove the jumper to disable the programming mode.
At this stage I had a working ISP, and I could see the entry (Bus 001 Device 025: ID 1781:0c9f Multiple Vendors USBtiny)

                sibu@archSSD ~ % lsusb
                Bus 004 Device 002: ID 8087:8000 Intel Corp.
                Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
                Bus 003 Device 002: ID 8087:8008 Intel Corp.
                Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
                Bus 002 Device 002: ID 174c:1351 ASMedia Technology Inc.
                Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
                Bus 001 Device 002: ID 413c:2107 Dell Computer Corp.
                Bus 001 Device 025: ID 1781:0c9f Multiple Vendors USBtiny
                Bus 001 Device 024: ID 0bb4:0f91 HTC (High Tech Computer Corp.)
                Bus 001 Device 003: ID 046d:c077 Logitech, Inc. M105 Optical Mouse
                Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
          
and dmesg
            [11184.067876] usb 1-6: new low-speed USB device number 26 using xhci_hcd
          
The ISP was tested by using the new board as a programmer to program an Arduino board I have.
Later, I moved all the components to a new board, to make the USB Key version. This board didn't work at the first time because of the loose connection, the board is very thin for a snug fit in USB port. So I made the connector area slightly thicker by applying generous amount of solder on the 4 contacts (I applied solder on the entire board too as the copper started to tarnish). Little bit of extra flux was also used to make the solder flow nicely and form a smooth profile (else the board may get stuck in the USB port). A piece of vinyl was also pasted on the backside of the board.

Mission Accomplished
Now I have a perfect little ISP of my own, and no need of any USB cables. I can now start programming new micro-controller boards, help others to give 'soul' to their own ISPs....

ISP with LEDs

Although this works perfectively as an ISP, there are no LEDs to indicate communication. I like to have LEDs on Rx and Tx channels like the ones in an Arduino board. I found another Fabable ISP, FabTinyIsp. This has a few more features like LEDs on Rx/Tx lines to indicate communication, a reset switch, a smaller chip etc. I'm thinking about making this board, with one modification, the ISP connector to the side, the connection would be made from the side rather than top of the board. Or I will solder the ISP on the board itself and I plan for a makeshift conformal coating, using 'glue-sticks'.

Re-Designing the ISP to include LEDs

I changed my mind;
Instead of making the FabTinyISP, I decided to modify the design of the FabISP key I have made; just added two LEDs and current limiting resistors. The LEDs were added on Rx and Tx lines, ie MISO and MOSI lines.

FabISP with LED
FabISP key modded for Rx/Tx LEDs. The green pads are for a jumper.

Eagle Files

Board Schematic

I made a few changes again,



The new design is here.
FabISP with LED v2
FabISP key modded for Rx/Tx LEDs version 2. The green pads are for a jumper or will be connected via the ground plane.

The short vertical bottom layer trace (blue) is not supposed to be connected, the pads are not to be drilled either. This is more like a test point, when shorted it enables the chip to programmed.

Exporting the Eagle design to .png for milling.

Below is gallery showing the process of exporting the image to .png files for cutting and milling traces operations.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

The .png files for cutting and milling the traces are shown below. There were few mistakes and the edited images/eagle files can be found further down.

my ISP trace my ISP cut
The trace file and cutout cum drill files. The length of the image is 40.25mm, for proper scaling.

I made a few mistakes in the previous design/milling operation.

clean 1 clean 2
After cleaning the required area of the double sided PCB using brass-wire brush and detergent.
mill 1 mill 2 rslt 1
During the milling operation.
rslt 2
Before cutting, notice the bottom trace didn't get separated.
rslt 3
The trace at the bottom is almost gone.

Bonus!


Here is a time lapse of the milling process, the board being milled is not mine, I just recorded it.

I used the intervalometer function in Magic Lantern firmware for the Canon 600D DSLR to take many photos of the process at regular intervals.
and used ffmpeg (ffmpeg -framerate 30 -i img%03d.jpg -c:v libx264 -r 30 -pix_fmt yuv420p test.mp4 ) to stitch them all into a video.

final ISP final ISP trace final ISP cut
The final trace file and cutout cum drill files. The length of the image is 40.75mm, for proper scaling.

Eagle Files


for the final version go to the bottom of the page

Board-v2 Schematic-v2

Populating and Debugging

final ISP component place
The component placement diagram.
final ISP top populated
The top layer, populated with components.
final ISP bottom
The bottom layer, fully tinned to prevent rusting and discoloration, Notice the interconnects between the layers, I used few strands of thin copper wires from the soldering wick to make this. The tinning process is slightly thicker at USB connector area to make it thicker for a snug fit.

Error

There he is! I missed him so much!
The command dmesg shows the following output on plugging the device in the USB port.

error

I spent some time figuring out what this error is.

Since the board is working happily with two LEDs, I thought why not one more, a power LED, an indicator that the ISP is getting power. I didn't want to make a new board, so I just soldered an LED and a 499 Ohm resistor to the board, between the VCC and GND.

final ISP with power led
The power LED added, the new LED and the resistor is connected like a flyover bridge over two traces. I updated the schematic to include all the LEDs and it can be found at the bottom of the page.
ISP with power led on
The power LED shines when I plugged the ISP to a power bank.
ISP evolution
Evolution of the ISP, and the remnants. The heart of the ISP the AtTiny and few critical components like the Zener Diode and few of the resistors and the capacitors moved on to the new boards.

Conformal Coating

Here is the picture of the ISP in a makeshift conformal coating. I used hot melt glue as the conformal coating, the tools used for this are the glue gun, hot air gun and 'wet finger' to shape the softened glue. This will protect the board against the atmospheric and other elements causing corrosion, rough handling, vibrations, and short circuits from dirt and water.
conformal coating

Here is the video of the new ISP in action, the board is used to program blink LED program to a 20MHz Fabduino variant I made for Electronics Design.

A snap of of the new ISP, before cleaning.

HERE ARE THE FINAL EAGLE FILES FOR THE ISP (with all the three LEDs).
Board Schematic FIRMWARE


The archive(firmware) has the compiled binary, but you can recompile if you wish.

Future Plans

What will you do,
when you mess up the FUSE?
or if you disable the SPI programming feature by unsetting SPIEN FUSE?
or if you disable the RESET?

This when you require a high voltage serial/parallel programmer. Achieved by keeping the RESET at 12v.
I would like to make an ISP capable of programming the chips in this mode. This should be able to un-brick any bricked chips with messed up FUSE. This could also take advantage of the RESET pin of the chip, as you can now use even the RESET pin as IO.

Resources