Support for MGen Standalone Autoguider

Issue #92 resolved
Stefan B repo owner created an issue

Got a request for this via mail.

Comments (51)

  1. Paul Garais

    Would absolutely love MGEN support. Currently I am using APT because it is the only “nice” tool for astrophotography which supports the MGEN autoguider. But I like the approach, features and UI of NINA and would like to use it! Can I donate for that feature? :D

  2. Stefan B reporter

    I’m already in contact with Lacerta and they provided me with a test unit and a Documentation how the communication works, so I can do the implementation.

    So far I got the basics to communicate with the MGEN running, but having it integrated into N.I.N.A. is still taking some effort.

  3. Stefan B reporter

    This will be one of the first topics i will tackle for 1.10.

    I can’t give any ETA yet, but I should be continuing on this soon.

  4. Stefan B reporter

    Yes this is the next topic I will start for 1.10, as I already have the hardware for it and details on how to interface with the mgen. So it is planned to be finished in 1.10 if no show stopper appear.

  5. Stefan B reporter

    Short Update for you. I’m in the middle of implementing the MGen support and my estimation is that I am about halfway through. Communication is already working and I have even managed to add simple UI to control the handbox from NINA. See screenshot below:

  6. Paul Garais

    Hi Stefan! That is awesome. Even having a control and display for the handbox is way more, than I expected. Makes remote control possible, which is great news for cold winter nights 😉. Looking forward to get this feature more than ever before after this teaser 😃

    Thank you very much for the work and effort!

  7. Lukas

    Hello Stefan! I am speechless. Awesome work… the remote control and display is a great feature. Thank you very much!

  8. Christoph Zechner

    I am looking forward for Mgen support too. Keep up your great work! And thank you. CS Christoph

  9. Stefan B reporter

    Dithering using the Simulation Mode seems to Work as well as calibrating and starting guiding on sequence start. Additionally the mgen ui is refreshed automatically and the Leds are also displayed. Mostly there to actually bring the Changes into the nightlies to give them a first real world Test.

    Things still Missing is Auto selecting of new star (e.g. after flip) and grabbing the guiding corrections to Display in the Chart similar to phd2

  10. Paul Garais

    It is getting better and better! I am ready for testing in the field. As soon, as the weather cooperates -.-. At least we don't have to wait for new moon for testing :)

  11. Stefan B reporter

    I want to pull my work into the nightly builds tomorrow to let you guys have a first look.

    Keep in mind that the work is not entirely finished and some areas still need improvement. But it would be good in general to have someone else test the stability and general reliablitiy of the things done already.

    Things that should work:

    • Starting calibration and starting guiding on sequence start (When camera is started and a star is already selected)
    • Dithering
    • Stopping Guiding
    • Show MGEN display in app and control buttons
    • Basic graph showing RA and Dec drift (although the north/south indicator might be wrong. this needs to be validated)

    Things still missing

    • Starting camera prior to guiding
    • Auto Selecting a guide star
    • More stablity in case of some communication error
    • Graph Scale by arcsec instead of pixels
    • Some other nice to haves like setting parameters instead of going through the display menu

  12. Paul Garais

    Perfect Timing! Those long winter nights with the moon up are perfect for testing. Will so so as soon as the clouds are giving us a day off of their presence 😉

  13. Stefan B reporter

    I have just uploaded Nightly Build Nr. 39 which contains the MGEN implementation.

    Implementing this device was a lot of work and I do hope it will pay off. Theoretically it should already have everything inside. I also added the auto selection of a guide star, but i cannot test this using the simulation mode. Hope it works 🙂

    Happy testing!

  14. Paul Garais

    Thank you so much! I will test extensively and report back ASAP. Just need some clear nights to make a real world test. Thank you especially for adding auto star selection so quickly. Should make unattended meridian flips possible, which is great news for my sleep 😃

  15. Stefan B reporter

    Yea i have worked the complete weekend on it to finalize the version. Also reworked the generic FTDI c# wrapper driver interface, because the wrapper provided by the ftdi vendor had some issues which i was not satisfied with. Hope everything works in real conditions too. Just using the emulation mode indoors is working great so far.

  16. Paul Garais

    Intereresting information regarding the FTDI c# wrapper. I am sure I heard about it before while searching for solutions for instable connection to a device also using FTDI chip.

    The first “Indoor test” is working flawlessly, as you said! Can't wait for the rain to stop. Hope the 10 day weather preview I currently get, is totally wrong.

    I also heard about your efforts to improve QHY drivers. They are not known for good software or drivers. Maybe they should hire you. All QHY customers will BE relieved 😉

    Thank you for diving in so deep even into issues created by others! Everyone I recommended N.I.N.A. to is very happy and has just positive feedback to give!

  17. Christoph Zechner

    Thank you! I will also test your MGEN implementation as nsoon as the weather allows it. CS Christoph

  18. Christoph Zechner

    I have installed the latest nightly build and tried to connect to the Mgen. I only get the message: „ Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt“. What am I doing wrong?

    The Mgen has the firmware version 0261.

  19. Stefan B reporter

    you can find logs giving more details at %localappdata%\nina\logs. please share them to see what’s wrong

  20. Paul Garais

    Ok, either I was drunk or something fishy is going on. On my first run, I tried, it just worked (emulation mode). Now I am trying on my home office desktop computer (my notebook that I usually using for image acquisition is not here at the moment) and it just does not connect and gives me the same error as Christoph Zechner. I don’t know what is different between those two systems. Maybe I am doing something wrong or differently than with the notebook. I tried with MGEN powered on and off, connecting it after starting N.I.N.A. and before and so forth. The error log:

    [2019-12-13T22:01:03]    [ERROR]     [MemberName] Connect
    [2019-12-13T22:01:03]    [ERROR]     [FileName] E:\Projects\nina\NINA\Model\MyGuider\MGENGuider.cs
    [2019-12-13T22:01:03]    [ERROR]     [Message] Object reference not set to an instance of an object.       at NINA.MGEN.MGEN.<>c.<DetectAndOpenInternal>b__14_0(FT_DEVICE_INFO_NODE x)
       at System.Linq.Enumerable.WhereListIterator`1.MoveNext()
       at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
       at NINA.MGEN.MGEN.<DetectAndOpenInternal>d__14.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at NINA.Model.MyGuider.MGENGuider.<Connect>d__20.MoveNext()
    

    I also tried the small tool from Lacerta with the “Virtual M-GEN UI”. It does connect and does show the screen of the MGEN correctly. So the basic requirements should be there.

    Thank you for looking into it!

  21. Paul Garais

    Ok, I found the difference just a minute later -.-'.
    It works as long as I connect the device directly to the computer. As soon as I connect it through my regular USB3-hub, which all astro equipment is connected to, it is not working. So just seems an addressing issue? It founds the device, even with USB3-hub in between (because if it does not find the device e.g. if the cable is not connected, it says “No MGEN device found”.

    So should be easy to fix, I hope.

    Thanks again!

  22. Dale Ghent

    Is your USB hub powered or not? IF you are using a USB that is not self-powered (ie, it is powered from its own USB connection) the MGEN may be too much for that very low power and shared resource and fail to operate properly. If the MGEN device does not show up in Windows Device Manager, this is an issue beyond our control.

  23. Paul Garais

    MGEN shows up in the device manager. I can control it with the Lacerta software through the USB3-hub. I also use this setup with ATP (Astrophotography Tool) and it does work there with and without the USB hub. So I think the USB hub does get enough juice 😉. The MGEN also has it’s own power plug and it is connected.

    Edit: Thank you for the very fast answer 🙂

  24. Stefan B reporter

    Ok i will try to connect it to my usb hub instead of direct connection and see if i get the same issue

  25. Christoph Zechner

    I have the same issue. Mgen is connected via a powered hub, shows up fine in apt and mgen winapp. It does not connect to nina. When I connect the usb cable of the mgen directly to the computer, nina connects.

    Cs Christoph

  26. Stefan B reporter

    I just tried to connect via my usb hub and it is working fine. Really hard to identify the issue here, as i cannot reproduce.

  27. Christoph Zechner

    Hello Stefan Thank you for your effort, but the problem persists. Now I cannot even connect, when the usb cable is attached directly to the computer. The Mgen firmware app connects smoothly, so it is not some sort of power or cable problem. I have attached 2 logs. One is done with build 41, the newer one with build 42.

    CS Christoph

    Am Sa., 14. Dez. 2019 um 13:21 Uhr schrieb Stefan B <

  28. Paul Garais

    Thank you very much! I tried Nightly #42. It has the same issue, but now with a different error message. BUT: I could narrow down the problem to the real cause (at least I hope so).

    I think, the real problem is caused by using two or more devices with the FTDI chipset. First I assumed that my hub is the problem. But I could make N.I.N.A. connect to the MGEN device in Nightly #41 and #42 by removing every other device from the hub. And this worked! This is what I tested:

    • ✔ Connect MGEN with the USB cable directly to PC: Works in #41/#42
    • ✔ Connect MGEN through USB hub without any other device attached to the hub: Works in #41/#42
    • ✔ Connect MGEN through USB hub with attached and powered on camera: Works in #41/#42
    • ✔ Connect MGEN through USB hub with attached and powered on camera and focuser: Works in #41/#42
    • ✔ Connect MGEN through USB hub with attached and powered on camera and focuser and a mobile phone for image transfer and charging (to give some extra load on data transfer and power usage): Works in #41/#42
    • ❌ Connect MGEN through USB hub with attached and powered on camera and focuser and a mobile phone for image transfer and charging (to give some extra load on data transfer and power usage) and Pegasus Astro EQdir cable: DOESN’T work in #41/#42

      • Notice: While in #41 the above error message and error log entry occurs, in #42 the error is “No MGEN device found” in this case. The log-entry for this one:

        [2019-12-14T13:39:45] [ERROR] [MemberName] Connect [2019-12-14T13:39:45] [ERROR] [FileName] E:\Projects\nina\NINA\Model\MyGuider\MGENGuider.cs [2019-12-14T13:39:45] [ERROR] [Message] No MGEN device found at NINA.MGEN.MGEN.<DetectAndOpenInternal>d__14.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at NINA.Model.MyGuider.MGENGuider.<Connect>d__20.MoveNext()

    • ❌ Connect MGEN through USB hub with only Pegasus Astro EQdir cable attached (removed everything else): DOESN’T work in #41/#42

    So in short: The main problem is the Pegasus Astro EQdir cable (and potentially other devices). I think the reason is, that this EQdir cable is using the FTDI chipset, which is also used in the MGEN device for the USB connection.

    Here is a screenshot from my device manager, where you can see the identical Hardware-IDs for the chip:

    In this case COM3 is the MGEN and COM5 is the EQdir for connecting to my EQ6-R without the handset in between. As soon as I remove COM5, everything works fine just as by direct connection.

    Hope this is useful for troubleshooting. If I can test anything else or you need some more information (like log-files from Windows or thelike) please tell me. I will take care and report back!

    Thanks!

  29. Christoph Zechner

    Hello Stefan The latest fix solved the problems. Everything is connecting perfectly now - zwo camera, zwo filterwheel, lacerta focuser, mount and mgen! Great work - and many thanks again. Cs Christoph

    Christoph Zechner christoph.zechner@gmail.com schrieb am Sa. 14. Dez. 2019 um 22:06:

    [image: Stefan B] Stefan B commented on issue #92: Support for MGen Standalone Autoguider https://bitbucket.org/Isbeorn/nina/issues/92/support-for-mgen-standalone-autoguider

    Issue is identified. Fix will be uploaded into version 43 shortly. View this issue https://bitbucket.org/Isbeorn/nina/issues/92/support-for-mgen-standalone-autoguider or add a comment by replying to this email. Unwatch this issue https://bitbucket.org/api/internal/repositories/Isbeorn/nina/issue/92/unwatch/Christoph_Z/9e6f7fdd8ea45207396e139330f07943930875489c763bbf560affce26c46fd1/ to stop receiving email updates. [image: Bitbucket] https://bitbucket.org

  30. Mike Forster

    Hello, I am new here and today I wanted to connect my MGEN-3 (Firmware 01.02) to NINA 1.10 NIGHTLY #065

    I connect the USB cable directly to my laptop where NINA is installed but i always get the message “No MGEN device found” can someone help me?

    Thanks!

  31. Stefan B reporter

    @Mike Forster MGEN3 is not yet supported. The current implementation is for the MGEN2 only. MGEN3 support will come later this year.

  32. Mike Forster

    Ach ok.. In NINA menu is just written “MGEN Superguider” so i supposed mgen 3 as well.

    And can you say which month roughly it will be implemented?

    KR

  33. Hartmuth K

    Hello, I'm new here.
    I have been testing Nina with the MGen2 for a few days.
    So far it works very well including dithering. :)
    However, I get a very strange guiding curve in Nina. (see image)
    It is probably due to the stored setting of the resolution per pixel.
    I use finder scope guiding with a focal length of 180mm.
    Therefore the pixel scale is very rough.
    Somewhere 3.6" per pixel.
    Can that be set somehow?

    CS Hartmuth

  34. Stefan B reporter

    Hi Hartmuth,

    the pixel scale is currently not adjustable and the unit in ARCSECONDS will be wrong for the mgen and pixels should be used instead.

  35. Hartmuth K

    Hi Stefan,

    I tried it also with untit “Pixels”
    It dit not make much difference.
    But I will try it tonight again and report results.

    Hartmuth

  36. Mike Forster

    Hi Hartmut

    in NINA you can only setup the focal length, pixel size and chip size. But not the pixel scale (or at least I did not see it)

    What I see here is not a NINA but a guider and tracking problem.

    CS

  37. Hartmuth K

    I tried again tonight and set the unit to pixels.
    I also set the roughest scaling for the Y axis.
    Nevertheless, the guiding curve goes beyond the scale.

    It is whining at a high level, since the guiding including dithering works very well and the M-Gen itself shows the curve correctly.
    But I suppose adjusting the scaling is just a minor matter.

    Stay healthy.
    Hartmuth

  38. Stefan B reporter

    Yea the one thing missing for the graph to work properly is the focal length. There seems to be no interface to read that from the mgen so i might put up a setup option for it into nina to specify the focal length manually

  39. Christoph Zechner

    Is there a way to synchronice the dithering process for two instances of N.I.N.A. running? That would be cool for my dual setup.

  40. Log in to comment