Posted on

Adding a spindle to your LongMill?

UPDATE: We now offer spindle kits specifically for the LongMill. Make sure to check it out here.

Over the last few months, I’ve been playing around with using a spindle on the LongMill MK2. Originally, we didn’t recommend for customers to use spindles on their LongMills due to the overall cost and complexity, as well as because we hadn’t done much testing on how a heavier spindle would behave on the LongMill.

I recently wrote about working with Andy McTaggart, one of our beta testers in one of our posts. There I mentioned that at the speed and cutting depth he was running his project, I could audibly hear his Makita router struggle. Although the project was completed without incident, I also realized that now with the LongMill MK2 bringing significant rigidity improvements, there were a few more areas in which we could push the boundaries of how hard we can run these machines.

Now with the overall rigidity improvements on the LongMill MK2, we are more confident in recommending installing a spindle for some customers who might benefit from the extra power and features a spindle can offer, which we’ll discuss in this article. We’ll also talk generally about installing a spindle and some of the things I recommend watching out for.

Disclaimer

I have done my best to make sure the information in this article is useful, accurate, and relevant. However, I do not take any responsibility for any issues, injuries, or damage arising from this. We do not provide direct company support for spindles and VFDs, so we cannot help you with your specific setup or installation. If you have any inquiries or questions, please direct them to the manufacturer of your spindle or VFD.

This article is designed to provide some general information, not a step-by-step instructions for adding a spindle to your machine. Installation will vary significantly depending on what hardware you are using.

We want to create a plug-and-play option for a spindle for the LongMill in the future. However, at this time, there is no timeline or plans for this to be available anytime soon. If you wish to stay up to date on future development, please sign up for our mailing list: https://sienci.us13.list-manage.com/subscribe/post?u=720f140325aaa668a8aa09916&id=e18d59a085

Who would I recommend spindles for?

I’ve had the chance to work with spindles in both industrial and hobby settings, as well as play around with a variety of different types of spindles over the years. I’ve also spent many years using the Makita RT0701 router which we recommend for the LongMill as well.

The biggest and main reason I don’t recommend using a spindle is because spindles and VFDs are much more complicated than routers. Yes, a spindle comes with a lot of advantages, but for most beginners, I don’t think the benefits outweigh the potential cost and headaches of setting one and using one brings. Although there are now some plug-and-play spindle kits available for hobbyists, such as from PwnCNC* that can take some of the guesswork out, there are a lot of settings, wiring, and other technical details that may confuse users. From my experience, cheaper spindle kits that you can find on Amazon and Aliexpress have many quality issues and come with pretty much no documentation and support. Most also don’t come with any cables and require additional cables and soldering to set up. If you are just starting out with CNC and don’t want to make your life more complicated, using a small router is still an excellent choice.

*I have not used the Spindle Kit from PwnCNC and cannot vouch for the product. This is not a recommendation or endorsement.

Over the years, I have played around with several different spindles from different vendors which are all “budget focused”. Here are some common things I learned:

  • They don’t come with any wiring, so you’ll have to source your own.
  • VFDs are not pre-programmed out of the box to work. Running the spindle without the right settings can cause damage.
  • Some come with a very brief instruction manual which requires a lot of research to decipher. There are usually a lot of different variations of VFDs and finding manuals online can be difficult
  • It is hard to judge the actual quality without taking the spindle apart or with special tools. I would take any specifications posted for each spindle with a grain of salt.
Anemic wiring on a 15KW air cooled spindle

I think it’s also important to give credit to how good the Makita RT0701 actually is. Although 1.25HP (0.9KW) doesn’t sound like a lot when you compare it to a 1.5KW or 2.2KW spindle, because of the constant speed control under load feature, the router will keep a constant RPM even at high loads. On the other hand, 3 phase motors in general typically require to spin within a certain range to provide a certain level of torque, but may not provide the full torque potential of the motor. This means that the power rating of the spindle may not represent the actual usable power at the RPM ranges you want to work in. With the exception of certain types of high-load jobs, such as surfacing and bowl cutting, the Makita 0701 should be able to keep up without issues. We’ve used the Makita router for cutting steel and aluminum and it’s survived if that’s worth anything.

