# Building a 3D-printed Brushless Spindle for CNC~ 4 min.

## Motivation:

I have this shapeoko 2 machine sitting around and gathering dust, so I thought I should do something with it. I have used it as a 3d printer before and also as a laser engraver, but never as the originally intended use case: milling stuff. There is already an arduino with a ramps shield running grbl firmware, so movement works fine and it is missing only a spindle. (and an enclosure because there will be dust everywhere otherwise)

There are a few basic requirements when I want  to build a spindle myself:

• cheaper than an air-cooled china spindle with vfd (around 250€)
• quiet (as in you don’t have to wear ear plugs)
• powerful (compared to e.g. a dremel)
• better construction than those cheap china dc spindles
• closed loop rpm control

## First Steps:

I dug around my boxes and searched for things I could use for the spindle as well as a motor controller. A while ago I ordered a nice dc motor with rotary encoder from aliexpress, which I thought might work well. Especially because it should be relatively simple to measure the rpm with an arduino. Here is what I came up with:

• arduino pro mini clone
• 0.96in oled display
• rotary encoder
• button
• mosfet board
• dc motor with rotary encoder
• high precision 5mm shaft + some bearings

With this I designed and printed a first version of the spindle and controller.

There are a few problems with this build, so this is only the first iteration and there are many improvements to be made:

• only one radial bearing, so it can stand only very tiny axial forces
• because there is only one bearing on the shaft, the bearings of the motor have to take radial forces as well. Which is very bad because these are just brass bushings.
• there are some tiny vibrations
• it is low noise

With this basic spindle I began to program and test the motor controller, which can now set the pwm for the dc motor and display current rpm with a high refresh rate. There is no closed loop control yet, but for testing it is ok. So on the controller side everything is fine, except that I accidentally destroyed the arduino once by applying 12v to the raw input, frying the regulator and also the atmega… Some hot air, a new arduino, and a slightly damaged display later and it was up and running again.

The real problem I found with help of the rpm measurements was the motor, which is way too slow. At 12V and no load it runs at about 1,500 rpm. For comparison: typical cnc spindles have up to 24,000 rpm.

So this is where I am right now (1. October) and the next steps are to improve mechanical design and get a new motor.

## Better Construction

To solve the mechanical issues I looked at how spindles are typically constructed. There are three bearings in total, two to compensate radial forces and one for axial forces. In the illustration below the forces these bearings induce on the axle are denoted by $F_{rb}$ and $F_{ab}$. $F_{r}$ and $F_{a}$ are the forces induced by the workpiece onto the end mill.

Now we could compute forces $F_{rb1}$ and $F_{rb2}$ as a function of $F_{r}$, and the geometry set by $a_1$ and $a_2$.

The sum of all forces in y direction and moment centered at $F_{rb1}$ gives us:

$F_{rb1} = F_r + F_{rb2}$

and

$a_2 * F_{rb2} = a_1 * F_r$

$F_{rb2} =\frac{a_1}{a_2} * F_r$

Now we know, that the ratio between $a1$ and $a2$ has a large impact on the forces in the bearings. If e.g. $a1$ is much larger than $a2$, then the load on the bearings is also much larger than the force induced by the workpiece on the end mill. But since I want the spindle to be compact I will try to use a rather small $a2$ and see how this goes. Here is a screenshot of the new spindle base.

I already ordered bearings and a new motor (a brushless motor with esc). When they arrive I will see how well this construction actually works. The coupling between motor and axle will also be improved. Before, it was a stiff construction and here I will use a 3d printed coupling that allows for some misalignment. I hope the polymaxx PLA is strong enough, so it won’t explode. We’ll see…

Kommentare
1. Bruno says:

Hello! Nice post. I couldn’t find the date when posted it, but I’m curious to know if the bearings arrived and if it worked as expected.

1. Katja says:

Hi, yeah the bearings arrived, but I didn’t finish the project, so unfortunately it’s not clear how well it would have worked.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 18, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.4821324348449707, "perplexity": 1266.910939125427}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 20, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2020-16/segments/1585371799447.70/warc/CC-MAIN-20200407121105-20200407151605-00305.warc.gz"}