×

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

Bi-monthly release with minor bug fixes and improvements

Enhanced Celestron SCT Focuser control

  • Posts: 91
  • Thank you received: 5
I am using SM for some time now and enjoy it greatly ! so many thanks to all, who contributed so much !
From time to time I use my Scope just for visual observation, which is great fun, too; especially when you are with friends and/or family and show them how the nightsky looks through a telesope.
It is in these situations that I would appreciate to have more options for manual focus control. The current driver for the Celestron SCT focuser is geared toward astrophotography and using autofocus. When you want to use it for visual observation it becomes quite inconvenient and cumbersome, as you can only switch between focus in / focus out in fast mode. When you are close to focus you have to hit abort quite fast to get the focus right or revert to tiny focus steps.
Here is a link to a manual focus controller, which seems to be quite convenient:
www.cloudynights.com/topic/645522-celest...t-and-edgehd/page-37
With this controller you can use the thumbstick to move the focuser in either direction. The amount of deflection controls how fast the focuser moves. Quite intuitive and convenient. Judging from the amount of posts in this thread and other information contained therein, there seems to be quite some interest for this controller.
Now, I guess it can´t be too hard to implement this in the current Celestron SCT Focuser driver. I tried myself, but unfortunately my coding skills are too basic and limited to get it right.
Here is what I found out, though:
Based on information from here:
www.paquettefamily.ca/nexstar/NexStar_AUX_Commands_10.pdf
It appears that enhancing the code of the driver seems to be quite straight forward. As of now, only the MC_GOTO_FAST command is employed to control the focuser move (line 372 in celestron.cpp).
According to the command listing from above there is also a MC_GOTO_SLOW command available, so a "switch" would need to be implemented in the code to toggle between MC_GOTO_FAST and MC_GOTO_SLOW.
Alternatively, there are the commands "MC_MOVE_POS" and "MC_MOVE_NEG", which are to be complemented by an integer number of 0 (stop) or between 5 (slowest) and 9 (fastest) for setting the speed*. One would need to implement two buttons and a speed slider (or even better a joystick axis) to have the focuser move in a slow or fast way and stop, when no button is pressed or the joystick is in neutral position. The latter way (especially with the joystick) seems to be the most elegant to me.
Once this is implemented and working, one could probably give options in the Joystick tab for assigning buttons to the presets. This would be absolutely perfect, then. So one could switch between focus of different setups or looking through the scope with or without glasses.
Can anyone please help out here ? I am willing to test code anytime.
Many thanks and kind regards
Dirk
*information derived from the first link; 1-4 seem to be unused
1 month 2 weeks ago #99648

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

  • Posts: 2
  • Thank you received: 0
I've been thinking of implementing *exactly* this idea. There are some quirks in the focuser interface that would need to be addressed (e.g. it's sort of an either/or time-based or absolute/relative and this would have to be both). I'll write up an issue for Github and probably work on it over the next few weeks. I don't have much time to tinker (just an hour or so a week) so it'll be a bit.
1 month 2 weeks ago #99708

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

  • Posts: 91
  • Thank you received: 5
That sounds great ! Please let me know if I can help / assist in any way.
The easiest/fastest adaptation (although staying short of having analog control via joystick thumbstick) would probably being the following:
re-enable "has_variable_speed" capability. This makes the speed slider reappear in the control panel. Option is for two speeds "slow" and "fast" (1 and 2). In the code of the celestron.cpp where the absolute_move is being executed ("start_move" line 361 ff) the return statement could be made dependent of the speed setting via an "if" statement: if focuser speed is fast, than MC_GOTO_FAST is executed, if focuser speed is slow, than MC_GOTO_SLOW is executed. Potentially this would also result in less of a mirror shift, as the movement is carried out more gentle.
I still have not found out, where / in which file the Joystick options for the focuser are being defined. Adding more control options (e.g. assign presets to buttons) should be a straight forward exercise. Any idea, where to find this ?
Last edit: 1 month 2 weeks ago by Dirk Tetzlaff. Reason: typo
1 month 2 weeks ago #99709

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

  • Posts: 91
  • Thank you received: 5
Don´t know whether this makes sense or not, but I will share my thoughts anyhow:
thought of a possible software solution to eventually control the focuser with the thumbstick on the joystick controller. Apparently the MC_MOVE_POS [x] and MC_MOVE_NEG [x] will make the focuser move in positive or negative direction with speed [x] until a) either a "0" is received via a new "MC_MOVE_XXX [x]" command or a soft limit (set via calibration) is hit. The backlash function also seems to be implemented in the firmware of the driver, so we don´t have to care about this.
So can´t we just declare two new variables in our driver, let´s say "move_focuser_neg" and "move_focuser_pos". Based on the value of these variables either a "MC_MOVE_POS" or "MC_MOVE_NEG" is being sent through the serial comm. That way we don´t need to touch the basic design of the driver with the either time based or abs/rel moves, but just add our code to the existing one. To control the focser by control panel you have to add two new buttons for Focus_in and Focus_out. These would be in addition to the existing ones, which toggle direction for the abs/rel moves. When you hit one of the buttons the "MC_MOVE_XXX ]x]" command would be sent with the speed value [x] based on the slider setting from the "has_variable_speed" capability. The speed range in this case would need to be defined from value 5 (slow) to 9 (fast). If you release the button the "MC_MOVE_XXX [x]" command would be sent with [0] as speed value to stop movement. Same could be done with the joystick. Depending on the axis reading you load the "move_focuser_neg"/"move_focuser_pos" variable and execute the move. As soon as you release the joystick a "MC_MOVE_XXX [0]" command would be sent to stop movement. To not accidentely move the focuser by unintended touches when you grab the joystick, one could potentially assign a button to block focuser movement by the joystick. The button could toggle joystick command on and off. On my joystick, this would leave three of the four buttons next to the thumbstick for storing/retrieving presets. A long button press could store the current position, a short press sends stored position to the existing absolute movement routine. The current positon is being read via the "MC_GET_POS" command.
Does this makes sense ?
1 month 2 weeks ago #99726

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

  • Posts: 91
  • Thank you received: 5
I just added the code from Mark Lord, who did the design of the standalone handcontroller via the aux port of the focuser. I took it from the source disclosed earlier in this thread. Guess this could help for getting our project up to speed. The code is intended for an arduino pro mini or micro. The serial comm part we don´t need because we would use what´s already defined in the existing indi driver for handling serial communication. The nunchuck part we don´t need because we use the inid_joystick driver. The rest could probably be helpful.
1 month 2 weeks ago #99727
Attachments:

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

Time to create page: 0.702 seconds