×
INDI Library v1.8.5 Released (19 Apr 2020)

April 2020 release of INDI Library v1.8.5 introduces new drivers while providing fixes and improvements to existing devices and core framework.

Always focus from one direction

1 month 6 days ago
kross
Expert Boarder
Expert Boarder
Posts: 121
Karma: 2
More
Topic Author
Always focus from one direction #54644
Hello,

I have recently written an INDI driver for a DIY focuser. One thing I've implemented is the ability to always approach focus from one direction, to eliminate backlash. But it seems to me this is the kind of thing that would be universally applicable to almost all focusers. So do you think it would make sense to implement this in the Ekos focus tab? Some extra options under "mechanics" perhaps?

The current anti-backlash implementation in most focus drivers is a fixed number of steps that get added when changing directions. This requires a lot of trial and error, or careful measurement. The approach I've implemented (which I believe is the same method used in Sequence Generator Pro) is to always approach focus from one direction. For example, if the focus needs to move in, then move in the desired number of steps. If it needs to move out, then move out the desired number of steps, plus some arbitrarily large number of steps, then move in to the desired position.

Does this sound like a good idea, and should it be in Ekos focus module?
The following user(s) said Thank You El Corazon

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

1 month 6 days ago
dallmon
Junior Boarder
Junior Boarder
Posts: 34
More
Always focus from one direction #54648
It sounds like a good idea to me. It eliminates backlash as a problem. I built a focus controller as well, and I incorporated backlash compensation, only to realize that the backlash may not be there in the real world, or may be different at different positions in the sky. The one direction approach makes all of that moot.

Dave Allmon

12" LX600
QHY9S-M
Mac Mini Indi server
Mac Pro client

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

1 month 6 days ago 1 month 6 days ago by El Corazon.
El Corazon
Platinum Boarder
Platinum Boarder
Posts: 764
Karma: 3
More
Always focus from one direction #54649
Kevin,

That is already implemented. That was exactly the rationale on which Hy designed the Linear focus algorithm in the focus module in Ekos. Just change to 'Linear' instead of 'Polynomial' and it will do exactly what you describe.

Look at the 3rd picture in my post here: indilib.org/forum/focusers-filter-wheels....html?start=36#53928

It shows the linear focuser in action. You can follow the incrementally numbered focus measurements as they first establish the U curve and then the focuser moves back again and starts to home in from one direction only onto the calculated minimum in half-size steps.

Jo

Atlas Pro AZ-EQ, ASI1600MM-Pro, ASI120MM-S, ES102ED, WO-Z61, Nikon D3300, ASI-EFW, ZWO LRGB,Ha,O3,S2 filter set

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

1 month 6 days ago
kross
Expert Boarder
Expert Boarder
Posts: 121
Karma: 2
More
Topic Author
Always focus from one direction #54654
Excellent! I'm glad I asked before implementing! :)

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

1 month 6 days ago 1 month 6 days ago by kross.
kross
Expert Boarder
Expert Boarder
Posts: 121
Karma: 2
More
Topic Author
Always focus from one direction #54655
Well actually....

I looked at that picture. 21 iterations to reach focus! Wow. Polynomial works pretty well for me, and usually in 7 or 8 iterations.

I suspect a universal anti-backlash mechanism would be useful, so that it isn't tied to one focus algorithm. Or more likely, it will need to be added to polynomial algorithm. (Are there more algorithms? I don't remember).

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

1 month 6 days ago
DerPit
Platinum Boarder
Platinum Boarder
Posts: 432
Karma: 1
More
Always focus from one direction #54664
IIRC I had placed a wishlist request for this feature some time ago. As in a general option for all focusers to always end moving inwards, ideally with a configurable overshoot amount. I think it would be a very useful thing to have!
So I would definitely welcome it if you go ahead and implement it :D

openSUSE Tumbleweed KStars git INDI git
GPDX+EQMOD, CEM60EC, ASI1600+EFW+EAF+ASI290 mini
The following user(s) said Thank You El Corazon

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

1 month 6 days ago
knro
Administrator
Administrator
Posts: 8078
Karma: 51
Always focus from one direction #54667
So you can implement this in your driver with Ekos needing to know about it. Once you detect a switch in direction, you perform the large move and then go back to that position again. As far as Ekos is concerned, it's just waiting for you to finish your move.

Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info

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

1 month 6 days ago
DerPit
Platinum Boarder
Platinum Boarder
Posts: 432
Karma: 1
More
Always focus from one direction #54669
But couldn't (shouldn't?) that capability go to the general INDI focuser class, so that any driver can benefit?

openSUSE Tumbleweed KStars git INDI git
GPDX+EQMOD, CEM60EC, ASI1600+EFW+EAF+ASI290 mini

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

1 month 6 days ago
El Corazon
Platinum Boarder
Platinum Boarder
Posts: 764
Karma: 3
More
Always focus from one direction #54671

DerPit wrote: IIRC I had placed a wishlist request for this feature some time ago. As in a general option for all focusers to always end moving inwards, ideally with a configurable overshoot amount. I think it would be a very useful thing to have!
So I would definitely welcome it if you go ahead and implement it :D


I also would love to have that configurable overshoot amount, both on the initial way out (how far from established focus the module moves the focuser before homing in again) and on the return after the U-curve has been established.

In theory, the polynomial algorithm should be faster, but that only applies to a system without backlash or with only minimal amounts. The moment there is any backlash, the linear approach is clearly superior in my hands.

Atlas Pro AZ-EQ, ASI1600MM-Pro, ASI120MM-S, ES102ED, WO-Z61, Nikon D3300, ASI-EFW, ZWO LRGB,Ha,O3,S2 filter set

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

1 month 6 days ago
El Corazon
Platinum Boarder
Platinum Boarder
Posts: 764
Karma: 3
More
Always focus from one direction #54672

kross wrote: Well actually....

I looked at that picture. 21 iterations to reach focus! Wow. Polynomial works pretty well for me, and usually in 7 or 8 iterations.

I suspect a universal anti-backlash mechanism would be useful, so that it isn't tied to one focus algorithm. Or more likely, it will need to be added to polynomial algorithm. (Are there more algorithms? I don't remember).


The approach to the minimum is very methodical and does take longer than the polynomial, but it is also very versatile, as it works GREAT with analog focusers and FCUSB. There, the movements of the focuser are highly load dependent, in contrast to steppers. Nonetheless, the linear focuser handles that with flying colors. But making it more configurable, as Peter suggests below, would definitely be especially useful for such analog systems, I agree.

Atlas Pro AZ-EQ, ASI1600MM-Pro, ASI120MM-S, ES102ED, WO-Z61, Nikon D3300, ASI-EFW, ZWO LRGB,Ha,O3,S2 filter set

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

1 month 6 days ago
kross
Expert Boarder
Expert Boarder
Posts: 121
Karma: 2
More
Topic Author
Always focus from one direction #54705

knro wrote: So you can implement this in your driver with Ekos needing to know about it. Once you detect a switch in direction, you perform the large move and then go back to that position again. As far as Ekos is concerned, it's just waiting for you to finish your move.


I've already done that. I was asking if putting this in Ekos as a universal solution was better. :)

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

1 month 6 days ago
kross
Expert Boarder
Expert Boarder
Posts: 121
Karma: 2
More
Topic Author
Always focus from one direction #54706

DerPit wrote: But couldn't (shouldn't?) that capability go to the general INDI focuser class, so that <em>any</em> driver can benefit?


Doing it there, rather than in the Ekos UI, is also an option. I hadn't considered that.

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

Time to create page: 0.732 seconds