Home

Electronics Pr​oduction

Milling, soldering, "stuffing," and programming circuit boards.

Assignment:

Make an in-circuit programmer that includes a microcontroller. Mill and stuff the board. Program it. Test it to verify it works.

Group Assignment:

Characterize the design rules for your in-house PCB production process (PCB = printed circuit board). 

Milling the Board

We started this week by learning how to use the Roland milling machine to mill circuit boards from scratch. This time, we used trace and outline files provided by the teaching team, but in a few weeks we'll have to design our own. 

Step #1: Preparing Your Software

The software application used to control our mill is called "mods." Mods was created by Neil and his team to be modular so that different functionalities and pathways can be combined into workflows to run many (perhaps all?) of the Fab Lab's machines. While it doesn't have the friendliest user interface for beginners—various settings and buttons aren't always immediately obvious—mods is a very powerful and versatile tool. 

Tip: For mods to work, its server must be running in the background.

Once mods is up and running, load a .png file for either the board's traces (the shallow pattern in the copper) or its outline. In the  "Set PCB Results" box, make sure to choose the correct setting for the file and endmill you've selected. This will be either "mill traces" or "mill outline." The setting you've selected will appear in bold. Then click the "calculate" button under the "Mill Raster 2D" box in order to feed the file through the rest of the workflow. 

With your software set up, now it's time to prepare the Roland itself. First, select a copper-coated sheet. This is what you'll be milling your board from. Apply several strips of double-sided tape to the backside of the sheet and affix it firmly to the sacrificial mill bed. Press down hard! If your tape is loose, the sheet may move and ruin your job. This can cause the traces not to translate all the way through the copper, or result in imperfect lines. 

Step #2: Preparing the Milling Machine

Now it's time to select and mount your endmill. Endmills are like drillbits, but designed to mill laterally as well as plunge. We're working with two endmills to make our circuit boards: 1/64 (smaller/thinner) and 1/32 (larger/thicker). The smaller endmill will be used for the traces, while the larger will be used for the outline—essentially to cut our board out once it's done. We're going to start with traces, meaning we need the smaller drillbit (1/64) first. 

Tip: Order of operations matters here. Just like on the laser cutter, you want to tackle any surface-level design elements first, before cutting. (Once you cut, the substrate can move more freely. This introduces opportunities for error when the surface-level rastering/engraving occurs, expecially on a mill where there's friction occurring between the endmill and substrate.) 

With the mill in its "home" position, use an allen key to loosen the set screw in the collet (the sleeve that holds the endmills in place). Insert the appropriate endmill for your job into the collet so that only a small bit of it is sticking out. Holding this in place, re-tighten the endmill with the allen key. But don't crank on it and break the endmill! Snug is fine. Make sure to close the mill's lid/shield when you're done since it won't move when this is opn.

Now you need to calibrate your origin. Remember: x-axis = left and right, y-axis = forward and backward, and z-axis = up and down. 

For the x- and y-axes, trial and error is honestly the easiest way to get your bearings. For the z-axis, keep your value low (~10 or lower) so you don't accidentally lower the endmill so far that it breaks off against the side of the sacrificial bed as it moves. If you don't know where else to start, try 20 and 20 for the x- and y-axes and go from there. Then, click the "move to origin" button. 

Tip: The "origin" marks the spot where the job will begin. This is always in the lower lefthand corner. 

The mill will begin to spin, and then move to the origin you've just programmed. If it isn't lined up quite the way you want it—perhaps it's not even above the board at all!—you'll need to adjust your axis values and click "move to origin" again. Rinse and repeat until you have successfully stationed the endmill in an appropriate spot to begin your job. Remember to be efficient with your material! Try to position things so you can get the maximum number of pieces from your substrate. 

Once you have an appropriate origin programmed and your endmill is in place above it, it's time to drop the endmill down to your substrate. Do this by loosening the set screw and—gently!—dropping the endmill so that its tip is in contact with the copper plate. Then re-tighten the set screw. 

Now you're ready to mill!

Problems to be prepared for: Don't You'll probably make the same mistake I did a few times during this step: if you open the mill's door too soon after it moves (from "home" to "origin," for example), it'll throw a fault and you will have to reset the machine and start over. Unplug the machine, plug it back in again, turn it back on, and try to be more patient next time.

Step 3: Mill Your Traces!

You'll probably have to hit the "calculate" button again to feed the file back through the workflow software. Then click "send file to device." 

The tracing process will take a while. When it's done, use a vacuum to suck up the debris left behind. Your board should now have clear paths milled through just the upper layer of copper.

Problems to be prepared for: If your board doesn't come out quite perfect, your substrate probably wasn't adhered well enough to the bed. Unfortunately,  you'll have to start over (though this still makes a good practice board for soldering, so it's still worth cutting out first!). 

Dont do what I did: After the last person finished cutting out their board, I forgot to switch the mill settings back to "trace" from "outline." Because of the way the debris collects on top of the board, I couldn't see my error until it was too late and the job had already finished... so I essentially cut out all of the tiny details that were supposed to be traced at surface level, since the endmill was plunging too deep. I felt pretty silly after that one, but at least it's a mistake I'll never make again.

Step 4: Mill Your Outline

Don't touch your origin settings after your board has been milled. You still need to cut it out! 

First, swap out the "traces" file for your "outline" file. Be sure to click over to the appropriate "mill outline" settings, and then press "calculate" to feed the file through the workflow.

Next, repeat the process outlined in Step #2 to prepare your milling machine. This time, use the larger of your two endmills (1/32 instead of 1/64). You'll have to put the right endmill in, press "move to origin," and then drop the endmill down until it touches your substrate again before milling.

When this is all done, click "send file to device" to mill your outline and cut out your board!

Troubleshooting Suggestions

I can't get the milling machine to start.

You probably opened the shield (door) too soon after the machine stopped moving. Unplug and restart it. Move it back to origin. Wait for at least 5 seconds. Then reset your endmill against your substrate and try again.

If this still doesn't work, make sure you pressed "calculate" in mods to feed the file through the workflow.

My boards aren't tracing correctly.

Make sure you haven't broken an endmill.

If that isn't your problem, either your double-sided tape isn't making strong enough contact between your board and the sacrificial bed, or you don't have any tape directly beneath the section you're milling.

Try pressing the board down as firmly as you can before trying again, or re-adhere your board to the bed. Make sure you have some adhesive directly beneath the section you're milling.

I'm getting an error code when programming.

Check your connections. My class found it was helpful to add several layers of tape beneath the USB portion of our boards to thicken them just slightly. You can also use a shim. Make sure your shims are at the same height.

Your order of operations matters. Make sure you plug in the board being programmed first, before the board doing the programming.

Resources:

  • https://fabacademy.org/2019/labs/sorbonne/students/leo-lhermitte/week_05.html
  • https://github.com/leomcelroy/fab-notes/blob/main/README.md
  • http://modsproject.org