Menu

ASCOM focuser disconnects upon move request

2022-01-11
2022-08-16
  • Woodpeckercz

    Woodpeckercz - 2022-01-11

    Hi,
    thanks for the amazing project. It took me a while to get it right.
    I built the arduino version of the focuser and got it working with INDI and Astroberry, but due to camera connection issues I decided to give N.I.N.A. and ASCOM a try.
    The problem is, when I request the focuser to move it moves correct amount, but the controller disconnects and I have to reconnect it again.
    I found this in the ascom log, after which it reports connected: false.

    02:14:44.564 IsMoving.get FormatException ew target=90000[0D][0A]I1,System.FormatException: Input string was not in a correct format.[0D][0A] at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)[0D][0A] at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)[0D][0A] at System.Convert.ToInt32(String value)[0D][0A] at ASCOM.myFocuser2ASCOM.Focuser.get_IsMoving()
    02:14:44.565 Connected get: False
    02:14:44.565 Link Get False
    02:14:44.565 Connected get: False

    Here are logs from ASCOM device hub and from N.I.N.A.

    Any help is appreciated.
    Thanks.

     
  • brownrb

    brownrb - 2022-01-11

    Nothing obvious from the logs.

    set the options in NINA , log level to TRACE as this will provide more information

    You set your maxsteps to 388000 ?????
    and the position was reported as 80000, that is 80,000 is it not?
    Was that just for testing or for real? Seems an excessively high number.

    That value though is not the cause of the crash.

    At a guess I would have to say that this issue is very similar to this one,
    https://sourceforge.net/p/arduinoascomfocuserpro2diy/discussion/general/thread/f7d5d47445/

    which turned out to be something other than the driver.

     
  • Woodpeckercz

    Woodpeckercz - 2022-01-11

    I'm using nema11 with 14:1 gearbox and 1/32 microstepping. 388000 is full range of my focuser(about 95mm), 1 revolution of the stepper is 6400microsteps, and 1 full revolution of the gearbox shaft is 89600.
    i will post N.I.N.A. trace log in a minute.

     
  • Woodpeckercz

    Woodpeckercz - 2022-01-11

    I have tried this with two different computers so far.
    It's connected through a powered USB 3.0 hub.
    It works perfectly in INDI and Astroberry/Stellarmate.
    I don't think it's related to the mentioned issue, as it happens immediately upon move request in Both ascom and N.I.N.A.
    I tested the focuser with the myASCOMClient 1.3.1.11 and it worked fine, so the issue only shows up in ASCOM Device Hub and N.I.N.A..

    Here is trace log from N.I.N.A. and log from myASCOMClient.

     
  • Woodpeckercz

    Woodpeckercz - 2022-01-11

    So I tested this on freshly installed pc which i intend to use as a headless pc for astronomy(at least until I get something better) and it works somewhat better in NINA, but has same problem in ASCOM hub

     

    Last edit: Woodpeckercz 2022-01-11
  • brownrb

    brownrb - 2022-01-12

    Hi
    Can you please assist me to get as much detail as I can, in order for me to try and replicate your issue?

    1. ascom hub?
    2. what is ascom hub?
    3. ASCOM Device Hub?

    4. Did you calculate how many steps you have in the critical focus zone?

    5.I do not get why you are using a PG14 and microstepping it 1/32. Please show me the math.

    I see you are using myFP2DRV firmware_version: 312
    I see you are using NINA Version 1.10.3.9001

    Can you please provide me with the following
    6. What actual pcb did you implement. Did you download the schematic/pcb, which one?
    7. Was the 312 firmware a recent update? if so, what version firmware were you using before?
    8. In Nina, what is the poll rate set to?

    The ascom log from the driver seems to show that for some reason, it has just asked the controller a specific value when it interrupted by another command, and then sent the original request which got picked up by the 2nd command and not the first.
    That should not happen. Are you trying to connect multiple clients to the ASCOM driver?

     

    Last edit: brownrb 2022-01-12
  • Woodpeckercz

    Woodpeckercz - 2022-01-12

    Yes, Ascom Device Hub.

    My setup is currently still on a breadboard. It's a fresh build, I haven't used a previous version of the firmware, so I haven't done all the work/math yet. wanted to know if it works before i put all the work in. I used DRV8825 schematic from the PDF and beside the driver only connected IO leds, Temp probe & rotary encoder (i know it's not in the schematic but i found which pins it's supposed to be connected to in the firmware and wired it in myself).
    I tried disabling everything in firmware but it didn't help.

    I used PG 14 and microstepping because I'm not connected to the focuser 11:1 gear shaft but directly to the pinion shaft, because my telescope gearbox teds to slip a bit when focusing in while the telescope is oriented vertically (pointing up).

    I don't think it's HW related since it works perfecly fine in INDI and stellarmate/astroberry.

    I tried it on the fresh installed windows and it behaved weirdly, it connected and small movements worked without disconnecting (say +-1000 steps) but when I requested a larger movement(10k steps) or move to home, the focuser only moved for few seconds and then it stopped (and controller disconnected).

    I tried using three arduino nano boards with this, two were CH340g and on FTDI232 , all behaved exactly the same.

    I only test it with one client at a time NINA or ASCOM device hub.
    NINA pool rate is default (I will check what it is when i get home).

     
    • Woodpeckercz

      Woodpeckercz - 2022-02-05

      "I tried it on the fresh installed windows and it behaved weirdly, it connected and small movements worked without disconnecting (say +-1000 steps) but when I requested a larger movement(10k steps) or move to home, the focuser only moved for few seconds and then it stopped (and controller disconnected)."

      Last night when I was setting up my backlash compensation I found that the focuser works perfectly fine if I have Coil power On.
      When I turned Coil power Off, the focuser woud only turn on for a little bit and then the stepper motor would stop, while the controller keeps counting steps.
      So If I, say asked for 10k steps move, it would only move for 1k-ish and stop but the counter would keep going until it hit 10k. It dissapeared when again when I turned the coil power on.

       
  • brownrb

    brownrb - 2022-01-12

    I will put something together for you to try.

    It is a matter of finding some spare time, but I am talking days not weeks.
    Please be aware that the application has never ever been tested against ascom device hub.

    So I cannot even predict what the outcome of that is. but it not something I would recommend doing.

    There are two different versions of DRV8825 -
    DRV8825
    DRV8825HW203
    Each uses their own firmware, using the other firmware not designed for that board will have issues. Which is why I asked about the PCB and the firmware to see if you correctly used the correct one. There is always a reason behind quesions.

    If I am make any progress, I need to build a setup that matches your build with the firmware you used etc -

    If I just tested it on my own focuser (I have a few) - I can report that NINA has zero issue with my focusers - that means nothing - not saying you did something wrong, far from it, I believe there
    is a fault somewhere which lurks around, I believe it may be software, not 100% sure, and so if I used my own build I would never find it.

    No more testing on your part is required for now. So let us see what tommorrow brings

    Robert

     
  • Woodpeckercz

    Woodpeckercz - 2022-01-12

    i'll double check the firmware verison but i'm pretty sure I used the plain DRV8825 since i couldn't find information on what the hw203 means(i assumed it was meant for your pcbs).
    I used DRV8825 from AZdelivery (amazon.co.uk) and arduino is from them as well.
    oh an i also have 1.3" oled display connected.

     
  • brownrb

    brownrb - 2022-01-12

    Please find this beta ASCOM driver update -283
    please let me know how it goes.

    To anyone else reading this thread - please do not use beta 283 at this time.

    What to do - steps to installing v283 ASCOM driver beta update

    1. Download the new driver 283
    2. Uninstall exsisting driver 282 using control panel - it must be removed first
    3. If you cannot find the driver in control panel for removal , let me know, I can give you details about how to remove a driver that does not appear in control panel
    4. Then and only then install the beta 283 driver.
    5. For the firmware, please do the following
    6. When you unzipped the firmware zip file, there is a folder named tests.
    7. Navigate into the tests/ClearEEPROM folder
    8. IUse Arduino IDE to load that test and then program the controller with the ClearEEPROM firmware file
    9. After the program has been uploaded, the output is in the Serial Monitor of Arduino IDE (speed = 9600)

    10. Finally, reprogram the controller with the firmware 312.

    In terms of the
    DRV8825
    DRV8825HW203

    The original design was DRV8825. This was ok for home made PCB at the time using copper clad boards, etching solution etc. 2014.

    When I got round to designing PCB for the project - and using EasyPCB etc, the hardware circuit that when between the Nano Chip and the DRV8825 chip, to avoid having to use vias or jumper to match pins together, I changed a few of the wires. hence, that new pch was called drv8825hw203.

    A DRV8825 board only works correctly with a DRV8825 firmware.
    A DRV8825HW205 only works correctlu with a DRV8825HW203 firmware.

    If one uses DRV8825HW203 on a pcb design of DRV8825 then the microstepping does not work correctly.

    If one uses a design od DRV8825 and then programs the board with file DRB8825HW203, again, microstepping does not work correctly.

    Robert

     
  • Woodpeckercz

    Woodpeckercz - 2022-01-26

    Hi I finally had a chance to try this out and it works on my imaging pc.
    still doesn't work properly on my main pc for some reason but that doesn't matter.
    thanks for the help

     
  • brownrb

    brownrb - 2022-02-16

    A bug in the myfp2drv8825 firmware was recently found - which causes an issue with NINA. It has been updated to myfp2drv8825-312-1

     
    • Woodpeckercz

      Woodpeckercz - 2022-08-16

      Thanks a milion for the update :)

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.