Notifications
Clear all

Stepper Motor and DM320T Driver

11 Posts
2 Users
0 Likes
2,936 Views
 Kirk
(@kirk)
Member
Joined: 3 years ago
Posts: 23
Topic starter  

I am having a problem getting the shaft of a NEMA 17 motor to rotate. I have attached a wiring diagram and the Arduino code provided by OMC.  I am using an Arduino Uno with output controls on digital pins 6 and 7. I am interfacing the Uno to a DM320T Driver manufactured by OMC (www.omc-stepperonline.com). I am using a 12V power source for the driver. The motor is manufactured by Polulu and is described as unipolar/bipolar, 6 wire, 200 steps/rev, 1.2A/phase, 42x48 mm.
I set up the circuit using the DM320 User manual in bipolar mode (I think) with center taps of A and B windings disconnected. The attached diagram shows DIP settings and wiring. I have some electronics background but limited experience with stepper motors. I have successfully used a ULN2003 driver with a NEMA 11 motor and an UNO. I am wondering about a timing issue or wrong motor (200 steps/rev) or defective driver?

I watched the You Tube video on controlling big motors.  It would be helpful to have a layout of a working system.  Please let me know if the diagram is readable-I'm trying new software =Diagram Designer.

Code

//DM542T

int x;

 

void setup() {

  pinMode(7,OUTPUT);    //Set Pin 7 as PUL

  pinMode (6,OUTPUT);   //Set Pin 6 as DIR 

 

}

 

void loop() {

  digitalWrite(6,HIGH);     //Set high level direction

  for (x=0; x<400;x++)        //Repeat 400 times a revolution when setting is 400 on driver

  {

    digitalWrite(7,HIGH);    //Output high

    delayMicroseconds(500);   //Set rotate speed

    digitalWrite(7,LOW);      //Output low

    delayMicroseconds(500);    //Set rotate speed

  }

 

  digitalWrite(6,LOW);        // Set high level direction

  for(x=0;x<400;x++)

  {

    digitalWrite(7,HIGH);

    delayMicroseconds(500);

    digitalWrite(7,LOW);

    delayMicroseconds(500);

  }

  delay(1000);

 

 

 

}

 

image

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

@kirk

Check your ENA (enable) and see if it's active HIGH or LOW and then connect it to the 5V or GND on the Arduino.

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


   
ReplyQuote
 Kirk
(@kirk)
Member
Joined: 3 years ago
Posts: 23
Topic starter  

@will 

Thanks, I have tried that without success.  It makes sense to connect ENA but the OMC user manual, page 10, says that ENA is left NC (not connected).


   
ReplyQuote
 Kirk
(@kirk)
Member
Joined: 3 years ago
Posts: 23
Topic starter  

Hi Will

   I have attached the circuit diagram from OMC Support.  I'm going to try checking the control lines with a scope to check for a signal. I don't have a dual trace scope; so I can't check timing. I also thought of connecting a known good NEMA 11 motor.   A puzzle....

                            

 


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

@kirk 

OK, well something has to enable it.

I see that your diagram shows pin 5 connected to the optocoupler enable but it's not declared nor set in your sketch. Try setting it HIGH, and if that doesn't work, try setting it LOW.

I've not used that driver nor a 6 pin stepper, so I'd say the next step is to double-check that you have the pairs correctly identified.

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


   
ReplyQuote
 Kirk
(@kirk)
Member
Joined: 3 years ago
Posts: 23
Topic starter  

@will 

Thanks Will, 

      That 5 you see on the diagram is " + 5V", I have the OPTO lead connected to a 5 volt terminal on the Arduino.  The attached code was provided/written by OMC.  I'm starting to think I should shop for a 4 wire motor, just to try it. Where did you get yours? What type of driver have you used?  I checked my motor lines :  A + black, A- Yellow, B+ Red, B- blue and center taps white -unconnected. Then I did continuity checks on the A coil and B coil. I'm about ready to start over with new parts!


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

@kirk 

I missed the significance of the + sign 🙂

As I said before, Ive never used that driver nor any 6-wire stepper. I've mainly used NEMA17 and A4988 divers with occasional use of ULN drivers and BYJ steppers.

If you have an oscilloscope, you could try checking across one of the coils to see if it actually gets a voltage step while the circuit is running.

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


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2527
 
Posted by: @kirk

Hi Will

   I have attached the circuit diagram from OMC Support.  I'm going to try checking the control lines with a scope to check for a signal. I don't have a dual trace scope; so I can't check timing. I also thought of connecting a known good NEMA 11 motor.   A puzzle....

                            

 

Can't read that document, I use a Mac and no MS software. The conversion stuff I have just brings up the first page (and no diagram).

I think a single trace 'scope ought to do, all you need is to confirm that a voltage step is (or is not) happening across the coil.

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


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

 

@kirk

I found this article on running a setup exactly like yours, except that they use the Stepper library from the Arduino belt-in set. This setup looks just like yours (except the describe, instead of showing) the ground from Arduino to power.

 

http://fastlabtutorials.blogspot.com/2019/10/running-stepper-motor-with-arduino.html

 

image

 

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


   
ReplyQuote
 Kirk
(@kirk)
Member
Joined: 3 years ago
Posts: 23
Topic starter  

@will 

Thanks Will,

     The wiring looks exactly the same!  I'll read the article.


   
ReplyQuote
 Kirk
(@kirk)
Member
Joined: 3 years ago
Posts: 23
Topic starter  

@will 

   Hi Will,

       Well, I finally narrowed it down. I swapped out the Arduino UNO board with one I had purchased in September. After I got the Ports set-had to switch from 3 to 4; I plugged in leads to digital pins 6 and 7, Vcc and ground and the motor started turning. Go figure!  I have to tweak the directional speed; but things are looking better!  I used a scope on the motor input leads as well as digital pins 6 and 7. That helped in the decision as there was no wave form on digital pins 6 and 7 (disconnected from the driver). Thanks again for the diagram and advice.

                            Kirk


   
ReplyQuote