Go Down

Topic: Meade starfinder mount - Arduino - Stepper - Calculating steps per min/sec (Read 310 times) previous topic - next topic

casperround64

Hi guys, I've got a Meade Starfinder mount, I have an arduino wired to a AccelStepper library using a CNC stepper shield v3.0
The nema 17, uses a belt drive, small cog on the nema 17, and large cog on the drive axle of the meade tracker. This is to obviously step down the nema 17 to a slower speed.

I managed to get it to move 10 Deg every 40 minuets. As for each hour passes it should rotate 15Deg.

However its not as percise as I would like. I used a telescopic lense on my mount with my DSLR, did a 4 Min  exposure. And there is a slight blur. It seems it is tracking as there is less blur, especially after 30 sec exposure without tracking there would 100% be a trail.

Setup:
GT2 Timing belt
On the Equatorial Mount (Only polar axis) it has a 60Teeth 2GT pulley
And on the nema 17 it uses a 20T Pulley


My code is as follows:

Code: [Select]
#include <AccelStepper.h>

// Define a stepper and the pins it will use
AccelStepper stepper(1,4,7); // Defaults to AccelStepper::FULL4WIRE (4 pins) on 2, 3, 4, 5

void setup()

  stepper.setMaxSpeed(100);
  stepper.setAcceleration(1000000);
}

void loop()
{   
  stepper.moveTo(35000);
  while (stepper.currentPosition() != 35000) // Full speed up to 300
    stepper.run();
  stepper.stop(); // Stop as fast as possible: sets new target
  stepper.runToPosition();
  // Now stopped after quickstop

}


Can someone help me calculate this or suggest a better way for more accuracy

Robin2

I don't think you have provided the information that is needed to help you.

You have told us there us a 3:1 gear reduction between the stepper motor and the telescope mechanism. But you have not told us how many rotations of the telescope shaft are needed for (say) 10° of rotation of the telescope.

What stepper motor driver are you using? From your code I suspect it is an L298 h-bridge.

If you use a specialized stepper motor driver it will give you the option of moving in half-, quarter-, one-eighth-steps etc.

As you have not posted the datasheet for your stepper motor I can't suggest a suitable driver.

...R
Stepper Motor Basics
Simple Stepper Code
Two or three hours spent thinking and reading documentation solves most programming problems.

casperround64

Yes of course, and it is a a4988 driver. Using a Step/Dir/Enable pin. Works much better than the other driver you mentioned due to the ability of micro stepping - Which is enabled.

Ill work out how many rotations are needed for 10 Deg

casperround64

Worked out it takes 3 Rotations for the large pulley to make 10 Deg

MarkT

Unless your Arduino's system clock is derived from a quartz crystal you'll not get satifactory results.

Many Arduino's use a ceramic resonator which is not accurate enough for astronomical work.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Robin2

Worked out it takes 3 Rotations for the large pulley to make 10 Deg
That seems to mean that the stepper motor would make 9 turns for 10°. If you are using full steps that would be 1800 steps. You can figure out the number of microsteps.

When you know how many degrees per minute (or hour) your telescope needs to move then you can work out the necessary interval between steps.

I don't know enough about astronomical observation to comment on @MarkT's observation. If poor Arduino time keeping is a problem maybe you could get a sufficient time correction by using a Real Time Clock (RTC) module.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

MarkT

Ceramic resonators are generally quoted as +/- 0.5%, which will easily blur/streak a long exposure.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

casperround64

That seems to mean that the stepper motor would make 9 turns for 10°. If you are using full steps that would be 1800 steps. You can figure out the number of microsteps.

When you know how many degrees per minute (or hour) your telescope needs to move then you can work out the necessary interval between steps.

I don't know enough about astronomical observation to comment on @MarkT's observation. If poor Arduino time keeping is a problem maybe you could get a sufficient time correction by using a Real Time Clock (RTC) module.

...R
So if I'm right: 1800(Steps) / 10(deg) = 180steps per deg
180Steps per deg * 16 (Microstep multiplier (Specified on my driver board)) =2880 Microsteps per deg

2880* 360 = 1036800 Steps per 360 deg
1036800 / 24 Hrs / 60 Minuets / 60 Secconds each minuet = 12 Steps per second speed

Robin2

1036800 / 24 Hrs / 60 Minuets / 60 Secconds each minuet = 12 Steps per second speed
And what step rate have you been using?

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

Idahowalker

Also, consider using a guide star to compensate for the various mechanical errors that will creep in. Using a finder scope or something like a Rigelsys you can focus a guide star onto an optical flow sensor. As the guide star drifts from a defined area on the optical flow sensor; delta x and delta y, the telescopes elliptic can be adjusted to compensate for the drift.

Go Up