Thursday 6 February 2014

Driver Testing

In my previous post, we tested a stepper motor by manually pulsing the motor coils, and that was all basic stuff.

Shortly afterwards, it occurred to me, building a test circuit around the ULN2003A Darlington Driver wouldn't be such a bad idea.   I could use this circuit to verify each of the four ULN2003 drivers (IC13 - IC16) from my interface board.  You could also use this to test a driver and stepper in one!

By replacing any faulty driver chips, we should then be in a position knowing everything on the High Current side of the interface circuit is good.

The following test circuit uses an Arduino to sequence the motor steps, and has also been designed around Colne Robotics stepper motor wiring:


Notice how two inputs are exchanged - this is necessary to make the Arduino Stepper Library compatible with the Armdroid's stepper motor wiring (see previous posting); otherwise the pulse sequences will be wrong, the motor will not rotate.

I've previously talked about the hardware switching of two lines Qb and Qc, this is easily illustrated looking at the outputs of the ULN2003 and how they map to stepper motor coil inputs A + C and B + D

OUT1 = Qd
OUT2 = Qb
OUT3 = Qc
OUT4 = Qa

You can compare in contrast to the more regular wiring of unipolar steppers (see Arduino example circuits) where the wiring sequence is more sequential.

Further clarification can be found in the circuit diagram/construction notes.
I really have no explanation why Colne Robotics choose this wiring arrangement.


The accompanying sketch continually rotates the motor in alternating directions - this is good enough to spot any motion irregularities:

 /*  
  * ID35 Stepper Sketch  
  * http://armdroid1.blogspot.co.uk  
  */  
   
 #include "Stepper.h"

 #define ID35_STEPS 48  
 Stepper id35_stepper(ID35_STEPS, 2, 3, 4, 5);  
   
 void setup()  
 {  
   id35_stepper.setSpeed(20); // RPMs  
 }  
   
 void loop()   
 {  
   // rotate clockwise  
   id35_stepper.step(ID35_STEPS);  
   delay(500);  
   
   // rotate counter-clockwise   
   id35_stepper.step(-ID35_STEPS);  
   delay(500);  
 }  
sketch_ID35_stepper.ino


The circuit was first tested with a new ULN2003A driver from my parts box.  After making sure everything was running smoothly, I removed each of the four darlingtons from my interface board, and fitted them, one at a time into the test circuit above.



Driver (IC16) extraction from Armdroid interface PCB




But, we're not done just yet....   The ULN2003A supports 7 channels of current amplification (IN1 - IN7), three of the ULN2003 (ICs 13 - 15) fitted to the Armdroid's interface use all seven of these channels.   To test these additional channels, simply re-wire the inputs to use IN4 - IN7 and likewise with the corresponding outputs to be OUT4 - OUT7, nothing else needs to change!

Re-arranged wiring to test IN4 - IN7

All of my darlingtons turned out to be good.  But, it's well worth checking these, as these are probably the components most likely to fail on a circuit of this age.

The two darlingtons replaced by ECG2013 equivalents - I hadn't heard of these chips before, but double checking a datasheet found on the internet indicates they have exactly the same ratings as the ULN2003 they replace.  Both are rated with an output current of 500 mA and maximum voltage 50 V.

I've added both datasheets to the resources section.



My next post will concentrate on final preparations for bench testing the interface board....

No comments:

Post a Comment