Menu

NINA automatic rotation error

2024-05-16
2024-06-10
  • Carlos Izquierdo Vázquez

    Good morning.
    Yesterday I was finally able to test the myrotator project. My configuration is the following:
    - 28JYB motor modified to bipolar
    - Driver DRV8825
    Modified firmware only for the pins.
    I have done several tests in my living room, trying to spin it and it works perfectly.
    The problem arose when I used NINA's framing assistant. It has been unable to reach the desired turn, making erratic tests.
    I have also been unable to see the relationship between mechanical position (it matches the data from the myrotator app) and the position of the sky.
    I attach some photos of what happened.
    Thanks again

     
  • brownrb

    brownrb - 2024-05-16

    Hi

    As far as I know, the ASCOM driver I supplied is compliant with the Rotator Interface v2 of ASCOM. Interface v2 does not support the "mechanical" / "position of sky"

    I have just checked the ascom driver source which returns interfave version 2 for the method
    InterfaceVersion

            public short InterfaceVersion
            {
                // set by the driver wizard
                get
                {
                    tl.LogMessage("driver.InterfaceVersion", "2");
                    return Convert.ToInt16("2");
                }
            }
    

    There is NO corresponding method in Interface 2 for mechanical position. Interface 3 compiliant drivers do have Rotator.MoveMechanical Method , but v2 does NOT.

    There is NO corresponding method in Interface 2 for mechanical position. Interface 3 compiliant drivers do have Rotator.MoveMechanical Method , but v2 does NOT.

    Sync is also not availble in Interface v2. It is only supported in v3 drivers.

    Alright, so the ASCOM driver interface is v2 and the driver version is 2404
    The driver is ASCOM compliant using the recent conform univsersal. I attach the report.

    I have also been unable to see the relationship between mechanical position (it matches the data from the myrotator app) and the position of the sky.

    Correct because in v2 interface mechanical position does not exist.

    Here is what I think is happening. NINA may be incorrect in thinking that the interface is v3, or ignoring it as v3. NINA should not be sending any requests for mechanical position as that does not exist for Interface v2 drivers.

    *Only the log file from NINA would shed more light on this issue. *

    You did not mention what firmware version you are using in the rotator. It should be
    myRotator-Firmware-2024-06

    Regards
    Robert

     
  • Carlos Izquierdo Vázquez

    Hello! Thanks for responding so quickly Robert!
    I am using the latest version of firmware (downloaded it 2 weeks ago).
    Since it works very well with the application, could the problem be with the driver? (I don't understand what you told me in your answer)
    I send you NINA's log. The screenshot I sent you corresponds to 11 p.m.
    All the best

    PD.
    I just reinstalled the driver and it seems that "sky position" no longer appears, only mechanical position.
    Let's see how it goes tonight!!

     

    Last edit: Carlos Izquierdo Vázquez 2024-05-16
  • Carlos Izquierdo Vázquez

    Hello, Robert
    Yesterday my rotator worked great. For it to work, the "sky position" part does not have to appear in NINA.
    What I found surprising is that before going to sleep the rotator was correctly in NINA and when I woke up, it had changed!
    I attach some screenshots of what I found and right after, when I disconnected and connected again.
    I tell you all this in case it helps improve this great project.
    Thank you

     
  • brownrb

    brownrb - 2024-05-17

    Hi Carlos
    I have had a quick look at theNINA log.
    Can see where the rotator is started by NINA
    2024-05-15T21:09:19.2543|INFO|RotatorVM.cs|Connect|386|Successfully connected Rotator. Id: ASCOM.myRotator.Rotator Name: myRotatorASCOM DisplayName: myRotatorASCOM Driver Version: 2404

    However, NINA does appear to query for the Interface version number, Maye that is missing due to the logging level in NINA.

    I See a lot of other calls to the Rotator -
    like this

    2024-05-15T22:01:57.4659|INFO|RotatorVM.cs|Sync|109|Syncing Rotator to Sky Angle 321.52048°
    

    which seems to be that the Interface version of the ASCOM driver is ignored or not used in NINA.

    Interface version 2 of the ASCOM Rotator standard has no Sync command. Interface version 3 (current version) does have sync and mechanical position.

    I do not know enough of NINA to say what is going on in NINA and if they are calling it a sync but doing some other code in its place, but I do not think that is the case.

    I think it is a Sync which the ASCOM Driver for the Rotator would not process. Meaning that the Position of the Rotator is not changed via a sync. The rotator is clearly working as an Interface v2 driver, using the v2 calls of which Sync is not one of them.

    I say that I think it is a Sync being sent by NINA, because not long after the Sync the Framing Assistant encounters issues with the focuser at a different place that NINA expects it to be.

    I guess there are two paths here
    Ask the NINA developers on the forum about NINA's handling of a Rotator with Interface Version2.

    Upgrade the Rotator ASCOM driver from v2 to v3 Interface. That is not a viable option for me, because I just dont have the development time to do that. With my other projects I already have at least 4 of them waiting on the next release. At least 1 of the projects the bug reports date back more than 1 year.

    It might be that there is someone in the community that has the skills and time to do that.

    I will look at the log in detail soon,

    Regards
    Robert

     
  • Carlos Izquierdo Vázquez

    Good morning.
    After doing some tests, I have been able to verify that the rotator rotates and behaves perfectly if it is rotated through "equipment", but if NINA uses the rotator to make a frame, it no longer works well. The sky position box appears.
    For this reason, as of today, it cannot be used in NINA. At least, this has been my experience.
    Thanks Robert for the projects you do!

     
  • Patrick PASC

    Patrick PASC - 2024-05-28

    Hello everyone.
    Just some information which will not help the development of the project but which may possibly give a clue.
    I have been using MyRotateur with NINA for over a year without encountering the slightest problem.
    I have remained at version 125- 1 of the firmware with the ASCOM 108 driver and the Windows application 2.0.0.2
    As it works perfectly I remain on this configuration.
    However, when I moved to version 3 of NINA I had to reverse the direction of rotation of the rotator to that the framing works. This information is also mentioned on the NINA forum. In NINA V3 the rotation controls are reversed compared to previous versions.
    The behavior of your rotator is very similar to the problem encountered when upgrading from NINA to V3.
    Perhaps you have the same problem.
    Patrick

     
  • Carlos Izquierdo Vázquez

    Thank you very much for answering!
    Precisely today I was going to provide this solution, since I had the same problem with a rotator using moonlite. I solved it by activating "reverse" in the driver. It's a relief to know the solution, since I like myrotator much better.
    One question, can the code be adapted to use an Arduino Pro Micro? I say this because I have PCB boards for focusers and they would be useful for this.
    Thank you so much!!!

     
  • Carlos Izquierdo Vázquez

    Hello, Robert.
    I'm trying to make the change so it works on an arduino pro micro... but I can't get it to compile.
    Am I getting into trouble? or is it feasible
    Sorry for insisting

     
  • brownrb

    brownrb - 2024-06-07

    zip the files up and I will take a look

     
  • Carlos Izquierdo Vázquez

    Thank you Robert for your time!!!!!
    I am a fan of yours and I want to continue using your inventions!

     
  • Carlos Izquierdo Vázquez

    I have two doubts.
    a) I have installed the hall sensor, but it does nothing... what should I do? I guess spin until you find the magnet... but it doesn't spin or do anything...
    b) On the other hand, I have seen that it only rotates the degrees that I indicate in one direction, that is, if I indicate 90º it rotates those degrees, but if I indicate 45º, it does not rotate in the opposite direction, but rather it rotates in the same direction 45º.
    What can happen?
    Thank you

     
  • Carlos Izquierdo Vázquez

    parece ser que es un problema de mi arduino nano. he cambiado el pin 2 (DIR) a otro pin y funciona el cambio de dirección.
    seguirmos probando el sonsor Hall

     
  • brownrb

    brownrb - 2024-06-10

    b) On the other hand, I have seen that it only rotates the degrees that I indicate in one direction, that is, if I indicate 90º it rotates those degrees, but if I indicate 45º, it does not rotate in the opposite direction, but rather it rotates in the same direction 45º.

    is an indication that you have a wiring issue with the stepper coils
    OR
    there is a fault with the DIRection line. When DIR is gnd then the stepper moves in one direction, and when DIR is high 5V then the stepper moves in the other direction

    Oh, and you should forget about using a micro, only Nano is supported like it says in the PDF

    You purchased a sensor that is just a single chip, not a module board?
    You did fit a 0.1uf (100nf) capacitor across + and gnd pins of the home sensor?
    The sensors small surface (front face with writing) faces towards the magnet with the larger area away from the magnet? And South pole of magnet is facing sensor?

    THIS IS A MANUAL TEST: DO NOT USE WINDOWS APP OR ASCOM DRIVER TO DO THIS

    Please run the attached version of TestHome, download and extract then program the Arduino nano with this program, When run, it sends messages to the serial port. So after it runs you need to open the Serial port monitor (speed 9600) and then press the little reset button on the Arduino chip to reset and run this program, Do not close the Arduino program, it needs to be connected with USB to the controller)

    So after positioning the sensor about 5-10 away and u are ready to start the test,
    Press S
    You now have 20 seconds. Move the rotator by hand slowly towards the magnet. If everything is Ok then the maganet will be detected and present a message. At that point stop moving the rotator by hand. Look to see where the sensor is now in relation to the magnet. Is it close or over the magnet or is the sensor still a little way away .

    If not found and you end up with the sensorr on the other side (having moved past the magnet then the sensor cannot be working,

    Do the test a couple of times to determine where the home sensor shows it has detected the magnet. Take a shot on your phone so we can know where that is.

    Regards
    Robert

     

    Last edit: brownrb 2024-06-10

Log in to post a comment.