From Noisebridge
Jump to navigation Jump to search
Noisebridge | About | Visit | 272 | Manual | Contact | Guilds | Resources | Events | Projects | 5MoF | Meetings | Donate | (Edit)
Guilds | Meta | Code | Electronics | Fabrication | Games | Sewing | Music | AI | Neuro | Philosophy | Funding | Art | Security | Ham | Brew | (Edit)
Fabrication | Sewing | 3D Printing | Wood Shop | Metal Shop | SparkleForge | Laser Cutter | Vinyl Cutter | (Edit)
Metal Shop | Lathe | Manual Mill | MaxNCMill | Grizzly G0463 | (Edit)


A good primer on CNC machining:

Background[edit | edit source]

The MaxNC 10 broke at some point and was repaired by @jmathur. This page documents both how to use the CNC (part 1) and how it works (part 2). The second part will be good reference for any that want to improve the CNC.

Part 1: How to use the CNC[edit | edit source]

To begin, this is the CNC:

MaxNC 10.jpg

There are three cables coming out the side, two of which plug into the wall outlet. One provides power to the spindle motor. The other is an AC-DC adapter and provides 24 V to the stepper motors. Plug these into the wall outlet or power strip. The 3rd cable is a USB cable and is responsible for sending G-code from your laptop to the Arduino Uno. Plug this into your laptop (TODO: get a dedicated laptop). After plugging in the USB cable, the green LED on the Uno should light up (you can see it in the above photo). The 24 V stepper power supply is currently duct-taped to the top of the CNC box. Turn the dial all the way to the right. This display should read ~24 V. To turn it off, turn it all the way to the left. You should hear a ‘click’. It might take ~20sec for the display to say 0 V when off.

The 24V DC Power Supply.png

Next, take your hand around the left side of the CNC and to the case. Press the switch to power the case circuitry. See the photo below to see where the switch is (it lights up red when pressed). Your hand needs to get there, but you MUST go around the left side of the CNC. DO NOT raise the window and power on that way. If you want to know why, read the second part of this guide.

Switch photo.png

Now, the CNC should be fully operational. You should hear a high-pitched coil whine from (I think) the steppers. The CNC spindle SHOULD NOT start just by pressing the switch. If it does, something is wrong and that is a hazard. Some quick facts about this CNC.

  1. It follows a right-hand coordinate system (see the photo below).
  2. There are no limit or homing switches. This means you, the operator, need to be smart.
  3. The spindle spins at a fixed 8000 RPM (or maybe 10k RPM; see [1]). Different RPMs can be achieved by changing the pulley drive system. For a discussion on what it would take to get software-controlled variable speed control, see the second section of this guide.

Cnc axes.png
To change bits, loosen the black collet nut. Then select the right collet (collets should be stored in one of the trays on the table) and bit and install them. Hand-tightening the black collet nut will probably suffice, but I haven’t tested many metal cuts and maybe it needs to be tighter for that. The collets come from Taig Tools (specifically 1040 Collet Set).

Next, download Universal G-Code Sender ([2]). You should see a serial device, click that and connect to it. UGS should print sensible messages to the console and say that the connected device is running GRBL. GRBL ([3]) is an open-source open-loop control software that enables an Arduino to control a CNC machine.

Now, your job is to use some CAM software to generate G-code for manufacturing your part. I used Autodesk Fusion, and it works well enough. There are many guides online about how to use Fusion and generate CNC G-code, so I won’t discuss how to do this in detail. A quick outline is:

  1. Use CAD software to design your part
  2. Use CAM software to design how your part will be manufactured. Importantly, set the workpiece origin to something you can move the cutter bit to. This typically means something on the top surface of the part, such as the center or edge.
  3. Use the CAM software to export G-code (Fusion gives a .NC file)
  4. Start UGS. If doing this for the first time, use the Setup Machine wizard. IMPORT THE FOLLOWING SETTINGS FILE: [4].
  5. Import the G-code into UGS
  6. Move the workpiece into the vice and bolt everything down. The piece must be very securely held. Use the smaller Allen wrench in the FoxAllen cardboard box to loosen/tighten the vice bolts.
  7. Use the Jog Controller to move the cutter to the origin of the workpiece. The cutter position should align with the origin in the CAM software. Be careful, moving the cutter too aggressively can cause the cutter to hit the workpiece/vice.
  8. RUN BOTH OF THE FOLLOWING COMMANDS. If you do not do this, your cut will not execute as expected. These set the current position as the home position and the origin. TODO: make this a macro or something.
    1. G92 X0 Y0 Z0
    2. G28.1
  9. Use the UGS visualization of the cut to see if it makes sense. Look at the limits of the X, Y, and Z travel and see if that would cause problems. The main problems to look out for are:
    1. Overshooting and hitting the vice with the cutter
    2. Overdoing the X, Y, or Z travel. The Y-axis travel is particularly easy to overlook in this machine.
  10. Ensure that the window is moved fully down and there is no chance for material (especially shorting material like metal) to center the electronics area. TODO: get magnets to snap the window shut?
  11. If things look good, start the cut. Use the UGS UI to pause/stop a cut if things go poorly. If things go really poorly, unplug the power switches from the wall.

