Last edited · 6 revisions  

 


Configuration / Rotator and Focusers

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 teh 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:

AXIS3 ROTATOR

  • ROTATOR
    • Default Value: OFF
    • Other Values: OFF, ON
    • Notes: ON to enable the rotator (or de-rotator for ALTAZM mounts.)
  • AXIS3_STEPS_PER_DEGREE
    • Default Value: 64.0
    • Recommended Values10.0 to 3600.0 (6 arc-min/step to 1 arc-sec/step)
    • Notes: This is how many steps are required to move the rotator one degree (at the current microstep setting.)
    • ReminderFor Alt/Az de-rotation where you want to image, a quick rough estimate of the minimum value to use is n =  (num_circumference_pixels * 2)/360.  That is a count of the pixels around the edges of a rectangular imaging chip (rough approximation of the circumference) * 2 (to satisfy the nyquist theorem) /360 (to convert into degrees.)
  • AXIS3_STEP_RATE_MAX
    • Default Value: 8
    • Recommended Values: 0.1 to 100 (milliseconds)
    • Notes: This sets the fastest step rate.
    • Reminder: Minimum ms/step depends on processor and your requirements.
  • AXIS3_DRIVER_MODEL
    • Default Value: OFF
    • Other Values: OFF,
      TMC2130, TMC2130_QUIET, TMC2130_VQUIET,
      TMC5160, TMC5160_QUIET, TMC5160_VQUIET
    • Notes: This is the step/dir (stepper) driver model.  When using an A4988, DRV8825, TMC2208, etc. set this to OFF and use shunts near the driver socket to set the desired microstep mode.
    • Reminder:
      • This feature requires SPI pins routed to the driver (only the MksGenL2 has this currently.)
      • 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.)
  • AXIS3_DRIVER_MICROSTEPS
    • Default Value: OFF
    • Other Values: 1 to 256
    • Notes: Tracking mode micro-steps setting.  Exact values allowed depends on the stepper driver model.  OnStep #error on compilation if an invalid value is used.
    • Reminder: This setting is only allowed for TMC2130 and TMC5160 stepper drivers.
  • AXIS3_DRIVER_IHOLD
    • Default Value: OFF
    • Recommended Values: 100 to 1000 (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 AXIS3_DRIVER_IRUN reminder.
  • AXIS3_DRIVER_IRUN
    • Default Value: OFF
    • Recommended Values: 100 to 1000 (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.  Note that for MaxPCB/MaxESP designs you need to limit current so that power P=IV (current * voltage) is such that P <= 4.2 watts.
      • Also see the AXIS1_DRIVER_IRUN reminder.
  • AXIS3_DRIVER_POWERDOWN
    • Default Value: OFF
    • Other Values: OFF, ON
    • Notes: Powers off the motor at stand-still.
  • AXIS3_DRIVER_REVERSE
    • Default Value: OFF
    • Other Values: OFF, ON
    • Notes: Set ON to reverse movement direction for this axis.  You can instead reverse stepper driver wiring to do the same.
  • AXIS3_LIMIT_MIN
    • Default Value: -180
    • Other Values: -180 to 0 (degrees)
    • Notes: Minimum allowed rotator angle.
  • AXIS3_LIMIT_MAX
    • Default Value: 180
    • Other Values: 0 to 180 (degrees)
    • Notes: Maximum allowed rotator angle.

AXIS4 FOCUSER1

  • FOCUSER1
    • Default Value: OFF
    • Other Values: OFF, ON
    • Notes: Set ON to enable the primary focuser.
  • AXIS4_STEPS_PER_MICRON
    • Default Value: 0.5
    • Recommended Values0.01 to 10 (steps)
    • Notes: Steps per micrometer.  This is how many steps are required to move the focuser one micrometer (aka micron) at the current microstep setting.
    • Reminder: Your telescope has a focus depth, which can be calculated or looked up online, be sure this value is smaller.
  • AXIS4_STEP_RATE_MAX
    • Default Value: 8
    • Recommended Values: 0.1 to 100 (milliseconds)
    • Notes: This sets the fastest step rate.
    • Reminder: Minimum ms/step depends on processor and your requirements.  In DC mode, this is the pwm frequency.
  • AXIS4_DRIVER_MODEL
    • Default Value: OFF
    • Other Values: OFF,
      TMC2130, TMC2130_QUIET, TMC2130_VQUIET,
      TMC5160, TMC5160_QUIET, TMC5160_VQUIET
    • Notes: This is the step/dir (stepper) driver model.  When using an A4988, DRV8825, TMC2208, etc. set this to OFF and use shunts near the driver socket to set the desired microstep mode.
    • Reminder:
      • This feature requires SPI pins routed to the driver (only the MksGenL2 has this currently.)
      • 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.)
  • AXIS4_DRIVER_MICROSTEPS
    • Default Value: OFF
    • Other Values: 1 to 256
    • Notes: Tracking mode micro-steps setting.  Exact values allowed depends on the stepper driver model.  OnStep #error on compilation if an invalid value is used.
    • Reminder: This setting is only allowed for TMC2130 and TMC5160 stepper drivers.
  • AXIS4_DRIVER_IHOLD
    • Default Value: OFF
    • Recommended Values: 100 to 1000 (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 AXIS4_DRIVER_IRUN reminder.
  • AXIS4_DRIVER_IRUN
    • Default Value: OFF
    • Recommended Values: 100 to 1000 (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.  Note that for MaxPCB/MaxESP designs you need to limit current so that power P=IV (current * voltage) is such that P <= 4.2 watts.
      • Also see the AXIS1_DRIVER_IRUN reminder.
  • AXIS4_DRIVER_POWERDOWN
    • Default Value: OFF
    • Other Values: OFF, ON
    • Notes: Powers off the motor at stand-still.
  • AXIS4_DRIVER_REVERSE
    • Default Value: OFF
    • Other Values: OFF, ON
    • Notes: Set ON to reverse movement direction for this axis.  You can instead reverse stepper driver wiring to do the same.
  • AXIS4_DRIVER_DC_MODE
    • Default Value: OFF
    • Other Values: OFF, DRV8825
    • Notes: For pwm dc motor control on stepper driver "A" outputs.
    • Reminder:
      • The DRV8825 (or A4988) must be configured for half-stepping (2x micro-stepping) mode.
      • The En signal of the DC mode stepper driver must be pulled HIGH with a sturdy resistor to disable the driver at boot time otherwise the motor will run until OnStep wakes up and takes control.
      • Limit current as usual with Vref and AXIS4_LIMIT_MIN_RATE.
      • Optionally chain Focuser2 using DC mode for the "B" driver outputs of Focuser1.
  • AXIS4_LIMIT_MIN_RATE
    • Default Value: 10
    • Recommended Values: 1 to 1000 (micrometers per second, covers 0.1 to 100.0% in DC mode)
    • Notes: Minimum microns/second.
    • Reminder:
      • Allows manual control at the slowest speed the user is comfortable with; the ideal speed depends on focus depth and the "human factor".
      • In DC mode, this is the minimum power where movement occurs we then pulse that movement for basic control.
  • AXIS4_LIMIT_MIN
    • Default Value: 0
    • Other Values: 0 to 500 (millimeters)
    • Notes: Minimum allowed focuser position.
  • AXIS4_LIMIT_MAX
    • Default Value: 50
    • Other Values: 0 to 500 (millimeters)
    • Notes: Maximum allowed focuser position.

AXIS5 FOCUSER2

  • FOCUSER2
    • Default Value: OFF
    • Other Values: OFF, ON
    • Notes: Set ON to enable the secondary focuser.
  • AXIS5_STEPS_PER_MICRON
    • Default Value: 0.5
    • Recommended Values0.01 to 10 (steps)
    • Notes: Steps per micrometer.  This is how many steps are required to move the focuser one micrometer (aka micron) at the current microstep setting.
    • Reminder: Your telescope has a focus depth, which can be calculated or looked up online, be sure this value is smaller.
  • AXIS5_STEP_RATE_MAX
    • Default Value: 8
    • Recommended Values: 0.1 to 100 (milliseconds)
    • Notes: This sets the fastest step rate.
    • Reminder: Minimum ms/step depends on processor and your requirements.  In DC mode, this is the pwm frequency.
  • AXIS5_DRIVER_MODEL
    • Default Value: OFF
    • Other Values: OFF,
      TMC2130, TMC2130_QUIET, TMC2130_VQUIET,
      TMC5160, TMC5160_QUIET, TMC5160_VQUIET
    • Notes: This is the step/dir (stepper) driver model.  When using an A4988, DRV8825, TMC2208, etc. set this to OFF and use shunts near the driver socket to set the desired microstep mode.
    • Reminder:
      • This feature requires SPI pins routed to the driver (only the MksGenL2 has this currently.)
      • 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.)
  • AXIS5_DRIVER_MICROSTEPS
    • Default Value: OFF
    • Other Values: 1 to 256
    • Notes: Tracking mode micro-steps setting.  Exact values allowed depends on the stepper driver model.  OnStep #error on compilation if an invalid value is used.
    • Reminder: This setting is only allowed for TMC2130 and TMC5160 stepper drivers.
  • AXIS5_DRIVER_IHOLD
    • Default Value: OFF
    • Recommended Values: 100 to 1000 (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 AXIS5_DRIVER_IRUN reminder.
  • AXIS5_DRIVER_IRUN
    • Default Value: OFF
    • Recommended Values: 100 to 1000 (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.  Note that for MaxPCB/MaxESP designs you need to limit current so that power P=IV (current * voltage) is such that P <= 4.2 watts.
      • Also see the AXIS1_DRIVER_IRUN reminder.
  • AXIS5_DRIVER_POWERDOWN
    • Default Value: OFF
    • Other Values: OFF, ON
    • Notes: Powers off the motor at stand-still.
  • AXIS5_DRIVER_REVERSE
    • Default Value: OFF
    • Other Values: OFF, ON
    • Notes: Set ON to reverse movement direction for this axis.  You can instead reverse stepper driver wiring to do the same.
  • AXIS5_DRIVER_DC_MODE
    • Default Value: OFF
    • Other Values: OFF, DRV8825
    • Notes: For pwm dc motor control on stepper driver outputs.
    • Reminder:
      • The DRV8825 (or A4988) must be configured for half-stepping (2x micro-stepping) mode.
      • The En signal of the DC mode stepper driver must be pulled HIGH with a sturdy resistor to disable the driver at boot time otherwise the motor will run until OnStep wakes up and takes control.
      • Limit current as usual with Vref and AXIS5_LIMIT_MIN_RATE. 
      • If Focuser1 is in DC mode you can turn this option on to chain Focuser1 drivers "B" outputs to the logical Focuser2.
      • If Focuser1 is in normal mode this uses Focuser2 drivers "A" outputs only.
  • AXIS5_LIMIT_MIN_RATE
    • Default Value: 10
    • Recommended Values: 1 to 1000 (micrometers per second, covers 0.1 to 100.0% in DC mode)
    • Notes: Minimum microns/second.
    • Reminder:
      • Allows manual control at the slowest speed the user is comfortable with; the ideal speed depends on focus depth and the "human factor".
      • In DC mode, this is the minimum power where movement occurs we then pulse that movement for basic control.
  • AXIS5_LIMIT_MIN
    • Default Value: 0
    • Other Values: 0 to 500 (millimeters)
    • Notes: Minimum allowed focuser position.
  • AXIS5_LIMIT_MAX
    • Default Value: 50
    • Other Values: 0 to 500 (millimeters)
    • Notes: Maximum allowed focuser position.