Autofocus - 4 questions - re temperature compensation and backlash

Hi all,

I have had Temperature compensation and refocus every 30 minutes working pretty well on my William Optics 115mm FLT → Moonlight focuser → ZWO 071MM-c, but in the last two days some weird things have occured and I am not sure how I have configured things so strangely - compared to what it was like for the last few months! I am using WIndows 10 - latest version of SGP 64 bit edition downloaded it last night).

So I set the focuser to both auto temperature compensation by -23 steps for every degree fall in temperature determined by the Moonlight focuser’s temperature sensor (seems to work well) and in addition trigger a refocus (with step size 25 and 10 points using HFR) every 30 minutes.

In Sydney the temperature may drop 15 degrees over night - so lets say imaging run starts at focus point say 1,000 for 25 celcius - by the end of the night at 10 degrees cecilus it is likely to end up with focus point (1,000 - (23 x (25 - 10)) = 655. So far so good but issue one - when I start autofocus on the next night the temperature is back to 25 degrees but the focuser is at position 655 from last night and it will likely move focus out by half of ten steps of 25 points each = 125 steps so to focus position 655 + 125 = 780 - when it really needs to be at position (start postion + (half of number steps (10/2) + temperature delata of current temperatre - last focus temperature (25 - 10) x steps size 25) thsus giving 655 +( ( (10/2) + (25 - 10) ) * 25) = 1,1255 to start auto focus.

So Question 1 - Is there any way for SGP to understand start of night and end temperatures and focuser position so it can revert the beginning focus starting position to the previous nights starting position - rather than its ending position?

Question 2 - is there anyway to tell the scope on auto focus move out say 500 steps then move into first position (for me) only half the steps x the step size = 125 steps out from starting position - to remove any chance of backlash? I do this on my scope and camera controlled by APT - it adds 500 (so a deliberate significant overshoot to the first target focus position on any autofocus run (think of this as position zero) and then moves always inwards to the first target position.

Question 3 - is there a good tutorial anyone can share as to how to set up the backlash compensation (it was 0 - I decided to try 20 steps on direction change to see how that performs tonight - if the clouds go away).

Question 4 - last one - for some reason the scopes counter seems to move in each night - a month ago at 20 degrees focus was at around 2300 at 16.5 degrees down to 2180 at 10.7 degrees - two nights ago it was at about focus position (and I am sure this is a relative number) 600 at 20 degrees. The Moonlight DRO ASCOM driver never wants to focuser to go below 0 (no matter how much room it has to still move) - so every time I see it get down below 500 I manually set in the driver for it to be at say 2,000 - but I am wondering what I might have done to make it countdown after weeks of it always being in the 2300 - 2100 range - its really wierd!

So thanks all for any help that can be offered - loving SGP at the moment!

For #1, there is already a feature request for SGP to keep track of focus positions at various temperatures so when a sequence is started the focuser will go to a position close to correct, then start the auto focus.
I believe this request is in the queue.
I also look forward to it.

1 Like

Also as to #1:
This suggestion has been made already in July 2018 (!), see Minor feature request for when you run out of other ideas , and I repeated it several times. Apparently there is no interest in this (important) topic.

Bernd

1 Like

There is not. It used to be in there, but was broken and we have never prioritized fixing it. It comes up every once in a while like this… I’ll see about it.

I’m not sure I understand this. This is what backlash compensation actually does.

Not a tutorial really, but you can just start SGPro’s frame and focus with the realtime HFR metric enabled. Then, using the manual focus controls, move into some position such that backlash is cleared (doesn’t matter if focus is perfect, just make sure stars are defined and measurable). Record the HFR value. Then, in the opposite direction start moving a bit and then back by the same amount. Keep doing this until your HFR returns to the same value you recorded above. Remember to fully clear blacklash before starting again. Then, increase that number by 10 to 20% and use it as your compensation. Always go bigger than you need. Too much is fine… too little is bad.

1 Like

It’s not that we have no interest in it, it’s just that its relative priority to other things we are making is lower. That said, I did take a little time to add an alternate (and not totally ideal) implementation of the original version of this functionality (which used only focus change per degree to calculate the next starting position). This version does not attempt to use any type of focus offset (maybe someday), but rather just notates the starting position of the last sequence (if the first auto focus run was successful). Here are the current restrictions and rules:

  • Initial positioning of the focuser is only honored when the Focus before sequence starts trigger is used (support for other triggers coming).
  • Initial positioning request is ignored if the last known starting position is more than 15 days old.
  • Initial positioning request is ignored if the current sequence start time is outside of a +/- 1.5 hr range of the recorded last start position.

This will be available in the next 4.3 beta release.

1 Like

Hi Ken, when backlash compensation hasn’t been applied - or wasn’t applied correctly - some software compensates by making an overly large first move that the user configures, then the auto focus routine moves in one direction to the first location and continues in this direction for the rest of the focus check points.

So APT might specific focus direction is always Inwards and on the first check location it moves 500 steps past this then travels back in to the first starting point - meaning backlash should never be a issue if the temperature is simply steadily falling throughout the night.

So on my larger 132mm scope with a ZWO focuser and filterwheel - controlled by APT - if it is at say focus point 17,300 and it wants to run a 12 point autofocusing starting at say 17,450 - it will first move the focuser to 17,950 - then all the way back to 17,450 then take sample points back to say focal point 17,150 - so the travel is always only in one direction when testing for best focus…

But as you and other suggest - I should try and remove all backlash with an offset figure for my gear - I will try this in the comming days!

Best regards, Matt

Matt,

You are defining focuser backlash. I have mine set to 300 (which I got from trial and error) in the ASCOM settings for my Optec Gemini focuser:

image

Click on this gear icon to set yours:
image

1 Like

Thanks Eric et al,

My focuser has slightly different configuration options - and I see Moonlight as very high quality gear - but you do have to configure it correctly. This Happens in three different places…

Question - In the driver I can set temperature compensation on - and define the steps there to use - but if I use this one do I then turn it off in the focuser settings so it doesn’t double dip the temperature compensation being 23 steps for each degree fall. Plus if I want the focus position to decrease for each degree fall I suppose I use a negative number - not a positive one - have to experiment with that! There is no option I can see at the driver level to set backlash…

Within the control panel - Focuser → Settings → Other one can turn on backlash and specific either In or Out for SP to manage and apply backlash when a direction change occurs - I presume I should enable this and first I should work out what the number should be!

Finally In this focuser settings box under Use auto focus I set the step size (25 seems to work okay for me) and number of steps (10) 1x1 binning and HFR as the algorithm. I teill it to run auto focus every 30 minutes and/or every degree temperature change. I monitor image History but have set it to trigger if history degrades (might try that later)

Matt,

Temperature compensation should only be set in EITHER the driver OR SGP, but not both, or else you’ll get the “double dip” as you said. I set mine in SGP since it only move the focuser in between images whereas the driver has no idea if an image is being taken so it moves the focuser any time. I don’t have any data to prove it, but it seems like moving the focuser during an image might create a problem.

Negative numbers move the focuser in, as you thought.

I agree you need to work out the backlash settings before turning backlash on.

My auto-focus takes several minutes since downloading an image takes about 11 seconds, so I only run auto-focus every degree change. It seems like it’s not worth also running auto focus every 30 minutes, for example, if the temperature doesn’t change why bother with an auto focus? I suppose if an auto focus run only took 30 seconds it wouldn’t be a big deal to run both ways.

Hi Eric,

Thanks for confirming only set Temperature based compensation on in one spot - I like your thinking - it makes sense to do that in SGP rather than the driver!

Auto focusing using 10 images (5 seconds each) norrmally takes me about 2 minutes to run - so I don’t mind the overhead!

Over a 6 hour imaging session I expect the temperature to fall 15 - 18 degrees - so that is 2-3 degrees an hour if the weather plays that way!

I expect if you say every degree or every 30 minutes - SGP only does which happens first - as when 30 minutes have passed it grabs the temperature at that time and resets teh temperature changes by a degree trigger clock?

Lastly when the temperature falls and the focuser moves Inwards - I presume the position counter decreases right - smaller numbers = inwards movement - have I got the signs on this travel direction correct? As the temperature decreases I need the scope position to descrease by 23 steps each degree - so I guess its added the number of steps (not subtracted) so a -ve sign is needed correct?

Thanks,

Matthew

Smaller numbers == focuser moves inward.
Since you need the focuser to move inward by 23 steps every degree, you need to use -23 steps to get a smaller number. Most telescopes are this way.

You may want to download SGP Auto Focus LogViewer - Google it. It’s great at determining the steps as well as filter offsets. I combine the data in the “Scan details” tab for many nights into a big file, then load that. Here’s my “Temp & Filter Analysis” tab for a combination of 306 SGP runs:

image

I add the “-438” into SGP for the steps per degree (my focuser has 115,000 steps). I also add the filter offsets at the bottom into SGP. Interesting that these Astrogen filters are supposed to be parfolcal, but aren’t exactly.
I should try focusing with Ha, OIII, and SII filters some moon-lit night so I can get their offsets.

1 Like

Hey Eric - huge thank you - that Log viewer is great!!!

Took me a few seaches to find where the log flie actually stored )C:/users/matthew/AppData/local/SequenceGeneratorPro/) and was surprised there were only about a dozen files there (I expected closer to at leats 50) :wink:

Interestingly I found best fit line at between -28.5 to 36 steps for several nights; pondering why the best fit changes over a few weeks.




The other really weird thing is you can see from the first to the last image spanning from the 9th Aug to the 26th Aug at roughly the same temperate the scope has travelled in about 500 steps - when it normally moves a night over 10 - 15 degree temperature deltas about 300 steps. I am wondering if that is a weird Moonlight driver bug reseting the zero point each night.

On the first two graphs the position at temperature 15 C is roughly the same around 859 and it gradually drifts in over a series of nights about a week apart to the low 400s and then high 300s. Like each nights ending position is confusing the next days starting position…

I am thinking as a workaround start the focuser at whatever position it was the night before and over write its position to be say 2,000. Then move the scope out 300 steps to be say at position 2,300 to start autofocus from there (supposing a temperature of say 20 Celcius).

The log viewer has helped me, too.

Your questions might be good to ask the Moonlight team.

I’ve noticed my focus at a certain temperature can be quite a bit different if the scope has cooled down or not. For example, I open the roof and the focuser says it’s 20C and it focuses at 50,000 steps. An hour later the focuser may still say 20C but it focuses at 40,000 steps. I assume the difference is because the scope cooled down. The focuser temperature probe is just hanging - I should attach it to the scope.

That might explain some of your results. It may be helpful to ignore/delete the first focus run or two.

1 Like

The R squared from each night is pretty solid - meaning excellent linear line fitting per night - just not across nights - which is a tad surprising!

My biggest gripe with Moonlight focusers software is there hang up with no moves below the 0 position. If you didn’t know this and switched the focuser on and calibrated it at some mid point close to focus - it absolutely blocks travel below this point.

One day I must see which way is in according to its counter. With a PC not attached use the hand controller to rack it all the way - set that point to zero then get it to travel all the way out to the correct focus position - which is likely to be say 20,000 or 40,000!

Beginner mistake that has haunted me for years and years - must reset it one day!!!