While operational, the CNC should look like this:

Spindle relay.png
There is a relay controlling whether the spindle motor circuit is closed or open. It shines a red LED when the circuit is closed, as shown. The spindle should never spin if this LED is off. Conversely, the spindle should always spin if this LED is on. Note: this relay is built around an optocoupler and therefore is not suitable for PWM (more on this in the second section). The generated G-code should turn this relay on and off. You should have to do nothing to turn the spindle on/off, but this is helpful debug information.

Part 2: How the CNC was fixed[edit | edit source]

The MaxNC 10 was originally supposed to work off an electronics board in the back metal case on the machine. The original circuitry looked like this:

Original cnc wiring.png

⚠️ There is a good amount of circuitry between the wall AC and switch. This means that the moment you plug in the wire, some wires in the case are live. So, don’t even think about doing anything inside or near the case without first disconnecting the wall AC.

The PCB has a parallel port interface which an external computer must connect to. That computer should run Mach3 or LinuxCNC and will control the CNC in real-time through the high throughput, low latency parallel port interface.

I tried this setup, but it did not work. I knew all the motors still worked (spindle you can test with DC power supply; steppers I used this video to guide testing them: [5]). I briefly used a scope to probe the PCB and it was clearly outputting nonsense signals at below-nominal voltages to the stepper drivers. Rather than try to debug components on the board or order a new one, I decided to use an Arduino Uno running GRBL to control the CNC. The main downside of this approach is that GRBL is an open-loop controller. The MaxNC 10 steppers have encoders, so closed-loop is possible. A real consequence of this design decision is that the MaxNC 10 should be run at slower than maximum feed rates, otherwise you risk the steppers missing/overdoing a step, losing its reference, and ruining the cut (yes, this has happened to me, and yes doing this slows your cuts down). For this reason, in the provided settings I set a maximum speed of 300 mm/min on any axis. The main advantage of this approach is simplicity and low cost.

The Arduino (via a CNC shield) connects to 3 stepper drivers (A4988 driver) The only unusual aspect of the setup is that the stepper drivers are meant for bipolar steppers, whereas the MaxNC 10 has unipolar steppers. It turns out you can drive unipolar steppers with bipolar drivers if you wire it right. For the sake of documentation, this is the correct wiring:

Driving Stepper with Bipolar Driver
Stepper Wire (6 Cable Wire) A4988 Pin
Black 1B
Green 1A
Blue 2A
Red 2B

After doing this, I decided I wanted to add software control of spindle speed via PWM. This requires a high-voltage motor controller (the spindle motor is 120 V AC rectified so about 170 V DC). In the most basic implementation, a DC motor controller is just a transistor, so I tried getting a high-voltage MOSFET (specifically an IRFP460). I also added a flyback diode to prevent motor back-EMF from frying the MOSFET. This worked for a day, then failed. The issue could have been a low-quality MOSFET or poor connection quality of the diode. I suspect the latter, but didn’t have time to verify. So, for now I have an AC relay installed to provide on-off control of the spindle. However, some circuitry is still present due to the old MOSFET-control design. Specifically, because more circuitry was being added around the DC circuit, and the DC circuit (both + and - lines) is at a higher potential than the grounded metal case, I wanted to add some electrical protection. In general, it is good practice to put an isolation transformer between wall AC and an appliance circuit, especially a rectified DC circuit. For more discussion on this, see [6]. To this end, I purchased a fused isolation transformer ([7]). For some reason, the output of the transformer picks up a fairly high voltage with respect to the grounded metal case. I saw online that this is expected due to some capacitance between the transformer windings, but very little current should conduct on this line. To test this, I connected a metal wire between the two transformer outputs (one at a time) and the grounded case. Nothing exploded, there was no current. So, I think this is safe. Anyways, the transformer (barely) fits within the metal case. But, there is also a wall-plug cable that goes into one end of the transformer, which then makes the transformer wider than the metal case. So, I had to make the metal case sit on its own, as you can see in the photos. The polycarb window should prevent metal chips from flying into the case, but I have to admit I don’t love the case just sitting out like this. See possible improvement #2 for a solution.

