Equipment - OnStep


Since I aquired an Losmandy G11 mount without any goto provision I decided to create my own solution. I was a bit reluctant to use a Gemini, mainly because of the cost, but also due to the reliablity since the servo motors are somewhat prone to failure. I also like to have complete control over the software/firmware so that no "show stopper" issues will ever be a problem for me. Looking around the 'net I saw other goto systems that seemed capable, but either they all seemed to have needlessly complex hardware or were commercial systems that cost about twice what they should.

OnStep is a computerized goto system for stepper motor equipped mounts. It was designed, from the beginning, as a more or less general purpose system and provisions were made in the firmware to allow for use on a variety of mounts. Originally OnStep supported only GEM mounts, but code was added to support Fork mounts, and recently even Alt/Azm mounts like Dobsonians. It uses a Meade Autostar/LX200 like computer command set with a few extensions to suit hand-controllerless operation.

In addition to the wide range of software supported through it's ASCOM driver, many software packages work directly with it's LX200 protocol. These include Cartes du Ciel, Stellarium, Sky Safari, and no-doubt others. My hand-controller App is available in the Google Play Store for any Android (2.3.3 or later) Phone/Tablet. It allows you to unpark or align the mount to get going, then startup SkySafari (for example) and connect (using Bluetooth or IP) to have a full planetarium type control application.

The 5-minute video (above right) is my Tak EM10B mount moving around a little then returning to the home positon. It's goto top speed is just a little over 1 degree per second with the motors being the limiting factor. All OnStep hardware is in the motor bay of the mount (very limited space in there.) The cord seen going to the mount is the DC power cord, control is via Bluetooth using my Android tablet and/or across USB using the connector next to the power cord seen in the video. Note: I later changed out the motors in this mount for better ones and the slew speed improved to 2 degrees per second. Finally, I switched to my OnStep Mini PCB based controller (shown below) with better stepper drivers and WiFi instead of Bluetooth, slew speed is now 3.5 degrees per second.


OnStep functionality includes:
  • Speeds above 4 or 5 degrees per second are possible with the right stepper motors/gear reduction/driving voltages.
  • Initialization of date/time/location, and align with one, two, or three stars.
  • Align with one-star to quickly get going or two/three stars to correct for polar axis misalignment, cone error, etc.
  • Meridian flips happen automatically as needed, the software doesn't allow you to pick the meridian side during GOTOs, but it does provide a command to inform you as to what side of the mount the telescope is on.
  • The guide commands are for pulse-guiding, centering objects, etc.
  • Parking functionality includes the ability to set the park position (anywhere you like), park, and to unpark.
  • Home commands including the ability to move the telescope to the home position and stop tracking or reset the controller when at the home position for initialization.
  • PEC commands include the ability to record, play-back, read, and write PEC data.

  • The Android App allows for initialization, parking, alignment, PEC programming, etc. Along with the Moon and Planets, several catalogs of objects are included for GOTOs: Messier, NGC/IC, Herschel 400, and a named bright star catalog.
  • The Android App can communicate with OnStep across Bluetooth or IP connections.
  • Typical Bluetooth devices include the HC05, HC06, Sparkfun Bluetooth Silver.
  • IP devices supported are either the ESP8266 WiFi or the Arduino M0 and Ethernet Shield.
  • My firmware gets uploaded to one of these and it connects to OnStep via. a serial interface.
  • IP devices have both a Command Channel (for my Android App, Sky Safari, ASCOM, etc.) and a Web Server.


The software/firmware downloads and a detailed command description are on the Telescope Driver/OnStep Firmware page.
My Sky Planetarium offers the most advanced integration with OnStep.



Notes pertaining to the testing and development of OnStep hardware, firmware, and software are here.



If you find OnStep useful, please help support this project:




In addition to the information given below, my OnStepTelescope Yahoo Group is a helpful place to get questions answered and to share your experiences while implementing this system.