Here is a general list of pros and cons with a spindle compared to a router:

Pros:

  • More overall power
  • Quieter
  • More durable, as it does not need brushes
  • Less runout
  • Allows for speed control using gcode or the computer interface

Cons:

  • More expensive, typically $300ish on the low end, and $1000+ on the high end
  • Complicated to set up and use
  • Additional electrical installation to handle added current loads may be needed
  • Safety concerns with dealing with mains voltages
  • Higher chance of user error and damage
  • Higher chance of having EMF issues

Choosing a spindle and VFD

The two main components of the spindle system are the spindle and VFD. The spindle is the motor part, which holds the bit and spins it. The VFD (variable frequency drive), is an electronic driver or controller that controls the frequency and current of the electricity going into the spindle to adjust its power and speed. We’ll be talking about both of these components and what to look for when selecting them.

Common example of a spindle
Common example of a VFD

Power

Most spindles in the size category will either be 0.8KW, 1.5KW, or 2.2KW. VFDs can be matched with the spindle as required. The larger the diameter of the spindle the more power it usually has. Most 65mm spindles will generally have a power rating of 0.8KW to 1.5KW. 80mm spindles will generally have a power rating of 1.5KW to 2.2KW. Larger and smaller spindles do exist, but for the purpose of this article, we won’t get into them.

It’s sort of difficult to suggest one power rating over another because cutting loads vary a lot based on material and tooling used, but for context, the Makita RT0701 is about 0.9KW. A 1.5KW spindle theoretically would have up to 67% more power and a 2.2KW would have up to 144% more power.

I would recommend going with the 2.2KW if your power outlets can handle it, but if you are on 110V/120V with standard 15A breakers, you’ll be limited to a 1.5KW model. A 2.2KW spindle on 120V will peak at 18A and a 1.5KW spindle on 120V will peak at 12.5A. On my setup, I am using a 2.2KW spindle and VFD but limited the max current to around 10A to prevent the breaker from going off.

Size and weight

CNC spindles for this type of CNC use typically come in 65mm and 80mm diameter sizes. We sell a 65mm and 80mm that works with any LongMill. The larger the diameter of the spindle the more power it usually has. Most 65mm spindles will generally have a power rating of 0.8KW to 1.5KW. 80mm spindles will generally have a power rating of 1.5KW to 2.2KW. Larger and smaller spindles do exist, but for the purpose of this article, we won’t get into them.

It’s also good to note that spindle size also generally determines what collet sizes you can get with it as well. Most 65mm spindles will have an ER11 or ER16 system. 80mm spindles usually use an ER16 or ER20 system. The number of the ER collet dictates the largest shank that the system can take plus one millimeter. So an ER16 system can hold up to a 17mm shank.

An ER11 collet

The next thing to consider is the weight of your spindle. I don’t have exact weights for the different sizes, but this 80mm spindle weighs about 10lbs. A 65mm spindle would obviously be lighter. The one below is an air-cooled model, which has some extra fins and bits for heat dissipation, and based on some cursory online research, a water-cooled spindle of the same diameter and power should be slightly lighter. A lighter spindle makes it easier for the machine to control the acceleration of the spindle and puts less stress and wear on the overall machine, but in my testing, using the 80mm air-cooled spindle was totally fine with default LongMill settings.

Water-cooled vs air-cooled

Spindles are available as water-cooled or air-cooled. Each has its pros and cons. I would preface to say that I don’t have any experience using water-cooled spindles, as I chose to go with air-cooled ones due to their simplicity. This part will come from general research done online plus some of my experience using air-cooled spindles.

