24V Stepper motors

Hi -

I am completely new to Arduino but extremely excited about the project we are working on. We are attempting to construct 6 small Auger systems using stepper motors and Arduino boards.

I have been supplied with the following:

  • Arduino Mega 2560
  • Arduino Motor shield
  • StepSyn Sanyo Denki motor (TYPE 103H7126-5740)

It seems however this motor requires 24V to run and that exceeds Voltages allowed on either on these boards. Am I maybe missing something?

Would appreciate some guidance with this.

Kind Regards,

Am I maybe missing something?

Yes. You need different motors, or different motor drivers.

Hi -

Thank you for the prompt response. I will check with local supplier. Is there maybe a motor driver you can recommend. My apologies, very new to this :slight_smile:

Regards,

Those motors are 2A, 2ohm, the voltage rating is utterly meaningless, steppers are current driven.

You must run them from a chopper driver circuit like a DRV8825, although 2A is a bit
too high for most single-chip drivers.

The supply voltage for the driver affects the top speed of the motor, for instance 24V supply
will give high top speed than 12, but 36V would be even better (check the operating voltage
of the driver you choose).

Stepper motors do have a voltage rating that might be important, namely the insulation
voltage rating, but that's usually a lot higher than 24V.

The datasheet is here: http://www.farnell.com/datasheets/2074957.pdf?_ga=1.106327171.1608676617.1466799981 and the only mention of 24V is that is the value they use in the torque/speed graphs

These links may be useful
Stepper Motor Basics
Simple Stepper Code

...R

Hi -

Thank you so much for all the replies. I will look into new motor drivers.

In the meantime I managed to get the motor running with the following code

/

*************************************************************
Motor Shield Stepper 
Conitnuous turn
*************************************************************/

int delaylegnth = 20;

void setup() {
  
  //establish motor direction toggle pins
  pinMode(12, OUTPUT); //CH A -- HIGH = forwards and LOW = backwards???
  pinMode(13, OUTPUT); //CH B -- HIGH = forwards and LOW = backwards???
  
  //establish motor brake pins
  pinMode(9, OUTPUT); //brake (disable) CH A
  pinMode(8, OUTPUT); //brake (disable) CH B
 
}

void loop(){
 
  digitalWrite(9, LOW);  //ENABLE CH A
  digitalWrite(8, HIGH); //DISABLE CH B

  digitalWrite(12, HIGH);   //Sets direction of CH A
  analogWrite(3, 255);   //Moves CH A
  
  delay(delaylegnth);
  
  digitalWrite(9, HIGH);  //DISABLE CH A
  digitalWrite(8, LOW); //ENABLE CH B

  digitalWrite(13, LOW);   //Sets direction of CH B
  analogWrite(11, 255);   //Moves CH B
  
  delay(delaylegnth);
  
  digitalWrite(9, LOW);  //ENABLE CH A
  digitalWrite(8, HIGH); //DISABLE CH B

  digitalWrite(12, LOW);   //Sets direction of CH A
  analogWrite(3, 255);   //Moves CH A
  
  delay(delaylegnth);
    
  digitalWrite(9, HIGH);  //DISABLE CH A
  digitalWrite(8, LOW); //ENABLE CH B

  digitalWrite(13, HIGH);   //Sets direction of CH B
  analogWrite(11, 255);   //Moves CH B
  
  delay(delaylegnth);

}

I have not been able to increase the speed, despite my best efforts. I have tried both 5V (1A or 2A) as well as 12V (2A) PSU's but speed remains the same. I was offered a CNC Shield that can accommodate 24V but was struggling to master G Code.

Kind Regards,
Friedl.

You must ramp speed to get the top speed out of a stepper (they cannot accelerate instantly).
AccelStepper library is the simplest way to do this. You get to set max acceleration and speed and figure
out what works.

But if you have a 2 ohm motor still connected to a Motorshield, stop using it now, you are overstressing
things and could simply blow everything up when the chip fails.

Hi Mark -

Thank you for the advice. I spent some time with the local supplier who now supplied me with the following:

  • Arduino UNO
  • CNC Shield
  • DRV8825 Stepper Motor Driver
  • NEMA 23 StepSyn Sanyo Denki motor (TYPE 103H7126-5740)
  • 24V PSU for CNC Shield
  • 5-12V PSU for Arduino UNO

I managed to get the motor running/stopping with the code below:

int dirpin = 5;  //7
int steppin = 2;  //4
#define stepsPerRevolution 200;   //number of steps required to make a complete rev.

void setup() 
{
pinMode(dirpin, OUTPUT);
pinMode(steppin, OUTPUT);

 int i;
  digitalWrite(dirpin, LOW);     
  delay(30);
  for (i = 0; i<10000; i++)       
  { 
    digitalWrite(steppin, LOW);  
    digitalWrite(steppin, HIGH); 
    delayMicroseconds(30);      
  }   


}
void loop()
{ }

The problems I am still faced with are:

  • As soon as I exceed 32 000 Mircosteps, the motor simply runs continuously and do not stop. I would need much more than this number to achieve desired results.
  • I have tried removing the jumpers from the CNC Shield to change to full steps as apposed to Mircosteps, but this causes the motor not to turn and make squealing noise instead.

Any help would be greatly appreciated.

friedlbasson:
As soon as I exceed 32 000 Mircosteps, the motor simply runs continuously and do not stop.

That usually means that you are using an int data type which has a max positive value of 32767. You should probably be using an unsigned long.

When you include a number in your program the compiler assumes it is an int. For a bigger number specify like this 123456UL and, of course, the FOR index must also be an unsigned long.

...R

AccelStepper library examples is definitely where to start, not using delay