Nowadays, mechanical components and electronics for CNC machines have become widely available, so realizing the idea of building your own CNC machine is just a step away. When planning, sooner or later we face the question of how we will control our CNC machine. For control, we need to choose both the appropriate software and the controller that is compatible with it. There are many different solutions available, from simple to more complex and from cheaper to more expensive. In the end, we have to choose the one that will ensure that our CNC machine and other devices connected to it have all the functions we expect and need.
In this article, we will present how to set up the control of a CNC machine with a controller in a simple way Novusun NVEM V2. This controller is designed for use with Mach3 software, which is popular both in the industry and among CNC enthusiasts. Due to its reliability and relatively low price, Novusun NVEM V2 offers a favorable ratio between quality and price. The NVEM V2 controller can control 3/4/5/6 stepper motors or servo motors. It has 12 inputs, 10 optically isolated outputs and allows PWM or 0~10V analog output. It is connected to the computer via an Ethernet interface, either directly or via a router.
In this article, we will use Windows 10. Everything written can be easily used on older versions of Windows as well.
Connection diagram of Novusun NVEM V2 controller in CNC machine
First, let's see how to connect stepper motor drivers, stepper motors, power supply, switches, etc. to the controller.
Choosing the right power supply for Novusun NVEM V2
It is recommended to choose 18~32 VDC power supply. But I can say that when we powered it with 12 VDC, the controller worked perfectly normally.
Installation of MACH3 software and plugin
We will not go into the MACH3 software installation here. I gather that we already have MACH3 installed on our computer. We also need to install a plugin where the settings for MACH3 are stored, which enable the controller to communicate properly with the computer. The plugin can be found at this link: NVEM-V2 Plugin
Unzip the Novusun.rar file, then copy the Novusun.dll file to the C:\Mach3\Plugins folder. The path to the folder depends on the location where we installed MACH3 and therefore may differ in your case.
Connecting the computer to the NVEM V2 controller
- Direct connection between computer and controller
In the Windows Start menu, type "View network connections" and click on it. A window with network connections opens. Then right-click on the Ethernet or Local Area Connection icon and select Properties.
Select Internet Protocol Version 4 (TCP/IPv4) and click Properties.
Select Use the following IP address and copy the numbers as shown in the image below.
Now we can connect the controller and the computer with an Ethernet cable.
We can see if the connection is successful if we right-click on the connection, which now no longer has a red cross, and select Status.
The success of the connection is indicated by the Bytes in the field Sent and Received, which must be more than 0.
Let's start the MACH3 software. If we installed the Novusun.dll plugin correctly (see point 2), MACH3 offers us the Novusun-Novusun-Plugin-Ver-3.0b option, which we select and confirm.
Tuning the engines
In the tab Config → Ports & Pins → Motor Outputs, set the values as shown in the image below. In the Enabled column, select the axes you want to use.
If you want to change the direction of rotation of an individual stepper motor, change the value in the Dir LowActive column for each motor, from a cross to a checkmark or vice versa.
Now we need to set the maximum allowed values of speed and acceleration of each axis of the CNC machine.
In the tab Config → Motor tuning, set the following values separately for each axis:
- Steps per: This field represents the number of steps the stepper motor must take to move the axis by 1mm. The formula is as follows: Steps per = A * x / m; A = number of full steps of the stepper motor in 1 revolution (typically 200); x = driver microstepping; m = pitch of the threaded spindle, or by how many mm the axis moves at 1 revolution of the stepper motor. Example: we have a stepper motor with 200 steps per revolution, microstepping 8 (1600 steps per revolution) and a thread pitch of 5 mm; value Steps per = 320.
- Velocity: set the maximum allowed speed in mm/min or in/min, depending on which metric unit is set in the MACH3 settings.
- Acceleration: set the maximum allowable acceleration in mm/sec/sec or in/sec/sec.
- Step Pulse: here we set the width of the 5 V pulse. This width must be at least as specified in the stepper motor driver specifications. We can set 5us.
To save the entered data, after entering the data for each axis and before clicking on another axis, click SAVE AXIS SETTINGS. Otherwise, the data will not be saved.
The changes will take effect after restarting MACH3.
Connection of E-stop, limit switches
E-stop, limit switches, probes are connected as shown in the diagrams below.
PNP inductive switches can also be connected to the controller as shown in the diagram below.
Now we have to enter the appropriate settings in MACH3 as shown in the pictures below. Input signals are on Port 1, the Pin number is chosen according to the configuration of the connection of switches and sensors.
Connecting the relay to the Output pin
All outputs are optically isolated. They share a common ground, which is separate from the ground of the controller's main power supply.
As we can see from the diagram above, we have to supply power between the output and GND1 if we want to open and close the relay. The optocouplers in the NVEM V2 controller are labeled EL3H7. In their specification, we can see that a maximum voltage of 80V and a maximum current of 50mA can be applied between each output (OUT3, OUT4, OUT5,...) and GND1.
This current is usually not large enough to directly open the relay, so we have to choose another way. The relay must be powered directly from the power supply, and the signal path must be routed through the optocoupler of the controller. We choose a relay module that has 3 pins on one side, DC+ and DC- (GND) for power and IN for signal. The relay must be of the "trigger low" type, which means that it will be activated when 0V is applied to the IN pin. It is also important to choose a module that is suitable for the voltage with which we want to open it. The most common are modules for 5V, 12V and 24V.
We need another 10 kOhm resistor, which we insert between the DC+ pin and the IN pin on the relay module. It is not necessary to use exactly 10 kOhm, we can use any value between a few kOhm and 10 kOhm. We make the connections as shown in the diagram below.
Now we need to enter the appropriate parameters in MACH3. Go to the Config tab → Ports & Pins → Output Signals. The port where the outputs are located has the value 2. The pin number is from 1 to 10.
In the Spindle Setup tab we define what we will use a certain output for. M3, M4, M7 and M8 are G codes that turn on a specific output and thus open the relay.
Sources:
Write A Comment