I am using an FPGA with a stepper motor (and ULN 2003 driver board) and have not been able to make it go to a specific angle. I am using verilog so Arduino examples such as this cannot be used but this is precisely what I want.
What I have tried successfully:
//turn 90 degrees, then 90 again and so on
0: stepperPins <= 4'b1100; //this means 1A is HIGH, 1B is HIGH, 2A and 2B are LOW
1: stepperPins <= 4'b0110;
2: stepperPins <= 4'b0011;
3: stepperPins <= 4'b1001;
//180 to 210 degrees and repeat, the angle changing randomly
0: stepperPins <= 4'b1000;
1: stepperPins <= 4'b0100;
2: stepperPins <= 4'b0010;
3: stepperPins <= 4'b0001;
4: stepperPins <= 4'b1000;
5: stepperPins <= 4'b0100;
6: stepperPins <= 4'b0010;
7: stepperPins <= 4'b0001;
//90 degrees and repeat
0: stepperPins <= 4'b1110;
1: stepperPins <= 4'b0111;
2: stepperPins <= 4'b1011;
3: stepperPins <= 4'b1101;
//180 and repeat
0: stepperPins <= 4'b1100;
1: stepperPins <= 4'b1110;
2: stepperPins <= 4'b0110;
3: stepperPins <= 4'b0111;
4: stepperPins <= 4'b0011;
5: stepperPins <= 4'b1011;
6: stepperPins <= 4'b1001;
7: stepperPins <= 4'b1101;
How do I power the pins to get to say 30 degrees? or 115? Experimentally I did this:
0: stepperPins <= 4'b1100;
1: stepperPins <= 4'b0011;
but the motor didn't even move. I understand that half step angle is 5.625 degrees and full step angle is 11.25 but how to get multiples of them? I have spent more than a month searching for answers, so if anyone could kindly help me?