Understanding SharpCap autofocus behavior when ASCOM StepSize = 0.0 (Esatto 2")

Somewhere to ask questions about the best way to use SharpCap
Forum rules
‍

If you have a problem or question, please check the FAQ to see if it already has an answer : https://www.sharpcap.co.uk/sharpcap-faqs
tutendorf
Posts: 5
Joined: Sat Oct 08, 2022 2:55 am

Understanding SharpCap autofocus behavior when ASCOM StepSize = 0.0 (Esatto 2")

#1

Post by tutendorf »

I’m seeing some autofocus behavior with the Esatto 2" focuser that I’m trying to understand and resolve.

Observed behavior
When running autofocus in SharpCap with the PrimaLuce Esatto 2"
• SharpCap always performs 26 autofocus steps, regardless of the configured step size.
• Actual focuser movement is always 1 step per iteration, even when entering values such as 2000–10000.
• No usable autofocus curve is generated.
• The configured step size appears to be ignored.
This behavior is consistent across multiple attempts.

Driver metadata (from logs)
Focuser: Reported StepSize = 0.0

SharpCap’s logs show that the Esatto ASCOM driver reports a step size of 0.0: This matches what I see in the ASCOM hub UI, where the step size field also displays 0.0.

Movement behavior (from logs)
Despite entering much larger step sizes (2000, 5000, 10000), the actual movement commands show SharpCap issuing 1‑step moves:

This pattern repeats for all 26 autofocus iterations (from logs)

MoveFocuser: Moving by 1 steps
MoveFocuser: Moving by 1 steps
MoveFocuser: Moving by 1 steps
...

Based on what I've read in other forums, and my understanding of SharpCap's autofocus implementation, I believe SharpCap is working as designed. Unfortunately, this apparently leaves me with no SharpCap autofocus solution for my Esatto.

I’d appreciate insight and confirmation from anyone familiar with how SharpCap handles focuser metadata. Specifically:
1. Does SharpCap require a non‑zero step size from the ASCOM driver in order to compute autofocus step sizes correctly?
2. Is the 26‑step / 1‑step‑movement pattern expected when the driver reports a step size of 0.0?
3. If the driver were to report the correct Esatto 2" step size (0.04 µm), what would SharpCap’s autofocus behavior be?
4. Is there a recommended workaround for focusers that report no usable step size?
5. If applicable, is there an older Esatto driver version known to report step size correctly?

Thanks to anyone who can shed light on this.

Tom
User avatar
admin
Site Admin
Posts: 17530
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Understanding SharpCap autofocus behavior when ASCOM StepSize = 0.0 (Esatto 2")

#2

Post by admin »

Hi Tom,

I don't think it is going to be the step size that is the issue here - SharpCap doesn't even bother to read the value of that property, since there aren't any features in SharpCap that consider the focus position in terms of actual microns moved. Everything just works in the numeric step counts.

My suspicion is that it is the 'MaxIncrement' property of the focuser returning a value of 1, which makes SharpCap think it can only move one step at a time. If that is something configurable for your ASCOM driver then try setting a very high value and see if that helps. If not configurable, it would be interesting if you can confirm if the value really is one. SharpCap will log that value in the logs, although it gets called 'MaxChange' - there will be a line in the log about initializing the focuser, which will contain both the MaxPosition and MaxChange values.

If it is stuck at one and cannot be configured then I will try adding some code to ignore that value for your type of focuser and we will see if that helps.

cheers,

Robin
tutendorf
Posts: 5
Joined: Sat Oct 08, 2022 2:55 am

Re: Understanding SharpCap autofocus behavior when ASCOM StepSize = 0.0 (Esatto 2")

#3

Post by tutendorf »

Robin,

Thanks for the quick reply. As it happens, PrimaLuce sent me a link this morning to a test build of their ASCOM driver with the following note:

“We added the value you requested (StepSize property) we have no way to test it under the sky (weather forecast is bad for the next week) so please test it and let us know if it works fine now in SharpCap."

I wasn’t able to download it due to a SwissTransfer restriction and have let them know. Based on your explanation, the StepSize change may not affect SharpCap, but I’ll test the new build as soon as I can get it.

In the meantime, here are the MaxIncrement/MaxChange entries from the SharpCap log. It looks like the driver is reporting MaxChange = 439000, so it doesn’t appear to be limiting moves to 1 step.

Verbose 10:09:14.303293 #31 Focuser : ASCOM.Common.DeviceInterfaces.IFocuserV3.get_MaxIncrement :: Completed (returned 439000) get_MaxIncrement()

Info 10:09:14.495995 #1 Initializing PLL ASCOM Focuser, MaxPosition = 439000, MaxChange = 439000, TempCompAvailable = False in void SharpCap.ViewModels.FocuserViewModel.InitializeImpl()

Regards,

Tom
nexusjeep
Posts: 383
Joined: Thu Oct 18, 2018 3:01 pm
Location: Gloucestershire

Re: Understanding SharpCap autofocus behavior when ASCOM StepSize = 0.0 (Esatto 2")

#4

Post by nexusjeep »

Hi,
I have not used the Autofocus option but just run a sequence that takes the focuser out +7,500 steps and in -10,000 in 11 increments and it produces a nice curve and sharpcap finds the optimal focus point for my 4" Esatto so this could be an interim option it takes 3 exposures at each position stores the camera setting first sets camera to 3s at 300 gain then resets the exposure / gain after it completes back to the imaging settings.

SEQUENCE
PRESERVE CAMERA SETTINGS
SET EXPOSURE TO 3
SET GAIN TO 300
AUTOFOCUS OFFSET 7500 TO -10000 STEP COUNT 11 BACKLASH 0
END PRESERVE
END SEQUENCE

Cheers
Nick
tutendorf
Posts: 5
Joined: Sat Oct 08, 2022 2:55 am

Re: Understanding SharpCap autofocus behavior when ASCOM StepSize = 0.0 (Esatto 2")

#5

Post by tutendorf »

Thanks, Nick! I'm hoping to resolve the autofocus issue somehow, but I'm looking forward to some clear skies to give this sequence a try.

Tom
User avatar
admin
Site Admin
Posts: 17530
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Understanding SharpCap autofocus behavior when ASCOM StepSize = 0.0 (Esatto 2")

#6

Post by admin »

Hi Tom,

OK, not the maximum move then...

Let's go back to the start - looking at the log fragment you included of 'MoveFocuser: Moving by 1 steps' , as far as I can see that's not a SharpCap log message (at least I can't find any code in SharpCap that would produce that exact message... So, it would be interesting to see the log from the SharpCap side, as that should record the parameters of the autofocus as far as SharpCap is concerned. In this case, since we don't really care at this stage whether there is a successful autofocus or not, just plugging the camera and telescope into the PC and testing without waiting for clear sky should provide some useful info.

Another thing I should mention is that autofocus in SharpCap only really works properly if you have already 'trained' SharpCap by using the assisted focus tool and used the 'Positive' or 'Negative' focus scan buttons to run a scan. Once the scan completes and finds a best focus point and you then tell SharpCap to goto that best point, SharpCap remembers the parameters of the scan that works (how many positions to measure at, how many frames to measure at each position, number of focuser steps between positions, etc) and can re-use that info later for autofocus operations. I thought it was supposed to just fail at the start if you haven't done that procedure yet, but maybe somehow you've got past that point and it is trying to run an autofocus without any saved parameters?

cheers,

Robin
tutendorf
Posts: 5
Joined: Sat Oct 08, 2022 2:55 am

Re: Understanding SharpCap autofocus behavior when ASCOM StepSize = 0.0 (Esatto 2")

#7

Post by tutendorf »

Hi Robin,

I revisited the Automatic Focus tool and confirmed that SharpCap does indeed honor the step size I configure during a focus scan. When I set to scan 2000 steps, the focuser moves the full 2000. I verified this with the custom driver PrimaLuce provided and the original driver.

With hindsight, I'm confident this would have worked correctly all along — I didn't let a full scan complete previously, so SharpCap never got the valid data it needs to do the refocus routine.

I’ll verify everything under the stars on the next clear night, but at this point it looks like the issue is due to user error (and over reliance on a certain AI tool's assessment) rather than an Esatto/SharpCap matter.

Thanks for the guidance. I now realize the SharpCap manual is rather clear about this, but it took your explanation to help me make the connections and get past the step size of 1 automatic refocus behavior. Apologies for taking up your time with this.

Best,
Tom
User avatar
admin
Site Admin
Posts: 17530
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Understanding SharpCap autofocus behavior when ASCOM StepSize = 0.0 (Esatto 2")

#8

Post by admin »

Hi Tom,

glad you got it sorted :)

It would be helpful if you gave me some idea of how you managed to get the autofocus/refocus to run without having done the successful scan beforehand - that's supposed to be blocked with a helpful error, so I guess you found a way to get around the block that I ought to fix.

I think that there are both benefits and drawbacks to the way SharpCap does this... The alternative would be to have some sort of way to configure the autofocus operation - some window to adjust all the possible settings that might affect it. The problem is that there are *a lot* of those settings, and I'm not convinced that having a long list of things to adjust and trying to guess good values is a productive way to get things going. On the other hand, it's perhaps more in line with what users expect...

cheers,

Robin
archer1960
Posts: 98
Joined: Sun Feb 23, 2025 9:04 pm

Re: Understanding SharpCap autofocus behavior when ASCOM StepSize = 0.0 (Esatto 2")

#9

Post by archer1960 »

Jumping in here...

I don't have an Esatto focuser (Feathertouch, with Microtouch motor instead), but Voyager has a simple way of letting a user configure the autofocus routine if they choose not to use Voyager's method, which is simply to let the user enter the number of points, and the step size to use. I use 7 points of 200 focuser steps, and it works well. I've been doing it long enough that I no longer recall what the issue I had with Voyager's built-in method, but there was something with it that kept me from having consistent good results. The only slight caveat is that you need to start the process from somewhat near focus, or it may not be able to find stars when it is at the ends of its tested range.
nexusjeep
Posts: 383
Joined: Thu Oct 18, 2018 3:01 pm
Location: Gloucestershire

Re: Understanding SharpCap autofocus behavior when ASCOM StepSize = 0.0 (Esatto 2")

#10

Post by nexusjeep »

That's similar to my sequence above although with the Esatto's you need a large step sizes as 200 steps will not move the focuser enough to actually change the reading on multistar FWHM and if I go much less than a 17,500 steps range it will sometimes fail to create a V or U to find focus. Also I think from memory that Sharpcap requires 4 points or might be 3 either side of the perfect focus point to plot the curve hence the fact that I have the sequence set to 11 as that usually always works and Sharpcap will stop the sequence early if it decides best focus has already been found, also as you say it requires you to be somewhere near focus before you start.

Cheers
Nick
Post Reply