Search the Knowledge Base
LAN5160T4 Mach 3 4-Axis Ethernet CNC Motion Control Board
Introduction
The LAN5160T4 is a cutting-edge four-axis drive control board developed by Digital Dream. It is a versatile 2-in-1 Mach 3 controller and driver, eliminating the need for additional motor drivers. Designed for 4-axis CNC milling machines, it integrates a CNC motion controller and 4 high-performance Trinamic stepper drivers into a single, compact board.
This all-in-one design simplifies installation, ensures seamless compatibility with a variety of stepper motors, and saves valuable space by combining the Mach3 control card and stepper drivers into one unified system. Communication with Mach3 software is handled efficiently via Ethernet, providing reliable and fast performance.
Specifications
- Controller Type: Mach3 Motion Controller & Stepper Driver 2-in-1
- Axis Support: Independent 4 Axis Support
- Drivers: 4x Trinamic TMC5160 built-in
- Maximum Output Frequency: 300KHz per axis
- Communication Method: Ethernet
- MPG Support
- Output Interface: 3 ports (for spindle control and coolant)
- Spindle Control: 0-10V spindle control with spindle enable
- Power Supply: 24VDC
- 2 Auxiliary Relay Ports
- Control Software: Compatible with Mach3 Software.
- Cooling: Passive cooling via the heatsink.
Safety Notes
The author of this document is not liable or responsible for any accidents, injuries, equipment damage, property damage, loss of money or loss of time resulting from improper use of electrical or mechanical or software products.
Assembling electrical and mechanical CNC machine components like power supplies, motors, drivers or other electrical and mechanical components involves dealing with high voltage AC (alternating current) or DC (direct current) and other hazardous items which can be extremely dangerous and needs high attention to detail, experience, knowledge of software, electricity, electro-mechanics and mechanics.
BEFORE MAKING ANY CONNECTIONS OR DISCONNECTIONS POWER MUST BE REMOVED FROM THE DEVICE AND THE CONTROLLER. FAILURE TO DO SO WILL VOID ANY AND ALL WARRANTIES.
Before starting please read through all the instructions.
Moving objects like CNC Machines and automation equipment can be dangerous. Please take care to keep out of the way of the machine while under operation.
Note:
- Any Mains power connections must be installed by a Licensed Electrician or suitability qualified person.
- This controller is compatible only with Open Loop Stepper Motors. Closed loop stepper motors and servos are not supported.
Errors and omissions excepted
System Requirements
- Windows XP, 7, 8, 8.1,10 operating systems (32 and 64 bit)
- A computer with at least one LAN connection/Ethernet port
- Ethernet cable (For direct PC connection)
Power Supply Wiring
Caution: Any Mains power connections must be installed by a Licensed electrician or suitability qualified person.
To power the LAN5160T4, a 24V power supply is recommended. Use a reputable power supply like the MeanWell LRS24V power supply. Connect the ‘V+’ terminal from the power supply to the ‘+’ terminal on the LAN5160T4. Lastly, connect the ‘V-‘ terminal from the power supply to the ‘-‘ terminal on the LAN5160T4 to complete the connections.
Motors and Motor Driver wiring
The LAN5160T4 uses built-in Trinamic drivers to control 4 motors. There is no need to connect external stepper motor drivers. 2 Phase Stepper Motors with an operating current of up to 6A can be used.
Please note: The minimum output current is 0.5A. If your motors are rated for less than 0.5A, they be damaged due to overcurrent.
XYYZ Motor Wiring
This wiring sequence is for machines with a twin screw-driven Y-Axis setup like the OutBack CNC, or the lead screw variant of the WorkBee CNC.
XYYZ Motor Wiring (Y-Reversed)
This wiring sequence with the single inverted Y-Axis wiring is for machines that use belts and pulleys or rack and pinion transmission such as the Ox Gear and the rack and pinion variants of the WorkBee V3.
Limit Switch Wiring
Limit switches are used to home the machine as well as to stop the machine from over-travelling. The recommended limit switch wiring configuration is the Normally Closed configuration.
Choosing the Normally Closed limit switch configuration is recommended as it ensures that the electrical connection stays closed when the switch is at rest. This provides a reliable way to detect wiring issues such as a break in the wire or an intermittent connection. The Normally Closed configuration also lowers the chances of false signals caused by Electromagnetic Interference (EMI) in environments with electrical noise or when using a spindle or VFD.
Provided in the kit is a DB9 male screw terminal connector which allows the user to easily make connections. Connect each of the COM pins of the limit switches to the G pin on the DB9 connector and use the following table and diagram to connect the NC pin of the limit switch to the relevant pin on the DB9 connector.
Limit Switch Axis | DB9 Connector Pin |
X | 3 |
Y | 4 |
Z | 5 |
Plug the now-wired DB9 connector into the Input Port of the LAN5160T4 controller as shown below.
VFD and LAN5160T4 Wiring and Programming
Caution: Any Mains power connections must be installed by a Licensed electrician or suitability qualified person.
The LAN5160T4 supports 0-10V VFD control. Below is the wiring sequence to the VFD signal terminal. For your convenience, the LAN5160T4 controller is pre-calibrated to output a 0-10V signal by default and no further calibration is required on the controller.
In the kit is a pre-wired JST PH3 connector to be used for wiring VFD control signals. Connect the Provided JST PH3 connector to the VFD terminal indicated as above. The pinout table is also shown below for your reference. Please ensure that a bridge between ACM and DCM is made indicated by the orange wire connection.
JST PH3 Wire Colour | LAN5160T4 Controller | VFD Terminal |
Black | COM | ACM |
Yellow | OUT1 | S1 |
Green | VSO | AI1 |
VFD Signal input Connection to LAN5160T4
After making the connections, plug the JST PH3 connector into the LAN5160T4 controller. The appropriate port is the OUTPUT PORT as indicated by the image above.
VFD Programming
The LAN5160T4 controller is compatible with Variable Frequency Drives (VFDs) that use a 0-10V signal to vary the speed of the spindle.
The programming parameters will depend on the VFD type. The VFD shown below is a Folinn BD600. If your VFD is a different model, consult your manufacturer.
The VFD will need to be programmed using the following commands.
Initially Reset the VFD to factory default setting settings by setting F00.28 = 1
- Frequency Reference Resolution
- F00.11 = 1
- Speed Control Mode
- F00.00 = 2
- Command Source Selection
- F00.01 = 1
- Max Output Frequency
- F00.03 = 400.00
- Run Frequency – Upper Limit
- F00.04 = 400.00
- Run Frequency – Lower Limit
- F00.05 = 133.00
- Frequency A command selection
- F00.06 = 2
- Keypad Setting Frequency
- F00.10 = 400
- Acceleration time 1
- F00.12 = 5
- Decceleration time 1
- F00.13 = 5
- Motor Rated Power: (Ensure that you choose the correct motor power rating for your spindle)
- 1.5kW: F02.01 = 1.5
- 2.2kW: F02.01 = 2.2
- Motor Rated Frequency
- F02.02 = 400
- Motor Rated Speed
- F02.03 = 24,000
- Motor Rated Voltage
- F02.04 = 220
- Motor Rated Current: (Ensure that you choose the correct motor current for your spindle)
- 1.5KW: F02.05 = 7
2.2kW: F2.05 = 9
- Forward/Reverse: 2 Wire Control:
- F05.13 = 0
- F05.13 = 0
- VFD Display RPM
- F07.03=0011
- F07.03=0011
- Decimal Points for Speed Display
- F07.12=0
Complete, the VFD has now been configured.
Network Setup
In order to communicate with the controller, the network will need to be set up on the computer. For your convenience, the network settings come pre-setup on the LAN5160T4 Controller by default.
Direct PC Connection: (Recommended)
The recommended method is to connect your LAN5160T4 directly to your computer. To do this, you will require an ethernet cable.
Please follow the steps below:
- Connect your LAN5160T4 controller to the 24V power supply power supply and switch it on.
- Connect one end of the ethernet cable to the LAN5160T4 and the other to the ethernet port of your computer.
- On your computer, type “Control Panel” in the search bar and click on the Control Panel menu.
- Inside the Control Panel menu open the Network and Sharing Centre.
- An unidentified connection will show. Click on the “Change adapter settings”
- Click on the unidentified connection and a toolbar will appear. Right-click and select properties. A small window will show. We can change the parameters.
- Click on “Properties” and locate the “Internet Protocol Version 4 (TCP/IPv4)“.
Clicking on the properties will show the current IP address and DNS server address settings. Change these to the following as shown below in menu item [1]: IP address: 192.168.4.2, Subnet mask: 255.255.255.0 and tick the “Validate settings upon exit” tick box [2]. When completed, click the OK button [3].
Mach3 Setup Guide
Note: Your computer will restart automatically after the Mach3 installation is completed. Please make sure to save any open work prior.
To interface with the controller, Mach3 software is required. Please download it here. Double-click on the file and follow the installation prompts.
During the installation, you will be prompted to select a profile. Select the Mill Profile. After the installation has been completed, your computer will automatically restart.
You will need to purchase the license file to run Mach3 fully. If a license file is not purchased, Mach3 will only run in Demo Mode, limiting the user to a few functions. Maker Store is a distributor of the Mach3 Licence which can be purchased here.
After downloading your license file copy it and, navigate to the Mach3 installation folder; C:\Mach3 and paste it there.
Installing the LAN5160T4 Controller plugin
For the Mach3 software to recognise the LAN5160T4, a plugin for the controller must be installed. It can be downloaded here.
To install this plugin extract the file, and copy the extracted. Navigate to C:\Mach3\PlugIns and paste the file there.
After both the license file and plugin have been installed, open the Mach3 software. Mach3 as well as a pop-up window will launch displaying that a new plugin has been detected. Select the Digital Dream variant, tick the Don’t ask me this again checkbox and click the OK button.
Motor Configuration
Caution: It is recommended to set the motor parameters prior to running the machine. Neglecting to do this will adversely affect motor performance and may even lead to irreversible damage.
Motor Current and Microstep Settings
As the LAN5160T4 controller features built-in programmable TMC5160 drivers, the motor-specific settings are set in the software.
Navigate to the Config menu, select Config Plugins and a list of plugins will show, Select the DigitalDream plugin’s config button.
A small dialogue box will show. Click on the Config Motor Driver option to set the motor parameters. Initially, the Motor Driver configuration window will be greyed out. Click on the Modify button.
Each Machine Axis will need to be configured and each axis has 3 parameters associated with it. Please note that for the LAN5160T4, you will need to modify the XYZA axis. The B and C axis are not supported. Please see below the description of the settings:
Setting Name | Description |
micro | Micro-step level |
r-cur | Run Current – When the motor is in motion |
s-cur | Holding Current – When the motor is holding position |
Please note that the Run and Holding currents are specific to your motor type. If you are not using Maker Store Stepper Motors, please consult the datasheet/supplier for your motors.
Note:
- For Maker Store motors, these settings are applicable to variants with either 6.35mm or 8mm shaft diameters. For example; the 8mm and 6.35mm shaft variants of the 2.45Nm stepper motor share the same parameters.
- The r-cur and s-cur values are multiplied by a factor of 10. If your stepper motor is rated at 3.2A, your r-cur value should be 32.
- The minimum r-cur and s-cur values are 5 (0.5A).
- s-cur values depend on the load. These can be adjusted down to a minimum of 0.5.
Motor | r-cur Value | s-cur Value |
Nema 23 Stepper Motor 1.26N.m | 28 | 10 |
Nema 23 Stepper Motor 2.45N.m | 30 | 10 |
Nema 23 Stepper Motor – High Torque – 3.0Nm | 40 | 10 |
After making the appropriate changes, click on the save button and then the save settings button.
Clone Axis
Depending on your CNC machine type, you may need to clone an axis. For router-style CNC machines, you have 2 Y-axis actuators therefore cloning the Y-axis is required to power and move the second Y-axis actuator in sync with the other.
Mill-style CNC machines commonly have a single Y-axis actuator with the exception of the C-Beam XL machine which has two Y-axis actuators.
To clone or slave an axis, click on the Config menu and select Slave Axis. A small window will show the axis to be slaved. In this menu, you can slave the main axis [XYZ] to an additional axis such as [ABC].
As shown in the image below, The Y-axis can be slaved to the A-axis driver. The X and Z-axis options should be set to None. When done, click the OK button and restart the Mach3 software for these changes to take effect.


