×
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.

Re:HitecAstro DC Focus

1 month 3 weeks ago 1 month 2 weeks ago by gilesco.
gilesco
Expert Boarder
Expert Boarder
Posts: 95
Karma: 1
More
Topic Author
Re:HitecAstro DC Focus #51557
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

__
I blog my progress: www.coochey.net
Attachments:
The following user(s) said Thank You knro

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

1 month 2 weeks ago 1 month 2 weeks ago by gilesco.
gilesco
Expert Boarder
Expert Boarder
Posts: 95
Karma: 1
More
Topic Author
Re:HitecAstro DC Focus #51706
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.

__
I blog my progress: www.coochey.net

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

1 month 2 weeks ago
gilesco
Expert Boarder
Expert Boarder
Posts: 95
Karma: 1
More
Topic Author
Re:HitecAstro DC Focus #51707
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.

__
I blog my progress: www.coochey.net

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

1 month 2 weeks ago
gilesco
Expert Boarder
Expert Boarder
Posts: 95
Karma: 1
More
Topic Author
Re:HitecAstro DC Focus #51710
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.

__
I blog my progress: www.coochey.net
Attachments:

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

1 month 2 weeks ago
TallFurryMan
Platinum Boarder
Platinum Boarder
Posts: 871
Karma: 13
More
Re:HitecAstro DC Focus #51731
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

HEQ5-Pro - Atik 314E - Orion ED80T - DMK21 on Orion 50mm
DIY 3D-printed Moonlite and FWheel RGB/LPR
KStars and indiserver on two Atom 1.6GHz 1GB RAM Linux, VPN remote access

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

1 month 2 weeks ago
gilesco
Expert Boarder
Expert Boarder
Posts: 95
Karma: 1
More
Topic Author
Re:HitecAstro DC Focus #51734
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.

__
I blog my progress: www.coochey.net

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

1 month 2 weeks ago
gilesco
Expert Boarder
Expert Boarder
Posts: 95
Karma: 1
More
Topic Author
Re:HitecAstro DC Focus #51738
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
};

__
I blog my progress: www.coochey.net

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

1 month 2 weeks ago
gilesco
Expert Boarder
Expert Boarder
Posts: 95
Karma: 1
More
Topic Author
Re:HitecAstro DC Focus #51744
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?

__
I blog my progress: www.coochey.net

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

1 month 2 weeks ago
gilesco
Expert Boarder
Expert Boarder
Posts: 95
Karma: 1
More
Topic Author
Re:HitecAstro DC Focus #51817
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.

__
I blog my progress: www.coochey.net

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

Time to create page: 0.376 seconds