×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

Re:HitecAstro DC Focus

  • Posts: 348
  • Thank you received: 69

HitecAstro DC Focus was created by Giles

I posted before under another topic about a patch I had written for the HitecAstroDC Focuser: indilib.org/forum/general/6167-for-those....html?start=60#51148

I've made some changes to that patch, haven't tested it as yet. But main changes are:

1. Reverted to SlewSpeed rather than ISlewSpeed and OSlewSpeed
2. Brought In OutFocusFactor property, which is a multiplier that should correspond to correct the speed if the imaging train is at 90 degrees.
3. Brought in a Telescope Altitude, which will adjust that factor so that if the Altitude is 0, then the In and Out Focus speeds should be the same.

Obviously the Telescope Altitude should probably be snooped from the HORIZONTAL_COORD on the telescope, but this is getting beyond my capabilities with C++.

Any comments welcome.

EDIT: Added 2 decimal accuracy display for OctFocusFactor, 1 decimal accuracy to TelescopeAltitude.
EDIT2 : Fixed my maths
The following user(s) said Thank You: Jasem Mutlaq
Last edit: 3 years 11 months ago by Giles.
3 years 11 months ago #51557
Attachments:

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

  • Posts: 348
  • Thank you received: 69

Replied by Giles on topic HitecAstro DC Focus

I've fixed the maths used to calculate the reduction in Focus motor speed according to Telescope Altitude (as set in the Focuser Control Panel) and the out focus factor.

So now, it will actually set the speed to (Focus Factor) * (In Focus Speed) if the Telescope Altitude is set to 90, and if Telescope is Horizontal then the Speed will be the same.

