How to control spindle speed in Mach3 with Huanyang and other inverter

Before connecting your inverter to Mach3, consider whether it is needed. You will have more difficulty controlling the spindle manually as the speed is in the file you created. If you jump between different materials, the spindle speed maybe different. You can control it in Mach3 but fine tuning can be tricky, you will understand when you have connected the inverter.

I myself control the inverter manually to have better control when I cut aluminum as an example. Aluminum comes in different degrees of hardness and the speed may differ slightly. I have cut a lot of aluminum, I can hear when the speed is wrong, and I can change the speed while it is cutting. If you have the inverter connected to Mach3 then this becomes more difficult. I have a machine that only cut Valchromat and MDF and 18,000 rpm work for both, that machine is connected to the inverter and it works well.

It is complicated to connect the inverter to Mach3 without instructions since everything from China comes completely without instructions.

I will gather everything here so that you do not have to search for it. Let’s start with the Huanyang inverter. If you have another model, then there will be instructions for that later. There are copies of this inverter and you can probably wire it the same way, if all the instructions can be followed.


We will use the upper terminals and only connect Start / stop, speed and forward rotation the other functions we skip for now. Before you can plug in your inverter you need a circuit board with a relay and 0 – 10v control. See this product

Replace your card by connecting it the same, just note that the ports p2, p3, etc. are backwards but just follow the marking. Tips !, Take a picture of your old settings. The difference with this card is that it also needs 24V which you take from your power supply and connects to the 12-24v port. (+ is down and – upwards if you look at the picture)

We will use the Spindle ON / OFF port and 0-10V Spindle speed. This is how it works.

Relay stops and starts the spindle via Mach3. 0-10V is speed where 10V is maximum speed (24000rpm) and 0 lowest speed. 5V becomes half ie 12,000rpm. Unfortunately, the card does not give exactly 10V but 9.56V in my case, so the speed is not accurate.

Start by connecting – from the 0-10V port to the ACM port on the inverter, and from the 0-10V port to the V1 port on the inverter. Connect one of the ports on ON / OFF to DCM and the other to FOR

You also need to move a jumper, to V1, see picture below

Open Mach3 and go to Config / Spindle Pulleys and set the following

Go to Config / Ports and pins / Motor outputs and set Spindle as the picture

Go to Config / Ports and pins / Output Signals and set the following

Go to Config / Ports and pins / Spindle setup and set the following

I have set the PWM Base Freq to 1000 because I do not get 10V to the inverter, with 1000 I get pretty close to the speed I want. Usually, the value should be 4166 or similar but test yourself for what works for you.

CW Delay Spin up / DOWN is set to 10, which means the machine waits 10 seconds before it starts cutting so that the spindle can reach its speed. I have set my inverter to come up at the right speed in 10 seconds, I want to wait 10 seconds before I cut. If you have your spindle speed upstart set to 20 seconds or 50 seconds then your value should be the same in Mach3.

You also need to program your inverter. Click PRGM and set the inverter to allow Mach3 to control it. Look at the pictures. I show pictures so you can see if you have the same inverter.




You should be able to controll your spindle by pressing the Spindle CW F5 button. The speed of the spindle is now set in your CAM software.

As soon as I get the time, I will see how to connect the other models.