×

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

Bi-monthly release with minor bug fixes and improvements

Connecting modified EQMOD to PHD2

  • Posts: 48
  • Thank you received: 0
Hi

Thank you for this group. It has been really informative towards my DIY star tracking project.

I have been working on implementing an EQMOD compliant controller for EQ5 mount. It is similar to AstroEQ, but I rather have everything wireless, so that communication is done over WiFi with the controller being an FPGA controlling two DRV8825s. It seems to be working well at the moment kstars. I added some extra info at the end of the message if that helps answer some part of the questions I am about to ask.

Connecting to PHD2:
as I mentioned, it works well with kstars. In PHD2, when i go into the settings page of EQMOUNT on localhost/PC (Guide>Connect Equipment>Mount Setup>INDI>Main Control>Connect), I am able to connect to the device and also control it. However, when I press connect from the main connect page (Guide>Connect Mount>Connect to Mount), it does not connect to anything but shows a connecting to mount scrolling bar. I was wondering if someone can give me a hit as to why it is failing in PHD2 but works fine on kstar. EQMOUNT gets the IP of the FPGA from the environment variable, so the settings on the Device Port should be inconsequential. So I am not sure what to put on Guide>Connect Equipment>Mount Setup>Device Port (I have it set on /dev/NULL - obviously that is not helpful). Any suggestion would be helpful in this regard


Implementation:
The source fort he FPGA DRV8825 controller as well as the software drivers on the onboard ARM core is located in:
github.com/rsarwar87/koheron-sdk/tree/ma...ars_zx3/star-tracker

The client library for communicating with the device is in the /libclient directory. this has all the functional commands and some extra. This is linked to EQMOD, which then substitutes the relevant SkywatcherCommand. For this i forked the eqmod project and added codes to it to enable making the calls. you can grep for _KOHERON or koheron_interface to find the relevant snippets. no changes in the workflow/algorithm of eqmod were made.
github.com/rsarwar87/indi-3rdparty/blob/...eqmod/skywatcher.cpp

Best Regards
Rashed
3 years 9 months ago #55227

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

Hello Rashed and welcome to INDI forum! What's the driver interface? You can find in under Options in INDI Control Panel.
3 years 9 months ago #55263

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

  • Posts: 48
  • Thank you received: 0
Hi

Thanks. I have the Device port set to the IP address of the board, although I am not sure what/where/how this IP is used within the code. It is the same settings I have on kstar. Please seee the attached screenshots

Thank you for your help
Last edit: 3 years 9 months ago by Rashed.
3 years 9 months ago #55279
Attachments:

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

So actually everything looks fine to me. Maybe post this to PHD2 group to see what the issue is at their end?
3 years 9 months ago #55280

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

  • Posts: 210
  • Thank you received: 104
Hi,

In the PHD2 screenshot the device port is set to a wrong value "/deb/ttyUSB0"
It must be /dev instead if connecting by USB, or let it blank if you want to connect by the IP/port you set in the previous screenshot.

A question for Jasem, I added this port option in PHD2 about 6 years ago because at this time the device port was not saved and reloaded from the driver options. Now it look like this value is automatically restored when the driver start, at least for eqmod. Is this the case for all the telescope drivers? In this case I can remove this confusing option.

Patrick
The following user(s) said Thank You: Rashed
3 years 9 months ago #55303

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

Patrick, yes please remove it the driver handles it internally.
The following user(s) said Thank You: Rashed
3 years 9 months ago #55305

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

  • Posts: 48
  • Thank you received: 0
Hi both

Thank you, that seemed to have solved the problem. much appreciated. I can see on my device that the eqmod is polling regularly for status updates, however, when I press the Noth/South/East/West buttons on Tools>Manual Guide, nothing happens, looking at syslog (the drivers i created logs to syslog), Same when I auto select a star and start guiding, i.e. i can see RA/DEC going up and down, but nothing on syslog or on the device.

I do not think any calls to eqmod drivers were made. EQMOD is selected as the mount, so I was expecting the calls to be routed through eqmod. Or at least that is what happens on kstars.

It is probably my limited understanding of phd2 that is getting in the way, as I never had the equipment before to try out phd2.

May I ask about the Server address in the second screenshot I posted. both the phd2 and the indi server are running on the same PC, and nothing INDI related is installed on 192.168.1.122, just the drivers for the device. Is there a way to retrieve this address/port (as a string or likewise) from eqmodbase class so that I may use it to initialize the drivers I added?

Best Regards
Rashed
3 years 9 months ago #55307
Attachments:

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

  • Posts: 210
  • Thank you received: 104
PHD2 use the properties TELESCOPE_TIMED_GUIDE_NS and TELESCOPE_TIMED_GUIDE_WE for the guide command.
You can try them directly without PHD2 in the INDI "Motion Control" tab, the label is "Guide N/S" and Guide E/W".

Activate the INDI driver debug log, this must show message like this with the PHD2 manual guide:
13:38:53.305: [DEBUG] Timed guide South 750 ms at rate 7.52053
13:38:53.305: [DEBUG] StartDETracking() : trackspeed = -7.52053 arcsecs/s, computed rate = -0.5
13:38:53.305: [DEBUG] SetDERate() : rate = -0.5
13:38:54.056: [DEBUG] StartDETracking() : trackspeed = 0 arcsecs/s, computed rate = 0
13:38:54.566: [DEBUG] End Timed guide North/South

In your case StartDETracking() is in your modified skywatcher.cpp
3 years 9 months ago #55311

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

  • Posts: 48
  • Thank you received: 0
Thank you Patrick

your post made me gave me the hint which guided me to find this in the log: "Can not guide if not tracking". It seems EQMOD::SetTrackEnabled() was never called. Not sure i came across a setting in PHD2 to turn it on. But i did see one on ktar.

tail -f ~/.indi/logs/2020-06-10/indi_eqmod_telescope/indi_eqmod_telescope_14:17:19.log
SCOPE 46.980914 sec : Current encoders RA=0 DE=0
WARNING 47.239023 sec : Can not guide if not tracking.
WARNING 47.375210 sec : Can not guide if not tracking.
WARNING 47.598684 sec : Can not guide if not tracking.
SCOPE 47.987388 sec : Compute local time: lst=7.59508261 ( 7:35:42.30) - julian date=2459011.09592394



I will investigate.

Best Regards
Rashed
3 years 9 months ago #55314

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

  • Posts: 210
  • Thank you received: 104
No, PHD2 never set tracking because this is not it's job.
Set tracking on is part of the target centering operation, which include slewing to coordinates and ensuring the mount stay there. This is a requirement before to start guiding.
The following user(s) said Thank You: Rashed
3 years 9 months ago #55315

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

  • Posts: 48
  • Thank you received: 0
Thank you for the explanation. It makes sense now that you put it like that.

Thanks
3 years 9 months ago #55317

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

Time to create page: 0.245 seconds