This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Rotates through 480 steps every time the button is pressed. | |
Check your equipment to find out how many motor steps it takes for a full rotation. In my case it's 4800. | |
4800/sides or gear teeth you need to cut = number to put into "const int pulseset" | |
*/ | |
int count = 0; | |
const int pulseset = 480; //change this to change how many sides/gear teeth. 4800 pulses per rotation on my spindexer. | |
const int directionPin = 8; | |
const int pulsePin = 9; // the stepper driver gives one step at the rising edge of the pulse from the Arduino. | |
const int sensorValue = 1000; // sets the speed of rotation. 1000 is slow, 10 is fast |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Arduino controlled Bipolar NEMA 34 stepper rotary axis for milling machine. | |
Copyleft AvE channel on Youtube | |
Use and Abuse, Improve as you see fit | |
Wiring connections | |
Arduino Pin 8 to stepper driver pulse +5V | |
Arduino Pin 9 to stepper driver direction +5V | |
Arduino Ground to stepper driver signal ground Pulse -ve, Dir -ve, enable -ve | |
Arduino +5 volts to on/off switch to stepper driver enable +5V |