Replacing Chinese JP-382C board with genuine PlanetCNC MK3DRV controller

1. Take your control box and remove all screws of the top cover:

Now remove top cover of control box:

2. Locate JP-382C board and disconnect connectors of cable sets for X, Y and Z axis motor outputs, power supply and E-Stop switch. They should not be hard to find:

3. Remove JP-382C board from enclosure by unscrewing two screws at the bottom side of control box and two screws at the back panel:

4. Throw JP-382C board into the trash bin:

5. Take MK3DRV controller and 3D printed pillars:

3D printed parts are available here: PlanetCNC Mk3DRV pillars and back panel

6. Attach and screw them to Mk3DRV controller:

7. At the back panel place controller into existing cutout hole and screw it:

Screw in also pillars at the bottom side of control box:

8. Take cable sets for x,y,z motors that we previously disconnected from JP-382C board:

And cut off the connectors:

Each motor cable set should have 4 wires, 2 wires of one colour and other 2 in different colour.
Each colour represents separate phase of stepper motor.

9. Connect motor cable wires for X,Y and Z axis to Mk3DRV motor output terminals MOTOR 1(X), MOTOR 2(Y) and MOTOR 3 (Z). Motor phase 1 wires (yellow wires) are connected to terminals 1A and 1B, motor phase 2(red wires) is connected to terminals 2A and 2B.

10. Locate power supply cable and cut off its connector.
Connect power supply cable wires to Mk3DRV power supply terminal 24V. Red wire should be connected to “+” terminal and black should be connected to “–“ terminal:

11. Locate E-Stop switch cable and cut off its connector.
Connect it to Mk3DRVs GND and eSTP terminals:

Now you can use your control box with PlanetCNC TNG software and your CNC machine.

PLEASE NOTE: MK3DRV can be used only with PlanetCNC TNG software version SW2017.10.30(or newer), if you will use older version for update such as SW 2017.10.20 beta you could bridge it.

Plasma CNC and floating Z axis with PlanetCNC

Sometimes we need to modify our CNC machine in order to achieve our machining goals as quickly and as efficiently as possible. CNC machines such as plasma, plotter cutters, lasers need mechanism that helps with measuring of material surface.

Good example of such modification is Floating Z axis.

The concept is pretty straight forward:  Z axis has its own movable unit which is able to move when tool encounters with material surface.

Floating Z axis on a plasma machine is a safety feature that prevents any serious damage of your plasma torch, in case of hitting any obstacles on located on machine table.

For plotters and drag knife cutters,   floating effect comes handy because it is much easier to apply pressure of the pen or  knife onto material surface (paper, carton, vinyl etc) without the frustrating trial and error procedure.

Floating Z axis can also be used for measuring material top surface. In such case, floating z axis unit uses limit switch. When Z axis moves down towards the material, activated switch signals controller that surface of material was detected and zero work position of Z axis can be set.

This procedure is similar to movable tool sensor, except that thickness value is negative. See bottom of this page for more details.

 

Example of floating Z axis:

 

Example of floating Z axis on plasma machine using limit switch:

 

Obtaining thickness value on plasma machine with floating Z axis:

Full tutorial about movable tool sensor can be found here: https://planet-cnc.com/measure-work-position-movable-sensor/

Slowly jog Z axis towards the material surface, so that the nozzle of plasma torch is just barely touching the surface of material. You can help yourself by adding a sheet of paper between torch nozzle and the surface of material. Start moving the paper and when you are not able to move paper anymore, set work position Z to Zero.

 

Now jog Z axis further more in -Z direction. When floating Z axis limit switch will activate, write down position value of Z axis. This is your thickness value.

 

You can make your own floating Z axis unit. 3D and STL files are published here:
https://www.thingiverse.com/thing:2516238

Spindle synchronisation with PlanetCNC TNG

CNC lathe thread cutting requires spindle RPM’s to be synchronised with machines linear movement, we call this spindle synchronisation.

To achieve this, controller needs to read feedback signal from machines spindle to obtain information at which RPM spindle rotates.

For this purpose we can use incremental (with quadrature A and B signals ) encoder or some sort of sensor that would read spindle RPM’s.

If we would use only sensor, we could use optical or magnetic sensor.

But since encoders already use index signal, choosing encoder would satisfy all our needs.

Encoder should rotate at same rotational speed as spindle. Normally it is mounted directly on spindle shaft or connected to spindle shaft via pullyes and timing belt. In such case make sure that transmission rate is at 1:1.

