
Electronics
The first thing that was obvious when I looked at the Mantis was that one of the stepper drivers was broken. The electronics were the Fab-in-a-box CNC electronics - overly modularised, leading to an overcomplicated, expensive and oversized system. In addition to that, the computer interface to the electronics was broken and documentation was lacking. I decided to replace the electronics. After mucking around with H-bridges and microcontrollers in an attempt to make a microstepping stepper driver without specialised parts, I decided an off-the-shelf solution would be better to get things working as quickly as possible. I had a RAMPS board lying around - until recently, the best and cheapest choice in RepRap electronics. The RepRap 3D printer is in essence a 4-axis CNC machine - perfect! The first practical problem was that there were no connectors on the stepper motor wires since they were simply soldered to solder pads on the stepper driver boards. I bought some four-pin 0.1" polarised female connectors with wire, cut the stepper wiring from the drivers and spliced the new wires in. Now I had the electronics ready but I couldn't use them yet - they need firmware!
Firmware
The electronics require firmware to instruct the microcontroller. Since I was using RepRap electronics, I decided to use RepRap firmware too. I went for Sprinter because I'm familiar with it and because it simply is the most popular firmware for RepRaps - must be good, right? The first change that I needed to make in the Configuration.h was changing the steps per mm setting. A RepRap uses belts for the X and Y axes, and a different leadscrew for the Z axis. The first step was to set X and Y to the same steps/mm as the Z - all axes have identical drive mechanisms on the Mantis. I started from the default for RepRaps, a better option might be to start with a value from a step count calculator. I simply moved 100mm and measured the distance travelled with calipers. Take the desired distance, divide it by the measured distance and multiply the steps per mm by that factor. During this calibration you can use the M92 command to change the steps per mm without reuploading the firmware (ie, M92 X100 Y100 Z100 - you can omit the others to set one at a time). With all this done, it's ready for testing! Right? Not right. There was another problem ahead..
The Spindle
The spindle is the centerpiece of a CNC mill. It is after all the part that does all the work - it is the part that holds and spins the milling bit. I looked up the specs of the installed motor and found that the rated voltage was 12V. Surprisingly enough, it wouldn't turn at 12V! Cranking up the voltage to 24V made it work but also made smoke come out (!) - seems like it needs to be replaced. I replaced it with 24V DC motor. Sadly enough, the motor wasn't the only problem - the coupling to the milling bit holder was rigid, and the top part of the shaft was eccentric! My first idea was a 3D-printed coupler, for which a number of designs were tried. I ended up filing the top end of the shaft into a square and printing a somewhat loose-fitting counterpiece that goes onto the shaft. This failed after a while because it was printed in ABS, a soft plastic. I'll probably replace it with one printed from PLA, but it has an acrylic lasercut version as a temporary solution. The next part to be fixed was the milling bit holder. The set screws were imperial sizes, so I drilled out the bit set screw (the one you need to use most often) and tapped it to M3, unfortunately breaking a tap in the process. Lesson learnt, lubricate and be careful! M3 was chosen because the other milling machine in the FabLab also uses M3, meaning that the same hex key can be used for both. Less tools to lose is always a good thing. And the table also uses imperial bolts..
The Table
The table is where the workpiece is clamped onto. On the Mantis the workpiece is clamped onto the table with four (imperial, but close to M4) hex bolts which screw into tee nuts on the bottom of the bed. I bought some M4 bolts which surprisingly fit the imperial tee nuts. Since the Mantis will mainly be used for milling PCBs, I drilled new holes to hold the FabLab's PCB feedstock and moved the tee nuts to the new holes. When milling PCBs it is important to get the Z position correct and the easiest way to get this right every time is to use the PCB material and the milling bit as a switch to detect when the bit touches the surface of the PCB material. Usually this involves using crocodile clips to both parts, which isn't very convenient. I decided to connect wires to the tee nuts so that I would have an easy connection to the PCB material through the clamping bolts. A brush will be added to the spindle for the other pole. More updates as soon as I get to the FabLab to work on the Mantis again!


