Hello,
I am trying to build a 3-axis CNC milling machine using an Arduino and three stepper motor drivers. The stepper motors are already working, but I can't seem to make an Arduino sketch that will control the stepper motors with a fine enough granularity.
I can't actually get the stepper motor to turn one step. The stepper motor is rated for 200 steps per revolution, but it looks like it takes about 460 "steps" (as shown in the code snippet below) to complete one full rotation.
void do_step(byte step_pin)
{
digitalWrite(step_pin, HIGH);
delayMicroseconds(5);
digitalWrite(step_pin, LOW); }
Any suggestions on where I'm going wrong? Thanks so much.
I am trying to build a 3-axis CNC milling machine using an Arduino and three stepper motor drivers. The stepper motors are already working, but I can't seem to make an Arduino sketch that will control the stepper motors with a fine enough granularity.
I can't actually get the stepper motor to turn one step. The stepper motor is rated for 200 steps per revolution, but it looks like it takes about 460 "steps" (as shown in the code snippet below) to complete one full rotation.
void do_step(byte step_pin)
{
digitalWrite(step_pin, HIGH);
delayMicroseconds(5);
digitalWrite(step_pin, LOW); }
Any suggestions on where I'm going wrong? Thanks so much.