Last edited · 7 revisions  

 


Configuration / Mount

In order to customize OnStep's behavior to each users requirements there are a variety of configuration settings in the Config.h file.

Instead of editing the Config.h file manually, you can use the web based Online Configuration Generator which gets you a basic working file quickly by answering a few questions. You can later edit the same file further to add more options, when you need them.

If you are manually editing the file, then many settings are optional but those settings that must always match your hardware and must be set properly are highlighted in red.  In some cases that's enough to get a working telescope controller but usually you also have to fill in the stepper driver information also, at a minimum, which is highlighted in yellow.  In all cases you should only change the Value column of the Config.h file to the required selection.

There are numerous checks performed at compile time:  Read the compiler warnings and errors, they are there to help guard against invalid configurations.

The Config.h file settings are categorized as follows:

 


TRACKING BEHAVIOR

  • TRACK_AUTOSTART
    • Default Value: OFF
    • Other Values: OFF, ON
    • Notes: Start with tracking enabled.
    • Reminder:
      • Not supported for MOUNT_TYPE ALTAZM.
      • If you have a TLS (Time Location Source, other than GPS) OnStep will start normally.
        • It is up to you to make sure the site information (Latitude/Longitude) are always correct if using this option.
        • If parked the mount will automatically be unparked.
      • If you do not have a TLS the mount will start tracking with limits disabled.
      • Good for testing but generally I do not recommend using this option.
  • TRACK_REFRACTION_RATE_DEFAULT
    • Default Value: OFF
    • Other Values: OFF, ON
    • Notes: Start with refraction compensated tracking enabled.
    • Reminder: This option can be enabled/disabled at run-time also.
  • TRACK_BACKLASH_RATE
    • Default Value: 25
    • Other Values: 2 to 50 (x sidereal rate)
    • Notes: Backlash take up rate.  Too fast and motors stall/gears slam as they run into the load of stationary telescope/mount at high speed.  Too slow and mount becomes less responsive.
    • Reminder: The amount of backlash for Axis1/2 is configured at run-time.

SYNCING BEHAVIOR

  • SYNC_CURRENT_PIER_SIDE_ONLY
    • Default Value: ON
    • Other Values: OFF, ON
    • Notes: Disables ability of a Sync. to change pier sides.  This is useful since otherwise the user might not be aware that OnStep changed pier sides if a Sync. is done near the Meridian.
    • Reminder: Relevant for GEM mounts only.  A Sync. can cause much confusion if the mount isn't manually moved into the alternate orientation as required to match the pier side change.  Many control applications provide side of pier information, some like my Sky Planetarium will warn you if a Sync causes a Pier Side change.

SLEWING BEHAVIOR

  • SLEW_RATE_BASE_DESIRED
    • Default Value: 1.0
    • Recommended Values: 0.4 to 10 (degrees per second)
    • Notes: Desired slew rate in degrees/second. Adjustable at run-time from 1/2 to 2x this rate.
    • Reminder:  This is the desired slew rate which OnStep may slow down to meet micro-controller performance limitations.  Other settings can affect performance limits, those include the overall AXISn_STEPS_PER_DEGREE, STEP_WAVE_FORM, AXISn_DRIVER_MICROSTEPS_GOTO, and related options.
  • SLEW_RATE_MEMORY
    • Default Value: ON
    • Other Values: OFF, ON
    • Notes: Remembers slew rates, set in the 1/2 to 2x SLEW_RATE_BASE_DESIRED range at run-time, across power cycles.
  • SLEW_ACCELERATION_DIST
    • Default Value: 5.0
    • Recommended Values: 0.1 to 20 (degrees)
    • Notes: Approx. distance for acceleration (and deceleration.)
  • SLEW_RAPID_STOP_DIST
    • Default Value: 1.0
    • Recommended Values0.1 to 10 (degrees)
    • Notes: Approx. distance required to stop when a slew is aborted or a limit is exceeded.
  • MFLIP_SKIP_HOME
    • Default Value: OFF
    • Other ValuesOFF, ON
    • Notes: Default OFF causes Gotos to slew to the Home Position first when a Meridian Flip is required.  This helps prevent cords from becoming tangled or snagged in some cases.
    • Reminder:
      • For GEM mode only.
      • Enable ON and Gotos slew directly to the destination without visiting Home Position, even if a Meridian Flip is required.
  • FLIP_PAUSE_HOME_MEMORY
    • Default Value: OFF
    • Other ValuesOFF, ON
    • Notes: Remember Meridian Flip Pause at Home setting across power cycles.
    • Reminder:
      • For GEM mode only.
      • Meridian Flip Pause at Home causes OnStep to wait at the Home Position for confirmation before continuing on to the destination when a Meridian Flip is required.
  • MFLIP_AUTOMATIC_MEMORY
    • Default Value: OFF
    • Other ValuesOFF, ON
    • Notes: Remember Automatic Meridian Flip setting across power cycles.
    • Reminder: For GEM mode only.  If enabled the Automatic Meridian Flip setting causes a goto with Meridian Flip to occur when the mount tracks into the Meridian Limit when West of the Pier.

