Using ExtOut board with PlanetCNC controller

PlanetCNC controllers offer digital outputs for external equipment control. Digital outputs of controller are usually used with output board for spindle control.

To expand number of outputs, you can use ExtOut board with 8 relays. This board comes useful when you need to control many external devices such as vacuum pumps, various actuators, selenoid pneumatic valves (ATC).

Please note:
-ExtOut board can be used only with Mk3 controller

-ExtOut board is connected with Mk3 controller trough ExtIn board.

-ExtOut board requires external power supply, 12VDC , min. 200mA

 

Ext Out board:

ExtIn board:

 

 

ExtIn and ExtOut board are connected via 5wire cable(included with ExtOut board):

 

ExtIn board is then connected with controllers I/O EXT header via 10pin ribbon cable:

 

 

 

 

Using jogging keyboard with PlanetCNC controllers

With Mk3 and Mk3/4 controller you can use external jogging keyboard:

 

Jogging keyboard is connected to controllers JOG header via 16pin ribbon cable.

MK3 JOG header:

 

Mk3/4 JOG header:

 

Jogging keyboard connection with Mk3 controller:

 

Jogging keyboard connection with Mk3/4 controller:

 

Please read tutorial on how to configure jogging keyboard in PlanetCNC TNG software:

 

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 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 labeled 1
Input 2 controls relay labeled 2
Input 3 controls relay labeled 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. Do not connect terminals labeled “S”, “0”, “1”, “2” and “3”.

Set settings like this:

For Mk3/4 and MK3DRV controllers:

Connect Mk3/4 or Mk3DRV 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:

 

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:

 

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

How to use tool change with ATC?

Automatic tool change – ATC tutorial with PlanetCNC software and controller

This tutorial will guide you through ATC hardware equipment installation, software settings configuration and final use of ATC with PlanetCNC software and PlanetCNC motion controller.
We will start by installing ATC hardware equipment on our machine and later on continue with software settings configuration.

In the beginning we will determine how we want to machine our workpiece, and base our settings configuration on it.

But first we will describe and clarify Tool Change feature settings.

ATC HARDWARE EQUIPMENT

ATC stands for Automatic Tool Change. For successful implementation of ATC procedure into your machining process special hardware equipment is required.

This equipment typically consists of pneumatic tool changer, tool holders and tool table. We know many different approaches and concepts, from simple low-cost to expensive professional solutions.

First check that every piece of equipment is working as it should.

Equipment used for purposes of this tutorial is simple and not very complex, however, it fully serves its purpose.

Pneumatic tool-changer and tool-holders:

Tool_Changer

Tool_holder

Tool Table:

Two solenoid pneumatic valves:

Device

Device_back

ATC SOFTWARE SETTINGS

Settings referring to Tool Change and Tool Change ATC are located at File/Settings/Tool Table/Tool Change and Tool Change ATC.

Tool_Table_Settings

No setting referring to ATC is standalone. Meaning, any of these three settings are co- dependent on each other at some point.
For example in Tool Table we set everything about tool specification, but their use is enabled in Tool Change settings. To control the ATC equipment
you need to assign output pins, and you do that in Tool Change ATC settings.

Tool Table settings

Tool table is where all tools are at “rest ”. How many tools is in tool table is up to each user. We will use three tools.
Because each tool is different in its shape and form, you can say that is unique. Therefore we must fill in each tools “personal data” and save it in the tool list.
This is done in General tab.

Tool_Table_Settings_General

Every tool has it “resting” place over the tool table. So we have to save each tools position coordinates.
We will obtain them by jogging machine over populated tools, and then write down the coordinates of each tool. It is necessary that you execute Homing procedure,
because all tool position coordinates use absolute values and you can’t really afford any lost steps. This is done in Tool Change tab.

Tool_Table_Settings_Tool_Change

Tool Change settings

In Position settings group, we can define position coordinates of tool change, Tool offset measurement and Tool change procedure machine “behavior”.

Tool_change_Settings

