Monday, June 30, 2014

CanaKit Stepper Motor with Cable Review

CanaKit Stepper Motor with Cable
Customer Ratings: 4 stars
List Price: $16.24
Sale Price: $7.34
Today's Bonus: 55% Off
Buy Now

Smooth, precise control. No instructions.Took a little bit of work, but I found a diagram.

Red = A, Green = AC, Yellow = B, Blue = BC.

Powerful and pretty fast. A bit on the heavy side, but this thing isn't exactly small.

Click Here For Most Helpful Customer Reviews >>

I've never done anything with stepping motors before now. When this motor arrived the only documentation was a link to a site that showed the motor specs and wiring. After a quick search the motor looked like it was easy to use, so I decided to try to control it with an Arduino motor shield. This is not the solution I would suggest for any one else, but I wanted to try this instead of an actual motor controller so that I could get a better understanding of how it worked. I've got a stepping motor controller on order and plan to use it. The advantage of having the stepping motor controller is it will manage the sequence of coil activations required to turn the motor and gives you more liberty as far as what lines you use to control the motor (Assuming you are using an Arduino). I think a stepping motor controller will also do a better job at managing the current to the motor (I think I may be using more than necessary). If you want to test your motor to see if it works try the code below. But don't use the code for an actual project implementation. Go with the motor controller.

The A-coils in the motor are controlled with the red/green wire pair and the B-coils are controlled with the yellow-blue wire pair. The lines on the Arduino the control the motor shield are as follows:

_direction_b_pin = 13;

_speed_b_pin = 11;

_brake_b_pin = 8;

_direction_a_pin = 12;

_speed_a_pin = 3;

_brake_a_pin = 9;

It's necessary to setup each one of these pins as an output.

void Setup

{

pinMode(_direction_b_pin, OUTPUT);

pinMode(_speed_b_pin, OUTPUT);

pinMode( _brake_b_pin, OUTPUT);

pinMode(_direction_a_pin, OUTPUT);

pinMode(_speed_a_pin, OUTPUT);

pinMode(_brake_a_pin, OUTPUT);

_degreesPerStep = 1.8;

_currentPosition = 0;

}

Once these pins are setup it is just a matter of pulsing them in the right sequence. Here is one way of doing this. Every time the Step method is called the motor will make one step in a direction (one direction if _directionFlag is true, the opposite direction if _directionFlag is false).

void Step

{

if(_directionFlag)

{

if((_coil_a_state)&&(_coil_b_state))

_coil_a_state = false;

else if((!_coil_a_state)&&(_coil_b_state))

_coil_b_state = false;

else if ((!_coil_a_state)&&(!_coil_b_state))

_coil_a_state = true;

else

_coil_b_state = true;

_currentPosition += _degreesPerStep;

}

else

{

Serial.println("-");

if((_coil_a_state)&&(_coil_b_state))

_coil_b_state = false;

else if((!_coil_a_state)&&(_coil_b_state))

_coil_a_state = true;

else if ((!_coil_a_state)&&(!_coil_b_state))

_coil_b_state = true;

else

_coil_a_state = false;

_currentPosition -= _degreesPerStep;

}

if(_isOn)

{

digitalWrite(_brake_a_pin, LOW);

digitalWrite(_brake_b_pin, LOW);

}

else

{

digitalWrite(_brake_a_pin, HIGH);

digitalWrite(_brake_b_pin, HIGH);

}

digitalWrite(_direction_a_pin, (_coil_a_state)?HIGH:LOW);

digitalWrite(_direction_b_pin, (_coil_b_state)?HIGH:LOW);

digitalWrite(_speed_a_pin, HIGH);

digitalWrite(_speed_b_pin, HIGH);

}

This code is sufficient for getting the motor to turn. If you

Best Deals for CanaKit Stepper Motor with Cable

I have used these motors in several projects and have been very happy with them. I have build a crane, and a car. They are drvien with Easy Drive and Arduino.

Honest reviews on CanaKit Stepper Motor with Cable

The motor is great for all kinds of projects. It shipped quickly and arrived on time and in perfect condition. 4 out of 5 stars though becuase there is little to no paperwork available on the motor specs (pin out, current draw, max stepping speed, ect...)

Find helpful customer reviews and review ratings for CanaKit Stepper Motor with Cable

or maybe just a wiring diagram. THe motor works great. However, there should be a simple diagram indicating the basic specifications and poles of which magnet are associated with which color lead. How hard can this be? The motor arrives with NO (as in zero) documentation.

Buy Fom Amazon Now

No comments:

Post a Comment