I now have three OnStep driven mounts. A Losmandy G11, a Takahashi EM10b, and a Zhumell Z12 Dobsonian. All use SilentStepStick TMC2100 or TMC2130 drivers with 256x micro-stepping, figures given are before 256x interpolation:
G11: Oriental 400 step NEMA17 hybrid direct coupled (32X mode.) 12800 steps per degree, 4.0 deg/sec goto. 0.28125 arc-sec per step. 24VDC. TMC2130.
EM10b: Oriental NEMA11 200 step 18:1 (16X mode.) 28800 steps per degree, 3.2 deg/sec goto. 0.125 arc-sec per step. 24VDC. TMC2100.
Z12: Sanyo Denki 200 step NEMA17 direct coupled (16x mode.) 2222.22 Az (2533.33 Alt) steps per degree, 4.0 deg/sec goto. 1.62 arc-sec per step. 12 VDC. TMC2100.

For the purpose of quantifying performance with some other stepper motors and drivers here are my past setups, all used the DRV8825:
G11: Hurst 48 step 15:1 stepper somewhat similar to the stock digital drive motors (16X mode.) 11520 steps per degree, 0.68 deg/sec goto. 0.3125 arc-sec per step. 24VDC.
G11: Oriental 400 step NEMA17 hybrid direct coupled (32X mode.) 12800 steps per degree, 4.0 deg/sec goto. 0.28125 arc-sec per step. 24VDC.
EM10b: Unbranded 48 step 50:1 "tin-can" stepper (16X mode.) 19200 steps per degree, 1.04 deg/sec goto. 0.1875 arc-sec per step. 12VDC.
EM10b: Oriental NEMA11 200 step 18:1 (8X mode.) 14400 steps per degree, 2.04 deg/sec goto. 0.25 arc-sec per step. 24VDC.
Z12: Sanyo Denki 200 step NEMA17 hybrid direct coupled (32x mode.) 4444 Az (5067 Alt) steps per degree, 4.0 deg/sec goto. 0.81 arc-sec per step. 12 VDC.


Construction

OnStep OnStep is composed entirely of off-the-shelf components and only modest soldering skill is required to assemble them. Costs are low and everything is readily available should something break. Stepper motors are, generally, very reliable. The device attaches to a computer over an USB interface and also requires a seperate power supply to run the stepper motors.
Total cost can be <$100, I spent about $250 on each of my conversions. There was some experimenting involved, the first motors I bought for the EM10b were a little weak and had to be replaced (wasted maybe $30.) The Hurst steppers on the G11 worked well enough, but gotos were slow. The NEMA17 400 step motors I now have on the G11 are better and cheaper. But making them work required machining (turning down) motor couplings, careful fabrication of mounting plates, fabrication of motor cables, etc.

A good place to start is this spreadsheet (or this one for the older -Stable branch of OnStep), it does what-if calculations for gear ratios and stepper motors. The default values are for my setup. Please take note that the values are labeled here as they are in the OnStep Config.h file.


Main Controller:
These cost $12 to $40 ea, the Teensy3.2 is recommended (the Tiva Launchpad TM4C series is also supported, as is the Arduino Mega2560.) Also, try to stick with boards that use a crystal oscillator instead of those with ceramic resonators. The Teensy3.2 uses a crystal oscillator. Most Arduino 2560's have resonators, but not all. Note that almost all Mega2560's have crystal oscillators and are advertised as such. It's on the USB to Serial chip and we need one on the main MCU. If a GPS (or RTC) with PPS (Pulse Per Second) output is also used, the PPS signal then governs the tracking rate and solves the resonator issue on the Mega2560.

Serial interface:
A single device can connect to OnStep on the Serial port. This is usually tied to the USB port of the "Arduino" that's running OnStep. On a PC this can be connected to via ASCOM/POTH and shared among several ASCOM aware programs. It can also serve as a LX200 protocol serial interface instead.

