×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

How do I reverse the direction of the Ekos autofocus routine?

  • Posts: 14
  • Thank you received: 0
Hi Folks,

I have an Edge 11" with the Celestron Electronic Focuser attached. For these scopes, my understanding is that focusing should always finish in the CCW direction so that the primary mirror is pushed toward the corrector. When using the Celestron Electronic Focuser, CCW movement occurs when the focuser position value is INCREASING, but the Ekos autofocus routine always finishes in the DECREASING value direction.

Is there an option to reverse the direction of the autofocus routine?

Thank you!
-Bret
2 weeks 2 days ago #100793

Please Log in or Create an account to join the conversation.

  • Posts: 624
  • Thank you received: 283
Yes, there's an option on the Indi Focuser tab to reverse the sense of the motion.
2 weeks 2 days ago #100794

Please Log in or Create an account to join the conversation.

  • Posts: 14
  • Thank you received: 0
Hi John,

Thanks for the quick response ... much appreciated. Do you mean the "Direction" option under the Indi tab (see attached screenshot)? If so, this has no affect when using Ekos autofocus.-- it only effects the direction when I use/set the "relative position" field located right below it.

Are you referring to a different option under the Indi tab?

-Bret
2 weeks 2 days ago #100799
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 154
  • Thank you received: 20
I am using AF3 focuser from DeepSkyDad and in the driver options there is one control which enables me to change the direction of motion. You can check, if such option is also in driver for your focuser.
Last edit: 2 weeks 1 day ago by hades.
2 weeks 1 day ago #100800
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 154
  • Thank you received: 20
In your case it would be this control:
2 weeks 1 day ago #100801
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 14
  • Thank you received: 0
Hi Hades,

Thank you for responding. Unfortunately, the "Celestron SCT" focuser driver does not have a 'Reverse Motion' option and the 'Direction' option does not serve this function -- it only sets the direction if you use the 'relative position' function beneath it ... it does not reverse the direction when using the Ekos autofocusing routine.

-Bret
2 weeks 1 day ago #100803

Please Log in or Create an account to join the conversation.

  • Posts: 624
  • Thank you received: 283
Hi Bret,

I had a look at the Celestron Indi driver and the Reverse Motion option isn't enabled which is why you don't see it on the Indi panel. So I then did a bit of digging around and it looks like the Focuser doesn't have this function (as far as I can see there is no mention of it in the doco - I'm not 100% on this however).

I then looked at the Celestron Indi driver and it looks like you can enter +/- backlash values where + values operate in what I would call the "standard" way of adding the backlash to an outward move and when that completes moving in by the backlash value as a second move. - values, appear from the code, to operate in the other sense of subtracting the backlash amount from an inward move and when that completes moving out by the backlash value as a second move. I think this is what you are after. So you could try setting Backlash to, say -500 (or whatever value is appropriate for your setup) and set AF Overscan = 0 and see what happens.

I have to say this is the first time I've seen a negative backlash value so I don't know if it would work with Focus at all. Certainly the way Focus currently works with most of the sweep being out->in isn't optimal for this setup as each step will be a backlash move (2 individual steps).

I then thought about this some more and have managed to convince myself that actually it "should" work fine with a positive backlash value (and AF Overscan = 0). So, if we take the example of backlash = 500. Let's say we have a Linear 1 Pass sweep from 22000 to 20000 (11 datapoints), step size = 200. Let's say Focus determines focus point at 21000. So after the sweep Focus will attempt to move the focuser from 20000 to 21000 so it will:
1. Move out from 20000 -> 21500. When complete...
2. Move in from 21500 -> 21000.

However, the Focuser will move the primary outwards (CCW) during 1. but although move 2. is CW its just taking up the slack and NOT moving the primary. So the last primary mirror movement is CCW (which is what you are after).

