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.
Note: this week Neil has put the gerber file we need on his webpage. Download it here.
there you need cam.py to mill your board:
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.
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.
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.
to do this, first run
stty 9600 raw -echo crtscts > /dev/ttyS0
to send output to modela
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.
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).
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.
display sizechanges the zoom you're viewing your circuit in. it has no effect on the generated commands. note that the bigger the number, the further away you zoom your view.
y offsetcorrespond to the values you determined with the
move.rmlscript (see: above). The units here are in inches, whereas the units in
move.rmlare in mils, so 1000 above means 1 here.
part scale factorchangest the scale factor of the actual part. you will probably want to leave this at 1.0 (unless you can also scale your components, which you can't)
tool diameterto match your endmill (this field is in inches, too: 15mil = 0.015 )
contour undercutparameter specifies how much undercut when generating the contour boundary. this amount is in inches and undercut for positive values and overcuts for negative.
see section below on notes regarding this parameter
raster overlapspecified how much overlap you have between neighboring raster lines. 0.95 means that there is only 5% overlap between neighboring mills. 0.5 would mean 50%.
z down. for this task you will probably want to use -0.015. (inches again)
z updetermines how far to pull up between operations.
z speedas is, unless you find out some particular feed needs. 2 is safe, i would say that even 3-4 is safe - and it saves raster time.
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.
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]
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.
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.
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
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.
david lobosco wrote some useful tips for modela milling.