Slow slew Atmega2560


Marius Ungureanu
 

Hello,

I have just started motorizing my mount on it’s RA axis but i am getting verry slow speeds.
I use Ramps 1.4 with DRV8825 DRIVER and ML17A3 motor.
I have set the jumpers to 32 microsteps
I use a 20t pulley on my motor and 60t on the telescope mount (so 3:1 ratio), the mount has a further reduction of 100:1 on it’s worm pulley.


Could you have a look? Am i doing something wrong? I get verry slow speed on tracking.




// TRACKING BEHAVIOUR -------------------------------------------- see https://onstep.groups.io/g/main/wiki/6-Configuration#TRACKING
#define TRACK_AUTOSTART               ON //    OFF, ON Start with tracking enabled.                                          Option
#define TRACK_REFRACTION_RATE_DEFAULT OFF //    OFF, ON Start w/atmospheric refract. compensation (RA axis/Eq mounts only.)   Option
#define TRACK_BACKLASH_RATE            25 //     25, n. Where n=2..50 (x sidereal rate) during backlash takeup.               Option
                                          //         Too fast motors stall/gears slam or too slow and sluggish in backlash.

// SYNCING BEHAVIOUR ---------------------------------------------- see https://onstep.groups.io/g/main/wiki/6-Configuration#SYNCING
#define SYNC_CURRENT_PIER_SIDE_ONLY    ON //     ON, Disables ability of sync to change pier side, for GEM mounts.            Option

// SLEWING BEHAVIOUR ---------------------------------------------- see https://onstep.groups.io/g/main/wiki/6-Configuration#SLEWING
#define SLEW_RATE_BASE_DESIRED       2 //    1.0, n. Desired slew rate in deg/sec. Adjustable at run-time from            <-Req'd
                                          //         1/2 to 2x this rate, and as MCU performace considerations require.
#define SLEW_RATE_MEMORY              OFF //    OFF, ON Remembers rates set across power cycles.                              Option
#define SLEW_ACCELERATION_DIST        5.0 //    5.0, n, (degrees.) Approx. distance for acceleration (and deceleration.)      Adjust
#define SLEW_RAPID_STOP_DIST          2.5 //    2.0, n, (degrees.) Approx. distance required to stop when a slew              Adjust
                                          //         is aborted or a limit is exceeded.
                                          
#define MFLIP_SKIP_HOME               OFF //    OFF, ON Goto directly to the destination without visiting home position.      Option
#define MFLIP_PAUSE_HOME_MEMORY       OFF //    OFF, ON Remember meridian flip pause at home setting across power cycles.     Option
#define MFLIP_AUTOMATIC_MEMORY        OFF //    OFF, ON Remember automatic meridian flip setting across power cycles.         Option

// PARKING BEHAVIOUR ---------------------------------------------- see https://onstep.groups.io/g/main/wiki/6-Configuration#PARKING
#define STRICT_PARKING                OFF //    OFF, ON Un-parking is only allowed if successfully parked.                    Option

// MOTION CONTROL -------------------------------------------------- see https://onstep.groups.io/g/main/wiki/6-Configuration#MOTION
#define STEP_WAVE_FORM             PULSE // SQUARE, PULSE Step signal wave form faster rates. SQUARE best signal integrity.  Adjust

// Stepper driver models (also see ~/OnStep/src/sd_drivers/Models.h for additional infrequently used models and more info.): 
// A4988, DRV8825, LV8729, S109, SSS TMC2209*, TMC2130* **, and TMC5160* ***
// * = add _QUIET (stealthChop tracking) for example "TMC2130_QUIET"
// ** = SSS TMC2130 if you choose to set stepper driver current (in mA) set Vref pot. 2.5V instead of by motor current as usual.
// *** = SSS TMC5160 you must set stepper driver current (in mA) w/ #define AXISn_TMC_IRUN (IHOLD, etc.)

// AXIS1 RA/AZM
#define AXIS1_STEPS_PER_DEGREE     10666.66667 //  12800, n. Number of steps per degree:                                          <-Req'd
                                          //         n = (stepper_steps * micro_steps * overall_gear_reduction)/360.0
#define AXIS1_STEPS_PER_WORMROT   38400 //  12800, n. Number of steps per worm rotation (PEC Eq mode only:)                <-Req'd
                                          //         n = (AXIS1_STEPS_PER_DEGREE*360)/reduction_final_stage

