Last edited · 84 revisions  




The telescope Home Position is described above under the section "Mount Orientation" of the Using OnStep page.  OnStep has two commands (controls) available to move the telescope back to this position.  One is a Home/Reset where you manually move the telescope and the other is a Find/Home where OnStep moves the telescope.

Home/Reset: the telescope controller is re-initialized as though it was just powered on.  The Axis1/2 stepper drivers are then disabled.  All current pointing model information is lost (un-parking might still recover it though.)

Find/Home: OnStep moves the (active w/stepper drivers enabled) telescope back to the home position and disables tracking but does not reset the controller or disable the motor drivers.

If the mount has physical home switches installed and home sensing enabled (#define HOME_SENSE_ON) there is no need for the mount to be aligned, it can be in any orientation and still return to home properly.

If the mount doesn't have home switches (most cases) the mount must be aligned to find the home position properly.

If the mount has a Tangent Arm for Declination (AXIS2_TANGENT_ARM setting in Config.h) Find/Home moves just the Declination axis back to center.


Parking allows OnStep to remember the pointing model information and also to leave the telescope in a user defined orientation while not in use.

Set-Park:  The first step in using the parking feature is to tell OnStep how you want the telescope orientated while parked.  Start OnStep in the usual way and do an alignment.  Once aligned do a goto to put the telescope in the desired orientation then press the Set-Park button.

Park:  When done using OnStep for the night press the Park button.  The telescope will then be moved to the park position you previously set.  Any updated pointing model is saved for later and the Axis1/2 stepper drivers are disabled.  You can then turn OnStep's power off.

Un-Park:  Power OnStep up and set the date/time as usual (if required.)  Press the Un-Park button to resume operation.  Your last alignment will be maintained and active.

Note: In the event a Park operation fails (power outage, etc.) you may need to use the [Home/Reset] option (above) to clear/acknowledge the park fail status before parking operation can be resumed.  Also note it is usually still possible to Un-Park even after this reset (provided strict parking isn't enabled.)

Tracking Rate Selection

Master clock: Tracking rates (and time) in OnStep are based on the micro-controllers internal master clock.  OnStep has commands to adjust its internal counts to compensate for the master clock's inaccuracy.  This is done with the tracking rate [+] and [-] buttons where each click of the button adjusts the rate 0.02 Hz slower or faster.  Any changes to this setting are remembered across power cycles but can be returned to default (no compensation) with the [Reset] button.  On some micro-controllers (Mega2560) the use of an external time reference (PPS, Pulse Per Second) is highly recommended since the master clock frequency based on its ceramic resonator is neither accurate enough nor stable enough (with time and ambient temperature) for our purposes.  This can be obtained from a GPS or inexpensive RTC (real time clock) module and when activated (PPS_SENSE and TIME_LOCATION_SOURCE settings in Config.h) automatically makes the timer rate adjustments on-the-fly with very high accuracy.  Other micro-controllers like the Teensy3.x, ESP32, STM32 have very accurate crystal oscillator's that usually need no frequency compensation (PPS) or tracking rate adjustment.

Basic tracking rates: There are easy to use buttons/commands that set rates for Sidereal, Lunar, and Solar.  The sidereal rate is the default and if the power is cycled will be selected again regardless of the prior setting. 

Advanced tracking rates: In sidereal tracking mode there are additional advanced tracking options that dynamically adjust the tracking to compensate for atmospheric refraction Refraction Only or atmospheric refraction as well as deviations due to polar alignment inaccuracies. that is, pointing model Full.  These options are only available on Equatorial Mounts.  Normally, default operation, is for tracking compensation in Declination to be Single Axis RA only.  If unguided imaging is the goal it's a good idea to enable Dual Axis tracking. You can see image samples taking with and without Full Compensated Dual Axis tracking, in this post.

Guiding and Centering Objects

There are four commands/methods of initiating a guide in OnStep.  They all use the same underlying guide system.  Since guide commands are used to restore normal operation after a limit is exceeded these commands are active/allowed even when a limit has been exceeded.

Rates: All of the commands below support a range of guide rates.  The guide rate is usually set with buttons such as [0.25x] [0.5x] [1x] [Center] [Find] [Fast] [VFast] which are available in the Android App, website, Sky Planetarium, etc.   There is a separate pulse-guide rate that applies only to that command and possibly the ST4 port (if NOT in hand control mode.)  This way the ST4 interface (if in hand control mode) or a normal guide can move the telescope more quickly to center objects while auto-guiding will always use the same much slower rate appropriate to its operation.  The pulse-guide rate is remembered across power cycles.

With this separate pulse-guide rate any rate set at 0.25x, 0.5x, or 1x applies to both the normal guide rate and the pulse-guide rate.  Any rate set above 1x is applied to the normal guide rate only and the pulse-guide rate will remain at the last setting (0.25x, 0.5x, or 1x.)

ST4: These are digital hardware inputs that are normally brought out to a RJ12 modular connector.  Button presses (a hand controller) or digital equipment (an imaging camera, etc.) can cause a guide in a given direction (N,S,E,W) to start/stop. 

  • If ST4_HAND_CONTROL mode is enabled (in Config.h) a 100ms de-bounce on all button presses is applied and support for basic hand controllers (like this one) and the Smart Hand Controller (SHC) is enabled.
    • For basic hand controllers you can then control certain features (like the guide rate, reticle brightness, focus, etc.) using combo-button presses (described here.)
    • When an Smart Hand Controller device is plugged in it sends a "tone" signal on some of the ST4 signal lines that confirms its presence, at which point OnStep re-configures the ST4 port to support bi-directional data communications.  If the SHC is unplugged the "tone" disappears and the port returns to normal ST4 operation automatically.
      *** NOTE: if the SHC is plugged into OnStep's ST4 port NO OTHER DEVICES may be connected to the port (using a 1 port to 2 port modular adapter for instance) at the same time. ***

Pulse-guide:  This command ":Mgdn#" causes OnStep to guide in a given direction for the specified time in milliseconds.  ASCOM supports this same method of guiding so it's utilized when PHD2, for example, connects to OnStep through the ASCOM OnStep Telescope driver.  Other software, i.e. INDI probably uses it for guiding also.

Normal guide: These are pairs of commands with one command starting the guide (":Me#" for example) and another stopping it (":Qe# for example.)  As a safety feature, once a guide in a given direction is started it will continue for only up to GUIDE_TIME_LIMIT seconds (from Config.h) before being canceled, if this feature is enabled.

Variable rate guide: These commands ":RAn.n#" and ":REn.n#" are used by ASCOM for the MoveAxis() method which some client software uses for object centering and satellite tracking.


Periodic Error Correction allows OnStep to be trained to correct the RA tracking rate for periodic errors in an Equatorial Mount telescope drive gearing.  Normally this is applied to a worm in a worm-wheel gear reduction.  In order to apply the periodic correction in sequence with the worm (or other gear) rotation OnStep must have a rotation zero-index.  OnStep can track the zero-index by counting stepper motor steps (a "virtual index") and even keep this count when the power is turned off if parking is used.  If power is ever lost while in use (without parking) or OnStep is reset, the zero-index will be lost.  To solve this issue an index sensor (hall-effect, optical, etc.) can register the passing of a small magnet or optical mark moving with the worm shaft (for example) to provide a physical index.  This is then used to correct the virtual index automatically.

Clear PEC data:  This erases the PEC data buffer. 

You must tell OnStep to Write to EEPROM or the last data written will be restored when power is cycled.

Recording PEC data:  To measure/correct the variations in tracking rate we start an auto-guiding session where guide commands are sent to OnStep to correct the drive rate based on the motion of a guide star.  When the Record button is pressed, these tracking rate corrections are recorded by OnStep's PEC subsystem for a full worm cycle.  Naturally, in addition to periodic rate errors due to the worm gear (etc.) there will be non-periodic errors (other gears, wind, etc.) that will be recorded too.  This is why the recording design only writes full corrections to the buffer after a Clear of the PEC data but uses a weighted average (3:1 favoring the buffer) for subsequent recordings.  Once recording is done a low-pass filter is applied to the data to help smooth any rate spikes.  It's also generally a good idea to do 3 or 4 recording sessions to help suppress non-periodic error.

As an alternate method one can directly record the guide star motion on a computer and use PECPrep to do an analysis and prepare PEC data, which can be directly uploaded to OnStep with my Sky Planetarium software (see SP help, etc.)

When a physical index is present OnStep must see the index pass at-least once before recording will begin.

You must tell OnStep to Write to EEPROM after recording or the last data written will be restored when power is cycled.

Playback:  Simply enable this with Play.  OnStep can remember this setting so playback starts automatically (if an physical index is present.) 

When a physical index is present OnStep must see the index pass at-least once before playback will begin.

Etc:  Keep in mind that my Sky Planetarium has the most advanced controls for PEC.  It shows a live view of the playback buffer, indices, etc.  It also can import/export PEC data for processing in PECPrep. 

Refine Polar Alignment 

The Refine PA button in the Android App provides a way to get better polar alignment based on the errors in altitude and azimuth that OnStep calculates from a previous alignment. To use this feature:

  • Start with a 3 star (or more) alignment.
  • Slew to a star with the criteria below.
  • Center the star perfectly and sync on it. You can do the align with plate solving, as well as centering the star to save time, and reduce the effort needed.
  • Press RefinePA and note where the star moved. The mount will move to the position the star should be in if the mount was perfectly pointing to the celestial pole.
  • Using only the altitude and azimuth adjustment knob on your mount, re-center the star.
  • Press Return Home,
  • You may want to do another 3 star (or more) alignment.

The criteria for the star are as follows:

  • The Declination of the star should be between +50 and +80 (northern hemisphere) or -50 and -80 (southern hemisphere).
  • In general stay away from the meridian.
  • Not too close to the NCP since lots of RA axis motion is needed for a small angular distances.
  • Not too close to due East/West since Alt adjustment has zero effect on center coordinates pointing due East or West.
  • Not too close to the Zenith since Azm adjustment has zero effect on center coordinates pointing straight up.

Meridian Flips

For German Equatorial (GEM) and some Fork mounts OnStep automatically changes the mount orientation to keep the optical tube above the mount.  This is referred to as a Meridian Flip and when it takes place you'll notice the mount move back to the polar home position before continuing on to it's destination.  In fork mount mode (MOUNT_TYPE in Config.h) OnStep will perform meridian flips until the alignment process is completed then they are disabled.

Preferred Pier Side: Depending on the meridian limit settings there can be an ambiguous region of overlap.  Normally OnStep will stay on the current meridian side (Best) for gotos but this setting can override that behavior and let you specify which side is preferred (East or West.)  The extreme case is where the mount can operate unhindered by pier/tripod interference.  For such mounts this feature becomes an essential tool to control the mount orientation (since the Meridian Limits East and West can then be set to allow full access to the sky in either orientation and the ambiguous region of overlap is the entire sky.)

Auto Meridian Flip: When this option is On and tracking encounters the MinutesPastMeridianW limit; instead of stopping tracking and throwing an error OnStep will instead do a goto to the same RA/Dec but on the opposite side of the meridian (if possible.)  The last setting (On/Off) can be recalled (MFLIP_AUTOMATIC_MEMORY in Config.h) otherwise it is always Off when OnStep starts up.

Meridian Flip [Now] button: Similar to the above option except the meridian flip is attempted immediately.  OnStep will internally request a goto to the current RA/Dec but on the opposite side of the meridian.  This is only allowed (possible) if the current RA/Dec is within limits on the opposite meridian side.

Pause at Home: When this option is On OnStep will stop at the home position and wait for user confirmation (for cable wrap, etc.) before continuing on during a meridian flip.  The last setting (On/Off) can be recalled (MFLIP_PAUSE_HOME_MEMORY in Config.h) otherwise it is always Off when OnStep starts up.

Encoder Support

The OnStep system supports incremental encoders on Axis1 (RA/Az) and Axis2 (Dec/Alt.)  This support is provided in the form of firmware running on an add-on (Wifi or Ethernet) and within OnStep itself.  The add-on firmware has most of the functionality including support for reading quadrature A/B or CW/CCW encoders and for coordinating their operation with OnStep.  This coordination includes the ability to sync coordinates in both directions (encoders to OnStep and OnStep to encoders.) 

The encoder web page has controls for:

  • Manually syncing to or from OnStep.
  • Automatic syncing enable/disable.
  • Setting threshold amounts for the allowable angular distances between the two systems.

In operation, when OnStep is started up and at the Home position or Parked the encoders are sync'ed from OnStep automatically.  Once OnStep starts operation (Un-Parked or tracking starts) the encoder sub-system (running on the Wifi or Ethernet add-on) will begin to make checks and sync to OnStep if the encoders vs. OnStep coordinates are in disagreement more than the threshold amounts.  This syncing is, however, disabled until alignment is complete to keep the encoders from interfering with the alignment process.  Any Syncs done in OnStep (to refine pointing positions) are applied to both OnStep and the Encoder positions.

Another encoder add-on option is tracking rate control for Eq mounts.  For this a high resolution encoder (exceeding arc-second accuracy and near arc-second resolution) on the RA axis is required.  The encoder tick rate is measured and this is used to adjust OnStep's tracking rate for the RA axis to compensate for gear PE/NPE etc.  There are several options to average encoder rate measurements and to visualize the encoder rate vs. OnStep's tracking rate.  Corrections to OnStep's tracking are issued as guide commands.  This is still an experimental feature at this point so feel free to try it out and report you results (as I will continue to do.)

Extended LX200 Commands

OnStep implements an extended LX200 command set. These are documented here.

This command set can be issued from the Arduino IDE's Serial Monitor for testing purposes.

And example of how these commands are useful, is to move to a given Altitude and Azimuth, e.g. when you want to measure the angular distance that a scope's axis moves (taking into account all the gear train and microstepping).

1. Start tracking

2. Set the Altitude

3. Set the Azimuth

4: Do an Horizon coordinate slew