Encoder uses two quadrature signals, A and B and  Index signal. For our purposes 100PPR(parts per revolution) encoder would do just fine.

Encoder is connected to controller via its CTRL header:

 

Encoder wiring  for Mk3 controller:

Signal A from encoder is connected to EN4A  pin and signal B from encoder to EN4B pin of CTRL header.

Index signal from encoder is connected to IDX pin of CTRL header.

 

Encoder wiring for Mk3/4:

Signal A from encoder is connected to ENC A  pin and signal B from encoder to ENC B pin of CTRL screw type terminal.

Index signal from encoder is connected to IDX pin of CTRL screw type terminal.

PlanetCNC TNG encoder settings:

Encoder settings are located in: File/Settings/Input/Output/Spindle -> Encoder

PPR: PPR value of your encoder.

Index PPR: Number of index signals per one revolution of encoder.
Invert: Inverts Index signal.

Debounce: Debounce time period for index signal.

 

Video of thread cutting using lathe CNC machine and PlanetCNC TNG software and motion controller:

Using Adapter for 16 pin header with PlanetCNC controllers

If you need to connect your external electrical equipment such as sensors, switches, buttons, encoders with controller using single wires, you can use adapter for 16pin header.

adapt16_1

Adapter pinout when connected to CTRL header of Mk3 controller:

ctrloriginal_small

Adapter pinout when connected to JOG header of Mk3 controller:

ctrl_small

Adapter pinout when connected to LIMIT header of Mk3 controller:

limit_small

Using Adapter for 10 pin header with PlanetCNC controllers

If you need to connect your external electrical equipment such as sensors, switches, buttons, encoders with controller using single wires, you can use adapter for 10pin header.

adapt10_front

Adapter pinout when connected to AUX header of Mk3 controller:

auxconn_small

Adapter pinout when connected to AXIS header of Mk3 controller:

axis_small

Adapter pinout when connected to INPUT header of Mk3 controller:

input_small

Adapter pinout when connected to IOEXT header of Mk3 controller:

ioext_small

Adapter pinout when connected to OUTPUT header of Mk3 controller:

output_small

Adapter pinout when connected to SDI2C header of Mk3 controller:

sdi2c_small

Using output board for spindle control

In this tutorial we will explain how to use output board with VFD and spindle. We will describe how to set VFD* parameters and how to connect output board with VFD control inputs.

We are aware that many users use different VFD’s but no worries, the work flow in a sense should be the same.
*For purposes of this tutorial we will use MK3/4 controller and Chinese Huanyang VFD which is a well known piece of equipment among hobby machinists around the world.

Please follow this link to introduce yourself with output board and controller pin configuration:

Using output board with PlanetCNC controllers

 

Step 1: Configuring Huanyang VFD’s parameters

Variable Frequency Drive (VFD) drives an electric motor by varying the frequency and voltage supplied to the electric motor. VFD controls motors ON/OFF control,speed, direction etc..

All these functions can be controlled via external equipment (output board). Output board communicates with VFD trough its control inputs which are located on external terminal panel.

So first we need to define operating mode and configure VFD’s control inputs.

1.1: Defining VFD’s operating mode:

  • We want to start/stop spindle from VFD’s external terminal panel
  • We want to change motors direction from VFD’s external terminal panel
  • We want to regulate motors RPM from VFD’s external terminal panel with 0-10 analog voltage signal

 

After going trough VFD’s user manual we know that we need to configure these parameters:

“Source of Run Commands” ->parameter PD001

PD001 → set it to value 1 (Set by external terminals)

Start, stop, change direction and speed can now be controlled via screw type input terminal.
“Source of Operating Frequency”-> parameter PD002

PD002 → set it to value 1 (Set by external terminals);

Source of operating frequency signal type is determined with parameter PD070

PD070 → set to value 0 (0-10V)

Motor speed can now be controlled via screw type terminal using the 0-10V input.

 

Step 2: Connecting output board with VFD

We need to connect output board with VFD control inputs.

Basic Connection Diagram :
VFD_control_inputs

Control inputs of VFD that we will use:

“FOR”: This input will be used for forward motor rotation

“REV”: This input will be used for reverse motor rotation

“DCM”: Common Terminal of Digital and Control Signals

“VI”: Analog Voltage Frequency Reference Input. 0-10V signal from output board will be connected to this input.

“ACM”: Common Terminal of Analog and Control Signals. GND signal from output board will be connected to this input.

