On Wednesday, February 01, 2012 08:29:51 PM orly wrote:
> hi folks
>
> i am building a telescope control system using an arduino and a couple
> steppers. i will use the Pololu stepper motor controller (based on
> Allegro A4988) which supports up to 1/8 or 1/16 microstep. this is
> handled by the 1-wire mode of AccelStepper.
>
> ok this is my issue - AccelStepper keeps an internal count of the
> position of each stepper, but it cannot handle different stepping
> speeds, right? (and I don't mean pulses per second)
>
> i want to use full-step mode when slewing the telescope (pointing it
> at stuff) because i need the torque, but when tracking, i want to be
> in micro-stepping mode. Trouble is, say if i use 1/8 microstepping,
> the stepper positions will be all wrong because 1 step in microstep
> mode only goes 1/8 (roughly) the angular distance.
Difficult problem.
Maybe you will have to do all your step calculationins in 1/8 steps. When you
want to slew as opposed to track, change the outputs to MS1, MS2, MS3, and
change the max speed and acceleration of the AccelStepper.
ie run the AccelStepper in 2 different modes at different times, one for
slewing and one for tracking?
Might be interesting how the motor controller handles transitions from 1/8
stepping to full stepping and vide versa. Would the relative phases be
important?
>
> so - there should be some sort of "multiplier" for each stepper. i
> will add this feature once i get around to it (because i need it) but
> i was wondering if there's already some effort to add this feature.
Alas, AccelStepper does not currently support anything like that.
>
> also.. when the telescope is in tracking mode, the RA stepper is
> running continuously (in micro-step mode) at a very precise rate (to
> implement the sidereal rate of 1 revolution per 86164 seconds).
>
> What is the best way to implement this? the functions talk about
> absolute positioning and then use run() - so should i put run() inside
> an interrupt handler?
No, dont do that. run() is potentially expensive. But you might call
runSpeed() inside an interrupt: its cheap for constant speeds.
How many steps per second is that? What is the acceptable jitter? Is your
arduino doing anything else? Constant speed isnt it?
--
Mike McCauley mi...@open.com.au
Open System Consultants Pty. Ltd
9 Bulbul Place Currumbin Waters QLD 4223 Australia http://www.open.com.au
Phone +61 7 5598-7474 Fax +61 7 5598-7070
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, TACACS+, PAM, external, Active Directory, EAP, TLS,
TTLS, PEAP, TNC, WiMAX, RSA, Vasco, Yubikey, MOTP, HOTP, TOTP,
DIAMETER etc. Full source on Unix, Windows, MacOSX, Solaris, VMS, NetWare etc.
different stepper objects?
i'm just planning to gang together the MS1 / 2 / 3 of the two Pololu's
and map them to a single Arduino pin, so I have either microstep mode
or full-step mode.
> Might be interesting how the motor controller handles transitions from 1/8
> stepping to full stepping and vide versa. Would the relative phases be
> important?
No idea... I don't really care much because I'm working at a huge gear
reduction, a tiny bit of jitter at the transition won't bother me.
>> also.. when the telescope is in tracking mode, the RA stepper is
>> running continuously (in micro-step mode) at a very precise rate (to
>> implement the sidereal rate of 1 revolution per 86164 seconds).
>>
>> What is the best way to implement this? the functions talk about
>> absolute positioning and then use run() - so should i put run() inside
>> an interrupt handler?
>
> No, dont do that. run() is potentially expensive. But you might call
> runSpeed() inside an interrupt: its cheap for constant speeds.
>
> How many steps per second is that? What is the acceptable jitter? Is your
> arduino doing anything else? Constant speed isnt it?
Ok I need to do 1 revolution in 86164 seconds (360* x 60' x 60" =
1296000 arc-seconds giving 15.0411 arc-seconds per second).
The main ring gear is 192 teeth, my stepper drives the worm gear with
a reduction is ~5.18:1 (57/11) and I am using a 200-step stepper.
Hence each rotation of the worm gear is (200 x 57/11) = 1036.3636...
steps. And each rotation of the main gear is (200 x 57/11 x 192) =
198982 steps. This then requires 198982 / 86164 = 2.309 steps per
second.
Each step is then 1296000 / 198982 = 6.51 arc-seconds. This is way
too much (high-end telescope mounts have mechanical errors in the < 5
arc-second range, so my drive can't have that much jitter).
So when in tracking mode I want to use at least 1/8 microstep, which
results in 18.472 microsteps / second and a step size of 0.81
arc-seconds.
On Thursday, February 02, 2012 01:59:53 PM Orlando Andico wrote:
> On Thu, Feb 2, 2012 at 1:38 PM, Mike McCauley <mi...@open.com.au> wrote:
> ..
>
> >> i want to use full-step mode when slewing the telescope (pointing it
> >> at stuff) because i need the torque, but when tracking, i want to be
> >> in micro-stepping mode. Trouble is, say if i use 1/8 microstepping,
> >> the stepper positions will be all wrong because 1 step in microstep
> >> mode only goes 1/8 (roughly) the angular distance.
> >
> > Difficult problem.
> > Maybe you will have to do all your step calculationins in 1/8 steps.
> > When you want to slew as opposed to track, change the outputs to MS1,
> > MS2, MS3, and change the max speed and acceleration of the
> > AccelStepper.
> >
> > ie run the AccelStepper in 2 different modes at different times, one for
> > slewing and one for tracking?
>
> different stepper objects?
No I mean change its setup when you move from tracking to slewing.
>
> i'm just planning to gang together the MS1 / 2 / 3 of the two Pololu's
> and map them to a single Arduino pin, so I have either microstep mode
> or full-step mode.
OK.
>
> > Might be interesting how the motor controller handles transitions from
> > 1/8 stepping to full stepping and vide versa. Would the relative phases
> > be important?
>
> No idea... I don't really care much because I'm working at a huge gear
> reduction, a tiny bit of jitter at the transition won't bother me.
I mean that if you are tracking, then slew to a new observation and start
tacking again, will the motor controller have lost some 1/8 steps and will
that matter to you? Or do you position by eye and then enable tracking?
Hmm, thats not too bad, and jitter in the order of a few tens of microseconds
wont matter so much.
Cheers.
On Wednesday, February 01, 2012 10:38:51 PM orly wrote:
> On Feb 2, 2:24 pm, Mike McCauley <mi...@open.com.au> wrote:
> ..
>
> > > different stepper objects?
> >
> > No I mean change its setup when you move from tracking to slewing.
>
> Ah ok. But that means I can't rely on the stepper count from
> AccelStepper for the axis positions, right?
I mean that you could do all your shaft position calcs in 1/8 microsteps, and
then in slewing mode, set a new position with the step position divided by 8
(knowing that the controller will now step in (8 * 1/8) microsteps at a time
(ie in whole steps).
Hard to describe in words :-(
Cheers.
Yes, thats what I was trying to say.
Cheers.
>
> thanks!
>
> now to wire those pololu carrier boards...
>
> On Feb 2, 3:03 pm, Mike McCauley <mi...@open.com.au> wrote:
> > I mean that you could do all your shaft position calcs in 1/8
> > microsteps, and then in slewing mode, set a new position with the step
> > position divided by 8 (knowing that the controller will now step in (8
> > * 1/8) microsteps at a time (ie in whole steps).
> >
> > Hard to describe in words :-(