Hello all ! I am quite new to Stepper motor world, using them to make a CNC milling machine. I have the following components: - Cloudray Nema 23 Stepper Motor with Encoder These are closed loop stepper motors, and come with encoder. The encoder supports micro steps setting, I have configured at 800 Pulse/Revolution (which I believe means no micro steps) - I have an Arduino Uno with CNC Shield I have connected the arduino to the driver using the EN/GND and X-STEP/DIR connectors, and put the necessary power supplies. I am using Universal GCode Sendor to test all this... Everything seems to be working fine, however I am not able to get the right settings to do the accurate movement. Based on my configuration, at 800 Pulse/Rev and 2mm / rotation lead screw, I should use 400 step/mm, however I need a value around 10,000 to make it more or less accurate. Any idea why ?? Also, I am able to tweak the values to get an accurate movement, but the problem I have is that when I move the motor 10 time 2mm, it doesn't do exactly the same as 1 time 20mm ... There is easily a 2-3% difference. Why can this be?? Also something I noticed, is that when I change move from clock wise to anti clockwise (using X+ and X-), there is also a small difference. It seems like the motor goes backwards slightly when I request to go to the other direction. Any advise to troubleshoot these issues would be hugely appreciated !
Firstly, check that the step idle delay ($1) is 255. If a stepper motor ever loses power it will 'cog' around to its next 'natural' position. That was the easy bit... Secondly, check that the step signal is the correct polarity - i.e. does the driver expect positive going or negative going step signals? Is the controller outputting these correctly? Does the wiring from the controller to the drive have the effect of inverting this signal? Note that the motor will rotate whatever this setting, but will lose a step at every move if it is wrong. You can adjust the polarity of the step signal with $2 (set to either 7 or 0 for three identical axes). Thirdly, some drives are sensitive to the timing of the direction signal in relation to the step signal (and may miss steps because of this). This could well be compounded if the step signal is inverted. Some things to think about, anyway.
Thanks a lot !!!! $1=255 setting helped stop the motor from going backward slightly before moving, and setting $2=7 solved the issue with 10 x 2 not moving the same as 1 x 20. Thank you, you made my day ! If I may abuse your kindness a bit more... I have 2 more questions: - My driver is set to 800 pulse/rev, and my lead screw lead is 2mm. So logically I should set x resolution to 400 / mm. However I have to set it to 10,000 to get the correct movement. Any idea why? - My driver / stepper are supposed to go up to 4,000 rpm. However when I increase the X maximum rate beyond 270 (which gives me around 150 rpm) the motor stops and I get a hard limit error. Any idea how I can get the motor spin faster?
Well, your maths is OK, so somehow the drive isn't set to 800 pulses/rev, or there's a gearbox or something in the drive? 10,000 pulses/mm on a 2mm pitch screw would be 20,000 PPR and would equate to 100:1 microstepping for a conventional 1.8° / step motor. 4000 RPM is ~67 revolutions / second, which at 20,000 pulses per revolution means a pulse rate of 1.3 MHz! That isn't going to happen. 150 RPM is 2.5 revolutions per second which means a pulse rate of 50 kHz (again, at 20,000 PPR) which is knocking on the door of what GRBL is capable of. What is your $0 setting? I think the default is 10 (µs) which gives a max frequency for a 1:1 mark/space ratio step signal of 50 kHz. You may be able to squeeze slightly more speed out of it if you reduce this setting, but I'd be surprised if you managed to double the speed. If you go too low, you will get missed steps, or it will just stop working. The real answer is to figure out how your drive is handling the microstepping settings: to get ~4000 RPM with your controller, you would need to get down to ~750 pulses per revolution. (So probably 2:1 microstepping for a conventional 1.8° / 200 steps per rev motor.)
I've just had a look for the manual: Check your DIP switches carefully! Acording to this Cloudray drive manual (I don't know if it is the same as yours) Settings for 800 and 20,000 PPR are opposite to each other: Steps/Revolution SW1 SW2 SW3 SW4 800 off on on on ... 20000 on off off off Coincidence??
Haha that was exactly it !! I was looking at the driver from above and put the switches the wrong way... What looked like a NO was a ON haha All working perfect now, am getting around 3,000, I can try more but it's getting scary Hopefully last question: is it advisable to use the stepper motor at max speed, or should I go easy for durability? Thanks a lot guys, you helped me a lot today !
You definitely aren't the first, and probably won't be the last *I* wouldn't worry about wearing a stepper motor out. Higher speeds (and the consequent higher accelerations) are harder on the other drive components, but presumably you've built the machine to do a job, so use whatever speed is appropriate. 4500 RPM x 2mm pitch is 9m/min - you would need an extremely high speed, very powerful spindle to cut any of the materials I'm familiar with at anything like that speed. Beware that there is a limit to how fast you can spin leadscrews before they start 'whipping' (actual speed depends on their length, diameter and how they are mounted). Good luck! P.S. GIve OpenBuilds 'Control' software a try - I find it *much* nicer to use than UGS. (I'm not affiliated to OpenBuilds in any way).