So the first major difference is in sound level. Because air-cooled spindles need to have air flowing through them, a sound is generated in this process. Water-cooled spindles are generally quieter since it uses a liquid flowing through the body to cool the spindle.

When comparing the air-cooled spindle to the Makita, the air-cooled spindle is much quieter. It may be worth noting that during cutting, the sound of the bit cutting is much louder than the spindle itself, so I am guessing that the overall difference in real-life use isn’t too large. I chose to go with an air-cooled to avoid needing to deal with coolant lines and such. Once you add in the sound of your dust collection as well, my opinion is that I would expect that the difference would be minimal.

The second big difference and the reason I chose to get an air-cooled spindle is regards to the fact that coolant lines and a bunch of other parts are not needed. Water-cooled spindles need coolant, lines, a reservoir, and a pump to keep the spindle cool. Although not particularly complicated to set up, I wanted to avoid the clutter. I also wanted to avoid dealing with coolant and the chance of it leaking, spilling, and making a mess. It’s important to note that since air-cooled spindles use ambient air to cool themselves if you are in a high-temperature environment, a water-cooled spindle may be more suitable.

Voltage and phases

In a spindle system, you’ll need to concern yourself with the voltages and phase count of both the VFD and the spindle itself. Most will be 110V or 220V and accept it in single phase or three phase. Usually, VFDs can accept a range of voltages within their base working voltage. For example, if you have a 110V VFD, it should work within 100V and 130V. Although most VFDs are 3-phase, VFDs that have different numbers of phases also exist.

Using a higher voltage, such as 220V over 110V, typically makes it easier to transfer more power with the same cable thickness. When you start wiring your spindle, you’ll have to consider the wire gauge and power requirements of your system. The limit to the power you can carry on any given wire generally comes down to the amount of electrical current you are carrying and the resistance of the wire itself. A thicker wire has lower resistance and thus can transfer the same amount of current while generating less heat. If the heat generated is more than the amount that the wire can handle, you will have a meltdown, and lots of bad things happen. Note that these formulas are assuming DC instead of AC, and are simplified for sake of ease of explanation. For more info on calculating with AC, please check out this article.

Heat in watts =(Current in amps^2) x (Wire resistance in Ohms)

Power in watts = Voltage in volts x Current in amps

Based on these formulas, current is inversely proportional to voltage. This means that a 220V circuit requires half of the current to carry the same amount of power as a 110V circuit. A 220V circuit will also generate less heat flowing the same amount of power through a wire. This concept will be important when balancing choosing your input and output voltages of your VFD.

Heres a pretty cheap on I found on Amazon

To choose your input voltage and phase, confirm how you’re planning to power your VFD. Most North American households will have access to 120V, single-phase outlets. In this case, you’ll want to either choose a VFD that accepts 110V or use a transformer to change the voltage to the VFD you have.

Next, you’ll want to select the output voltage of your VFD. You’ll need to match this based on the voltage rating on your spindle. I’ve found that 220V tends to be the most common and is probably the one you want.

If I were to make a recommendation it would be:

  • If you have 220V power available to you, to get a 220V VFD and 220V spindle.
  • If you have 110V power only, find a VFD that has an input voltage of 110V in single phase and an output voltage of 220V in 3-phase.

Frequency

Most VFDs and spindle motors have a rated frequency and speed range. Most VFDs for CNC use will usually be rated for 0-400HZ, but it’s important to check that the working frequency range can support the spindle speeds you want. Spindles will have a speed range with the max RPM being the speed the motor can run at its rated frequency. Most that I’ve seen have a range from 10,000 to 24,000RPM.

Set up

Wiring

Setting up a VFD from scratch involves a lot of wiring. If you have a pre-configured kit that comes with everything you might be able to skip this step.

First, we’ll talk about the AC input. In my, I cut a spare power cord to expose the green, black, and white wires. The green wire is connected to the ground and the white wire to the “L”. On the “N” terminal, I’ve wired in-line with the black wire an E-stop switch for a bit of extra safety. If you don’t have a E-stop, your wire color will probably be black, but in my case the E-stop wire is red.

