Alright I need some help I have a project due in a couple of
Alright, I need some help. I have a project due in a couple of days and I have not made any progress on this.
What I need to do: Power a Stepper Motor Using an Analog Discovery 2 and Waveforms. (NOT AN ARDUINO) The motor needs to continuously step in one direction.
Components I was Given: 4 x 2N3904 Transistors, 1 x 12 V Stepper Motor (SM-42BYG011-25), 1 x 74LS194AN Chip, and 1 x 9V Battery
What I Know: I need to have the arduino power the chip in order to make a ring counter-type circuit.
I have tried several different configurations, and even tried one that my professor gave me but after confirming with him, that also failed.
I have no Idea where to go from here, Please HELP!!!!!!!!!
Solution
For this project , there are two ways in which you can use darlington transistor array and without darlington array.
While without darlington array you can use your mercury bipolar stepper motor with driver and 9V battery.
After setting up the circuit you net to configure the displacement of the stepper motor.
*/LOW LOW = Full Step
HIGH LOW = Half Step
LOW HIGH = A quarter of Step
HIGH HIGH = An eighth of Step
*/
#define step_pin 3
#define dir_pin 2
#define MS1 5
#define MS2 4
int direction;
int steps = 200;
void setup() {
pinMode(MS1, OUTPUT);
pinMode(MS2, OUTPUT);
pinMode(dir_pin, OUTPUT);
pinMode(step_pin, OUTPUT);
digitalWrite(MS1, LOW);
digitalWrite(MS2, LOW);
digitalWrite(dir_pin, LOW);
}
void loop() {
while(steps>=0)
digitalWrite(step_pin, HIGH);
delay(5);
digitalWrite(step_pin, LOW);
delay(5);
}
