OnStep Focuser support


Howard Dutton
 

I worked on the focuser support in OnStep for a while today.  Several commands were added to help with ASCOM integration and my OnFocus ASCOM driver now has support for connecting to OnStep.  Note that this driver, for now, still only supports serial connections (no IP yet.)


Zoltán Pásztor
 

Hi Howard!

Very good news!
Will be the zero index sense implemented?
Is there any chance to temperature compensation?

PZ


KHK
 

Hallo  Howard,
I wish you and the whole onstep friends a happy and happy new year  2018!

I have a little question:
where can I find the new Ascom OnStep Focuser version, unfortunately I find on githup only the V 1.02.
New possibilities for focusing would be great  !!!
regards
Karl-Heinz !

Germany, NRW
 


Am 30.12.2017 um 23:35 schrieb Howard Dutton:

I worked on the focuser support in OnStep for a while today.  Several commands were added to help with ASCOM integration and my OnFocus ASCOM driver now has support for connecting to OnStep.  Note that this driver, for now, still only supports serial connections (no IP yet.)


Howard Dutton
 


Howard Dutton
 

On Mon, Jan 1, 2018 at 05:50 am, Zoltán Pásztor wrote:
Will be the zero index sense implemented?
Is there any chance to temperature compensation?
I'm not putting a time table on it but more advanced features are planned.  That's one of the reasons for having the I2C port on the OnStep MaxPCB.


Howard Dutton
 

The OnStep Android App now has Focuser support.

Sky Planetarium has also been updated with minor changes to allow switching between Focuser1 and Focuser2.  This is in addition to ASCOM Focuser support that can already connect to the OnFocus ASCOM driver for OnStep focuser control.


Chris A
 

Howard
 
Cool. 
 
but for this must be there connection between the Arduino-UNO and the Mini board.
How is this arranged?
 
Chris


Howard Dutton
 

If you're thinking this is an OnFocus (running on an Arduino UNO or Nano) connected to OnStep, it's not.

The MaxPCB and RAMPS1.4/1.5 boards both have drivers for stepper motor driven focusers (and/or a rotator.)  MaxPCB has 4 axes and the RAMPS has 5 axes.  OnStep has it's own focuser code inside.


Howard Dutton
 

The new OnFocus ASCOM driver can (/should!) connect to OnFocus or OnStep.


John Scherer
 

Hi Howard,

Are you using 200 or 400 step/rev motors with the focuser?  Any benefit of one vs the other for this application?  


Howard Dutton
 

I use a 48 step tin-can with built-in 50:1 reduction...

Just like a telescope drive you need to look at the design goals:

  • Does the drive make enough torque?
  • Does the drive have have enough resolution?
  • Does the drive fit on the focuser acceptably.
  • Does the stepper need to micro-step to reach the resolution?  Keep in mind that the stepper motor needs to remain powered up to do this.  There is stand-still power reduction for some drivers (TMC2100/TMC2208.)  MaxPcb Aux3 and/or Aux4 need to be wired into the stepper drivers' EN pins to power down the focusers.  If powered up there will be some heat near your focuser.
  • Do power requirements matter?  Heavier leads, shorter battery life, etc.
  • Etc. etc.

I like tin-cans and lots of reduction in general for this but you end up with some backlash.  I guess if that backlash allows the focuser to shift under changing load that's not a good thing but this isn't a factor in my case.


dlyashko@...
 

Dear Howard
I install last version android aplication from google stor.
I did not find how to manage the focus of this program
where you can find it?
i have quastion about connect A4988 for OnStep.
Since I do not use contacts Mo M1 fnd M2 for change microstep mode, can I use them for step and dir focuser in my plate with Teensee3.2
 
 
Regards Dima


Howard Dutton
 

On Sun, May 6, 2018 at 04:19 am, <dlyashko@...> wrote:
Since I do not use contacts Mo M1 fnd M2 for change microstep mode, can I use them for step and dir focuser in my plate with Teensee3.2
I see what you're asking.  For a custom build (not a MiniPCB) you can change the relevant Pins.xxx.h however you like.


Khalid Baheyeldin
 

Howard,

Is focuser1 working on Alpha?

I ask because I tried to test it with the STM32, and it did not work.

What I did for testing was connect 3 pins to a DRV8825: EN, STEP, and DIR.
No movement on the focuser motor.

I used the oscilloscope to check if any signal is coming out, and EN was high,
and DIR was high (but different voltage on each, one was 2.5V or so, the other
was 3.3V).

DIR did not switch to low when I was pressing IN and OUT in the Android app.

The STEP pin had nothing coming out of it at all no matter what I was testing.

To make sure that the underlying pins were not reserved or something, I
used the disableDebugPorts() call for the STM32, so no pins would be
reserved for debugging.

Moreover, using the scope, I assigned the LED pin to each pin and tested
that I am getting a square wave when OnStep was tracking, and no wave
when it was slewing. So that eliminated platform issues (as much as I can
test them).

What else can it be? Do we need more than 3 pins?


Howard Dutton
 
Edited

On Mon, Jul 2, 2018 at 04:01 pm, Khalid Baheyeldin wrote:
Is focuser1 working on Alpha?
I just tested with a RAMPS1.4 board and it's working fine.