On trying to calibrate it before I almost dropped the focus tube with the imaging train to the floor (I've removed the old patch). So V2.2 of the patch should be the fixed version.
Last edit: 3 years 11 months ago by Giles.
3 years 11 months ago #51706

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

  • Posts: 348
  • Thank you received: 69

Replied by Giles on topic HitecAstro DC Focus

So the way I will attempt to calibrate this is:

1. Position Telescope with Imaging train at 90 degrees, with telescope pointing to Zenith
2. Set settings to: Telescope Altitude = 90, Focus Factor = 1
3. Focus out 1000 steps, measure the distance the tube moves
4. Focus out 1000 steps, measure the distance the tube moves
5. Repeat until Focuser is near limit
6. Focus in 1000 steps, measure the distance the tube moves
7. Repeat until Focuser is back at start point
8. Repeat from Step 3 until we have a good sample.
9. Take averages of the Focus out distances, and averages of Focus in distances.

It may make sense to Focus in say 100 steps after changing direction, it might eliminate some gear backlash in the focuser.

The focus factor you should set would be focus_in_average / focus_out_average.

As I've mentioned I'm not getting the Telescope Altitude from the Active Telescope driver, so if you're going to be imaging something that moves from say 30-34 degrees in altitude then just set an average for that to say 32, or update the altitude as you go along.
3 years 11 months ago #51707

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

  • Posts: 348
  • Thank you received: 69

Replied by Giles on topic HitecAstro DC Focus

So I have done a calibration, and the initial results look like this in a Spreadsheet, based on a Out Focus speed set at 75


On my next outing, I will try the new driver, using the OutFocusFactor setting of 0.862 and a speed of 75

If I have any success with autofocus, then will see if there is a way to get this patch accepted into the INDI source tree.
3 years 11 months ago #51710
Attachments:

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

  • Posts: 1029
  • Thank you received: 301

Replied by Eric on topic Re:HitecAstro DC Focus

There was something I wasn't sure I understood : this is the current behavior of the driver you want to change, right? I see "100 in" doesn't always end at the same position. So with your next calibration we should see a better stability. Have you looked at the CCD Simulator to check the snoop feature?

-Eric
3 years 11 months ago #51731

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

  • Posts: 348
  • Thank you received: 69

Replied by Giles on topic Re:HitecAstro DC Focus

Yes, so the HitecAstroDC focuser is just a DC motor, not a stepper motor. So depending on the weight of your imaging train the focuser goes out faster than it goes in.

I only took the samples of the 500 step changes, both in and out, and found that there was a 0.862 factor by which focusing in was slower than focusing out, so the driver patch applies a factor of 0.862 to the out focus speed, in the hope that it will equalise the distance more.

I have been looking at the Snoop stuff in ccd_simulator, but I am struggling to understand how it works.

I'm not a C/C++ coder, so all I'm doing is trying to transplant code from one to the other, and make modifications.

Currently when trying to compile I get the following:

In file included from /indi/indi/drivers/focuser/hitecastrodcfocuser.cpp:21:
/indi/indi/drivers/focuser/hitecastrodcfocuser.h:47:22: error: ‘virtual void HitecAstroDCFocuser::activeDevicesUpdated()’ marked ‘override’, but does not override
47 | virtual void activeDevicesUpdated() override;
| ^~~~~~~~~~~~~~~~~~~~
/indi/indi/drivers/focuser/hitecastrodcfocuser.cpp: In member function ‘virtual bool HitecAstroDCFocuser::initProperties()’:
/indi/indi/drivers/focuser/hitecastrodcfocuser.cpp:178:19: error: ‘ActiveDeviceT’ was not declared in this scope
178 | IDSnoopDevice(ActiveDeviceT[ACTIVE_TELESCOPE].text, "HORIZONTAL_COORD");
| ^~~~~~~~~~~~~
/indi/indi/drivers/focuser/hitecastrodcfocuser.cpp:178:33: error: ‘ACTIVE_TELESCOPE’ was not declared in this scope
178 | IDSnoopDevice(ActiveDeviceT[ACTIVE_TELESCOPE].text, "HORIZONTAL_COORD");
| ^~~~~~~~~~~~~~~~

So I'm wondering whether I need to add some #includes to the driver, or define something I have not yet defined in either the source or header file.

I'm not sure whether I'm understanding what these parts are for:

#ifdef USE_EQUATORIAL_PE
IDSnoopDevice(ActiveDeviceT[0].text, "EQUATORIAL_PE");
#else
IDSnoopDevice(ActiveDeviceT[ACTIVE_TELESCOPE].text, "EQUATORIAL_EOD_COORD");
#endif

In the CCDSim driver, so I went with just putting in the "else" bit, and changed EQUATORIAL_EOD_COORD to HORIZONTAL_COORD

Still, it looks like I'm not fully understanding how Snoop is supposed to work, and probably not understanding C++ all that well either.
3 years 11 months ago #51734

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

  • Posts: 348
  • Thank you received: 69

Replied by Giles on topic Re:HitecAstro DC Focus

I think I've made a little progress, put the following in the header file, taken from indiccd.h:

ITextVectorProperty ActiveDeviceTP;

// JJ ed 2019-12-10
IText ActiveDeviceT[5] {};
enum
{
ACTIVE_TELESCOPE,
ACTIVE_ROTATOR,
ACTIVE_FOCUSER,
ACTIVE_FILTER,
ACTIVE_SKYQUALITY
};
3 years 11 months ago #51738

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

  • Posts: 348
  • Thank you received: 69

Replied by Giles on topic Re:HitecAstro DC Focus

So I can compile if I remove the override option for "activeDevicesUpdated", in hitecastrodc.h, but if I leave it in, I still get the following:

In file included from /home/giles/Documents/indi/indi-new/drivers/focuser/hitecastrodcfocuser.cpp:21:
/home/giles/Documents/indi/indi-new/drivers/focuser/hitecastrodcfocuser.h:60:22: error: 'virtual void HitecAstroDCFocuser::activeDevicesUpdated()' marked 'override', but does not override
virtual void activeDevicesUpdated() override;

The code for activeDevicesUpdated in hitecastrodc.cpp looks like this:

void HitecAstroDCFocuser::activeDevicesUpdated()
{
IDSnoopDevice(ActiveDeviceT[ACTIVE_TELESCOPE].text, "HORIZONTAL_COORD");
}

I'm kind of stuck, if I leave the override out the the ALT value just remains at the default 45. I can change it manually, but it is not snooped.

Any ideas?
3 years 11 months ago #51744

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

  • Posts: 348
  • Thank you received: 69

Replied by Giles on topic Re:HitecAstro DC Focus

So I probably need some help with the driver.

I have forked the indi repo here:

github.com/gilesco/indi-hitecastrodc-focus-dev

Any help with the snooping side would be appreciated- this is mostly an attempt to transplant snooping from CCDSim, so fully accept there may be a lot in there that might be superfluous.
3 years 11 months ago #51817

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

  • Posts: 326
  • Thank you received: 49

Replied by Avocette on topic HitecAstro DC Focus

Sorry to reawaken this thread! I’ve just come across it now that I’ve started to try to get Autofocus to work with my set up. I have a HitecAstro DC focuser V2 driving a Sky-Watcher (non-stepper) motor with internal gearbox. After initial problems with coupling to the focus shaft on my SW ED80 refractor, I am confident that a short pulse of drive does adjust focus.
My normal focus routine used a Bahtinov mask and the Sky-Watcher battery box, but I recently invested in the HitecAstro unit. I had a couple of what seemed like initial successes running Autofocus with all settings in default values. I also had a number of failures. I then switched to Linear which I understand helps to account for the inherent backlash by approaching from one side of the optimum focus position. However I now often find that a warning message from the Indi focuser driver saying words to the effect that the motor did not move, although I have heard the sound of gear movement.
For the moment I am using the Ekos focus measurements to help optimise manually 15 ‘steps’ at a time. If I run the Autofocus the initial steps taken by the algorithm mostly leave the image well out of focus. The manual step approach works well enough and is certainly more convenient than using a Bahtinov mask.
I just wondered if I have missed some useful information from this forum relating to recent upgrades in the focuser module? I have read the KStars handbook, but clearly a lot of improvements have been introduced since it was written.
3 years 7 months ago #58178

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

Time to create page: 0.284 seconds