Connect output pins of controller with input pins of output board:

Controller_Output_board

Connect output board with VFD’s control inputs:
Output_VFD

Wiring diagram below illustrates how relays and varying voltage output are connected with VFDs control inputs so that we achieve on/off, direction and speed control:

shemasrednja

Short functional behaviour description:
When spindle is turned ON (M3 command), relay 1 is activated and motor rotates in forward direction(VFDs FOR input becomes active).

As soon as we change direction, relay 2 is activated and motor starts to rotate in reverse direction (VFDs REV input becomes active).

Please NOTE:

Before any wiring is done and equipment is connected, please check that all spindle, coolant and speed g-codes activate correct corresponding relays and outputs.

Using optocoupler adapter board with PlanetCNC controller

BannerPS_small2
Bottom wiring diagrams demonstrate various uses of adapter with optocoupler:

Optoisolated axis output:

OptoAxisBoard

Optoisolated limit switch inputs:

OptoLimitBoard

OptoLimitBoard24V

Using PNP proximity switches with optocoupler adapter:

With 12V power supply:
OptoProximityBoard12V

With 24V power supply:
OptoProximityBoard24V

Using SD card adapter with PlanetCNC controllers

Banner2

Connect SD card adapter with the Planet-CNC controller:

Mk3 and Mk3/4 controller:
SD card adapter is connected to Mk3 and Mk3/4 controller with 10pin flat cable trough SD&I2C connector.
Mk34LatestSmall

Mk3LatestSmall

Mk2 controller:
SD card adapter is connected to Mk2 controller with 10pin flat cable trough EXT connector.
Mk2LatestSmall

 

Export your toolpath to Raw file format in CNCUSB controller software: “File/Export Toolpath to Raw”:

ExportRawMenu

Raw file must be named “toolpath.raw” and must be located on SD cards root folder.

 

Program Execution:

You can start the execution of your program from SD card:
“Machine/Start from SD card”

If you do not intend to use computer, you can connect a switch to desired input, assigned it as “Start” switch in software and start the execution of the program without the use of computer.

In settings you set input as ‘Start’ switch:

Mk3 and Mk3/4:
File/Settings/Input

Mk3Start

Mk2:
File/Settings/Input/Use Start
Mk2Start

NOTES:

When running your program from SD card, the initial starting point of machining is always machines absolute XY=0 position.

It is important that the version of controller(Mk2, Mk3..) connected to computer when you export your toolpath to RAW format is the same as the one that will be later executing program from SD card adapter.

When you use controller in standalone option (no computer and no power supply via USB) it is necessary to use external power supply. Normal 8-24VDC adapter is suitable.

Mk2 requires jumper “JMP” to be short circuited (soldered) while Mk3 and Mk3/4 do not need this jumper to be short circuited.

Same settings need to be used when exporting toolpath(RAW file) and when updating controllers firmware (same settings need to be loaded into software).

Using output board with PlanetCNC controllers

Banner

Output board is used for control of external equipment such as VFDs, coolant systems, vacuum pumps etc.

It requires 12V power supply connected to a terminal labeled 12V (be careful with the polarity). Output board has 3 relays and 0-10V output. Relays can be used as NO (normally open) or NC (normally closed).

Output board can be connected with controller via 10pin IDC header or screw type terminals labeled “S”, “0”, “1”, “2” and “3”.

 

1. Output board connector description:

IDC header:

This IDC connector is used to connect output board with controller via 10pin ribbon cable (For Mk2 and Mk3).
IDC_resized
Pin 5 of this connector activates relay 1.
Pin 4 of this connector activates relay 2.
Pin 3 of this connector activates relay 3.
Pin 6 of this connector controls 0-10V output.

Control input terminals:

This screw type connector is used for connection with Mk2/4, Mk3/4 or Mk3DRV controllers(or some other external devices) with output board:
Control_Inputs_resized

[0-10V; GND, OUT] → to connect variable voltage output with VFD, output

[POWER; GND, 12V] → to connect power supply (12V DC, at least 200mA ), input

[SPEED; S, 0] → to connect varying frequency signal from controller or some other external device, input

S: Frequency signal input from Mk2/4 or Mk3/4 or other external device

0: GND from controller

[RELAYS; 1, 2 , 3] → Control signal input for SPINDLE, MIST or FLOOD from controller (or other external device), input
Input 1 controls relay labelled 1
Input 2 controls relay labelled 2
Input 3 controls relay labelled 3