Anyways, that summarizes most of the important decisions that went into the fix. For reference, here is the current wiring diagram of the spindle motor circuit.

Current CNC wiring diagram.png

This is not strictly accurate because the Triac (purchased from [8]) is based on an optocoupler and hence the Arduino 5V circuit is entirely isolated. Also, the diagram only shows the circuit downstream of the isolation transformer. Also, here is the wiring diagram for the spindle motor circuit with MOSFET-enabled software-controllable spindle speed. THIS NOT THE CURRENT IMPLEMENTATION AND IS SIMPLY PROVIDED AS A REFERENCE.

CNC wiring diagram with MOSFET.png

Possible Improvements

  1. Software control of spindle motor speed.
  2. Replace the plug into the output transformer with straight (bendable) wires. Attach them in a way that has good electrical contact, but bend them so they allow the metal case to be attached to the back of the CNC and screwed in. This will reduce any risks of shorts in the case and make pressing the on-switch much more user-friendly.
  3. Screw the Arduino down. Right now it can move. Make sure the USB cable can still be plugged/unplugged!
  4. Protect the Arduino better from shorts. It minimally needs exposure to air or a fan because the stepper drivers dissipate a lot of heat. The current solution might just be the easiest and good enough.
  5. Closed-loop control. The entire Arduino system would need to be replaced.

For those that want to improve/debug the electronics, UNPLUG EVERYTHING FROM WALL BEFORE DOING ANYTHING. Because as stated before, wires are live in the case even when the switch on the metal case is off. Even if you are just touching the Arduino, do you want your hand 4 inches away from live 120 V AC? Your choice.

Other details:

  • Vice was purchased here: [9]
  • Parts are kept in a plastic box in one of the trays on the table. If anyone makes the isolation transformer fit in the metal case (see improvement #2), the metal case screws are in the plastic box. It also has old now unused parts like the stepdown transformer and old, probably broken PCB board.
  • The withdrawable polycarb window was implemented so i) I could see LED indicators of electronic health and ii) I could modify the electronics without taking apart the whole thing. For those that want to modify the electronics, I hope this helps. You should be able to (with some finagling) get the metal case out.

Old Documentation[edit | edit source]

All documentation below is before the fix by @jmathur. It may still have some helpful information, so it is kept around.

IMPORTANT![edit | edit source]

Improperly used, the mill can destroy itself, its tools, and parts of you. Please know what you are doing and don't be afraid to ask questions.

  • Always check limits by manually running outside your mill area with the tool at a safe Z height.
  • USE EYE PROTECTION unless you like tweezering pieces of shattered carbide mill tools out of them

Though we have implemented basic safety shutoffs, we should be watching it all the time. It will very happily mill through itself without stopping.

If it appears to be getting out of hand, the F1 key should toggle Emergency Stop in the software. This will power down the spindle and stop it where it is immediately.

If it REALLY IS getting out of hand, turn the power switch off (the one on the side of the control box). Note however that after doing this you'll probably need to restart the software because it will be out of sync with the controller (it gets out of sync).

Software[edit | edit source]

We are using EMC2 and AXIS software to drive the mill. We had to hack the config files considerably and reverse-engineer the pinout. See here for documentation:

We have installed EMC2 and AXIS and some other software on the driver PC. This depends on a custom kernel and Ubuntu 8.04 -- PLEASE DON'T UPGRADE!

The EMC2/AXIS software takes GCode as motion control input files. More info here: We have figured out several Gcode #Toolchains for your CNC enjoyment

Local Installation[edit | edit source]