Optional Bluetooth Adapter, ESP8266-01 WiFi, or Arduino M0/Ethernet Shield:
All of these devices connect to the Serial1 port so choose only one (usually.) The Bluetooth option is probably the least flexible since it doesn't offer the Web Server and advantages of IP. The WiFi option should be the cheapest. None of these devices are very hard to setup, choose according to your needs.

The Arduino M0/Ethernet Shield needs to have my OnStepEthernetServer firmware uploaded.
The ESP8266-01 needs to have my OnStepESPServer firmware uploaded.
The Bluetooth modem sometimes needs security settings, etc. manually changed via. a terminal (see the device documentation.) Users have had success with the HC05/HC06/Sparkfun Bluetooth Silver. I generally recommend the Sparkfun Bluetooth Silver.

    A Sparkfun Bluetooth Silver and any OnStep is a recommend configuration (very well tested.)
    WiFi and a Teensy3.2 based OnStep is a recommended configuration (beta quality, fairly well tested.)
    Ethernet seems to work with the Mega2560 based OnSteps (lightly tested.)
    Ethernet with other OnSteps isn't tested (but should work.)
    WiFi is known to NOT work properly with Mega2560 based OnSteps (not supported, but that might change soon.)

Stepper Drivers:
OnStep Bread board Basically any stepper driver with step/dir inputs will work. At first I used Big Easy Drivers (16X micro-stepping, I bought mine from SparkFun. $23 ea.) They are easy to integrate, but are not as capable as the DRV8825 based modules from Pololu. The Pololu style drivers require a bit more soldering to setup (and an additional capacitor.) The newer Pololu style drivers like the RAPS128 and especially the SilentStepStick TMC2100 and TMC2130's will offer the best performance in many cases. If using the SilentStepStick drivers be aware that there's a power up sequence requirement: "When using an external supply, make sure, that VCC comes up before or in parallel to 5VOUT or VCC_IO, whichever comes up later." I setup my controllers so they can't be powered from a USB connection since the controller is supplying VIO in my case. The older Pololu A4988 stepper driver module often serves as an example of how to wire one of these drivers up.

Motor Power Supply:
I use a DC-DC converter to provide 24VDC (from 12VDC) to run my motors, again an ebay item. See www.current-logic.com or Pololu as a source for these too.
Some steppers will be perfectly happy at 12VDC from a battery.

Controller Power Supply:
I also use a DC-DC converter to take the higher voltage motor supply and drop it to a level suitable for running a Teensy3.2 (3.6 to 6V) or Mega2560 (7 to 12VDC.) For the Teensy3.2's I use the Murata OKI-78SR-5/1.5-W36-C (Mouser.com) to convert the 24VDC motor supply down to 5V. Pololu sells similar devices too. This isn't needed if the motor supply voltage is within the controller's supply range. In some cases you could also just run the controller from a USB connection.

Stepper Motors:
My first build used Hurst, LSG42012E40P (two) 15:1 gear ratio 12v 7.5° stepper motors. These were physically compatible with the Stock G11 mount, stock motor covers, stock motor circuit boards (which I used). They cost $66 ea. My G11 has been updated to use Oriental Motors NEMA 17 400 step units which directly drive the worms now. My EM10b uses Oriental Motors NEMA11 200 step 18:1 gear motors. Final gear reduction for the G11 is 0.1875"/u-step and for the EM10 is 0.25"/u-step.

Motor Connectors:
OnStep Mini PCB Build I've used RJ11 connectors (just like the G11 digital drive has) for running lower power steppers. These accept the stock Losmandy coil-cords that go to both motors. They cost $7 ea. For the more powerful hybrid motors I used a DIN connector which is rated for higher current. For the EM10b I just plugged directly in (0.1" headers) since the controller is built into the mount.

DC Power connections:
I added a jack (to the case) and a obtained a cord with matching coaxial DC plug at one end and fused cigarette lighter plug at the other. The fuse should be of an appropriate rating for your setup. Costs about $10. My newer controllers also have an internal fuse.

