×

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

Bi-monthly release with minor bug fixes and improvements

Backlash for Moonlite?

  • Posts: 185
  • Thank you received: 28
My thinking is to always focus inward. Even when going to a higher number of ticks, the number of ticks goes up by the backlash, the focuser moves out extra+ y (y is the desired movement outward) ticks, the number of ticks goes down by the backlash and the focuser moves in the extra ticks to leave the focuser at +y with backlash compensated.

In my normal usage, I go to a preset which requires inward focus to get to the minimum. After the minimum is reached, which is defined by drawing in past the minimum, the focuser commands an outward movement. Using your logic, I compensate for the backlash and go out the number of ticks. An unfortunate side effect is the focuser could slip on out the outward backlash. Using my logic, we command the focuser to move as described above and return to the target position.

To move the focuser inwards, the backlash was compensated on the outward movement. Think of this as being equivalent to biasing the RA axis east heavy.
The following user(s) said Thank You: Eric
Last edit: 5 years 8 months ago by Richard Beck.
5 years 8 months ago #28549

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

  • Posts: 1029
  • Thank you received: 301

Replied by Eric on topic Re:Backlash for Moonlite?

That's clear. Do you manage movement requests smaller than the backlash value?

-Eric
5 years 8 months ago #28550

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

  • Posts: 185
  • Thank you received: 28
Any movement outward, no matter how small, should be compensated with this logic.

For example, I'm using 24 for the backlash plus extra value. A command to move outward 4 ticks would result in unwinding the true backlash and moving outwards by an amount of 28 ticks (24 + 4). After that, the default command outside the if() block would move the focuser inward 24 ticks (unwinding the true backlash and moving the extra included in the 24), leaving the focuser at a true 4 ticks outward.

I am concerned the if() never evaluates as true. I need to see what I can do to confirm it does and the focuser responds as intended. I was thinking increasing the delay to 1000ms might give me a simple chance to see the move past and then the move back in INDI. The alternative would be to include a print that "outward test is true, moving out plus backlash". Your thoughts?
5 years 8 months ago #28556

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

  • Posts: 185
  • Thank you received: 28
I now have code that implements the backlash compensation, but I don't get progress information until the scope moves forward.

Here is the code:
        if(TargetPosition > CurrentPosition) 
        {
          Backlash = BACKLASH_FPTN;
          TempPosition = TargetPosition + Backlash;
          stepper.moveTo(TempPosition);      
          while (stepper.targetPosition() != stepper.currentPosition()) stepper.run();
        }
        stepper.moveTo(TargetPosition);

Any suggestions on how to get the position to update while going outward? There will be no feedback moving from all the way in to a defined preset.

Thanks.
5 years 8 months ago #28620

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

  • Posts: 185
  • Thank you received: 28
I finally got this sorted and have reasonable focus results. There may still be a bit of seeing issues, but, in general, the v-curve looks better than before backlash compensation.

I forked TallFurryMan's firmware and removed the dustcap control as well as implementing backlash compensation. The firmware can be found at github.com/beckrd/Moonlite_Focuser .
The following user(s) said Thank You: Eric
5 years 7 months ago #28972

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

  • Posts: 1029
  • Thank you received: 301

Replied by Eric on topic Re:Backlash for Moonlite?

That's great! Do you have a screenshot of the v-curve resulting from the Focuser module activity?

-Eric
5 years 7 months ago #28981

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

  • Posts: 185
  • Thank you received: 28
I don't have a screenshot, but I have re-created the v-curves from the logs.



File Attachment:

File Name: HFR_values.txt
File Size:4 KB


After reviewing all the filters, I may not have enough backlash compensation yet. Thoughts?
Last edit: 5 years 7 months ago by Richard Beck.
5 years 7 months ago #29012
Attachments:

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

  • Posts: 1029
  • Thank you received: 301

Replied by Eric on topic Re:Backlash for Moonlite?

This graph is a cool source of information! Assuming the order in which you focused with filters is L, R, G then B, it seems the position reported to Ekos is wrong as moves become smaller. The problem seems located for moves lesser than 10. I know that my original attempt at managing backlash is wrong when the movement request is smaller than the backlash amount, and I measured a backlash of ~10 ticks on the 28BYJ-48. It might be a similar problem?

-Eric
5 years 7 months ago #29027

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

  • Posts: 185
  • Thank you received: 28
I'm still biased that the backlash isn't fully compensated. My goal of having enough engagement for the focuser to not slip outwards seems to have been met. I ran the R, G & B frames through PixInsight's SubframeSelector script and had the most consistent results I've had since the focuser was installed.

For the next night out, I think I'll change the backlash to 100 to improve the meshing of the gears both directions. If the issue on HFR vs focus position the other night is because backlash is non-symmetric, I can't think of how to correct it.
5 years 7 months ago #29040

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

  • Posts: 1029
  • Thank you received: 301

Replied by Eric on topic Re:Backlash for Moonlite?

This is a good idea, now that you actually removed the backlash value from your equation. As you say, that will work only if the backlash is identical if both directions, but there's no physical reason it should be different.

I think the auto-focus procedure goes far for the L filter because it is the first filter, and only refines with smaller values for other filters, expecting the focus point to be close. It might be a problem, it seems you have a very low number of iterations when focusing subsequent filters. To me the number of samples that we see on the curve for G and B can't be used effectively to provide a minimum, and is certainly used jointly with the previous results. That is probably not what you want.

Perhaps you could use the filter offset panel to force a large outward offset before starting the procedure and see how it behaves? One thing you could try is change the order of filters to check if the weird curve slopes follow the filter type or the filter order.

In all cases it's good that you could achieve your primary objective indeed, congratulations :)

-Eric
5 years 7 months ago #29080

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

  • Posts: 1029
  • Thank you received: 301

Replied by Eric on topic Backlash for Moonlite?

Hello Richard,

Beginning of this week, I implemented your solution in my own firmware (I pushed the change to github if you are interested).
I tested it yesterday night, and it works pretty well, certainly better than the method I was using before with a backlash in two directions.
Unfortunately, I still suffer from relatively bad seeing in my backyard, causing HFR calculations to vary widely so it's difficult to conclude.
While testing, I got more consistent results by switching the star detection method from "SEP" to "Centroid".
It may be less precise, but HFR values suffer less variation from seeing, and this accelerates the focus procedure with no apparent loss of focus quality.
Before that, I was using full-field HFR calculation to prevent the algorithm from selecting a hot pixel, a stellar core or even a double star (aargh!) while I'm sleeping. But full-field HFR calculation is deadly slow on my system. I'll check how this behaves.

Thanks for sharing this idea!
-Eric
5 years 6 months ago #29838

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

  • Posts: 185
  • Thank you received: 28

Replied by Richard Beck on topic Backlash for Moonlite?

Eric,

First off, thanks for sharing the code and leading me to understanding state machines through our direct messages. This exercise has been valuable to me for more than just the focus controller.

To ensure I eliminated backlash, I increased the backlash value to 96(!). However, I still saw similar results which may be seeing related, although I use 5 second exposures to minimize seeing effects.

I have been using full-field HFR and it works at a reasonable speed on the laptop I have been using. I suppose I may need modify that if I start using a Raspberry Pi at the scope.

Richard
The following user(s) said Thank You: Eric
5 years 6 months ago #29841

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

Time to create page: 0.650 seconds