PARKING BEHAVIOR

  • STRICT_PARKING
    • Default Value: OFF
    • Other ValuesOFF, ON
    • Notes: Un-parking is only allowed if successfully parked.
    • Reminder: Normally Un-parking is allowed even if not Parked when at the Home Position.  This is a recovery feature that allows you to manually re-orientate the mount to near the park position then Un-park to restore operation (including the pointing model) should you loose control due to a power outage, etc.

MOTION CONTROL

  • STEP_WAVE_FORM
    • Default Value: SQUARE
    • Other ValuesPULSE, SQUARE, DEDGE
    • NotesStep signal wave formSQUARE mode provides a nice square wave which is best if the step/dir signals need to travel some distance from the micro-controller.  PULSE mode allows for higher step rates (about 1.6x faster) but in some cases the pulse width can be too narrow for step/dir (stepper) drivers; it is also more prone to noise and transmission problems at longer distances.  DEDGE mode is an experimental feature that allows stepping to take place on both the rising and falling edge of the step signal for similar speeds as PULSE mode but with better signal integrity; the s/d driver must support this.
    • Reminder:
      • OnStep knows the pulse width minimums for various common stepper drivers and does checks to ensure they will work in PULSE mode.  OnStep will #error during compilation to let you know if the setting won't work.
      • PULSE mode is highly recommended for the Mega2560 due to its slower operating speed.