Trimmer:

This trimmer is used for calibrating the 0-10V output:
Trimm_resized

Relay output terminals:

These are relay connectors. They are used for connection of the controlled device:
RelayConnector

NO- normally open contact of relay
NC- normally closed contact of relay
1 – common movable contact of the first relay
2 – common movable contact of the second relay
3 – common movable contact of the third relay

 

2. Output board and controller connection:

Mk2 and Mk3:

These two controllers use 10pin IDC connector, which makes the connection of controller and output board very easy.

Mk2 output connector:
Mk2_out_resized

Mk3 output connector:
Mk3_out_resized

Mk2 connection:
Mk2resized

Mk3 connection:
Mk3resized

 

 

Mk2/4,Mk3/4 and Mk3DRV:

These controllers use screw type connectors so you will need to use single wires to connect controller with output board. To know which output pin from controller is connected to which input of output board, please refer to tutorial in Step 1.

Mk3DRV output connector:

 

Mk3/4 output connector:
Mk34_out_resized

Mk2/4 output connector:
Mk24_out_resized

Mk2/4 connection:
Mk24resized

Mk3/4 connection:
Mk34resized

MK3DRV connection:

 

3. Configuring controllers output pins in PlanetCNC TNG software:

For Mk3 controller:

Connect Mk3 controller with output board like described above (connection for Mk3 and Mk2).

Set settings like this:

For Mk3/4 and MK3DRV controllers:

Connect Mk3/4 or Mk3DRV controller with single wires to screw terminals.

If you want to use 3 relays without the 0-10VDC output, connect output board terminals to controller like this:
“S” – not connected
“0” – GND
“1” – OUTPUT1
“2” – OUTPUT2
“3” – OUTPUT6

Set settings like this:

 

If you want to use 2 relays and 0-10VDC output, connect output board terminals to controller like this:

“S” – OUTPUT6
“0” – GND
“1” – OUTPUT1
“2” – OUTPUT2
“3” – not connected

Set settings like this:

4. Configuring controllers output pins in CNC USB controller software:

For Mk2 and Mk3 controller:

Connect Mk3/Mk2 controller with output board.Do not connect terminals labeled “S”, “0”, “1”, “2” and “3”.

Set settings like this:
outputMk2

For Mk3/4 controller:

Connect Mk3/4 controller with wires to screw terminals.

If you use 3 relays connect output board terminals to controller like this:
“S” – not connected
“0” – GND
“1” – OUTPUT1
“2” – OUTPUT2
“3” – OUTPUT6

Set settings like this:
outputMk34a

If you use 2 relays and 0-10V connect output board terminals to controller like this:

“S” – OUTPUT6
“0” – GND
“1” – OUTPUT1
“2” – OUTPUT2
“3” – not connected

Set settings like this:
outputMk34b

 

For Mk2/4 controller:

Connect Mk2/4 controller with wires to screw terminals.
If you use 3 relays connect output board terminals to controller like this:

“S” – not connected
“0” – GND
“1” – OUTPUT1
“2” – OUTPUT2
“3” – OUTPUT7

Set settings like this:
outputMk24a

If you use 2 relays and 0-10V connect output board terminals to controller like this:

“S” – OUTPUT7
“0” – GND
“1” – OUTPUT1
“2” – OUTPUT2
“3” – not connected

Set settings like this:
outputMk24b

Using EggBot with PlanetCNC controller and Toslink

In spirit of Easter holidays(with a slight delay) we decided to wipe the dust from our EggBot and see if still works. We thought that it would be perfect if we use Toslink devices to demonstrate how both, Mk3 controller and Toslink work perfectly hand in hand.

 

For better understanding of Toslink please follow link below:

http://irnas.eu/goodenoughcnc/2016/03/10/toslink-cnc

 

Toslink can be integrated with a small stepper driver by just being stacked with motor driver and connected via flat ribbon cable:

Toslink Driver - Copy

 

Master Toslink board sends coded optical signal to all Toslink slave devices:

Master Toslink - Copy

 

Controller is connected with Toslink master board which is connected with Toslink devices via optic fibre cable:

Complete

Here is a short video showing Mk3 controller, Toslink and EggBot in action.

 

 

 

 

 

 

 

 

How to connect motor driver with optoisolated inputs

HOW TO CONNECT MOTOR DRIVER WITH OPTOISOLATED INPUTS?

There are two possible connections:

1. Common cathode
opto_common-cathode

2. Common anode
opto_common-anode