Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

write focuser position to eeprom #115

Open
5 tasks
frnhr opened this issue Aug 22, 2020 · 0 comments
Open
5 tasks

write focuser position to eeprom #115

frnhr opened this issue Aug 22, 2020 · 0 comments

Comments

@frnhr
Copy link
Member

frnhr commented Aug 22, 2020

Problem:

Each time when focuser looses power (i.e. when powered on) we need to re-home it. This feels like an unnecessary step and is easily forgotten.

Possibility 1: Use relative values

Just use "0" as start value and go to + or -.

This would work fine except that MaxIm DL sometimes freaks out on negative values of focuser position. E.g. cannot perform auto-focus.

Also, working with absolute values it more intuitive for the user.

Possibility 2: Save absolute values

Arduino has EEPROM memory, a natural place for storing this value.

There is a guarantee of 100k write cycles. If we write only end position of moves, this gives us a few decades of use:

100000 / 10 refocus_per_night / 20 nights_per_month / 12
 months_per_year =~ 41 year

Implementation:

  • Store position in EEPROM when done moving
  • Do not store position while moving (this would reduce EEPROM life to single-digit number of years)
  • Store a sentinel ("magic") value when movement starts
  • When get command to move, and EEPROM contains the sentinel value, automatically re-home
  • Add "rehome" command to CLI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant