Jump to content

NLCbanner2024.jpg.2478be509670e60c2d6efd04834b8b47.jpg

blackdragon72

Members
  • Posts

    37
  • Joined

  • Last visited

Everything posted by blackdragon72

  1. Thanks for the links to all the components. I ordered this: http://www.omc-stepperonline.com/9deg-thin-stepper-motor-125mm-05a-7ncm10ozin-14hr050504s-p-88.html There are two main reasons: - I want to drive coarse knob so I need at least 400 steps motor. And my knob is somehow stiff so I also want to have more torque. If it does not work then I will attach motor to fine knob. - I need a small factor (esp shallow one) so I can still store the OTA with motor attached.
  2. I am new to Arduino based focuser design, and this is a great resource to get me started. I have ordered Arduino Uno and motor shield board, and am still waiting for order to be delivered. I am interested in to modify the sketch for Uno. This is a sample sketch I got from internet: // Include the Stepper Library #include <Stepper.h> // Map our pins to constants to make things easier to keep track of const int pwmA = 3; const int pwmB = 11; const int brakeA = 9; const int brakeB = 8; const int dirA = 12; const int dirB = 13; // The amount of steps for a full revolution of your motor. // 360 / stepAngle const int STEPS = 48; // Initialize the Stepper class Stepper myStepper(STEPS, dirA, dirB); void setup() { // Set the RPM of the motor myStepper.setSpeed(30); // Turn on pulse width modulation pinMode(pwmA, OUTPUT); digitalWrite(pwmA, HIGH); pinMode(pwmB, OUTPUT); digitalWrite(pwmB, HIGH); // Turn off the brakes pinMode(brakeA, OUTPUT); digitalWrite(brakeA, LOW); pinMode(brakeB, OUTPUT); digitalWrite(brakeB, LOW); // Log some [removed word] Serial.begin(9600); } void loop() { // Move the motor X amount of steps myStepper.step(STEPS); Serial.println(STEPS); // Pause delay(2000); // Move the motor X amount of steps the other way myStepper.step(-STEPS); Serial.println(-STEPS); // Pause delay(2000); } So looks like in addition to have different initialization code, I just need to use step(1) and step(-1) to replace clockwise() and anticlockwise() routine. I dont need to touch ASCOM driver, is my understanding correct? And is it possible to create a universal sketch to support Uno too?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.