Measuring CNC spindle friction using readings from Brushless DC Hall sensors

Greetings Fellow Arduino Users!

A bit of background:

We run a small assembly shop that uses custom spindles which go into desktop CNC machines. Our spindles are assembled in house using a press (we outsource the actual CNC manufacturing of the spindle, dom, etc.).

The problem:

When we build spindles their friction, which is to say the degree of resistance that they generate when they turn, varies considerably. A spindle assembly can be turned manually by hand and some exhibit good (low friction) rotation while others are not so good (more resistance, i.e. friction).

We use a warm-up code prior to the machine cutting which runs the Brushless DC motor (itself coupled to the spindle assembly via a belt and sheath). This “warm up” period lasts seven minutes. During the warm up phase the heat from the rotation of the spindle causes the bearings and lubrication inside the spindle to ‘loosen up’ thus reducing the friction for the actual cut procedure.

We have a very tight power budget, approximately anything over 130 watts is undesirable. Needless to say, we are committed to the power supplies we use in the machines, so in an attempt to improve through-put and know in advance which spindles to install and which to discard, we would like to test the spindle’s using an Arduino.

The Atmel 328p already drives the brushless DC (BLDC) motor using an in-house brushless DC motor control shield (itself uses the A4915 IC), and we use Synthetos G-shields to move the axises of our mill.

Our lead engineer is on indefinite sabbatical somewhere in the Southwest. We have very limited programming capability in house at the moment.

Proposed Solution:

We can create a mechanical linkage to connect the assembled spindle to a BLDC motor on a rig using 8020 and simply connect any one of the hall phases (thin green/blue/yellow wires) to an Arduino digital pin and then count pulses. Assuming the A4915 IC doesn’t brake our motor, we believe a simple program could be written which would could generate data that we could then use to determine the amount of friction each spindle produces.

We have little insight into how to write that program, however.

We already have a BLDC test rig that tests BLDC motors for RPM and power consumption that we initialize using Grbl Controller 3.0.

Pic Attached is our BLDC in house controller board which fits onto an Arduino Uno, etc.

Also shown is a completed Z-plate assembly with the spindle mounted next to the BLDC motor.

The motors we use are 57BLF02-1, 24 VDC, 3K RPM: http://www.longs-motor.com/productinfo/detail_12_81_134.aspx

You wrote 5 paragraphs under the title "The problem", but you never state the problem! What are you trying to accomplish?

Paul

What I would do is use a small DC motor to spin it up to some speed. Then cut the motor, let it freewheel and time how long it takes to stop. In that way you get a measure of the friction in your system.

You might want to spin it up with a wheel pressed against it so you are not freewheeling the motor and the cost to the stop is cleaner.

bearing temperature is another telling point.
laws of thermodynamics are similar to ohm's law.

Yes, the 3 laws of thermodynamics, loosely paraphrased as:
You can't win.
You can't break even.
You can't get out of the game.

Ok, you got me...
Ohm's law
thermodynamics
the IRS.....

Thanks to everyone who has replied to my admittedly humble thread.

We use an old HP analog oscilloscope and an 80/20 test rig to get the period and power draw (using another read out meter on said rig) and that gives us our RPM and power consumption, but now I am thinking it would just be easier and far more useful to simply have an (arduino) code which reads the hall sensors on the BLDC and then computes or otherwise outputs that so we can derive the RPM speed.

RPM speed is very important metric for cutting. Our motor are often conditioned incorrectly, or not at all in some cases, and we have need to test each machine prior to shipping.

How would I go about writing said code? Can someone provide some boilerplate arduino which has elsewhere been used to control a BLDC?

The only thing I was able to find in the forums was this: http://playground.arduino.cc/Main/ReadingRPM

...and this: http://forum.arduino.cc/index.php?topic=208227.0

...and this: http://diyhacking.com/arduino-hall-effect-sensor-tutorial/

I would like to take a reading using the arduino that runs our BLDC PWM signals, but chances are that's asking too much of the humble 328p?

Paul_KD7HB:
You wrote 5 paragraphs under the title "The problem", but you never state the problem! What are you trying to accomplish?

Seemed quite clear to me.
They want to power up their spindles with a known current * voltage and infer friction via the brushless hall sensor outputs (that has a linear relationship with RPM). Using this metric they can save time and money not installing spindles that will cause issues.
They don't know what they don't know about Arduinos and before sinking resource into it they are seeking discussion re. feasibility.

still not completely grasping the concept.
the BLDC driver uses hall sensors in the motor as feedback.
set the RPM knob and the board will try to run the motor until the feedback matches the desired setting.

set if for 1,000 rpm, and the power needed to maintain that speed should fall within a window.set the speed for 5,000, repeat, then again at full speed.

you can test speed with a tachometer, thereby an independent method
then data log the current used, thereby power.

I could see an arduino setting a desired RPM, then data log the power used at that RPM and data log the stability of the motor speed. then repeat for multiple points.

dave-in-nj is correct. You already have all of the test equipment required.

Spindles that do not spin freely will consume more power to maintain the same speed (RPM) as freely spinning spindles. Taking power measurements (you note that you have that facility) of the spindles with the desired functionality, after the execution of a warm-up profile, at various speeds (1000, 2000, 3000) will give you a profile of the power requirements and hence a measurable quantity for the desired spindle.

Testing new spindles should involve the execution of the warm-up profile followed by readings at the test speeds. Lower power consumption reflects an easier spinning spindle. Higher power reflects a tighter spindle.

So you are not only trying to determine the power consumption, but you also want to verify the speed of the spindle on the production machines via a feedback from the Hall sensors?

Although I am not the OP - there are two approaches:

Drive to determined RPM (or whatever arbitrary measure or rotational velocity) - assume voltage is constant, check current against some determined threshold.

Drive with known voltage*current, check RPM (or whatever arbitrary measure or rotational velocity) against some determined threshold.

I still think that grumpy mikes idea is the perfect answer. If you want to complicate it then you could record the rpms and spin down time then plot that to make a fancy report. But as this is a pass/fail you could just make a rig that checks full speed has been reached. Then time from this point until the motor/spindle has stopped compare against a know time base and light a led for pass or fail. As they already have a rig to warm the spindle up then all that is required is a way to read speed.