Notifications
Clear all

NEMA 34 Stepper motor RPM Issues

51 Posts
3 Users
22 Reactions
7,156 Views
Clark77494
(@clark77494)
Member
Joined: 3 years ago
Posts: 69
Topic starter  

I recently purchased a NEMA 34 Stepper Motor along with the stepper controller. It was advertised at 1,500 RPM which I am not getting. In the video I am running it as single phase motor because it is faster then running it 2 phase. It is pulling less then half an amp at 50 volts. Is it the code that is slowing it down? I turned the voltage down to 24 volts and it didn't effect the RPM whatsoever. I am running it at 20,000 pulses since 40,000 won't work at all. I have the motor wired up as 2 phase which phase 1 is using Digital pins 2 & 3, I have Digital pins 3 & 4 wired up for phase 2 but turned off on the Arduino. Any recommendations on how to speed it up? I am not very good at programming. Here is the YouTube video and the code.

//NEMA-34 Motor with CL86T Closed Loop Conroller

const int STEPS_PER_ROTATION = 3200; //3200 Steps per full Rotation

//DM542T Stepper Controller pinouts
const int INPUT1 =2; //PUL+ To Digital pin 2
const int INPUT2 =3; //PUL- To Digital pin 3


//Initialize the stepper library to stepper motor controller
Stepper myStepper(STEPS_PER_ROTATION, INPUT1, INPUT2); //  INPUT3, INPUT4);

void setup() {
  // Set Motor to initial bootup speed
   myStepper.setSpeed(1500); //1500 RPM
   myStepper.step(3200); // default 3200
}

void loop() {
  // Set Motor to initial bootup speed
   //myStepper.setSpeed(1500); //1500 RPM
   //myStepper.step(3200); // default 3200
 }

 

   

It's great to tip your server unless you work in the Server Room!


   
Quote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2585
 

@clark77494

What stepper motor library are you using and what rate multistepping are you using ?

1500 RPM = 25 revs/second

25 revs/sec at 3200 steps/rev requires 25 x 3200 = 80000 pulses/second

So, each pulse from the Arduino can't exceed 1/80000 = .0000125 seconds

Perhaps you need to use a more powerful uController (or at least one with a faster clock).

Anything seems possible when you don't know what you're talking about.


   
ron bentley reacted
ReplyQuote
Clark77494
(@clark77494)
Member
Joined: 3 years ago
Posts: 69
Topic starter  

@will I am using <Stepper.h> Library. Are you saying I need to replace the Arduino with a raspberry pi Pico or replace the Stepper Controller? Currently the CL86T Stepper drive is set to 20,000, and the max setting is 40,000. I tried setting it to 40,000 and the motor won't move. If I can get it to move at 750 RPM that would be a start. 

CL86T Controller

 

It's great to tip your server unless you work in the Server Room!


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2585
 
Posted by: @clark77494

@will I am using <Stepper.h> Library.

You might want to try the AccelStepper library because it allows you to use acceleration so that you can ramp up the speed instead of trying to hit it from the start.

Are you saying I need to replace the Arduino with a raspberry pi Pico or replace the Stepper Controller? Currently the CL86T Stepper drive is set to 20,000, and the max setting is 40,000.

20,000 corresponds to about 375 RPM. (That is 20000 steps/sec = 20,000/3200 = 6.25 revs/sec = 6.25*60 = 375 RPM.

From the last post, you'd need 80000 pulses/sec to get to 1500 RPM. But the Arduino probably can't reliably handle that load (if at all) and it appears that your stepper motor can't handle it either.

However, it appears that you can set your driver up to use 800 pulses per rev instead of 3200. That should result in a 4-fold speed increase.

I tried setting it to 40,000 and the motor won't move. If I can get it to move at 750 RPM that would be a start.  

Try switching to the AccelStepper library and set a lower starting speed and vary the acceleration to see if you can get to (and maintain) the 40,000 pulses/second speed. Starting slower and speeding up reduces the stress on the driver and helps avoid some of the inertia from a standing start.

If you get a 4-fold increase by switching from 3200 to 800, you may be able to reach your target of 1500 RPM.

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
Clark77494
(@clark77494)
Member
Joined: 3 years ago
Posts: 69
Topic starter  

@will I think I think I have reached the design limits of the Arduino Uno. I will put an Oscilloscope on it tonight and see if the trigger frequency changes with the recommendations. I was able to get the motor to work at 40,000 pulses but at half the speed.  20,000 seems to be the sweet spot. Programming is my Kryptonite. Thank you for all your help.  

It's great to tip your server unless you work in the Server Room!


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2585
 

@clark77494 

OK, I hope you find the solution 🙂

Anything seems possible when you don't know what you're talking about.


   
Clark77494 reacted
ReplyQuote
Clark77494
(@clark77494)
Member
Joined: 3 years ago
Posts: 69
Topic starter  

@will I just ordered the Raspberry Pi Pico. it will be here on Monday. I will let you know. 😀

It's great to tip your server unless you work in the Server Room!


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2585
 

@clark77494 

Good, thanks. I'm curious to see if your driver can handle the extra speed.

Anything seems possible when you don't know what you're talking about.


   
Clark77494 reacted
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7700
 

@clark77494 Only ONE, at $4 each, get a dozen!

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
Clark77494
(@clark77494)
Member
Joined: 3 years ago
Posts: 69
Topic starter  

 

@will I just put the Oscilloscope on the Arduino it is running at 7500 pulses per second. I think there is a problem in my programming. I thought the Arduino was capable of much faster then that.   

Big Motor Scope
This post was modified 3 years ago by Clark77494

It's great to tip your server unless you work in the Server Room!


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7700
 

@clark77494 Are you using the faster pins

On Arduino Uno, the PWM pins are 3, 5, 6, 9, 10 and 11. The frequency of PWM signal on pins 5 and 6 will be about 980Hz and on other pins will be 490Hz. The PWM pins are labeled with ~ sign.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
Clark77494 reacted
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2585
 
Posted by: @clark77494

 

@will I just put the Oscilloscope on the Arduino it is running at 7500 pulses per second. I think there is a problem in my programming.

Probably not a problem in your programming as you're using the Stepper class to run the driver. So, it's more likely to be a limitation of the class software. 

Anything seems possible when you don't know what you're talking about.


   
Clark77494 reacted
ReplyQuote
Clark77494
(@clark77494)
Member
Joined: 3 years ago
Posts: 69
Topic starter  

@zander When I get home I will reassign pins 2 & 3 to 5 & 6. Thank you for the recommendation! 🙂 

It's great to tip your server unless you work in the Server Room!


   
ReplyQuote
Clark77494
(@clark77494)
Member
Joined: 3 years ago
Posts: 69
Topic starter  

@will Do you think running the Raspberry Pi Pico will solve the issue? 

It's great to tip your server unless you work in the Server Room!


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7700
 

@clark77494 @will I am not expert at this to be sure, but doesn't this say the pico can do much more?

https://www.codrey.com/raspberry-pi/raspberry-pi-pico-pwm-primer/

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
Page 1 / 4