Eagle & The Modela
References to help with using Eagle and the Roland Modela MDX-15. The MDX-15 (usually just called a 'Modela') is the machine the Senior Design lab has to make PCBs
PCB design rule doc --- recommended by Tom McGuire. (by David L. Jones)
Good tutorial on making PCB specifically with an MDX-15. Includes a design rule file that you can load in Eagle so you can check with Eagle's Design Rule Check if your board is ready to rock-n-roll with the Modela. In case the file/link disappears, this is also it.
An outline from MIT's How to Make Almost Anything course about PCB fabrication. The course uses a similar Eagle/Modela setup and in fact the Python script we use for tracing contours on the board and sending to the Modela (cad.py) was written by the professor of this class (Neil Gershenfeld).
If you have tried producing a black and white image at 500 dpi from Eagle you may have found it ridiculously impossible. Take a look at this post(by gaussmarkov). It suggests: Under the view tab select Display and turn on the layers that you want to export Then in the command line just below the tool bar type "export image pcb.png monochrome 500") A file named pcb.pgn will be created in the folder where the .brd file was opened.
- Use 2 flute flat nose 1/64 for pcb tops and 1/32 2 flute flat nose for cutting through boards, including drill operations. Ball nose is not really useful for these flat surfaces.
- it's easier if you clear the copper you're going to drill through first with the 1/64 even though you're doing the actual drilling with a 1/32.
From http://wiki.infosyncratic.nl/FabLab RS232 serial cable from the Modela milling machine to a computer is done as follows:
1, 8 <-----> 20 2 <-----> 2 3 <-----> 3 4 <-----> 5, 8 5 <-----> 7 6 <-----> 4 7 <-----> 6
The recommended USB <-> Serial (Startech) has "aggressive" hardware handshaking which apparently the Modela likes
Use these scripts for generating all milling and drilling files directly from within Eagle, avoiding all the nonsense of exporting and tracing a bitmap. They are based on scripts from this site, and have been modified for accuracy and convenience.
There are some bugs (listed lower on this page) that make some things a little inconvenient, but overall the process is pretty easy once you get familiar with it. I'll try to fix the bugs if I can, but it's a little difficult to sort through 5811 lines of code, especially when half of the comments are in German.
- Unzip the files and copy everything in folders to the appropriate location within your EAGLE installation (EagleScripts/scr to ~$/eagle-x.x.x/scr, etc.)
- Open the eagle.def file installed on your computer and add the contents of eagle_def_addition.txt to the end of the file and save it
- Put Modela.py in a convenient place
Use (more detailed instructions will come soon)
Type "scr millmenu" in the Eagle command line while editing your board to add the milling menu bar. You will be able to access all the necessary scripts and ULPs from this menu.
From your new menu you can choose Milling -> Contours to launch mill-outlines.ulp. This will allow you to choose how you will mill the signals on your board. You can choose the size of the bits to use, whether to isolate or mill out all the excess copper, etc. When you run this program it will generate the isolate, blow-up, and dimension milling paths for the top of the board in layers 101, 102, and 103 respectively. It does the same for the bottom in layers 116, 117, and 118. At this point the paths will be the same width as the tool that was chosen to mill them, which is really nice because you can see pretty well what parts of the board will be milled, but before you run the CAM processor you have to set the line widths to zero, or the machine will mill far too much material.
To generate the drill positions run Milling -> Holes. This launches GenerateDrills.ulp, which is a very simple script. Specify the width of the bit you will use for milling the holes, and whether you want to drill a single point or mill the holes to there actual size. After this program is run the paths for the holes will be in layer 45.
Once you have these layers filled run Milling -> Zero Width. This will change the widths of all the milling paths to zero, which is necessary for the paths to be milled correctly. If you do not do this the machine wil remove too much copper.
Before running the CAM Processor you must run Milling -> Zero Width in the mill menu. Otherwise the milling files will be incorrect.
Save the file first or the newly generated layers won't be available to select.
The final step is to run the CAM processor: File -> CAM Processor. In the CAM processor window choose File -> Open -> Jobs and open Modela_Milling_Script.cam. The tabs are labeled to correspond to the options in mill-outlines.ulp, but this is just a starting point. You can and should customize the CAM job for the project that you are working on. The 'add' and 'del' buttons will add and delete tabs. The 'Proccess Job' button will process all of the sections in the job, and the 'Process Section' button will process only the current section. Here is a brief description of the sub-elements of the sections of a CAM job:
- The 'Pen' box: You don't need to change anything here,these parameters are currently set in the machine definition.
- The 'Job' box: You can rename the tab in the 'section' box. I don't know what the prompt tab is for.
- The 'Offset' box: You can define X and Y offsets; make sure you keep this consistent in each tab.
- The 'Layers' box on the right shows which layers will be traced by the section.
- The 'Output' box:
- Choose the device that you will output to; this will be 'Fablab_Milling' for contours or 'Fablab_Drilling' for holes and dimension cutting.
- Choose the scale; you will probably want to leave this at 1.
- Choose the output file name. %P is a macro that contains the path to the project directory, %N contains the name of the .brd file.
- The 'Style' box:
- Mirror: Flip the section over the Y-axis. The bottom of the board needs to be mirrored in order to be milled correctly. You will also need to offset mirrored sections by the width of the board so that they are in cuttable area of the machine
- Upside Down: Similiar to Mirror, but flips over the X-axis
- Rotate: You can rotate the board. I don't know why this would be useful.
- Pos. Coord: I don't know what this does.
- Quickplot: I don't know what this does, either.
Once you have run the CAM job you will have the files that you need to send to the Modela.
Run Modela.py to control the mill.
List of commands:
move <x> <y> : move the spindle to the specified position
- 40 units/mm
mill <file> : send file to the machine for milling
- help : display this list of commands
Insert the bit that you will be using for the job.
You need to set the zero point for the Z-axis before you send the file. Move the head to a point on your board that will be outside of the final product. Choose an area close to the front of the machine, it seems to be lower than the back. Hold the Z down button on the machine until the head moves close to the board. Now press the button without holding it down to move it in small increments. I find that moving it 2 clicks past the point where it first contacts the board will set it at a good depth.
Now you can send the file to the machine and watch it work.
If the outline of your board (in the dimension layer) is not quite connected, mill-outlines.ulp will not be able to generate the paths correctly. Sometimes it will warn you (in German), but other times it won't. When you draw the outlines, make sure you do it in a coarse grid so that you can easily tell if the lines are all connected.
Using dimension tool to put a dimension on the board will cause mill-outlines to generate paths incorrectly. If you want to place dimension in your layout, do so after you have generated the milling files.
If you try to run the CAM Processor while you have polygons in your board layout, Eagle may crash. You can still use polygons when generating the milling paths, but you will probably have to delete them before running the CAM Processor.
Here is a PDF tutorial that someone made. It's pretty good, but some things are not correct for the modified scripts. A better one will be posted in the future.
- Install on linux:
#fab modules cd ~/Desktop mkdir fabmodules cd fabmodules wget http://kokompe.cba.mit.edu/dist/fab.zip unzip fab.zip chmod +x bin/* sudo mv bin/* /usr/local/bin
- it installs a bash script that will let you run it if you type 'fab' in the command line after that. There are presets for both traces and cutting out boards.
Matt Keeter from the Media Lab writes:
I haven't done much through-hole work, but I had vias in my most recent board design. I cut them in the "cut out the board" stage. This required a bit of image post-processing - I had to export the vias image separately then combine it with the board cutout image. Something similar would probably work for through-hole components (Or someone could write a parser that turns gerber drill files into a modela drill script.)
I've attached the makefile and python script that I used to automate this process. It uses the Python Imaging Libraryfor image processing. You'll need to tweak the Makefile depending on OS / project name / layers, but hopefully it's pretty transparent.