I ask because I tried to test it with the STM32, and it did not work.

What I did for testing was connect 3 pins to a DRV8825: EN, STEP, and DIR.
No movement on the focuser motor.

I used the oscilloscope to check if any signal is coming out, and EN was high,
and DIR was high (but different voltage on each, one was 2.5V or so, the other
was 3.3V).

DIR did not switch to low when I was pressing IN and OUT in the Android app.
The floating voltages are telling me these pins are high-z and so are not switched to output mode.  [Perhaps check the config to be sure you have #define AXIS4_DISABLE HIGH set... and at 3.3V maybe DIR was not floating but HIGH]

The STEP pin had nothing coming out of it at all no matter what I was testing.

To make sure that the underlying pins were not reserved or something, I
used the disableDebugPorts() call for the STM32, so no pins would be
reserved for debugging.

Moreover, using the scope, I assigned the LED pin to each pin and tested
that I am getting a square wave when OnStep was tracking, and no wave
when it was slewing. So that eliminated platform issues (as much as I can
test them).

What else can it be?
Not sure but a few lines of code added to test pinMode() and digitalWrite() as a reality check would be a good start.
Post the section from Config.xxx.h if you like.

Do we need more than 3 pins?
Well you need a common ground, step, dir... en is optional.


Khalid Baheyeldin
 

The configuration was basically default, with only Focuser1 _OFF to _ON

So, it was:

#define FOCUSER1_ON
#define MaxRateAxis4               8
#define StepsPerMicrometerAxis4  0.5
#define AXIS4_REVERSE_OFF
#define AXIS4_DISABLE_OFF
#define MinAxis4                  25.0
#define MaxAxis4                 -25.0

I also tried:
#define AXIS4_DISABLE HIGH

But it made no difference.

I only defined one pin for DIR and another for STEP, and EN was -1.

I tried some D() statements, and in foc1.follow(),  as follows:

    if ((long)(tempMs-nextPhysicalMove)>0) {
        nextPhysicalMove=tempMs+(unsigned long)maxRate;

          D(" spos=");     D(spos);
          D(" target m="); D(target.part.m);
          D(" smax=");     D(smax);
          D(" smin=");     D(smin);
          D(" pda=");      D(pda);
          D(" tempMs="); D(tempMs);
          DL();
        }

        if ((spos<(long)target.part.m) && (spos<smax)) {

The output is like this:
spos=0 target m=0 smax=-12500 smin=12500 pda=1 tempMs=64875

And the code never goes into any of the subsequent if statements in the follow() method.

The issue is that debug seems to slow down OnStep considerably that WiFi does not connect most
of the time, so I can't control it from the app, and I can't connect to it via USB because of all those
messages.

One I remove the debug, WiFi is consistent.


Catch 22.


Howard Dutton
 

If the EN pin is -1 undefined how is the driver enabled?  Hard wired low?


On Tue, Jul 3, 2018, 1:12 PM Khalid Baheyeldin <kbahey@...> wrote:

The configuration was basically default, with only Focuser1 _OFF to _ON

So, it was:

#define FOCUSER1_ON
#define MaxRateAxis4               8
#define StepsPerMicrometerAxis4  0.5
#define AXIS4_REVERSE_OFF
#define AXIS4_DISABLE_OFF
#define MinAxis4                  25.0
#define MaxAxis4                 -25.0

I also tried:
#define AXIS4_DISABLE HIGH

But it made no difference.

I only defined one pin for DIR and another for STEP, and EN was -1.

I tried some D() statements, and in foc1.follow(),  as follows:

    if ((long)(tempMs-nextPhysicalMove)>0) {
        nextPhysicalMove=tempMs+(unsigned long)maxRate;

          D(" spos=");     D(spos);
          D(" target m="); D(target.part.m);
          D(" smax=");     D(smax);
          D(" smin=");     D(smin);
          D(" pda=");      D(pda);
          D(" tempMs="); D(tempMs);
          DL();
        }

        if ((spos<(long)target.part.m) && (spos<smax)) {

The output is like this:
spos=0 target m=0 smax=-12500 smin=12500 pda=1 tempMs=64875

And the code never goes into any of the subsequent if statements in the follow() method.

The issue is that debug seems to slow down OnStep considerably that WiFi does not connect most
of the time, so I can't control it from the app, and I can't connect to it via USB because of all those
messages.

One I remove the debug, WiFi is consistent.


Catch 22.


Khalid Baheyeldin
 

I would have thought: hard wired high?
But regardless of the details, if EN is optional, we can save one pin per focuser that way.

For now, I just want to see if something is coming out of DIR and STEP without having a driver or motor attached.


Howard Dutton
 

EN is active low for most most step stick stepper drivers.  For focusers being able to disable is fairly desirable since less power heat is a good idea.  Its an option on MaxPCB to do this. 


On Tue, Jul 3, 2018, 1:59 PM Khalid Baheyeldin <kbahey@...> wrote:
I would have thought: hard wired high?
But regardless of the details, if EN is optional, we can save one pin per focuser that way.

For now, I just want to see if something is coming out of DIR and STEP without having a driver or motor attached.


Khalid Baheyeldin
 

OK, will keep this in mind.

For testing, what else can I do to get a signal out of DIR and STEP, before I worry about wiring a stepper and driver?