Replacing USB board and Mach3 with Planet-CNC USB board and Software
This is a personal choice as the other router I set up runs Planet-cnc gear. As I said previously, I find Mach3 like Pronterface: functional but dated and finicky. For someone following this thread who is comfortable with Mach3, they would probably not bother with this step. For me, however, I really like the software and find it slick and intuitive.
At this stage I've only run two jobs using Mach3. The supplied USB cable caused one to fail part way through (communication dropped) and other (with shielded USB cable in place) was perfect. I can verify that the Chinese Mach3 USB board works exactly like it should. The only reason I'm replacing it so soon is that Mach3 is limited to 500 lines of g-code until you pay for it, which I certainly won't be with the other electronics/software ready to go.
I purchased:
- Planet-cnc Mk2/4 board
- Planet-cnc software license
- Output board
http://www.planet-cnc.com/index.php?page=shop
I also needed:
-A 12V power supply (for the output board)
-A multimeter
-A soldering iron and solder
-Wire cutters/strippers
-Short lengths of wire
Original Wiring
By default for the steppers, the Mach3 USB board is wired with common anode (5V+). This means of the four wires for each axis (STEP+, STEP-, DIR+, DIR-), the two positives are connected together to a common 5V+ rail and the two remaining negative wires control the stepper driver.
Apart from that, three wires output to the VFD to turn the spindle on and off as well as give a 0-10V to control the speed. The e-stop and tool sensor input on pin 14.
Wiring Board to Stepper Drivers
The planet-cnc usb board works better with common cathodes (GND), so a little rewiring was needed. Keeping the common 5V+ means changing jumpers on the new board.
http://www.planet-cnc.com/faq/driver_opto/
Firstly, I cut the yellow and red wires which were all soldered together. Each of them had the tip stripped and tinned with solder. I then soldered the previously separate black and white wires together in pairs (for each axis).
As the labels on the Planet-cnc board matched the labels on the Carving-CNC stepper drivers, wiring up each stepper was very straight forward.
Stepper Driver to Planet-CNC board
---------------------------------------------
YELLOW to DIR
RED to STEP
BLACK and WHITE to GND
Once all of the steppers were wired, I connected everything up, entered the stepper values from the original manual into Planet-CNC software and moved the axis' around. Fortunately, everything worked as expected.
Wiring Inputs
Only two inputs are needed by default, the e-stop and the tool sensor. On the old board, they are both wired to pin 14 which makes no sense to me.
I followed them back to the source to separate the two. The wiring for them is super easy.
Inputs to Mk2/4 board wiring
-------------------------------------
RED (probe) to IN5
RED (e-stop) to CTR1
BLACK x 2 to GND
Mk2/4 to Output board to VFD
This step is necessary to enable software control of the spindle, as seen with the previous board and Mach3. Unfortunately, a separate 12V power supply is needed that can provide at least 200ma. I originally tried a 12V wall wart, but it actually output 15V and stuffed up the 0-10V output, locking the spindle at full speed. I then found my original Solidoodle2 power supply, which is massively over engineered for this, but will do the job fine. There is another blanking hole at the rear available to drill a hole in and then run the 12V wires through.
The wiring seems tricky but is easiest to understand when broken into two parts:
Mk2/4 to Output Board wiring
-------------------------------------
GND to 0
OUT1 to S
OUT2 to 1
Output board to VFD wiring
----------------------------------
0-10 GND to COM
0-10 OUT to AIN1
N0 (relay 3) to X1
3 (relay 3) to COM
Three wires go from the main board to the output board. These are the PWM signal to set the spindle speed, the on/off signal for the spindle and a common ground.
From the output board to the VFD, a 0-10V signal and matching ground wire control the spindle speed. The other output from the main board drives a relay which switches the spindle on/off, but it doesn't do so directly. The spindle switches on when X1 is earthed, so we connect it to earth with the relay inline. When the output board triggers the relay, X1 becomes earthed and the spindle starts.
In the picture below, the previous wiring for the water pump is temporarily disconnected. It will be reconnected at the end.
Software Settings
The planet-cnc documentation here was contradictory. The screenshot in the manual was incorrect, with no pin assigned for the spindle PWM. I got it working through a combination of trial and error and reading the forums. It should be noted that Andrej from planet-cnc has the fastest and technically competent customer service I've ever come across.
Enter the settings below to match the wiring above. Note that the main board still has one spare output that could control a relay to switch on anything of your choice. This includes small voltage DC as well as mains AC power for a vacuum cleaner, mist spray, etc. These can then be activated manually from the software or automatically with g-code.
Board Mounting
The mounting system in the case is designed for the Mach3 usb board, so the two planet-cnc boards will need an adaptor to hold them tight. Luckily there is plenty of room for the two boards and we now have a CNC router to cut out an acrylic adapter.
The intended mounting solution is shown below:
I measured all of the mounting holes and modelled up a quick acrylic plate that will secure them side by side, and then to the original case brackets at the bottom (with the help of two fat plastic washers to get it to line up).
The blue acrylic here was actually cut on the cnc router at work to save time (and not wake up the neighbours before work). M3 bolts, washers and locknuts were used to mount the two boards and the original mounting brackets to the adaptor. This was then bolted to the case and everything was complete! Make sure everything works before bolting on the top of the case.
The STL for the adaptor is attached. It is modelled to be 4mm thick even though the acrylic is 3mm thick. This ensures the cutter cuts the whole way through the work piece. The work piece needs to be packed a little higher to stop the tool cutting the bed, thin plywood or old acrylic scraps are perfect for this.
Post's attachmentselectronics_holder.stl 139.96 kb, 1 downloads since 2013-12-18
You don't have the permssions to download the attachments of this post.