milling a circuitboard using modela, Fall 2004

author: emma + guy

This page draws very heavily from Guy's page from last year with a couple changes so it's up to date for this year's class

this document assumes that you have laid out your circuitboard using eagle. it also applies to a single-layer circuit board only. it also doesn't use capitals.

before coming to the modela pc

export a gerber file from eagle

Note: this week Neil has put the gerber file we need on his webpage. Download it here.

at the modela pc - set up the mill

get the scripts

there you need cam.py to mill your board:

put the mill in "view" mode

the white "view" button on the modela mill pauses any milling operation and puts the mill in view mode - pulling back the head and pushing the stock base forward for easy access. pressing it again will put the mill back in operational mode.

change the endmill

if necessary, change the mill bit to the one you need. This should be done in view mode. We all have mill bits-- use your's.

you can easily change the endmill using the small hex key to your left.

the chuck of the modela mill has two holes. Each of them have a screw. Turn the chuck to get to the screws.

tape down your stock

still in view mode, use double-sided tape to attach the copper plate to the milling base plate. then exit view mode. Try to put some double-sides tape underneath the place you will actually be milling. Make the tape extend out beyond the place for easy removal.

 

determine the x,y offset

to do this, first run
stty 9600 raw -echo crtscts > /dev/ttyS0
to send output to modela
Now use
move x_pos y_pos
to set the x/y position of the mill. "move 1 1" is 2 squares up and 2 over on the grid. This sets the x/y origin of your board.

finally, remember these x,y values. you will need them later on.

set the z offset

First loosen the screws so the mill bit is lightly resting on the surface. Then, holding one finger on the side of mill bit, depress the down button. This should cause the chuck to lower while the mill bit stays in place.

Continue pressing the down button until the chuck no longer goes down. You have now reached the end of the z axis.

Now depress the up button to move the the chuck up a bit (so that it can later move down to mill the material).
Finally, tighten the screws so that the mill bit is firmly in place. The mill bit should be sticking out only 1-2 cm from the chuck (aka most of it is inside the chuck-- this reduces wiggle).

at the modela machine - set up the toolpath

generate the rml code from gerber

for this we will use the cam.py script, which Neil has placed locally on this machine. To do this run
python /usr/local/bin/cam.py hello.cpm
in the directory where you put the hello file (or whatever file you are using).

Once the file loads, first set the x/y offset to the values you choose above when you positioned the mill bit. All the other parameters should already be set as needed to do the hello circuit-- for more info, see below.

now you're ready to create the toolpaths. first run contour boundary - this might take a while. then add raster interior, and finally hit write toolpath to write the path to the rml file specified in the output file field.

a note on command line options

when running python from the command line, you can pass several arguments. this will make your life easier, simply by not having to type them in every time.

cam.py is used as follows:
python cam.py [infile] [xoffset yoffset] [display size] [outfile] [undercut]

 

a note on undercut

the undercut parameter tells the python script to undercut when generating the contour boundary. in other words, it offsets the tool placement by the specified number of inches closer to the trace than the toolsize would normally allow.

this can be used to create a logically correct boundary, even when there is not enough clearance between the traces for the actual tool you're using. so, sometimes when you don't have enough clearance you can "cheat" the program in undercutting and correctly creating toolpaths between your lines. but note, that when milling, the tool may cut away from the traces and pads

you can also specify a negative amount (overcut) to make the traces wider than in your layout.

note: if you need too high or low a number to make your toolpath, the milling will almost certainly not succeed.

mill the circuit

Simply type
cat out.rml > /dev/ttyS0
from an xterm (subsitute in the name of your .rml file).

now make sure the mill is not in "view" mode, and the milling should start.

how to cancel mill jobs

at some point you will probably want to not only stop a milling job (using "view") but to cancel it altogether.

First press the view button.

next, press the up and down buttons on the mill simultaneously and hold these down until the led starts to blink. it will take a while, but when the led stopped blinking, your job should have disappeared from the printing queue. Check using
ps awx | grep tty
that the job is cancelled (otherwise use kill to kill the job) and you should now be set to start from the beginning.

more information

david speaks

david lobosco wrote some useful tips for modela milling.