Just as a side note, please make sure to check the gauge and current carrying capacity of your AC cable. In my case I am using a 14AWG cable good for 15A. I have experienced AC power cables melt from being used beyond their current limits. There should be a rating stamped or printed on the side of the cable for you to double-check.

Next, we’ll want to wire up the three-phase size to the spindle which is denoted by “W”, “V”, and “U”. This is where the lack of documentation makes things a bit more complicated. Some VFDs will say “U”, “V”, “W” instead as well.

In my case, the single sheet of paper that came in the box instructed me to wire Pin 1 on the provided aviation plug with “U”, Pin 2 with “V”, and Pin 3 with “W”. This involved doing some soldering to get the wires onto the aviation plug. If you have everything wired up correctly, the spindle should turn clockwise when looking from the top.

I would mention that the spindle did not come with any cables. I am assuming that the user is supposed to source their own. Spindles generate a lot of EMF, and so proper shielding is also important, but for some reason the paper manual also said to not ground the spindle and the cable. I did open up the spindle at the top cover and indeed the body of the spindle was not grounded.

In any case, if you have a shielded cable, you can ground the shielding and be on your merry way. I haven’t run into any interference issues yet, but your results may vary.

It is possible to purchase spindle-specific cables. The one I’m holding is one from an Ebay seller, which is probably the best type to use. However, because of the small size of the plug that came with the kit, I used a thinner, less durable 4 conductor security cable. Since it’s an 18GA wire, it’ll probably be ok for 10-15A, but it’s not ideal since this isn’t specifically designed to get bent and moved around that much.

A proper 3 phase spindle cable
4 conductor shielded security cable

Programming

I’ve found this to be the trickiest part of the setup, because there are a lot of parameters to select before running the VFD. We’ll go through some of the basic settings and talk about what they do, but it’s likely that the parameters and names of each are going to vary depending on the model you have. Having the wrong setting might fry your VFD or spindle so make sure to keep track of what settings you are changing and write notes down if you need to. I’m going to write down the name of the parameter and the description of the setting, but they may not be the same for your VFD.

First, get into “Programming mode”. There is probably a PROG button or something similar on the main panel. This will bring up each setting and you can navigate them using the arrows. You can choose to modify the setting with another button (“FUNCT/DATA” in my case) and save it. Make sure to double-check your settings persist regularly to make sure your settings are staying.

These are some of the settings that I feel like are most important. However, you should double-check all of them.

P00 Maximum voltage: Output voltage setting, or what we want the voltage going to the spindle to be. 220V.

P01 Reference frequency: This is the incoming voltage. For our case, it should be 60Hz since that’s the frequency our grid uses.

P02 Intermediate voltage: This is the incoming voltage, which in our case is 120V.

P07 Minimum operating frequency: This is the minimum frequency you can set for your spindle. In my case, the air-cooled spindle may overheat if it goes too slowly, so it may be good to set this at 166Hz, or a minimum RPM of 10,000.

P10 Working frequency source: This chooses where you want to get your speed control from. You can either control it directly on the control panel manually, but it’s likely you’ll want to be able to control it in g-code or software. If you have all of the other wiring set up, you can choose to use an external signal (in our case, a “2, external analog signal“) to control the speed of the spindle.

P11 Start/Stop control source: You can also choose how you want to turn on and off the spindle. The best way to set this up is to have it turn on with an external signal, such as the signal controlling the speed of the spindle.

P50 to P55 Multi-function binding post: This setting allows us to choose what turning on one of the input terminals does. In our case, we have it set up to “wire forward operation” because we want the spindle to turn when the terminal is active.

P62 Display options: You can choose what to display on the panel, such as RPM, current, operating frequency, etc. In my case, I just wanted to see the RPM so I have it set to “2 revolution”