Motor Acceleration and Steps per MM
Each machine has different operating parameters, and hardware and therefore will require different settings. Navigate to the Config menu and select Motor Tuning.
The Motor Tuning and Setup menu will show. As shown below, you can select an axis [1] and modify the axis parameters such as Steps per, Velocity, acceleration and Step/Dir pulse.
Using the table below, fill in the Steps per, Velocity and Acceleration figures. Set the Step Pulse and Dir Pulse to 2.
When done, select SAVE AXIS SETTINGS [2] and click the OK button [3].
Recommended values Based on a micro-stepping rate of 1/8th step or 1600 pulses/rev | |||
Transmission | Steps Per mm | Velocity – mm/min | Acceleration |
Lead Screw | 200 | 3500 | 250 |
Belt | 26.667 | 9000 | 500 |
Rack and Pinion (16T) | 31.83 | 12000 | 500 |
Spindle Configuration in Mach3
The spindle parameters will need to be set in the Mach3 software. Follow the steps below to configure them.
Spindle Outputs
Navigate to the Config menu and select the Ports and Pins menu. A menu called “Engine Configuration Ports and Pins” will show. Select the Spindle tab and modify the parameters as shown below.
In the same menu, navigate to the Output Signals tab and modify the parameters as shown below. When done, click the Apply button. Lastly, click on the Config menu and Select Save Settings for the changes to take effect.
Spindle Parameters
After setting the ports and pins, the spindle speed parameters will need to be set. Click on the Config menu and select Spindle Pulleys.
A window with spindle parameters will be shown. In the Current Pulley drop-down menu, select Pulley Number 1.
Set the Min Speed to 8000, and set the Max Speed to 24000. The Ratio should be set to 1. When done, click the OK button.
After setting all spindle ports, pins and parameters, save all the settings by clicking on the Config button and then the Save Settings option.
Frquently Asked Questions
- Why is my Mach3 software launching in Demo Mode?
- Ensure that the Mach3 license file has been inserted in the Mach3 installation folder.
- Check that the LAN5160T4 controller is receiving power and connected to your computer via the appropriate cable.
- Why is my LAN5160T4 controller not recognised by my Mach3 software?
- Ensure that the plugin for the LAN5160T4 controller has been placed in the plugins folder in the Mach3 installation folder.
Credits
Newfangled Solutions:
- Newfangled solutions developed the Mach3 software for use in CNC machines.
The Mach3 Forums and Comunity:
- The Mach3 Forums and Community offer invaluable support and troubleshooting assistance to fellow Mach3 users
The Maker Community:
- Special thanks to our fantastic Maker Community whose feedback helps provide new ideas and innovation for us to design and produce to make available back to the community.