Hello Guest it is November 20, 2019, 02:25:21 AM

Author Topic: Help controlling a stepper motor as a lowRPM spindle  (Read 17072 times)

0 Members and 1 Guest are viewing this topic.

Help controlling a stepper motor as a lowRPM spindle
« on: August 14, 2012, 09:14:55 AM »
Hi, I have been using what used to be a CNC Router, and am using it to hold a Laser head to do some marking. I needed to add a spindle (chuck) as I have some parts that I need to spin at no more than 30 RPM. Rather than going out and purchasing a VFC/Motor to drive the spindle, I started experimenting by temporarily using my Y axis motor (disconnected from the axis itself). I set up the parameters for the spindle according to the instruction manual, but so far have ended up with the motor running too fast, too slow, too hot. I just can't seem to get the right parameters to make it run the speed I need. Here is what I have.

Stepper Motor - 4 wire, 2 phase, 1.8 degree step angle, 3 amp, 3.6v
Motor Drive = 2 Phase, 2000 pulse/rev, 3 amp current set, half current mode set.
Pulley ratio, 2 motor rev = 1 spindle rev

I would be so grateful if someone could suggest the base parameters for the Motor Tuning and the Spindle Pulley settings, as I have tried so many combinations, I don't know what to adjust any more.

Cheers.

Offline Hood

*
  •  25,856 25,856
  • Carnoustie, Scotland
    • View Profile
Re: Help controlling a stepper motor as a lowRPM spindle
« Reply #1 on: August 14, 2012, 09:52:11 AM »
From the above it would seem your stepper drive is set to 10 microsteps thus the 2000 steps per rev, as you have it geared 2:1 then the steps per unit for the spindle would be 4000. Your Velocity would be what you want the max rpm to be (maybe 50?). Acceleration will be lowish try 1 and see how it goes, setting to that would mean the spindle would take 1/2 second to get to your 30rpm.
Hood
« Last Edit: August 14, 2012, 09:53:44 AM by Hood »
Re: Help controlling a stepper motor as a lowRPM spindle
« Reply #2 on: August 14, 2012, 10:46:00 AM »
Thanks Hood, I tried all combinations of steps per rev EXCEPT 4000. I tried that and it seems to work nicely. The motor is still a little warm, but that could be because of the crazy values I have been entering trying to get my result.

Thanks again (not Scottish by any chance?)
Re: Help controlling a stepper motor as a lowRPM spindle
« Reply #3 on: August 14, 2012, 10:48:24 AM »
Sorry, I now see you are from Canoustie... definitely Scottish  ;D

Offline Hood

*
  •  25,856 25,856
  • Carnoustie, Scotland
    • View Profile
Re: Help controlling a stepper motor as a lowRPM spindle
« Reply #4 on: August 14, 2012, 11:00:46 AM »
Thanks again (not Scottish by any chance?)

Yes I certainly was the last time I looked ;D

Steppers  get hot, just as long as they dont burn you when you touch them they should be fine.
Hood
Re: Help controlling a stepper motor as a lowRPM spindle
« Reply #5 on: August 14, 2012, 11:28:40 AM »
I think it was hot from the previous test(s) I had made. I shut it down for a while and ran the new settings and it has maintained a 'warm' temperature.
While I am on the subject of now adding this spindle and ordering a Drive and Motor for my Y axis, I have another question if you don't mind. The 25 pin Breakout Board I have left me with enough pins to control 5 outputs (no inputs) I need. Now that I need 2 pins to control the spindle, this leaves me 1 short of available pins. I looked everywhere on the web to look at the 9 pin (port 2) pin out, but can't find one. I (think) I am using all of my available pins on the 25 pin when I have the following assignments:

X axis - 2, 3
Y axis - 4, 5
Z axis - 6, 7
Emergency Stop -10
O/P 1 - 1
O/P 2 - 8
O/P 3 - 9
O/P 4 - 14
O/P 5 - 16
O/P 6 - 17
Ground 18 - 25

What about pins 11, 12 and 13?

Cheers.

Offline Hood

*
  •  25,856 25,856
  • Carnoustie, Scotland
    • View Profile
Re: Help controlling a stepper motor as a lowRPM spindle
« Reply #6 on: August 14, 2012, 01:16:35 PM »
1-9, 14,16, 17 are outputs
10,11, 12, 13 and 15 are inputs.
If you require more then you could add a second parallel port and you can either have it set the same as port 1 or you could have pins 2-9 configured as inputs. That would mean 2-13 and 15 would be inputs and 1, 14, 16 and 17 outputs.

What are you using all the ouptuts (1-6) for?


Hood
Re: Help controlling a stepper motor as a lowRPM spindle
« Reply #7 on: August 14, 2012, 02:21:23 PM »
When I said in my original mail it was for Laser Marking, I did not explain that is also used for Laser Cladding. The Laser System we have for Cladding requires 5 outputs for 'Laser Ready', 'Laser On', 'Shield Gas On', 'Powder #1 On', and 'Powder #2 On'. I need these 5 outputs for the system leaving me Output 6 as spare, but I am contemplating joining 'Laser Ready' and 'Laser On' as they can come on at the same time. I don't like the idea of having no spare outputs for future use which is why I asked about Port 2. I don't quite understand when you talk about a second 25 pin port and configuring the I/O the way you say, I doubt whether I will ever use inputs, for now anyway.

Barry.

Offline Hood

*
  •  25,856 25,856
  • Carnoustie, Scotland
    • View Profile
Re: Help controlling a stepper motor as a lowRPM spindle
« Reply #8 on: August 14, 2012, 02:55:17 PM »
It is an option for port 2 that you can either have it the same as port 1 (12 Outputs, 5 Inputs) or if you require more inputs it can be configured so pins 2-9 become inputs, that would mean you have 4 Outputs and 13 Inputs.
As you are requiring more outputs than you will need in inputs then leaving it as standard would be the best way.
Hood
Re: Help controlling a stepper motor as a lowRPM spindle
« Reply #9 on: August 14, 2012, 03:42:42 PM »
Thanks Hood, now I understand. Port 2 will be Port LPT2 on my computer, another 25 pin port that I can use like Port 1, but addressing the outputs as pin # and port #2.

From an Englishman in Canada to a Scotsman, I thank you for your help.

Cheers.