To experiment with EMC2/Axis machine on your personal Ubuntu/Debian setup, you may not want to apt-get emc2 because that depends on a special rtai kernel and Ubuntu 8.04. Here's a way to apt-get the pure simulator:

If you are badass, you can compile the code in simulation mode following the instructions here:

The resulting binary should run and give you a UI on your system. There's actually nothing machine-specific that you need at this point: your UI will look pretty much exactly what we have now. Select the "axis.ini" config file.

You should now just be able to:

  • open one of the sample gcode files
  • power the machine 'on' (unset emergency stop [red X], and set power [orange square] buttons)
  • 'home' the various axes (must home all axes, use radio buttons to select)
  • 'run' the gcode. (blue "play" triangle)

For most of the configurations there is a smaller window w/ an inverted cone representing the spindle (this is the default view). This will show the progress of your milling run. You can change the view and pan/zoom/tilt with the mouse.

For a sanity check, try simulating a run of the NB logo gcode from Identity

Then try gcode from the toolchain of your choice.

Login[edit | edit source]

username: nb password: nb

Toolchains[edit | edit source]

Many tools exist for generating/converting to gcode. Here's a good list:

In particular, here's how you generate gcode from

Bitmaps, Images[edit | edit source]

The EMC2/Axis application will import most image formats and create a raster scan tool path with milling depth proportional to image intensity. Haven't tried this but it looks very cool!

Text /TrueType[edit | edit source]

text / truetype :

Hershey Stroke Fonts for Inkscape from EMSL:

DXF/QCAD[edit | edit source]

DXF is a standard file format used by many CAD programs (as well as exportable from inkscape and Adobe Illustrator). It's a good choice, especially as gcode export from Inkscape seems to be buggy.

