I hope this is the right subforum to post this question.
A little background first. None of us have much of a background in electronics, we are mainly dealing with mechanical issues. We have a telescope observatory and are trying to automate the rotation of the dome to sync with the telescope. To that end to start the project we purchased a high torque stepper motor ( https://www.tindie.com/products/stepperonline/nema-17-stepper-motor-48mm-length-w-511-gearbox/ ) along with the TB6600 driver and Arduino Uno.
The following was the connections we used:
A 12V 5A power supply was used. The corresponding wires of the stepper were connected to the TB6600.
From the TB6600 EMA+, DIR+,PUL+ to Arduino 5V
PUL- to Arduino 8
DIR- to Arduino 9
The DIP switches are set to ON ON OFF / ON OFF OFF
Then we used a simple code to try rotating the stepper one full rotation.
With a step angle of .035 degrees one full rotation should be equal to 10,286 steps.
This is the code:
The result is that the stepper motor only rotates approximately 1/4 turn in each direction and not a full turn.
What are we doing wrong?
Again I apologize for the non professional nomenclature but electronics is not our strong suit.
Thank you in advance for any help you could provide.
A little background first. None of us have much of a background in electronics, we are mainly dealing with mechanical issues. We have a telescope observatory and are trying to automate the rotation of the dome to sync with the telescope. To that end to start the project we purchased a high torque stepper motor ( https://www.tindie.com/products/stepperonline/nema-17-stepper-motor-48mm-length-w-511-gearbox/ ) along with the TB6600 driver and Arduino Uno.
The following was the connections we used:
A 12V 5A power supply was used. The corresponding wires of the stepper were connected to the TB6600.
From the TB6600 EMA+, DIR+,PUL+ to Arduino 5V
PUL- to Arduino 8
DIR- to Arduino 9
The DIP switches are set to ON ON OFF / ON OFF OFF
Then we used a simple code to try rotating the stepper one full rotation.
With a step angle of .035 degrees one full rotation should be equal to 10,286 steps.
This is the code:
Code:
/*
Stepper Motor Control - one revolution
This program drives a unipolar or bipolar stepper motor.
The motor is attached to digital pins 8 - 9 of the Arduino.
The motor should revolve one revolution in one direction, then
one revolution in the other direction.
*/
#include <Stepper.h>
const int stepsPerRevolution = 10286; // change this to fit the number of steps per revolution
// for your motor
// initialize the stepper library on pins 8, 9:
Stepper myStepper(stepsPerRevolution, 8, 9);
void setup() {
// set the speed at 60 rpm:
myStepper.setSpeed(15);
// initialize the serial port:
Serial.begin(9600);
}
void loop() {
// step one revolution in one direction:
Serial.println("clockwise");
myStepper.step(stepsPerRevolution);
delay(500);
// step one revolution in the other direction:
Serial.println("counterclockwise");
myStepper.step(-stepsPerRevolution);
delay(500);
}
What are we doing wrong?
Again I apologize for the non professional nomenclature but electronics is not our strong suit.
Thank you in advance for any help you could provide.