Last edited · 11 revisions   

 


Configuration / Auxiliary Features

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

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.

Also, while working on your Config.h file take note of the "Hint" column to the far right, it's there to assist you in determining which settings are critical and which can most often be ignored.

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:


AUXILIARY FEATURES

This section allows you to control secondary Telescope automation equipment.

Parameter Name

  • FEATUREn_PURPOSE
    • Default Value: OFF
    • Other Values: SWITCH, MOMENTARY_SWITCH, HIDDEN_SWITCH, ANALOG_OUT, DEW_HEATER, INTERVALOMETER
    • Notes: Specify the type of feature you'd like.  A simple on/off switch (relay,) an analog output (using a MCU pin that supports PWM,) a dew heater, or an intervalometer (camera timer.)
    • Associated Options: In the case of a dew heater the DEW_HEATER_MAX_POWER n (where n the maximum power as a %) is an option which allows for a wider range of regulation. In-case the heater is a bit too powerful, for instance.
    • Reminder:
      • The OnStep Smart Web Server, Smart Hand Controller, Android App, and ASCOM driver have support for controlling these features.
      • Switches
        • A normal SWITCH just turns a pin on/off.
        • A MOMENTARY_SWITCH if on automatically turns itself off after one second.
        • A HIDDEN_SWITCH doesn't appear in client controls.  It can however be used to control a pin state at boot, for use as a low current voltage source for example.
      • Dew Heaters
        • Control the power delivered to a heating wire (providing 1 watt per inch of diameter is an accepted standard.)
        • Regulate the power delivered as a slow PWM signal with a period of two seconds.
        • Scales the power delivered to the heater based on the ambient or better a telescope spot temperature (near the mirror or lens) relative to the dew-point temperature.
          • OnStepX keeps track of the weather state and can internally provide the dew-point temperature (calculated from temperature and humidity, as supplied from a WEATHER sensor usually.)
        • There are associated run-time settings for the Zero (100% power) and Span (0% power) temperatures.
          • Near the Zero (set temperature difference you specify) the ambient (or spot) temperature and dew-point temperature are nearly the same so dew will begin to form and you want to prevent that, so more heat is applied.
          • Near the Span (set temperature difference you specify) the ambient (or spot) temperature is well above dew-point temperature so there is no danger of dew forming and minimal or no heat is applied.
      • Intervalometer
        • Often this takes the form of a optocoupler or transistor electrically closing connections on a 2.5mm stereo mini plug.  Google shows many DIY projects with similar hardware.
  • FEATUREn_NAME
    • Default Value: "FEATUREn"
    • Other Values: "Any string"
    • Notes: A handy name to remind you of what this feature does.
    • Reminder:
      • String can be up to 10 characters, any more will be truncated.
      • Commas "," are NOT allowed in the string.
  • FEATUREn_TEMP
    • Default Value: OFF
    • Other Values: OFF, THERMISTOR, THERMISTOR2, n (where n is the ds18b20 serial number.)
    • Notes:
    • Reminder:
      • If OFF, any associated dew heater will use the ambient temperature as supplied from a WEATHER sensor usually.
  • FEATUREn_PIN
    • Default Value: OFF
    • Other Values: AUX, n (microcontroller pin#)
    • Notes:
      • Specify an output pin (which this feature will control.)
    • Reminder:
      • If AUX is specified, the corresponding micro-controller Aux pin is used.
        • For example if FEATURE5_PIN AUX is set FEATURE5 will use the AUX5_PIN.
        • The AUXn_PIN definitions are listed in each PINMAP file and you can determine the actual pin# from there.
      • Note that ANALOG_OUT mode uses fast micro-controller hardware based PWM.
        • Not all micro-controller pins necessarily support this mode of operation.
      • If a GPIO_DEVICE is specified in Extended.config.h (and connected) you can use those pins here with the GPIO_PIN(n) macro for basic digital output.
  • FEATUREn_VALUE_DEFAULT
    • Default Value: OFF
    • Other Values: ON, n (0 to 255)
    • Notes:
      • Sets the startup state for the feature (ON or OFF or an analog value.)
    • Reminder:
      • This setting doesn't apply in INTERVALOMETER mode.
    • FEATUREn_ON_STATE
      • Default Value: HIGH
      • Other Values: HIGH, LOW
      • Notes:
        • When set to HIGH the ON state is 3.3V (or Vcc) and the OFF state is 0V on the pin associated with this Auxiliary Feature.
        • When set to LOW the ON state is 0V and the OFF state is 3.3V (or Vcc) on the pin associated with this Auxiliary Feature.
      • Reminder:
        • This setting doesn't apply in ANALOG_OUT mode.