Installation

As we discussed earlier, most spindles will come as a 65mm or 80mm body size. You’ll need a mount that fits this. If you already have a Makita RT0701, you can probably use the same original router mount as it is also 65mm, but if you are going with a larger 80mm body, you’ll have to order a new one. Router mounts can be purchased from our store.

From this point, you should be able to mount your spindle and route the cable back to the VFD through the drag chains in the same way as the Makita router.

Firmware and gSender settings

If you wish to have control over your spindle speed through g-code or gSender, you’ll have to check a few different settings for your machine. Some of the added features include:

  • You can have the spindle turn on and off automatically. For example, you can have your spindle turn on and spin up for 10 seconds before starting your cut, and then turn off the spindle automatically after the job is complete.
  • You can change spindle speed directly in your g-code. If you want to start the cut with a fast spindle speed, then slow down later in the job, you can do that directly with the code.
  • You can change your spindle speed on the fly with a few clicks, rather than fiddling with the knob on top of the Makita.

First, we’ll do a bit of wiring. Start by adding two leads from the SpinPWM output terminal from your LongBoard and wiring it to the input on your VFD. If you’re running a laser as well, you can have them in parallel as long as your laser is off. It should also be noted that you may need to change your min and max intensity values on your laser to match with your spindle’s min and max RPM so you don’t have to keep changing them in your firmware.

For more details about the LongBoard and stuff you can do with it, please check out our resources.

If your firmware settings using gSender, you’ll need to select your minimum and maximum spindle speed settings. In my case, I’ve selected 24,000RPM for the max spindle speed and 0 for the minimum. When the controller outputs a PWM signal, it will set the PWM duty cycle to 100% at 24,000RPM or higher, and between 0 and 0.4% duty cycle at 0RPM. Don’t forget to press “Apply New Settings” to have the settings propagate.

It’s very important for us to discuss the difference between analog input and PWM input. They are different and need to be taken into account when wiring your VFD and controller. I’ve talked to a lot of folks adding accessories that have been confused about this. The LongBoard controller and most GRBL controllers will have a PWM output. This means that the controller produces an on-off signal very quickly. Depending on the percentage time it is on, or the duty cycle, determines the speed or intensity that we want to have in controlling a device. This means regardless of the actual voltage being output, a PWM signal can represent the intensity accurately.

However, most VFDs use an analog voltage control. This means that the higher the voltage, the faster your spindle will run. Most have a 0-10V range, although some can be configured for 0-5V. This means that simply plugging in a PWM signal to a VFD that uses analog control may not work. If you are using an analog input VFD, you may want to find a digital to analog converter like the one below.

With the specific VFD that I’m using, I was able to set the voltage range to 0-5V. I have the PWM signal lines connected to the analog inputs directly and I am able to control the speed this way. This only works for a small and very specific set of reasons:

  • The output voltage of the PWM signal is close enough to 5V, or the max input voltage so that when the PWM signal is at 100% duty cycle, the spindle speed is also set to 100% speed.
  • The way that the VFD measures the voltage is by taking the average voltage over a certain period of time. So running at 50% duty cycle means that it thinks the input voltage is 2.5V.

This may not work for you and I don’t recommend setting things up like this, as factors such as your PWM voltage and the way your VDF interprets the incoming signal may vary. The most ideal way to set things up would be to find a VFD that can accept a PWM input.

Also, disable “laser-mode”. Again, if you have a laser you may need to change these settings back when you use your laser again.

Next, by clicking on the gSender’s setting button (the gear icon at the upper right corner of the interface), you can toggle on the Spindle/Laser tab and the max and minimum spindle speeds. In this case, I have it set to 10,000 to 24,000RPM.

Once you exit out of the settings, you’ll be able to find the Spindle/Laser controls in your gSender interface.