Case:
Originally I used a McMaster-Carr case #7593K32 (Compact ABS Electronics Enclosure, 6.9" Height X 4.9" Width X 2.5" Depth, Black) to hold everything, this cost $11. Precise drilling, filing, etc. was required to make it look nice. For my newer OnStep Mini PCB builds, as shown to the right, I used a 3D printer to make the cases (and the EM10 controller's face-plate.) The STL files are available in my OnStepTelescope Yahoo Group files section.

Misc:
McMaster-Carr and SparkFun carry a variety of standoffs, screws, jumper wires/connectors (0.1" centers), etc. to mount everything just right. I used jumper wires between all components in the enclosure, the Arduino can be unplugged and replaced in ten minutes, ditto for the BED's, should a motor go it's not too difficult to replace either.


Uploading Firmware

Install the Arduino environment (IDE.) If using a Teensy3.2 be sure to download an Arduino IDE version that's supported by Teensyduino and then install the Teensyduino add-on.

Download the OnStep -Beta (recommended) or -Alpha .zip file from GitHub. Unzip the folder inside and rename it to "OnStep". This can be on your desktop or in your ~/Documents/Arduino folder.
Open the folder.... If you're planning to use the alternate pin-map on a Teensy3.2 rename the "Config.h" file to "Config.h.old". Then rename the "Alternate_Config.txt" to "Config.h".

Double click on OnStep.ino (inside the OnStep folder.) This opens the project and you can then edit the Config.h file. Instructions for configuration are in that file and remember the spreadsheet which can help calculating the critical parameters. It's helpful to select a MaxRate that gives a low slew speed to start with, say 1 degree/second (or even lower if the mechanical design warrants it.)

In the Arduino IDE select the correct serial port and board. For the Teensy3.2 I select 72MHz operation (not overclocked.)

You can now upload the firmware.


Stepper Driver Adjustment

I used caution as stepper motors and drivers handle significant electrical power and can get hot, even burning hot (though they shouldn't be configured to allow that.) This is how I set them:

1. Assembled the OnStep. Confirmed the wiring of the stepper drivers and bluetooth, etc. to the Arduino.
2. Plug/connected my stepper motors into the drivers. Never disconnect a stepper motor if the system is powered up.
3. Adjusted each driver's (BED, DRV8825, etc.) pot to it's minimum power position.
4. Connected OnStep USB to my computer and also the motor supply to the stepper drivers (I used a regulated 12VDC power supply, along with a switching ~12VDC to 24VDC step-up converter.)
5. Opened a serial console in the Arduino software then typed ":A1#" - this starts the equatorial tracking pulses (RA).
6. Slowly turn the pot of the RA driver. I could hear the pulse width modulation resonance (singing) and the motor started to move. Then, I adjust the motor so that the motion was smooth;
too little and the motion was erratic, too much and it would cog to the full-step locations. I monitored my motors and stepper drivers powered up on the bench for a while (half-hour) to make sure they won't overheat.
7. From the serial console in the Arduino software type ":R2#:Ms#" - this starts the Dec motor moving.
8. Slowly turn the pot of the Dec driver. Tuning is the same as was done for the RA drive. Again, I monitored my motors and stepper drivers powered up on the bench for a while (half-hour) to make sure they won't overheat.
9. The stepper motors might very well run in the wrong direction (depending on wiring and stepper/gear-train design.) Each axis can be reversed in Config.h if needed. Doing short gotos from a Planetarium program lets you see on the computer screen which way the OTA should move and can help you figure out which axis needs to be reversed.


Connecting

The basic connection is on OnStep's USB (virtual serial) port. This is usually how my ASCOM driver talks to OnStep and is often the same serial port where you uploaded the OnStep Sketch to the Teensy3.2 or Arduino Mega2560.
If you're connecting to OnStep via Bluetooth be sure it's already paired first. Each Android phone/tablet has a Bluetooth pairing facility in the settings menu.
If you're connecting to OnStep via IP (ESP8266 WiFi or Arduino M0/Ethernet Shield) be sure you're connected to the correct network first.

For my OnStep EM10 Mount that's an ESP8266 Access Point with an SSID of "OnStep" (my ESP8266 firmware defaults to AP mode when first uploaded.)
For an Arduino M0/Ethernet Shield it defaults to the info. specified in the "Config.h" file of the "OnStepEthernetServer" Sketch which needs to be configured to match the network it's operating on.

Windows
OnStep's ASCOM driver can connect over Serial or IP. Several applications (CdC and Stellarium, for example) can also connect directly to OnStep's serial port using LX200 protocol.
Sky Planetarium uses ASCOM and can setup, align, and control OnStep.

OnStep's Android App
My Android App can connect to OnStep over Bluetooth or IP.
From my App's main screen, press the menu button and select Setup.
To connect to an OnStep with Bluetooth simply select it from the list of paired devices.
To connect to an OnStep via IP you must type in the IP Address.

Sky Safari
Sky Safari can connect to OnStep over Bluetooth or IP.
Settings->Telescope/Setup
    Scope Type -- Meade LX-200 Classic
    Mount Type, etc. should match up with your build.
    If connecting via Bluetooth simply select that option and the device you paired with.
    For WiFi you'll need the IP Address of your ESP8266 and the port (192.168.0.1 and port 9999 are default.)
    For Ethernet you'll need the IP Address of your Ethernet Shield and the port (192.168.1.55 and port 9999 are default.)
Other options in the setup section function as intended (if not by name) to help configure the WiFi and control OnStep.

OnStep's Website
If you have an ESP8266 WiFi or Arduino M0/Ethernet Shield setup there's also a website to help control OnStep. The IP address of the website matches the command interface address (as above) except the port is omitted (80.) Putting this address into your phone/tablet/ipad/PC's web browser should bring up the control website.


First time configuration:

In order for OnStep to function properly it needs to know where you're located. The site information specifies the Latitude, Longitude, and UTC Offset. The UTC Offset is the opposite of a Time Zone value (TZ x -1.0)
There are facilities in the ASCOM driver, the Android App, and the OnStep website to enter these values.

Other settings that can be helpful but aren't generally required for basic operation:
Overhead and horizon limits.
Backlash for RA/Dec.
Tracking rate adjustments.


Using OnStep

When starting OnStep (or after a reset) it always assumes the telescope is in the polar home position. That means the polar axis (RA axis) and telescope are pointing at the North Celestial Pole (NCP/roughly where Polaris is.) For southern hemisphere users it's the South Celestial Pole (SCP) that you want the polar axis and telescope pointing at. For a German Equatorial Mount (GEM) the counterwieght should be down (|HA|=12.) For a Fork Mount (or similar) the forks should be left and right of the OTA (HA=0.) For a one-star align start with the finder-scope down, for two/three star align start with the finder-scope on top. Even for Alt/Az telescopes, Dobsonains etc, you start in the polar home position - which just means the mount is carefully leveled and the telescope is roughly pointing at the NCP (or SCP.)

From the Android App, or Sky Planetarium, etc. set the Date/Time and start a 1-star align. Tracking will start. In the Android App a list of suitable stars will be displayed to choose from. Pick a bright easily identified star not too close to the NCP/SCP and do a goto. If the mount is well constructed and polar aligned and OnStep was setup correctly the star should be in a wide field eyepiece of a small telescope or in your finder 'scope. Use the guide controls to center the star in the eyepeice. In the Android App you need to then press the unlock key. Finally, select Align or Accept.

You're now ready to find objects. Since this example is for a 1-star align the accuracy will be somewhat less than what a 3-star align can do and you might want to do a goto and sync on a nearby bright star every now and then to help with pointing accuracy depending on how far you travel from location to location in the sky. If using an Android tablet this is where I usually exit my App and start Sky Safari and connect for control from there.



Comments

***DISABLED DUE TO SPAM***