Tool change ATC software settings

Since ATC if fully automated procedure, controller must control some external device (solenoid pneumatic valves on our example) via output pins from Output connector.
We assign pins for Lock and Blow actions here. What kind of move sequences machine makes when it changes tools from tool table is also set here.

Tool_change_ATC_Settings

STEP BY STEP ATC IMPLEMENTATION:

Note: Hardware equipment and installment procedure is unique for each users equipment and machine.

Step 1: Installing ATC hardware equipment on our CNC machine

Our tool Table should be mounted somewhere safe and remote so that it doesn’t block machines movement and unnecessarily reduces machines working area.

Step 2: Writing down position coordinates

When we populate our tool table with tools, we can jog our machine to tool table and start fine tuning positions of machine, so that we can get precise position coordinates of each tool in tool table.

Step 3: Settings configuration

1.) Tool Table settings

1.1.)General Tab

Each tool used, must be specified in a tool list with name and number.
To add tool in tool table list we click Add button. When tool number and name are assigned we click Update.
We repeat this for every tool.

Tool_Table 4_tools

All other parameters are really not that important for this tutorial.

1.2.) Tool change tab

Here we insert tool position coordinates that we have obtained earlier in Step 2. After we insert tool XYZ position coordinates, we must click Update button.
We repeat this for all three tools.

Tool_Table_4_coordinates

3.) Tool change settings

These settings were explained in previous tutorial, you can read it >here link<.

4.) Tool change ATC settings

Tool_change_ATC_Settings

4.1) Lock and blow pin assignment

Tool_change_ATC_Pin

Here we assign output pins that will control ATC equipment for locking and unlocking tool. We use solenoid pneumatic valves on our ATC.
Lock:
Lock output pin will activate/deactivate pneumatic tool-holder. In this example we will select Output pin 2.
Delay value is amount of seconds that machine waits after Lock output is activated.
Hold leaves Lock output activated when machine changes between two tools.

Blow:
Blow output pin will activate/deactivate blowing of tool-holder between tool changes.
This is used to avoid any impurities attaching on tool-holder and to assist removing tool-holder from its socket.
In this example we will select Output pin 3.

Delay value is amount of seconds that machine waits after Blow output is activated.
Hold leaves Blow output activated when machine changes between two tools.

Safe Height value is height to/from which machine ascends/descends when its in tool change procedure.
Speed at which machine descends/ascends to lock or unlock tool is defined with Speed value.

4.2.) Move configuration

Move Unloaded :
We can set sequence of moves when machine doesn’t have any tool loaded in the tool-holder.
First coordinate column represents first move and second column represents second move. These are offset coordinates.

Example: Move_Unloaded

This coordinate setup will do the following:

When machine unlocks tool, it ascends for 20mm in Z+ and then moves 30mm in X+ direction. Then continues at default traverse rate.

Move Loaded :
We can set sequence of moves when machine does have tool loaded in the tool-holder.
First coordinate column represents first move and second column represents second move. These are offset coordinates.

Example: Move_loaded

This coordinate setup will do the following:

After machine locks tool, it ascends for 10mm in Z+ and then moves for 30mm in Y+ direction at Speed value. Then continues at default traverse rate.

Step 4: Example program

These steps are in the same order as in video:

“Homing”, “Set Current XY offset” and “Measure Current Z offset with Movable sensor” steps are not shown in video. They were done before.

Active tool number in beggining is 2.

 

How to connect proximity switch as limit switch?

HOW TO CONNECT PROXIMITY SWITCH AS LIMIT SWITCH USING OPTOCOUPLER?

There are two types of switches – PNP (3002PA, 3002PB, …) and NPN (3002NA, 3002NB, …)

proximity

 

Switches are also categorized as NC – normaly closed (3002PB, 3002NB, …) and NO – normaly open (3002PA, 3002NA, …).
For NC switches enable “Invert Limit” in software settings, for NO switches disable this setting.


You can connect ordinary switch with optocoupler like this:

switch