I have gotten back to this and have good comms back and forth, but I have having some issues with the units. Can you help me understand what the protocol is expecting, unit wise, for the following commands:

Inquire Timer Interrupt Freq: I think this is supposed to be how many encoder steps occur during each pulse of the motor
Inquire Counts Per Revolution: I think this is how many encoder pulses are expected for the mount to cycle through 360 degrees

The motor driver keeps trying to set the period to 0 when I try to slew. Here is the log output:
[2020-06-15T04:46:26.355 EDT INFO ][ org.kde.kstars.indi] - EQMod Mount : "[INFO] Starting North slew. "
[2020-06-15T04:46:26.360 EDT DEBG ][ org.kde.kstars.indi] - EQMod Mount : "[DEBUG] SlewDE() : rate = 4 "
[2020-06-15T04:46:26.361 EDT DEBG ][ org.kde.kstars.indi] - EQMod Mount : "[DEBUG] Slewing DE at 4.00 4.00 0 0.149590 "
[2020-06-15T04:46:26.361 EDT DEBG ][ org.kde.kstars.indi] - EQMod Mount : "[MOUNT] SetMotion() : Axis = 2 -- dir=forward mode=slew speedmode=lowspeed "
[2020-06-15T04:46:26.361 EDT DEBG ][ org.kde.kstars.indi] - EQMod Mount : "[SCOPE] CheckMotorStatus() : Axis = 2 "
[2020-06-15T04:46:26.361 EDT DEBG ][ org.kde.kstars.indi] - EQMod Mount : "[COMM] dispatch_command: \":f2\", 0 bytes written "
[2020-06-15T04:46:26.366 EDT DEBG ][ org.kde.kstars.indi] - Telescope Simulator : "[SCOPE] Current RA: 13:38:50 Current DEC: 90:00:00 "
[2020-06-15T04:46:26.414 EDT DEBG ][ org.kde.kstars.indi] - EQMod Mount : "[COMM] read_eqmod: \"=103\", 5 bytes read "
[2020-06-15T04:46:26.419 EDT DEBG ][ org.kde.kstars.indi] - EQMod Mount : "[MOUNT] SetSpeed() : Axis = 2 -- period=0 "
[2020-06-15T04:46:26.419 EDT DEBG ][ org.kde.kstars.indi] - EQMod Mount : "[COMM] dispatch_command: \":f2\", 0 bytes written "
[2020-06-15T04:46:26.473 EDT DEBG ][ org.kde.kstars.indi] - EQMod Mount : "[COMM] read_eqmod: \"=103\", 5 bytes read "
[2020-06-15T04:46:26.479 EDT DEBG ][ org.kde.kstars.indi] - EQMod Mount : "[COMM] dispatch_command: \":I2000000\", 0 bytes written "
[2020-06-15T04:46:26.491 EDT DEBG ][ org.kde.kstars.indi] - EQMod Mount : "[COMM] read_eqmod: \"=\", 2 bytes read "
[2020-06-15T04:46:26.496 EDT DEBG ][ org.kde.kstars.indi] - EQMod Mount : "[MOUNT] StartMotor() : Axis = 2 "

All I can think is that I am not understanding the line:

period = static_cast<uint32_t>(((SKYWATCHER_STELLAR_DAY * RAStepsWorm) / static_cast<double>(RASteps360)) / absrate);

As the variable period is declared as a u32, I assume that the only way I would get a zero is if, RAStepsWorm is zero (but I think I have checked that and it is not, it is set to 25 I think), or period is less than 1 where the computer would truncate the value to 0. My RASteps360 (If I am interp correctly) is set tp 3_600_000. That is because there is 10000 pulses per motor revolution and then a 360:1 gearing ratio (120 on a worm drive and then 3:1 on a belt drive). I am assuming that rate in this case is the desired speed in the units of Siderial rate right?

Any help would be super great.

I am sure I will have similar questions for the position, but I think they are just encoder positions. So, maybe I have that already.

Read More...

"IRC it's really more complex than it needs to be."

Yes.....

Read More...

Thanks for the feedback. I might try to do the full custom driver eventually. Right now, I really want to get to "first light" on the mount as fast as I can. So, with that goal the skywatcher_bridge has been born. It is a program which will run and accept a network connection and then translate the skywatcher commands into my native commands and then farm them out to the SPI bus to communicate with the MCU. (This is seriously fun stuff!). I have already shelled out the program and have the INDI EQMod Driver talking to the bridge application. I also already have the SPI backend coded as that was part of a intermediate diagnostic app I wrote to debug the SPI comms. (They are async which might be nice when I get to a full custom driver). I will report back in this thread with my progress.

Seems like a lot of effort for a Canon 7D MK II with a 50mm lens. (maybe I will have enough money one day to own a full scope)

Read More...

So I have been kicking around a project to make a custom German Equilateral Mount for my camera. I was kind of using the iOptron designs as a reference. So far, I have two stepper motors, with encoder feedback, connected to a custom circuit board with a STM32F411 driving two Pololu stepper controllers. I have a basic command and control via SPI with an RPi 4. Here is an image of my current setup:



Right now I am a bit confused as to the full approach. Ideally I would like to have KStars drive this and be my interface to my camera and my custom mount. Based on my reading, this is what I think the setup should be:

Rpi hosts an INDI server which is configured for the Canon DSLR (I have an unmoved 7D MKII) driver and then either a custom driver for my custom board or to use the EQMod driver and write an intermediate interface to simulate the right interface between my custom hardware and then EQMod driver.
I can then use my laptop, possibly remotely across wifi, to run KStars and connect to the RPi's INDI server?

When I was looking at the different drivers, I fell onto the EQMod driver because it looked very feature complete. (position calibration solver builtin which sounded great). But maybe that is very outdated and a bad choice?

As I am early in the project, I have a lot of flexibility right now. Any help on how I can interconnect all of these elements would be great. Thanks for any feedback.

Read More...