Have a project that I want to build that requires a 6-wire unipolar stepper, but mine only has 4 wires, is there any way to get mine to work?
Have a project that I want to build that requires a 6-wire unipolar stepper, but mine only has 4 wires, is there any way to get mine to work?
with a 4 wire stepper you will need to use 2 full H Bridges to drive it instead of 4 single sided transistors, BTW, a ULN2003 is not a stepper driver, it is a 7 channel open collector driver that is often used to drive smaller stepper motors with 5 or 6 wires
a good place to start for a dual H Bridge is the TI Stepper Booster pack http://www.ti.com/lit/ug/slvu967/slvu967.pdf
MIne is a pretty small stepper. Would the sln754410ne work using this diagram I found http://42bots.com/wp-content/uploads/2014/12/bipolar_stepper_four_pins.jpg and this stepper https://www.sparkfun.com/products/10551 ?
It probably will for a small low powered stepper
I have everything wired up exactley as it is in the diagram, here is the code I am using to test the movement
int delaymotor = 3; // This variable affects the speed, and fluidity of the harp.
int motorPin1 = 8; //Use these names for the pin numbers.
int motorPin2 = 9;
int motorPin3 = 10;
int motorPin4 = 11;
void setup() {
pinMode(8, OUTPUT); // Setup for the motor.
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);
pinMode(11, OUTPUT);
}
void loop() {
digitalWrite(motorPin1, HIGH); // Move the motor to create the second beam.( One step forward)
digitalWrite(motorPin2, LOW);
digitalWrite(motorPin3, LOW);
digitalWrite(motorPin4, LOW);
delay(delaymotor); // Small pause
digitalWrite(motorPin1, LOW); // Move the motor to create the second beam.( One step forward)
digitalWrite(motorPin2, HIGH);
digitalWrite(motorPin3, LOW);
digitalWrite(motorPin4, LOW);
delay(delaymotor); // Small pause
digitalWrite(motorPin1, LOW); // Move the motor to create the second beam.( One step forward)
digitalWrite(motorPin2, LOW);
digitalWrite(motorPin3, HIGH);
digitalWrite(motorPin4, LOW);
delay(delaymotor); // Small pause
digitalWrite(motorPin1, LOW); // Move the motor to create the second beam.( One step forward)
digitalWrite(motorPin2, LOW);
digitalWrite(motorPin3, LOW);
digitalWrite(motorPin4, HIGH);
delay(delaymotor); // Small pause
digitalWrite(motorPin1, LOW); // Move the motor to create the second beam.( One step forward)
digitalWrite(motorPin2, LOW);
digitalWrite(motorPin3, HIGH);
digitalWrite(motorPin4, LOW);
delay(delaymotor); // Small pause
digitalWrite(motorPin1, HIGH); // Move the motor to create the second beam.( One step forward)
digitalWrite(motorPin2, LOW);
digitalWrite(motorPin3, LOW);
digitalWrite(motorPin4, LOW);
delay(delaymotor); // Small pause
}
When I power everything up, the motor just vibrates a little, and isn't stepping, any idea on why that is? I remember a while ago I watched something about steppers and maybe I need to add a capacitor somewhere or a pull-up resistor?
Gabriel,
please when you add the code add it with the source language syntax highlighting so it is possible co copy and paste for any test easily. IMHO the stepper vibrates for two possible reasons: you have wired the cables in the wrong order or the code sequence is not correct.
In the case of the motor wiring I suggest to check in detail searching on the internet the exact wiring color code of the motor model you are using. It is not the first time that some producer does not follow the expected standard colors in the stepper motors.
About the code, just taking a look, the HIGH/LOW pin setting sounds strange as the stepping requires a sort of symmetrical states. But I have not really idea of what is the scheme. Maybe the worth to try these suggestions and definitely publish the motor datasheet, pin usage and circuit schematics ?
Enrico
Gabriel
The code you posted suggests a delay of only 3mS, which makes this loop run very quickly.
Secondly the sequence you have is 1,2,3,4,3,1 then looping back 1,2,3,4,3,1
I suggest you change the delay to 10 or 50 and comment out or remove the last two sequences.
I found these
How to use a Stepper Motor - 4
https://learn.adafruit.com/all-about-stepper-motors/types-of-steppers
Mark
Gabriel
The code you posted suggests a delay of only 3mS, which makes this loop run very quickly.
Secondly the sequence you have is 1,2,3,4,3,1 then looping back 1,2,3,4,3,1
I suggest you change the delay to 10 or 50 and comment out or remove the last two sequences.
I found these
How to use a Stepper Motor - 4
https://learn.adafruit.com/all-about-stepper-motors/types-of-steppers
Mark