QCAD is an open-source 2d CAD program. Linux users can apt-get qcad, there is open-source executable for Windows as well (but it's hard to find as Ribbonsoft took it closed-source (wtf?) and most searches end up at their page.) QCAD is very solid and a great place to start with CAD, especially if you can't afford/don't need Autodesk/Solidworks.

The scale feature in QCAD is counterintuitive at first. To scale your object, select all, then select Modify -> Scale. Click the right arrow on the bottom of the toolbar on the left side. It will then ask for a reference point, click on the lower left corner of your image. It will then ask for the scale factor and will scale your object.

Dxf2gcode[edit | edit source]

We use a DXF-GCode conversion called, unsurprisingly, dxf2gcode [URL is not a typo]. In the /home/nb/dxf2gcode directory, run the command.

Open your dxf file from File->Read DXF. It sometimes barfs on DXF exported from Inkscape (works fine for me), but is fine with QCAD, so a workaround is to load the Inkscape dxf in QCAD and save it from QCAD (it's also easy to scale and rotate if necessary).

I am still working through the various dxf2gcode options but setting "infeed depth" to the same value as "mill depth" gives you a one-pass toolpath (otherwise it seems to do it in two passes.)

Coordinate units are kind of a crapshoot and don't make much sense right now.

Note that it may be doing a lot of math without benefit of the numpy library so it can be SLOW. It has no progress indication, and doesn't redraw the screen, so it may look like it crashed. Sometimes it actually does. But be patient!

Sometimes it gives the error "Failure reading like stopped at line X. Please check/correct line in dxf file." If X is the number of lines in your DXF, don't worry, it read the whole thing.

By default it lifts the tool up unnecessarily high, you can improve cutting speed by setting the Z retraction area and Z safety margin to a lower number than the default of 15.

EagleCAD[edit | edit source]

Cadsoft EagleCAD is a schematic editor and PCB layout tool. It's not open source, but there's a free version that is very decent and limited only to the size of board you can lay out.

To generate GCode from your Eagle layout, get the scripts from These do "Isolation routing," that is, they will generate GCode to mill away copper outside the traces you laid out on a copper-covered PCB (as well as drill it).

I've added MAXCNC mill-specific commands to the pcbgcode config stuff, including setting the spindle speed to maximum and turning on the motor. (Config file is /home/nb/eagle-5.6.0/ulp/gcode-defaults.h on the mill PC).

First experiments milling PCBs = success! Jtfoote 23:57, 17 October 2009 (PDT)

I used .01 carbide end mills from here:

On 1-sided copper-plated (1-oz) circuit boards from here:

To start, create a layout in Eaglecad. To work best, use one layer (which can make routing a pain), and use a minimum trace size of 0.012 inches. Make sure you do a DRC check with 10 mil isolation spacing (thouugh I have found it misses trace-pad distances).

From the Eagle command line,

run pcb-gcode-setup

This creates several gcode .ngc file in the same directory as your eagle .brd file. They have suffixes like "top" "bot" and "d" for top copper, bottom copper, and drill. Run AXIS2 and load the appropriate file. Look CAREFULLY at the tool path. Does it really isolate everything you want it to? If not, you may have to increase spacing and re-run. Check especially places of small pitch and tight clearances, especially between traces and pads.

Milling the copper is a tradeoff between quality and speed. At fast speeds, the copper tends to get rough at the milled edges. Slow speed rates help a lot but can lead to impractically long milling times.

2.5 ips gives beautiful results, but a good compromise is something like 5 - 8 ips (set in the pcb-gecode setup). If you look at File->properties in the EMC2-Axis tool it will give you a rough idea of the milling time.

Setting the Z home at precisely zero (at the board surface) is very important, because we are working at depths of hundredths of an inch. After several attempts I don't think you can do this well with just the manual jog, and risk breaking the tool. Here's what I did that worked:

  1. Raise the head so you can put the tool in the collet. Put it in as far as you can.
  2. Tighten gently, only enough to keep from falling out.
  3. Drop the head to about 1/4 an inch above the workpiece. Don't touch!
  4. Loosen the mill tool in the collet
  5. GENTLY let the mill tool drop to touch the workpiece surface
  6. finger-tighten the collet -- tightly!
  7. Home the Z axis VERY IMPORTANT DON'T FORGET!!
  8. Raise the head and wrench-tighten the collet

I think the default Z Down dimension of -0.01 may be too much given that 1-oz copper is supposed to be only 1.4 mils thick (0.0014 inches). I've had good results with -0.008; .0.005 led to problems because I think the PCB I used was not perfectly flat at at some places this depth did not hit "bottom." With further experiments this may be because the clamps are compressing the PCB: at least it seemed to work fine more than 1/2 inch away from them.

Drilling vias[edit | edit source]

For through-hole components, you'll need to drill vias. Doing this is a multi-step, involved process. Because etching is sensitive to the trueness/truing of your board's surface, you only want to etch the board when it's mated directly to a metal block, but you need a plastic sacrificial stop for drilling. So, etch as normal, then add two registration marks to the top of the board. Unmount it, add the plastic backing, change tools, remount, and rezero, respecting the registration. From there, you can run the drill program after suitable modification (you need to manually comment out all M06/tool change commands).

Generating the drill file:

Settings specific to drilling:

  • Machine:
    • Tool Change: you can't actually change tools at the moment, so this is just to expedite your cutting process, and stay within the limits of the mill
      • X: 0.0
      • Y: 0.0
      • Z: 0.2
    • Drill depth: Measure your board with calipers, then add 10mil for good measure (I used -0.100" for the single-sided board I did yesterday)
    • GCode Options:
      • Ensure "Do tool change with zero step" is UNCHECKED. If this is checked, EMC hangs. No, really, you don't want to deal with this problem. It's awful close to "EMC hangs, you have to hard kill it, and then rezero the whole setup."

Once you've got the GCode files for etching and drilling generated, you need to tweak the drill file. As it's currently configured, our milling rig doesn't handle tool changes well (the CNC doesn't support automatic tool change, but the EMC software thinks it does, so the whole setup gets Very Unhappy when it runs into these commands). To remove these, open your drill ngc/tap file in a Text Editor Of Your Choice, and comment out all lines containing the tool change command M06. In GCode, comments are parenthesized lines, and they cannot be nested.

Cheat sheet:

sed: 's/^\(M06.*\)$/( \1 )/;'
vim: :g/^M06/s/^\(.*\)$/( \1 )/
emacs: M-% ^\(M06.*\)$ <enter> ( \1 )

Open your drill file in EMC and make sure it looks sane. There will be a bunch of tool change steps, where it runs itself back to (0,0,0.2), then goes back to work. This is the tool change position specified above; you may want adjust the point to be closer to the centroid of your drill pads, to shave off a minute or two.

After your etch file looks good, and your drill files look reasonably good, go ahead and set up for etching as above. When etching is completed, don't take the board out! We need to add registration marks for the remounting. Manually walk the head down to (0,0,0.5). Once you're there, turn on the spindle, and gently lower the head til it just bites the copper. Personally, I went to (0,0,-0.008), which is the depth used for etching. Leave the spindle on, and raise the head back to (0,0,0.5). You can turn the spindle off if you'd like, then slew over to (1,1,0.5). Once there, turn the spindle back on, and go down to (1,1,-0.008) to make the second registration mark. Raise the head out of the board, then turn off the spindle. I'd also recommend slewing back to (0,0) at this point, to make re-registration easier.

Next, load up the drill file in EMC. You should still have the outline of the paths the head just etched on the display, with the drill file overlaid. This is a good chance to sanity check the line-up of things, etc. Once that looks right, move to adding a plastic backstop and re-rigging the board.

With those two registration marks in place, you can re-rig the board with a sacrificial plastic backstop underneath of it. There's a few of these in the document trays next to the mill. Change out to your PCB drill-end, re-zero as for etching, and ensure you have good registration (make sure the drill-end is sitting on the 0,0 mark when you insert it, raise to (0,0,0.1), and slew to (1,1,0.01) to eyeball the match up. If you want to be totally certain, you can turn the spindle on and just bite the board, but, in doing so, you're likely to obliterate your registration mark, so I'd advise against that.

Make sure you're happy with everything, and, assuming you are, hit Run. Keep an eye on things and be ready to hit the kill switch (if babysitting feels tedious, just imagine yourself doing all these holes on the drill press, and then try not to hug your newfound robot slave/friend). -- User:Jbm 2010-05-07 13:20; a big thank-you to User:jtfoote for all his help in familiarizing me with the setup.

Inkscape [edit | edit source]

This just in, plugin with fix for dxf export. Haven't tried it:

Latest: the gcode export from Inkscape is buggy. It's python so could possibly fix, but it looks kind of involved. Workaround: File->Save As-> .dxf, then use the QCAD->DXF toolchain.

For Inkscape 0.46, use this: (Do "get source", put all files in /usr/share/inkscape/extensions/)

IMPORTANT: Read the "Help" tab when you Effect->Export->Export as Gcode This tells you how to set the origin, and how to name your layers for different tools.

In the exported GCode, you need to add/change the following lines:

Set the cut height to -0.01 (for example, YMMV)

#2=-0.0100 (Height to cut at)

Add commands to turn on the motor after the first line:

G00 Z#1 
S 1000 (set motor speed to 1000 RPM)
M3    (turn spindle motor on)

And you are good to go. ---

This is cool but only works for Inkscape 0.43:

Tooling[edit | edit source]

Cutting fiberglass (PCB) will eventually destroy any kind of steel cutting tool. The glass in the resin matrix is much harder than steel. You need carbide tooling. Note that carbide is too brittle for most metals and will just snap.


*  carries Niagara carbide end mills in fine pitches suitable for circuit boards. Available via Amazon as well. 
* also sells carbide tooling locally, which you can pick up at their store on 760 Market street #905
* High Speed Stainless (HSS) tooling available here:
* Spring loaded tool holders account for warped PCBs and mills:  2linc <-- expensive.  Cheap ones exist.
* Really small end mills bitsbits

Search for "small parts inc" on They have reasonable prices and reasonable shipping for endmills. (You can also search for endmills) I believe we have a 1/4" and 1/8" collet for the mill, so you're looking for tools with a 1/4" or 1/8" shank. I mostly bought HSS for cutting plastic, but I have some harder ones with exotic coatings for aluminum and brass. --lamont

Parallel port DB-25 pinout[edit | edit source]

OK, got a definitive pinout, seem to conform to those above. Jtfoote 23:11, 28 September 2009 (PDT)

Pin  1:  Tool speed PWM, active low, 100Hz, 41uS (33RPM) step
Pin  2,3: A quad input, 500Hz max frequency
Pin  4,5: Y quad input, 500Hz max frequency
Pin  6,7: X quad input, 500Hz max frequency
Pin  8,9: Z quad input, 500Hz max frequency
Pin 10: 7420 quad nand output (motion complete ack?)
Pin 11: NC
Pin 12: X,Y,Z limit (or'ed active high when at limit)
Pin 13: spare digital (unused header labeled "probe")
Pin 14: Enable, active high
Pin 15: NC
Pin 16: input to 4x PICs: enable, active low (reset?)
Pin 17: Enable, active high
Pin 18: GND
Pin 19-25 - NC

LinuxCNC config[edit | edit source]

MaxNC CL 10108B driver[edit | edit source]

1/4" 20TPI lead screws: with 1.8 degree stepper, set `SCALE=32000` on X,Y,Z joints

MaxNC 10: X axis 7.82" range, Y axis 5.42" range

Quadrature driver: `step_type` set to 2,2,2; use stepgen.x.phase-A/B instead of step/dir if you use stepconf to generate the initial config files.

Spindle PWM active low: add `setp 1`

Misc other info[edit | edit source]


This guy rebuilt his, has derogatory things to say:

This other guy has some interesting upgrades. Especially notable is the new motor mount, and appropriate dxf

User:seph was hacking on one. Some notes from him are at There's a pinout, and an emc2 config. He also recommends thinking about eventually upgrading a lot of the components. Seph's work is what I (mikew) based the current functional HAL and INI files on.

Here's the link to how to drive the mill with a pc joystick:

Here is a link to the manufacturer's available accessories:

Workshop notes, 1.15.2010[edit | edit source]

Machine parts and geometry

  • The bed is the blue anodized aluminum extrusion to which the workpiece is affixed.
  • The collet is mounted at the end of the motor. It holds the milling bit. Note: do not lose the collet, as it is basically impossible to obtain a replacement.
  • The milling bit, which superficially resembles a drill bit, is used to machine the workpiece. To setup the machine, bits are inserted into the collet and then tightened with two wrenches.
  • The workpiece is whatever you're milling - copper-clad board for PCBs, aluminum, acrylic, etc.
  • Workpiece holders are small threaded rods with metal "clips" that are designed to hold the workpiece firmly to the bed. They should not be over-tightened, as it can cause workpiece distortion.
  • Backing material is a piece of scrap material used between the bed and workpiece. It's important to use backing material to protect the bed.
  • Limit switches are located at the end of each axis. These act as safeties in case the milling machine reaches the end of its travel. Note: if you're milling and manage to trip a limit switch, the mill shuts off, in which case you'll need to redo your work. Be diligent.
  • The X axis runs side to side; e.g. the "width" of the bed.
  • The Y axis runs forward and back; e.g. the "depth" of the bed.
  • The Z axis runs up and down; e.g. the space between the bed and collet.

Affixing the workpiece to the mill

  • Use a piece of aluminum stock between the PCB and the bed.
  • Use adjustable wrenches to cinch down the workpiece holders to the PCB. You only want the bolts to be finger-tight; the fiberglass substrate can actually be compressed if too much pressure is used, causing distortions in the milled part. Do not use pliers.
  • The collet faces upwards (like the tip of a rocket) into the spindle.
  • Keep the plastic guard attached to the milling bit. Place the bit into the collet, and bolt the collet into the spindle.

Zeroing the machine

  • Note: In the MaxNC control program, it's important to zero the mill - to set it to 0,0,0 - before routing a board. Occasionally, the milling machine will not home to 0,0,0 in the MaxNC control program. To fix this, go to Machine > Zero Coordinate System > P1 G54.
  • In AXIS' Manual Control tab, adjust the X, Y, and Z axis feed controls until the tool is at the upper right corner of the circuit board.
  • Chuck the bit, finger-tight.
  • It is critical to zero the Z axis correctly. The idea is to drop the bit down onto the surface of the copper, with zero force, and then zero the axis. Use the manual controls to drop the bit, step by step, until it is about 1/4" above the surface of the PCB.
  • Loosen the collet so that the bit drops onto the board. Tighten the collet.
  • Immediately zero the Z axis.


  • Controls for starting / stepping / stopping milling operations are located in AXIS' top toolbar.
  • At this point, all of the axes should be zeroed.
  • Click the Go button in the toolbar to start milling.

Upgrade[edit | edit source]

I'd like to upgrade the maxnc. Right now its a bit sloppy. I want to (1) fix it up, (2) make a locating system for two-sided PCBs, (3) make a sweet document with tons of pictures so its easy. -moo

Hey moo, who are you? The mill seems plenty accurate for our purposes, are you finding it isn't? (though a pcb jig would be sweet). I think someone bent the X spindle through misuse, if we fix anything let's fix that... Jtfoote 05:37, 13 May 2010 (UTC)

I recently stopped by and was told that the CNC was dead, or at least not working right, so I took it upon myself to dismantle the motor and spindle, re-oil everything, fix the belt tension, etc. It mills aluminum just fine now, as long as you don't try to take too heavy of a cut. I'm going to start working on a PCB mount system as well. - cole

Guys, I'd like to start using MaxNC for making PCB now, but I didn't see any PCB mount system around here. Are you guys still hanging out here? Hao 16:09, 9 June 2012

host pc upgrading notes[edit | edit source]

Hao just made MaxNC work with a dell latitude laptop (thanks Carlos for the donation of this laptop) on LinuxCNC 2.5, Ubuntu 10.04 Lucid, so he is planning to upgrade the desktop pc which was hosting the MaxNC machine before.

Here's two problem Hao met when he use LinuxCNC 2.5 with MaxNC

2. emc2 doesn't run - missing lapic This happens most usually on Ubuntu 10.04 LTS + emc2. Error messages like this:

.... Realtime system did not load .... Debug file information: insmod: error inserting '/usr/realtime-2.6.32-122-rtai/modules/rtai_hal.ko': -1 Operation not permitted

Additional the following lines are found in dmesg:

.... [ 0.000000] Local APIC disabled by BIOS -- you can enable it with "lapic" .... [ 54.798391] RTAI[hal]: ERROR, LOCAL APIC CONFIGURED BUT NOT AVAILABLE/ENABLED.

This means your computer has a Local APIC, but it is not enabled. RTAI however expects it to be present and enabled to be able to work. You can force it to on by editing:

in /etc/default/grub, change



GRUB_CMDLINE_LINUX_DEFAULT="quiet splash lapic"

afterwards run "sudo update-grub" and restart.

1.1. emc.nml changes For configurations that have not customized emc.nml, remove the inifile line NML_FILE = emc.nml. This will cause the most up to date version of emc.nml to be used.

For configurations that have customized emc.nml, a change similar to this one is required.

Failure to do this can cause an error like "libnml/buffer/ 143: PHYSMEM_HANDLE: Can't write 10748 bytes at offset 60 from buffer of size 10208."

12:21 PM, 5 Aug 2012

Ideas for maxnc accuracy improvement[edit | edit source]

In order of utility and least cost

  • tear-down + lube, wax x-y interface
  • inspect replace x-axis gib
  • replace set-screws, with hex cap with nut to lock down
  • x-axis motor mount (stiffer)
  • do swivel ball bearing set screws. (make sense with a gib? ) (anyways grease + locktite)
  • add bearings at ends of lead-screws to stabilie (original MaxNC has these... )
  • z-motor mount (plans at
  • spindle replacement

dual layer PCB fixture & locating system[edit | edit source]

Part 1 work plate for prepared pcbs (i.e. has holes for locating)

  • make pin indexed work plate that attaches with t-nuts (no need to drill holes in the maxnc)
  • add large dowel pins for indexing PCBs with pre drilled holes.
  • release pockets to scoop under pcb

part 2 prep work-plate

  • something sacrificial with indexing corner, to drill holes in PCBs needed to locate in dowel pins above
  • Face mill both to get flat surface.

This could make it really easy to get good dual sided pcbs. Process would be:

  1. load prep pate, clamp down pcb in corner
  2. home
  3. run pre-written g-code
  4. swap plates
  5. home.
  6. Place pcb in dowel pins, glue, mill side 1
  7. Flip pcb (release, reglue)
  8. Mill side 2
  9. Remove, release CA glue with acetone

UPDATE: 4/25/14

Machinist from 23b Shop checked out the mill. Settings have been tweaked, worlds have been reversed. X and Y axis flipped, .INI file adjusted to allow for a higher MAX_VELOCITY (15 IPM now, up from 6, not sure the original control hardware can do much more than that)

Seems like the mill prefers to have all the XY coordinates in the positive quadrant in relation to the G54 origin.

Simplified G code worked just fine

Gibs on the Y axis need adjustment, no limit switches or end stops are installed at the moment, so use the mill with extreme caution.

two sample programs exist in the nc_code folder, noise.txt and nyan.txt, both will run on a 3.5" tall, 4.5" wide piece of stock, with the origin at the front left corner. Use a 1/8" engraving bit.