#define AXIS1_DRIVER_MODEL            DRV8825 //    OFF, (See above.) Stepper driver model.                                      <-Often
#define AXIS1_DRIVER_MICROSTEPS       32 //    OFF, n. Microstep mode when tracking.                                        <-Often
#define AXIS1_DRIVER_MICROSTEPS_GOTO  8 //    OFF, n. Microstep mode used during gotos.                                     Option
#define AXIS1_DRIVER_IHOLD            OFF //    OFF, n, (mA.) Current during standstill. OFF uses IRUN/2.0                    Option
#define AXIS1_DRIVER_IRUN             OFF //    OFF, n, (mA.) Current during tracking, appropriate for stepper/driver/etc.    Option
#define AXIS1_DRIVER_IGOTO            OFF //    OFF, n, (mA.) Current during slews. OFF uses same as IRUN.                    Option
#define AXIS1_DRIVER_REVERSE          OFF //    OFF, ON Reverses movement direction, or reverse wiring instead to correct.   <-Often
#define AXIS1_DRIVER_STATUS           OFF //    OFF, TMC_SPI, HIGH, or LOW.  Polling for driver status info/fault detection.  Option

#define AXIS1_LIMIT_UNDER_POLE        180 //    180, n. Where n=150..180 (degrees.) Max HA hour angle + or - for Eq modes.    Adjust
#define AXIS1_LIMIT_MAXAZM            360 //    360, n. Where n=180..360 (degrees.) Max Azimuth + or - for AltAzm mode only.  Adjust



Dave Schwartz
 

Since the Ramps board does not support program-controlled microstep mode switching, the motors will only ever run at the 1/32 microstep rate you have configured (both physically and in Config.h) so that means your desire for _DRIVER_MICROSTEPS_GOTO  8 will not be effective. Since the Atmega is such a slow processor, OnStep can't pulse the STEP line fast enough to make the motors go any faster in 1/32 mode than what you are seeing now.

On 2021-04-21 1:25 a.m., Marius Ungureanu via groups.io wrote:
Hello,

I have just started motorizing my mount on it’s RA axis but i am getting verry slow speeds.
I use Ramps 1.4 with DRV8825 DRIVER and ML17A3 motor.
I have set the jumpers to 32 microsteps
I use a 20t pulley on my motor and 60t on the telescope mount (so 3:1 ratio), the mount has a further reduction of 100:1 on it’s worm pulley.


Could you have a look? Am i doing something wrong? I get verry slow speed on tracking.




// TRACKING BEHAVIOUR -------------------------------------------- see https://onstep.groups.io/g/main/wiki/6-Configuration#TRACKING <https://onstep.groups.io/g/main/wiki/6-Configuration#TRACKING>
#define TRACK_AUTOSTART               ON //  OFF, ON Start with tracking enabled.                  Option
#define TRACK_REFRACTION_RATE_DEFAULT OFF //  OFF, ON Start w/atmospheric refract. compensation (RA axis/Eq mounts only.)   Option
#define TRACK_BACKLASH_RATE            25 // 25, n. Where n=2..50 (x sidereal rate) during backlash takeup.               Option
                                          //   Too fast motors stall/gears slam or too slow and sluggish in backlash.

// SYNCING BEHAVIOUR ----------------------------------------------
see https://onstep.groups.io/g/main/wiki/6-Configuration#SYNCING <https://onstep.groups.io/g/main/wiki/6-Configuration#SYNCING>
#define SYNC_CURRENT_PIER_SIDE_ONLY    ON // ON, Disables ability of sync to change pier side, for GEM mounts.            Option

// SLEWING BEHAVIOUR ----------------------------------------------
see https://onstep.groups.io/g/main/wiki/6-Configuration#SLEWING <https://onstep.groups.io/g/main/wiki/6-Configuration#SLEWING>
#define SLEW_RATE_BASE_DESIRED       2 //    1.0, n. Desired slew rate in deg/sec. Adjustable at run-time from          <-Req'd
                                          //   1/2 to 2x this rate, and as MCU performace considerations require.
#define SLEW_RATE_MEMORY              OFF //  OFF, ON Remembers rates set across power cycles.                  Option
#define SLEW_ACCELERATION_DIST        5.0 //  5.0, n, (degrees.) Approx. distance for acceleration (and deceleration.)      Adjust
#define SLEW_RAPID_STOP_DIST          2.5 //  2.0, n, (degrees.) Approx. distance required to stop when a slew              Adjust
                                          //   is aborted or a limit is exceeded.
#define MFLIP_SKIP_HOME               OFF //  OFF, ON Goto directly to the destination without visiting home position.      Option
#define MFLIP_PAUSE_HOME_MEMORY       OFF //  OFF, ON Remember meridian flip pause at home setting across power cycles.     Option
#define MFLIP_AUTOMATIC_MEMORY        OFF //  OFF, ON Remember automatic meridian flip setting across power cycles.         Option

// PARKING BEHAVIOUR ----------------------------------------------
see https://onstep.groups.io/g/main/wiki/6-Configuration#PARKING <https://onstep.groups.io/g/main/wiki/6-Configuration#PARKING>
#define STRICT_PARKING                OFF //  OFF, ON Un-parking is only allowed if successfully parked.                  Option

