Loes Bogers

FabAcademy 2015


Week 04 - Electronics Production:

The In-System Programmer

Assignment: mill and stuff a FabISP (optional: program it)

In-System Programming (or in-circuit programming) is a technique to program a microcontroller after you solder it into a circuit board. The In-System Programmer is the interface between the computer and your system. You can buy them (eg. AVRISP mkll) but why not make them yourself?

The inevitable comparison with Arduino

Arduino has something comparable inside (the bootloader), but the downside of doing that is that it takes space on your microcontroller. Also, working with the Arduino and breadboards is less desirable because working with jumpers (loose wires) creates very flimsy systems that break easily. If you have access to a milling machine it's better to create real PCBs, they're stronger, reliable and still editable once you get to know them a bit.

Four FabISP versions

There are several ISPs developed in fablabs, with slight differences:

  1. 1. Andy
  2. - have to open a bridge after soldering
    - USB connector
  3. 2. David
  4. - uses microUSB connector
  5. 3. Valentin
  6. - USB connector
    - Break away part of the board after soldering
  7. 4. Zaerc
  8. - USB connector
    - Has LEDs that give feedback about power and whether data is being transferred
    - Has button to dis/reconnect power
I chose the Zaerc because of the additional features and because using it will help Fablab Amsterdam improve the firmware and documentation of it.

Milling the board

I got a leftover piece of copperplated board, only just big enough to get the model out of it. As you can see in this picture, if I got the orientation point super on point it would just be possible.

I fiddled with the starting point in hundreds of a mm (finally placed the origin in 71.53 x and 22 y. And it worked beautifully! I left the rest of the settings on default.

Funny mistake: I spent 5 minutes trying to get the hexkey into the endmill to replace it but couldn't open it....What happened? The endmill has two openings, one has a screw, one doesn't. So yeah, turn it 180 degrees and try the other hole :)

Stuffing the board

So I soldered with a magnifying glass and a good iron which made all the difference with the simple ones. The components are so teeny tiny! But after a little practice I got on quite well and didn't have to redo components. Zaercs documentation was really clear, also about orientation of the components etcetera.

And I love the look of the final thing. Proud! I tested all the connections with a multimeter and the LED lights up when I put it in a USB port (handy those LED components).

Programming the ISP

First step was to make a 6-wire wire to connect my ISP to a second ISP that I will use to program mine. Second, I went through these steps in the documentation of Zaerc's FabTiny*ISP. Then I went into the programming chapter. When we first tried to make the terminal command, AVR Dude replied that it couldn't find the USBtiny. But we checked in system information and actually under USB it showed up. When wiggling a bit with the USB to make a better connection at some point it showed up and we were able to run the command. I didn't have to modify any of the files in the vusbtiny-fabtinystar.zip. The tutorial is for when you use an Arduino to program the ISP, but I was using another FabISP and all the settings matched already.

When the USB kept giving bad responses we checked with another board. Which did show up. Then I made a better connection by adding solder to the USB connection on the ISP and adding some cardboard. It turned out that my ISP was off, I just had to flick the switch to turn it on. The confusion arose because the LED was on regardless of whether it was on or off. Finally I went through all the steps of the tutorial but at the end of it my ISP didn't show up still. Same problem Joe seemed to be having last week. He made a new board altogether. Oh no...Then Emma suggested to try just replacing the microcontroller. And that actually worked! Success!

----------------------------------------

7-ish steps to work the small milling machine for PCBs, or something like that

  1. 1. Start up Linux machine. Create a folder in "projects" or pull files from the FabNAS
  2. 2. Start terminal window, enter [fab], hit enter
  3. Using the fabmodule

  4. select input = PNG
  5. select process = Roland Modela (to RML)
  6. load 1st file (top file = the traces)
  7. select 1/64 inch (=0.4mmm endmill, for traces) Select the 1/32 inch endmill for cutting out
  8. make path
  9. Settings

  10. overlap = make sure you remove everything by overlapping the traces a little
  11. offset = how many traces it will take to clear an area (don't use -1, just set more paths)
  12. error = smoothens translation from PNG pixels to a line
  13. z = depth of the copper you will remove (usually -0.1mm)
  14. intensity = leave as is
  15. Preparing the machine

  16. press view mode to safely go into machine
  17. Open collet while holding the endmill so it doesn't fall
  18. place endmill (1/64 for traces, 1/32 for cuts), tighten while holding endmill, not too tight.
  19. exit view mode
  20. clean with hoover
  21. Find the X,Y origin and the Z

  22. enter different x,y coordinates until the endmill is in the position where you want it to start milling your board (orientation is bottom left)
  23. when you have the right coordinates take note of coordinates, you'll need them later to cut out your board (it needs to start in the same place)
  24. press down on the machine to lower the mill closer to the bed
  25. unscrew the endmill and carefully lower it until it touches the bed. Tighten it
  26. Tracing the board

  27. hit: "Make RML file"
  28. place the cover!
  29. hit: "Send it" to start the job
  30. you can pause and restart the job by hitting "view mode" on the machine interface to check the progress
  31. check the lines carfully after it's finished
  32. Cutting the board

  33. load the cut file into the fabmodule
  34. replace the endmill with a 1/32 inch one
  35. choose 1/32 for settings
  36. new settings options include:
    1. cut depth = depth per round
    2. bot z = total depth of z after all roundss
    3. max safe depth = less than the diameter of the mill
  37. repeat the steps above
  38. Terminating a job in process

    In some cases you'll want to terminate a job from the machine's cache while it's running. For example when you see the mill isn't going deep enough. On this page, under FAQ you can see the shell commands to delete the job. In short: press the up and down bottom on the machine until there's a blinking light. Then open a terminal window and give in the command ps -aux | grep cat. Look in the list and locate your two files, find the 4 digit number in the second column. Tehn type kill 0000 0000 [insert the numbers]

    Stuffing

    1. wash board with water and soap before stuffing
    2. do stuffing
    3. wash board again
Creative Commons License
Fabacademy2015 work by Loes Bogers is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.