From here, you can run your machine clockwise with the “CW (M3)” button and stop the spindle using the “Stop (M5) button”. If you have a VFD that can input a signal to run the spindle counterclockwise, you can also wire this with the “SpinDirection” pin and another terminal on the VFD. We won’t get into this since I don’t think most folks will need this feature.

Another important thing I want to touch on is the spindle dropping down due to its weight and inertia. The lead screw on your LongMill may not have enough drag to keep it in place when the motor is powered off. You can combat this by:

  • Setting the $1 Step Idle Delay to 255, to hold your steppers.
  • Adding a counterweight or using the lightest spindle possible.

To change your Step Idle Delay, you can find it in the Firmware tool again. Changing it to 255 means that the stepper motors will hold their position when they are not moving. Otherwise, they will power off after a small delay which allows them to move freely.

It’s important to note that setting the steppers to hold their place means that power continues to go to the motors, which may cause them to get hot. I would recommend shutting off the machine or changing the step idle delay back to the default if you aren’t using the machine. Although you shouldn’t have any issues or damage with regular use, you do run a larger risk for fire, which is why I try to avoid having the steppers hold.

I’ve created some macros to basically hold and unhold the stepper motors, which makes it easy to get around this issue. If you want to download and install them yourself, here’s the code:

To install it, just download the file and upload it into your macro section.

Alternatively, you can counteract having the spindle fall with a counterweight or springs, which we won’t get into here.

Using your spindle

If you have your spindle set up to run manually, for example, so that you turn on and off the spindle with the button on the front panel and speed with the potentiometer, then you can use your spindle by adjusting these.

However, if you’ve wired everything up to control directly through your computer and controller, you’ll be able to control your spindle directly through gSender. I’m assuming most users will want to do this as this is one of the most convenient parts of having a spindle in the first place.

First, you can control and test your spindle using the interface at the bottom left. Simply click the “CW (M3)” button to run the spindle, and set your RPM with the slider. A small note, you may need to reclick the “CW (M3)” button again to have the speed update. You can turn on and off your spindle using these controls. If you’re wondering what “CCW (M4)” does, this is the command to run the spindle counterclockwise, which sends the same PWM signal to control the speed but also a high signal on the “spindirection” output terminal on the control board to indicate the VFD to turn the other direction. You probably won’t need to worry about this one, unless you’re doing some really advanced stuff. Finally, the “Stop (M5)” command stops the spindle.

If you want to control spindle speed in your g-code, you will need to include it in your CAM. Find the setting that selects your spindle speed in your CAM software. The setting may be specific to each tool, or be a global option for your whole job. Another note is that once your spindle is running at the speed set in g-code, you can use the feedrate override controls to change the speed of your spindle.

And lastly and my personal favourite, is using the “Start/Stop G-Code” feature in gSender. This basically adds g-code at the start and end of every job. So when you press “Start Job”, it’ll run some code first. For my setup, I’ve made it spin up to 24,000RPM (M3 S24000) and then have a dwell (G4 P10) for 10 seconds to give it a moment to get up to speed. At the end, it sends an M5 command to turn off the spindle. You can adjust and change the code to fit whatever works in your system.

If spindles are a bit too confusing to you but you want to control accessories like your Makita router or vacuum with a relay, please check out our page about IOT relays.

Conclusion

As our community continues to grow and folks continue to push their LongMills further and further, I’m excited to test and share what we’ve learned to add more capabilities to our machines. When I’m using the LongMill for my personal projects, I’ve found myself running the machine harder and with more confidence as well, and I believe that upgrades like these can provide significant improvement to the machine’s productivity.

I found that setting up spindles and VFDs are pretty complicated. However, I’m hoping that as the hobby CNC market expands, we’ll see more third parties create plug-and-play options to eliminate the confusion that exists with budget setups. In the meantime, if you have a spindle set up with your machine, I encourage you to share your knowledge and setup! I’ve already found a lot of great info on our forum, if you’re looking for what’s already out there.

Happy making!