AXIS1 RA/AZM

  • AXIS1_STEPS_PER_DEGREE
    • Default Value: 12800.0
    • Recommended Values300.0 to 61200.0 (12 arc-sec/step to 0.06 arc-sec/step)
    • Notes: This is the number of steps the step/dir (stepper) driver needs to issue to the motor to cause the telescope to move one degree on this axis.
    • Reminder: For a stepper motor this is in units of tracking mode micro-steps; use the Configuration Calculator to help determine this value.
  • AXIS1_STEPS_PER_WORMROT
    • Default Value: 12800
    • Recommended Values: 0 to disable PEC, 77 to 862920 (in steps)
    • Notes: This is the number of steps the step/dir (stepper) driver needs to issue to the motor to cause the worm of a worm/wheel gear (or other final reduction stage) to rotate once.
    • Reminder:
      • Actual allowed range in steps depends on AXIS1_STEPS_PER_DEGREE and micro-controller limitations (RAM/NV.) 
        • 61 seconds minimum, AXIS1_STEPS_PER_WORMROT >= 61 * (AXIS1_STEPS_PER_DEGREE/240).
        • 3384 seconds maximum, AXIS1_STEPS_PER_WORMROT <= 3384 * (AXIS1_STEPS_PER_DEGREE/240).
      • For a stepper motor this is in units of tracking mode micro-steps; use the Configuration Calculator to help determine this value.
      • Ignored in ALTAZM mode.
  • AXIS1_DRIVER_MODEL
    • Default Value: OFF
    • Other Values: OFF,
      A4988, DRV8825, LV8729, RAPS128, S109, ST820, TMC2100,TMC2208,
      TMC2209,
      TMC2209_QUIET, TMC2209_VQUIET,
      TMC2130,
      TMC2130_QUIET, TMC2130_VQUIET,
      TMC5160, TMC5160_QUIET, TMC5160_VQUIET,
      GENERIC, GENERIC1, GENERIC2, GENERIC3,
      SERVO, SERVO1, SERVO2, SERVO3
    • Notes: This is the step/dir (stepper) driver model.
    • Reminder:
      • See the Stepper Driver Summary to learn more about the commonly used drivers.
      • SSS TMC2130 if you choose to set stepper driver current (in mA) with AXISn_TMC_IRUN (IHOLD, etc.) set the Vref pot. at 2.5V instead of by motor current as usual.
      • SSS TMC5160 you must set stepper driver current (in mA) with AXISn_TMC_IRUN (IHOLD, etc.)
      • The _VQUIET suffix (if available) causes the driver to run in stealthChop (silent) mode during tracking and slews.  StealthChop mode is not suitable for reaching high motor RPM's.
      • The _QUIET suffix (if available) causes the driver to run in stealthChop (silent) mode during tracking and spreadCycle during slews.
  • AXIS1_DRIVER_MICROSTEPS
    • Default Value: OFF
    • Other Values: 1 to 256
    • Notes: Tracking mode micro-steps setting, also used for gotos & slews if AXIS1_DRIVER_MICROSTEPS_GOTO is OFF.  A setting of 1 means a full-step, 2 half-step, 4 quarter-step, and so on.  We often use a value of 16, 32, or 64 here.
    • Reminder:
      • This value is present in the Configuration Calculator, if you change this AXIS1_STEPS_PER_DEGREE and AXIS1_STEPS_PER_WORMROT changes also.
      • Exact values allowed depends on the stepper driver model.   OnStep will #error on compilation if the driver doesn't support the micro-step mode specified.
  • AXIS1_DRIVER_MICROSTEPS_GOTO
    • Default Value: OFF
    • Other Values: 1 to 256
    • Notes: Optional micro-step mode to use during slews.  Using this can allow faster slew speeds when step rates are limited by micro-controller performance.
    • Reminder:
      • Exact values allowed depends on the stepper driver model and must be < AXIS1_DRIVER_MICROSTEPS aboveOnStep will #error on compilation if the driver doesn't support the micro-step mode specified.
  • AXIS1_DRIVER_IHOLD
    • Default Value: OFF
    • Recommended Values: 100 to 1500 (mA)
    • Notes: The stepper driver current at standstill.  Be sure to use a value the stepper driver, stepper motor, and controller/power-supply can handle.
    • Reminder: See AXIS1_DRIVER_IRUN reminder.
  • AXIS1_DRIVER_IRUN
    • Default Value: OFF
    • Recommended Values: 200 to 3000 (mA)
    • Notes: The stepper driver current while sidereal tracking.  Be sure to use a value the stepper driver, stepper motor, and controller/power-supply can handle.
    • Reminder:
      • This setting is only allowed for TMC2130 and TMC5160 stepper drivers.
      • The TMC2130 current is based on an Rsense of 0.13 Ohms, the TMC5160 current is based on an Rsense of 0.075 Ohms.
        • In the unlikely event this needs to be changed add #define AXISn_DRIVER_RSENSE n.nnn to Config.h
  • AXIS1_DRIVER_IGOTO
    • Default Value: OFF
    • Recommended Values: 200 to 3000 (mA)
    • Notes: The stepper driver current while doing gotos and slewing.  Be sure to use a value the stepper driver, stepper motor, and controller/power-supply can handle.
    • Reminder: See AXIS1_DRIVER_IRUN reminder.
  • AXIS1_DRIVER_REVERSE
    • Default Value: OFF
    • Other Values: OFF, ON
    • Notes: Set to ON to reverses movement direction for this axis.  You can instead reverse stepper driver wiring to do the same.
  • AXIS1_DRIVER_STATUS
    • Default Value: OFF
    • Other Values: OFF, TMC_SPI, HIGH, or LOW
    • Notes: Polls this axes driver for status info/fault detection.  Some drivers provide this signal as a simple logic level where it's, for example, normally LOW then goes HIGH only if there's a fault.  Other drivers like the TMC2130 and TMC5160 can use a setting of TMC_SPI where the drivers SPI MISO line transmitts data back to OnStep to provide a wider range of information about the fault/warning state including over temperature, outputs being shorted or open, etc.
    • Reminder: The TMC_SPI option is not always avaliable on certain PCB's since the MISO pins might be used for other purposes (like flashing an ESP8266) so check your board and how you have it configured.
  • AXIS1_LIMIT_UNDER_POLE
    • Default Value: 180
    • Other Values: 150 to 180 (degrees)
    • Notes: For GEM and FORK mounts only this is the maximum angle +/- in degrees (default limits to >= -180 to <= +180 degrees.)
  • AXIS1_LIMIT_MAXAZM
    • Default Value: 360
    • Other Values: 180 to 360 (degrees)
    • Notes: For ALTAZM mounts only this is the maximum angle +/- in degrees (default limits to >= -360 to <= +360 degrees.)
  • AXIS1_HOME_DEFAULT
    • Default Value: 90 (GEM) or 0 (for FORK or ALTAZM)
    • Other Values: 0 to 180 (degrees)
    • Notes: This is the default home position at startup.
    • Reminder: This is a "hidden" setting, it must be added to Config.h to change the default.