// MOTION CONTROL --------------------------------------------------
see https://onstep.groups.io/g/main/wiki/6-Configuration#MOTION <https://onstep.groups.io/g/main/wiki/6-Configuration#MOTION>
#define STEP_WAVE_FORM             PULSE // SQUARE, PULSE Step signal wave form faster rates. SQUARE best signal integrity.  Adjust

// Stepper driver models (also see ~/OnStep/src/sd_drivers/Models.h for additional infrequently used models and more info.):
// A4988, DRV8825, LV8729, S109, SSS TMC2209*, TMC2130* **, and TMC5160* ***
// * = add _QUIET (stealthChop tracking) for example "TMC2130_QUIET"
// ** = SSS TMC2130 if you choose to set stepper driver current (in mA) set Vref pot. 2.5V instead of by motor current as usual.
// *** = SSS TMC5160 you must set stepper driver current (in mA) w/ #define AXISn_TMC_IRUN (IHOLD, etc.)

// AXIS1 RA/AZM
// see https://onstep.groups.io/g/main/wiki/6-Configuration#AXIS1 <https://onstep.groups.io/g/main/wiki/6-Configuration#AXIS1>
#define AXIS1_STEPS_PER_DEGREE     10666.66667 //  12800, n. Number of steps per degree:                  <-Req'd
                                          //   n = (stepper_steps * micro_steps * overall_gear_reduction)/360.0
#define AXIS1_STEPS_PER_WORMROT   38400 //  12800, n. Number of steps per worm rotation (PEC Eq mode only:)          <-Req'd
                                          //   n = (AXIS1_STEPS_PER_DEGREE*360)/reduction_final_stage

#define AXIS1_DRIVER_MODEL            DRV8825 //  OFF, (See above.) Stepper driver model.                <-Often
#define AXIS1_DRIVER_MICROSTEPS       32 //  OFF, n. Microstep mode when tracking.                <-Often
#define AXIS1_DRIVER_MICROSTEPS_GOTO  8 //    OFF, n. Microstep mode used during gotos.           Option
#define AXIS1_DRIVER_IHOLD            OFF //  OFF, n, (mA.) Current during standstill. OFF uses IRUN/2.0                  Option
#define AXIS1_DRIVER_IRUN             OFF //  OFF, n, (mA.) Current during tracking, appropriate for stepper/driver/etc.    Option
#define AXIS1_DRIVER_IGOTO            OFF //  OFF, n, (mA.) Current during slews. OFF uses same as IRUN.                  Option
#define AXIS1_DRIVER_REVERSE          OFF //  OFF, ON Reverses movement direction, or reverse wiring instead to correct.   <-Often
#define AXIS1_DRIVER_STATUS           OFF //  OFF, TMC_SPI, HIGH, or LOW.  Polling for driver status info/fault detection.  Option

#define AXIS1_LIMIT_UNDER_POLE        180 //  180, n. Where n=150..180 (degrees.) Max HA hour angle + or - for Eq modes.    Adjust
#define AXIS1_LIMIT_MAXAZM            360 //  360, n. Where n=180..360 (degrees.) Max Azimuth + or - for AltAzm mode only.  Adjust



Howard Dutton
 
Edited

On Wed, Apr 21, 2021 at 07:55 AM, Dave Schwartz wrote:
that means your desire for _DRIVER_MICROSTEPS_GOTO  8 will not be effective. Since the Atmega is such a slow processor,
This is why we recommend the MKS Gen-L V2.0 or V2.1 (over a RAMPS 1.4) since TMC drivers can be mode switched without modifications.

Not only will it not be effective but slewing will be broken too.  Turn _GOTO OFF and use it that way or....

If you are brave/capable you can get out the solder iron and some wire then connect the mode switch pads (on AUX-4) to the Axis1 (X) and Axis2 (Y) stepper driver mode pads.
There are six of those connections required for full control but you can cheat and just switch M2 (of M0, M1, M2.)  That will allow 32x mode for tracking and 8x for slews (only.)  This is for the DRV8825 and while that will do mode switching on other drivers, like the LV8729 the modes switched might be different so each would need to be figured out individually.

Install jumpers in the two other pin sets under the drivers (as you would do for 32x mode) then tell OnStep to use 32x mode for tracking and 8x for slews.  Do not install jumpers at the position you wired into.  It will switch M2 only (since it is the only mode pin that changes between those modes) as required.

Note: the layout files are not clear enough for me to be 100% sure of the pads under the drivers.  I'm only 99% sure those are the correct ones, you can look at the Pololu site to see the DRV8825 pins and instead wire directly to the M2 pin on the driver socket or do a quick continuity check with a meter to be sure that's the correct pin.  On AUX-4 I'm as sure as I can be about anything that those are the correct ones.  Feel free to follow the pattern (refer to the MKS Wiki and link to the RAMPS1.4 near the top to see what pins) and put all six wires on, you can then use any mode or TMC drivers if you like... in that case, you would install no jumpers on those pins under the drivers.