The issues with this are the usual issues with Backlash which is you need to be exact on the number. The benefit of AF Overscan is that you can just specify a value >= actual backlash and it works. So if you measure backlash 3 times and get 510, 490 and 500 you'd take an average and say backlash=500. With AF Overscan you could set it to say 750 and it will work. With backlash if you set 500 and it's actually 503 then you'll be 3 ticks off and you'll get Focuser creep over time. If your backlash varies with temperature and over time Overscan does a better job than Backlash.

So, in summary, you could try a negative backlash just to see if it works, but I'd suggest measuring actual backlash as accurately as you can and setting either the Backlash field (or AF Overscan) to the actual backlash (e.g. 500) and using that. You might need to periodically check it for creeping values.

Hope this makes sense and helps a bit.
2 weeks 14 hours ago #100817

Please Log in or Create an account to join the conversation.

  • Posts: 14
  • Thank you received: 0
Hi John,

Interesting ideas and thoughts! I'd never even thought of trying a -ve backlash. I went out just now and tried some experiments with the backlash and overscan settings in the Ekos AF tab and commanding the focuser to go to different values to observe the motion. Overscan does not support -ve values so the below is for +ve overscan and both +/- backlash:



So ...

=> A +ve backlash will always finish in the INCREASING (=CCW) direction ... which is what I want. What I'm not sure about is -- Will a +ve backlash that is greater than the actual backlash result in focuser creep? If not, then I think I have a solution! My guess is that Celestron may have intentionally designed the backlash function so that the focuser will always finish pushing the mirror toward the corrector.

=> Overscan may not be ideal for most focusers since it will always result in the initial AF sweep motions ending in one direction and the final motion that goes to the solution ending in the opposite direction. Overscan is what I have been using up to now.

-Bret
Last edit: 2 weeks 5 hours ago by Bret. Reason: trying again
2 weeks 9 hours ago #100823
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 624
  • Thank you received: 283
Hi Bret,

Interesting!

I'm not sure how to read your examples. But I looked at the driver code again and realised what I wrote before is wrong. A positive backlash value will apply to an in (CW) move that results in an overshoot and a return to the desired position from in->out (CCW). I think this is what you observed, and what you want.

The way its implemented in the driver is to subtract backlash from the original move and then move back out by the backlash amount so moving from 22000 to 21000 (backlash = 100)...
Start @ 22000. Move to 21000 - 100 = 20900 which is a movement of -1100
Focuser reaches 20900
2nd Move: +100 to 21000

Since this is a double move what I wrote before about focuser creep if backlash is set > actual backlash is, I think, incorrect.

So you should be fine to set backlash to say 200 if you think it's actually around 100. So for this driver backlash has been implemented a bit like Overscan (but will give guarantee final motion is CCW).

A way to test this is to set backlash to a very high value (Overscan = 0) and run Autofocus. The HFR of the final position (In Linear 1 Pass) should pretty much be on the curve that is drawn on the v-curve. If it's not then the final move of Autofocus isn't correct (probably due to backlash not working as I'm now thinking it should). You could do this a few times to check.

Another test would be to run Autofocus say 3 times - you should get a consistent position (within a small number of ticks).

Hope this makes sense.
2 weeks 5 hours ago #100827

Please Log in or Create an account to join the conversation.

  • Posts: 14
  • Thank you received: 0
Hi John,

Makes sense and your description of the move from 22000 to 21000 matches what I observed. The "|" end of the arrows in my diagrams marks the starting point ... so for the backlash (+) case, it started at 22k and went below 21k, then reversed and came back up ending at 21k just as you described.

If the skies are clear I'll try it tonight. My backlash is around 45 so I'll try backlash settings of 100 and 200 and see what happens.

-Bret
2 weeks 5 hours ago #100829

Please Log in or Create an account to join the conversation.

  • Posts: 624
  • Thank you received: 283
Hi Bret,

Any luck testing things out?
1 week 2 days ago #100844

Please Log in or Create an account to join the conversation.

Time to create page: 0.775 seconds