AXIS2 DEC/ALT

  • AXIS2_STEPS_PER_DEGREE
    • Default Value: 12800.0
    • Recommended Values300.0 to 61200.0 (12 arc-sec/step to 0.06 arc-sec/step)
    • Notes: This is the number of steps the step/dir (stepper) driver needs to issue to the motor to cause the telescope to move one degree on this axis.
    • Reminder: For a stepper motor this is in units of tracking mode micro-steps; use the Configuration Calculator to help determine this value.
  • AXIS2_DRIVER_MODEL
    • Default Value: OFF
    • Other Values: OFF,
      A4988, DRV8825, LV8729, RAPS128, S109, ST820, TMC2100,TMC2208,
      TMC2209,
      TMC2209_QUIET, TMC2209_VQUIET,
      TMC2130,
      TMC2130_QUIET, TMC2130_VQUIET,
      TMC5160, TMC5160_QUIET, TMC5160_VQUIET,
      GENERIC, GENERIC1, GENERIC2, GENERIC3,
      SERVO, SERVO1, SERVO2, SERVO3
    • Notes: This is the step/dir (stepper) driver model.
    • Reminder:
      • See the Stepper Driver Summary to learn more about the commonly used drivers.
      • SSS TMC2130 if you choose to set stepper driver current (in mA) with AXISn_TMC_IRUN (IHOLD, etc.) set the Vref pot. at 2.5V instead of by motor current as usual.
      • SSS TMC5160 you must set stepper driver current (in mA) with AXISn_TMC_IRUN (IHOLD, etc.)
      • The _VQUIET suffix (if available) causes the driver to run in stealthChop (silent) mode during tracking and slews.  StealthChop mode is not suitable for reaching high motor RPM's.
      • The _QUIET suffix (if available) causes the driver to run in stealthChop (silent) mode during tracking and spreadCycle during slews.
  • AXIS2_DRIVER_MICROSTEPS
    • Default Value: OFF
    • Other Values: 1 to 256
    • Notes: Tracking mode micro-steps setting, also used for gotos & slews if AXIS2_DRIVER_MICROSTEPS_GOTO is OFF.  A setting of 1 means a full-step, 2 half-step, 4 quarter-step, and so on.  We often use a value of 16, 32, or 64 here.
    • Reminder:
      • This value is present in the Configuration Calculator, if you change this AXIS2_STEPS_PER_DEGREE changes also.
      • Exact values allowed depends on the stepper driver model.   OnStep will #error on compilation if the driver doesn't support the micro-step mode specified.
  • AXIS2_DRIVER_MICROSTEPS_GOTO
    • Default Value: OFF
    • Other Values: 1 to 256
    • Notes: Optional micro-step mode to use during slews.  Using this can allow faster slew speeds when step rates are limited by micro-controller performance.
    • Reminder:
      • Exact values allowed depends on the stepper driver model and must be < AXIS2_DRIVER_MICROSTEPS aboveOnStep will #error on compilation if the driver doesn't support the micro-step mode specified.
  • AXIS2_DRIVER_IHOLD
    • Default Value: OFF
    • Recommended Values: 100 to 1500 (mA)
    • Notes: The stepper driver current at standstill.  Be sure to use a value the stepper driver, stepper motor, and controller/power-supply can handle.
    • Reminder: See AXIS1_DRIVER_IRUN reminder.
  • AXIS2_DRIVER_IRUN
    • Default Value: OFF
    • Recommended Values: 200 to 3000 (mA)
    • Notes: The stepper driver current while sidereal tracking.  Be sure to use a value the stepper driver, stepper motor, and controller/power-supply can handle.
    • Reminder: See AXIS1_DRIVER_IRUN reminder.
  • AXIS2_DRIVER_IGOTO
    • Default Value: OFF
    • Recommended Values: 200 to 3000 (mA)
    • Notes: The stepper driver current while doing gotos and slewing.  Be sure to use a value the stepper driver, stepper motor, and controller/power-supply can handle.
    • Reminder: See AXIS1_DRIVER_IRUN reminder.
  • AXIS2_DRIVER_POWERDOWN
    • Default Value: OFF
    • Other Values: OFF, ON
    • Notes: Powers off 10 seconds after movement stops or 10 minutes after last <= 1x guide.
  • AXIS2_DRIVER_REVERSE
    • Default Value: OFF
    • Other Values: OFF, ON
    • Notes: Set to ON to reverses movement direction for this axis.  You can instead reverse stepper driver wiring to do the same.
  • AXIS2_DRIVER_STATUS
    • Default Value: OFF
    • Other Values: OFF, TMC_SPI, HIGH, or LOW
    • Notes: Polls this axes driver for status info/fault detection.  Some drivers provide this signal as a simple logic level where it's, for example, normally LOW then goes HIGH only if there's a fault.  Other drivers like the TMC2130 and TMC5160 can use a setting of TMC_SPI where the drivers SPI MISO line transmitts data back to OnStep to provide a wider range of information about the fault/warning state including over temperature, outputs being shorted or open, etc.
    • Reminder: The TMC_SPI option is not always available on certain PCB's since the MISO pins might be used for other purposes (like flashing an ESP8266) so check your board and how you have it configured.
  • AXIS2_TANGENT_ARM
    • Default Value: OFF
    • Other Values: OFF, ON
    • Notes: Setting ON limits physical motion of the Declination axis, you must also adjust AXIS2_LIMIT_MIN and AXIS2_LIMIT_MAX to constrain the TA (Tangent Arm) travel since in this mode the Declination axis can only move perhaps ~ +/- 5 or 10 degrees (depending on the mount.)
      • The common [Reset Home] control in OnStep applications sets the center of the TA travel.
      • The common [Find Home] control in OnStep applications moves (only) the TA back to Center.
      • You can then press [Find Home] just before manually moving to a bright star near a new target.
      • Once there press [Sync] and you are free to do gotos within the limits of the TA travel... or if you have encoders this Sync is done automatically as you move and as soon as you stop anywhere near the target you can do the goto.
    • Associated Options: The #define AXIS2_TANGENT_ARM_CORRECTION OFF option can be added to Config.h to disable the (normally enabled) tangent arm geometry correction.  If wondering what this does it assumes that at the center of the TA mechanism the arm length is shorter than at the ends.  Like a "T" where the vertical arm sweeps left/right of center traveling on a screw.  At the center the arm length is less and so the reduction ratio is less, toward either end the ratio becomes higher and this option compensates for the effect.
    • Reminder:
      • Ignored in ALTAZM mode.
      • Gotos and even guided movement that goes past the TA travel (limits) is not allowed.
      • When setting limits be sure to make allowance for a little extra distance to let fast guided motion stop once the limit is broken.  To keep this distance short don't allow fast slews (a low SLEW_RATE_BASE_DESIRED) and keep the acceleration distances short and set to the same value (SLEW_ACCELERATION_DIST and SLEW_RAPID_STOP_DIST.)
      • In TA mode HOME_SENSE (if also enabled) only applies to Axis2 and [Find Home] works as described above except the home switch determines the center location.  This mode of operation is untested.
  • AXIS2_LIMIT_MIN
    • Default Value: -91
    • Other Values: -90 to 0 (degrees)
    • Notes: Minimum allowed declination.
  • AXIS2_LIMIT_MAX
    • Default Value: 91
    • Other Values: 0 to 91 (degrees)
    • Notes: Maximum allowed declination.
  • AXIS2_HOME_DEFAULT
    • Default Value: 90 (GEM or FORK mounts) or 0 (ALTAZM)
    • Other Values: 0 to 90 (degrees)
    • Notes: This is the default home position at startup.  For EQ mounts the value is negated when the site Latitude is < 0 (south.)
    • Reminder: This is a "hidden" setting, it must be added to Config.h to change the default.