Welcome, Guest. Please login or register.

Username: Password:

Author Topic: Defining which motor is for RA/Dec  (Read 1839 times)

OscarCK

  • Newbie
  • *
  • Posts: 4
    • View Profile
Defining which motor is for RA/Dec
« on: March 11, 2018, 09:13:55 »

Hi,
Made a noob move and marked incorrectly which motor output is which on the PCB I milled and prepared, not really a big deal since the motor connectors are marked on the outside of the box I have made but OCD kicks in and since I know I have marked it wrong it is wrong. So the question, is it possible to change which motor is for RA and which for Dec, I know it should be possible in the "firmware" but what happens when I use the Configuration Utility, will there be any issues?

Thanks
Oscar
Logged

TCWORLD

  • Administrator
  • *****
  • Posts: 809
    • View Profile
    • AstroEQ
Re: Defining which motor is for RA/Dec
« Reply #1 on: March 11, 2018, 10:05:37 »

You could try editing AstroEQ.h to change the #defines for RA and DC. If you set RA to 1 and DC to 0, it should theoretically swap which axis is which.
The config utility uses the same interface as EQMOD so the axis would remain correct (RA settings for RA motor, driven through DEC port).

However there may be unintended consequences of making that change. Without trying it, I can't be sure.

Alternatively, you could try changing Line 72 of Synta.c from:
Code: [Select]
_axis = commandString[1] - 49; //second byte is axis
To:
Code: [Select]
_axis = '2' - commandString[1]; //second byte is axis
As that should have the desired effect, with probably lower likelihood of side-effects.
Logged
Tom Carpenter (AstroEQ)

OscarCK

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Defining which motor is for RA/Dec
« Reply #2 on: March 11, 2018, 11:20:03 »

Hi,
Tried the Synta.c change first, did the configuration, but the motors didn't seem to work after that. Did the AstroEQ.h change the motors worked but when I pressed to rotate them from EQMod it hanged and stopped responding, went back to the normal firmware and worked fine. Btw I'm using the A4988 drivers.

Probably just labeling both side will have to do.

Thanks for the help.
Oscar
« Last Edit: March 11, 2018, 11:47:26 by OscarCK »
Logged

TCWORLD

  • Administrator
  • *****
  • Posts: 809
    • View Profile
    • AstroEQ
Re: Defining which motor is for RA/Dec
« Reply #3 on: March 11, 2018, 17:01:13 »

Ah, thinking about it further, I know why it breaks. Some of the config routines use the axis id to select between different functions, so loading the config probably breaks as a result of the change.
Logged
Tom Carpenter (AstroEQ)