Project: PICAXE 28 - Dual Stepper Motors
Status: STARTED 7/26/2008 ***

Using the PICAXE 28 starter kit, attach two low power unipolar stepper motors.

You will need 5 sets of headers with aligator clips. See Header Cables with Aligator Clips project for more information

Material Used:
ItemsQtyUnit Price
JT004-Unipolar 4phase Stepper28.69
See Header Cables with Aligator Clips project-need 5 sets of 251.49
WE014-Picaxe-28X 1 Starter Pack134.99

Project Documents:
  Sample code for 2 steppers

Associated Links:OFRS-DADS , OFRS-PICAXE
PROJECT MANAGER
(click on phase to filter view of notes or show all

Assembly
Software
 
Colors:No WorkStartedCompletedCanceled
Project Notes (All Notes)


(7/26/2008) [phase:Assembly]
Attach each stepper motor using the head with aligator clips as follows.
Attach the following output pins to the stepper:
(colors only match for stepper JT004 - otherwise read stepper specifications)
Stepper1 X axis:
Output 0 to Phase A (Brown)
Output 1 to Phase B (Yellow)
Output 2 to Phase C (Red)
Output 3 to Phase D (Green)
Stepper2 Y axis:
Output 4 to Phase A (Brown)
Output 5 to Phase B (Yellow)
Output 6 to Phase C (Red)
Output 7 to Phase D (Green)

Ground to both black lines (both motors). (The output header pins have ground on the opposite side of the output pins).

Since the starter kit comes with an onboard ULN2803A darlington pair driver, and the JT004 can connect to it since it only pulls 240ma/phase. The board will handle it and the 3 AA batteries can drive a very light load just for testing. To use the stepper more, the starter kit allows you to change a jumper and add an additional power source to drive the ULN2803A and output pins. You will need to determin the best configuration and stay within the limits of the ULN2803A, power, and the stepper.



(7/26/2008) [phase:Software]
The sample software allows the motor to repeat a movement Z times - the movement is an X then Y movement (one must be value of 1). For examle a line that goes 10 space on the X axis and 20 spaces on the Y axis will do 1 step X followed by 2 steps Y and repeat 10 times. A ball was attached to each shaft with a piece of tape so that the units rotations could be observed. The W6 variable controls the timing between steps. If you step too fast, the motor (due to load and power source limits) may not move fast enough and could stall causing the shaft not to move correctly and lose it position.
Another thing to remember is that the outputs can only be on for short times otheriwse the motor will draw power and overheat, causing damage to the motor. To lock the motor in place you will have to pulse the active line a few times a second for a short time each pulse. This will allow the motor to keep it's place under load. The sample code does not show an example of this, but you can review some of picaxe's basic commands that handle timing or PWM to these lines or write your own holding code.
CODE LINK IS ON LEFT PAGE

This configuration of Stepper motors are better suited for possitional control like cnc machines (lathes, milling machines, 3d printers, plasma cutters ...).

end