Menu

2.3.9.4 Disconnects from Focuser when going home or position 0

2018-03-08
2018-03-31
1 2 3 > >> (Page 1 of 3)
  • Johan Landman

    Johan Landman - 2018-03-08

    Thank you so much for a wonderful design. I am busy with my second build. This is using one of the Fritz boards.

    Two questions
    1. Everytime I set to go to position 0 the software disconnects from the focusser. The motor will continue to return. Reconnecting and it is back at the last position before going "home" Setting to position 1 is 100%. Is this something I am doing wrong or is there some undocumented feature?

    1. What is jumper J11 PPTC used for? Sorry I have looked but cannot find anything in the documentation

    Regards
    Johan

     
  • Johan Landman

    Johan Landman - 2018-03-09

    Thank you for the prompt response and the explanation of PPTC J11. The ino file I am using is:-

    Focuserv265_DRV8825_HW203_OLED.ino

    The //#define HOMEPOSITIONSWITCH 1 seems to have fixed the problem. My apology if this is something I miss understood.

    Below is the output from my log.

    3/9/2018 7:24:44 AM: homefocuser(): =START=========================================================
    3/9/2018 7:24:44 AM: homefocuser: Serial Port is Open
    3/9/2018 7:24:44 AM: homefocuser: ConnectedState is true
    3/9/2018 7:24:44 AM: homefocuser: Temperature Compensation is disabled
    3/9/2018 7:24:44 AM: homefocuser: Call GetIsMoving
    3/9/2018 7:24:44 AM: GetIsMoving(): =START=========================================================
    3/9/2018 7:24:44 AM: Calling CommandString(:01#)
    3/9/2018 7:24:44 AM: CommandString(): =START=========================================================
    3/9/2018 7:24:44 AM: CommandString: Serial Port is Open
    3/9/2018 7:24:44 AM: CommandString: Try to write command: :01#
    3/9/2018 7:24:44 AM: CommandString: Command was sent.
    3/9/2018 7:24:44 AM: ReceiveString(): =START=========================================================
    3/9/2018 7:24:44 AM: ReceiveString: Command retcmd = I
    3/9/2018 7:24:44 AM: ReceiveString: Buffer recbuf = I00#
    3/9/2018 7:24:44 AM: ReceiveString: Value retstr = 00
    3/9/2018 7:24:44 AM: ReceiveString raw response for Ismoving is I00#
    3/9/2018 7:24:44 AM: ReceiveString(): =END===========================================================
    3/9/2018 7:24:44 AM: CommandString(): =END===========================================================
    3/9/2018 7:24:44 AM: Back from CommandString
    3/9/2018 7:24:44 AM: GetIsMoving: Success: ismoving status = 0
    3/9/2018 7:24:44 AM: GetIsMoving(): =END===========================================================
    3/9/2018 7:24:44 AM: homefocuser: Back from GetIsMoving
    3/9/2018 7:24:44 AM: homefocuser: ismoving = 0
    3/9/2018 7:24:44 AM: homefocuser: set motorspeed
    3/9/2018 7:24:44 AM: CommandString(): =START=========================================================
    3/9/2018 7:24:44 AM: CommandString: Serial Port is Open
    3/9/2018 7:24:44 AM: CommandString: Try to write command: :1502#
    3/9/2018 7:24:44 AM: CommandString: Command was sent.
    3/9/2018 7:24:44 AM: CommandString(): =END===========================================================
    3/9/2018 7:24:44 AM: Calling CommandString(:28#)
    3/9/2018 7:24:44 AM: CommandString(): =START=========================================================
    3/9/2018 7:24:44 AM: CommandString: Serial Port is Open
    3/9/2018 7:24:44 AM: CommandString: Try to write command: :28#
    3/9/2018 7:24:44 AM: CommandString: Command was sent.
    3/9/2018 7:24:44 AM: CommandString(): =END===========================================================
    3/9/2018 7:24:44 AM: Back from CommandString
    3/9/2018 7:24:44 AM: GetIsMoving(): =START=========================================================
    3/9/2018 7:24:44 AM: Calling CommandString(:01#)
    3/9/2018 7:24:44 AM: CommandString(): =START=========================================================
    3/9/2018 7:24:44 AM: CommandString: Serial Port is Open
    3/9/2018 7:24:44 AM: CommandString: Try to write command: :01#
    3/9/2018 7:24:44 AM: CommandString: Command was sent.
    3/9/2018 7:24:44 AM: ReceiveString(): =START=========================================================
    3/9/2018 7:24:44 AM: ReceiveString: Command retcmd = I
    3/9/2018 7:24:44 AM: ReceiveString: Buffer recbuf = I01#
    3/9/2018 7:24:44 AM: ReceiveString: Value retstr = 01
    3/9/2018 7:24:44 AM: ReceiveString raw response for Ismoving is I01#
    3/9/2018 7:24:44 AM: ReceiveString(): =END===========================================================
    3/9/2018 7:24:44 AM: CommandString(): =END===========================================================
    3/9/2018 7:24:44 AM: Back from CommandString
    3/9/2018 7:24:44 AM: GetIsMoving: Success: ismoving status = 1
    3/9/2018 7:24:44 AM: GetIsMoving(): =END===========================================================
    3/9/2018 7:24:45 AM: GetIsMoving(): =START=========================================================
    3/9/2018 7:24:45 AM: Calling CommandString(:01#)
    3/9/2018 7:24:45 AM: CommandString(): =START=========================================================
    3/9/2018 7:24:45 AM: CommandString: Serial Port is Open
    3/9/2018 7:24:45 AM: CommandString: Try to write command: :01#
    3/9/2018 7:24:45 AM: CommandString: Command was sent.
    3/9/2018 7:24:45 AM: CommandString(): =END===========================================================
    3/9/2018 7:24:45 AM: Back from CommandString
    3/9/2018 7:24:45 AM: CommandString(): =START=========================================================
    3/9/2018 7:24:45 AM: CommandString: Serial Port is Open
    3/9/2018 7:24:45 AM: CommandString: Try to write command: :01#
    3/9/2018 7:24:45 AM: CommandString: Command was sent.
    3/9/2018 7:24:45 AM: CommandString(): =END===========================================================
    3/9/2018 7:24:46 AM: CommandString(): =START=========================================================
    3/9/2018 7:24:46 AM: CommandString: Serial Port is Open
    3/9/2018 7:24:46 AM: CommandString: Try to write command: :01#
    3/9/2018 7:24:46 AM: CommandString: Command was sent.
    3/9/2018 7:24:46 AM: CommandString(): =END===========================================================
    3/9/2018 7:24:47 AM: CommandString(): =START=========================================================
    3/9/2018 7:24:47 AM: CommandString: Serial Port is Open
    3/9/2018 7:24:47 AM: CommandString: Try to write command: :01#
    3/9/2018 7:24:47 AM: CommandString: Command was sent.
    3/9/2018 7:24:47 AM: CommandString(): =END===========================================================
    3/9/2018 7:24:47 AM: CommandString(): =START=========================================================
    3/9/2018 7:24:47 AM: CommandString: Serial Port is Open
    3/9/2018 7:24:47 AM: CommandString: Try to write command: :01#
    3/9/2018 7:24:47 AM: CommandString: Command was sent.
    3/9/2018 7:24:47 AM: CommandString(): =END===========================================================
    3/9/2018 7:24:47 AM: GetIsMoving: ERROR: NO RESPONSE/TIMEOUT. CLOSING SERIAL PORT
    3/9/2018 7:24:47 AM: disableall(): =START=========================================================
    3/9/2018 7:24:47 AM: disableall(): =END===========================================================
    3/9/2018 7:24:47 AM: GetIsMoving: Success: ismoving status = 3
    3/9/2018 7:24:47 AM: GetIsMoving(): =END===========================================================
    3/9/2018 7:24:48 AM: GetFocusPosition(): =START=========================================================
    3/9/2018 7:24:48 AM: ---------------------------------------------------------------------
    3/9/2018 7:24:48 AM: GetFocusPosition: ERROR: SERIAL PORT IS CLOSED: INVOKING DISCONNECT EVENT HANDLER
    3/9/2018 7:24:48 AM: ---------------------------------------------------------------------
    3/9/2018 7:24:48 AM: Disconnect(): =START=========================================================
    3/9/2018 7:24:48 AM: Disconnect: error - serial port not open
    3/9/2018 7:24:48 AM: disableall(): =START=========================================================
    3/9/2018 7:24:48 AM: disableall(): =END===========================================================
    3/9/2018 7:24:48 AM: DisconnectBtn_Click: Disconnecting
    3/9/2018 7:24:48 AM: Disconnect(): =END===========================================================
    3/9/2018 7:24:48 AM: homefocuser: Focuser has stopped moving: Position = 100
    3/9/2018 7:24:48 AM: homefocuser(): =END===========================================================
    3/9/2018 7:25:03 AM: Exit(): =START=========================================================
    3/9/2018 7:25:03 AM: ExitBtn: exiting
    3/9/2018 7:25:03 AM:
    Number of focuser moves = 3
    Number of Temperature calls = 2
    Number of Firmware calls = 2
    Number of Connects = 1
    Number of Set Focuser Position = 2
    Number of Get Max Steps = 2
    Number of Set Max Steps = 0
    Number of Get Step Mode = 1
    Number of Set Step Mode = 0
    Number of Coil Power Changes = 0
    Number of Reverse Direction Changes = 0
    Number of Motor Speed Changes = 0
    Number of Display Enables = 0
    Number of Display Disables = 0
    Number of Display Enables during Moves = 0
    Number of Display Disables during Moves = 0

    3/9/2018 7:25:03 AM: ExitBtn: Com port closed: exiting
    3/9/2018 7:25:03 AM: FormClosing: Start
    3/9/2018 7:25:03 AM: FormClosing: Serial port not connected
    3/9/2018 7:25:03 AM: FormClosing: Save application settings
    3/9/2018 7:25:03 AM: FormClosing: Stop timers
    3/9/2018 7:25:03 AM: FormClosing: Finish
    3/9/2018 7:25:03 AM: FormClosing: Start
    3/9/2018 7:25:03 AM: FormClosing: Serial port not connected
    3/9/2018 7:25:03 AM: FormClosing: Save application settings
    3/9/2018 7:25:03 AM: FormClosing: Stop timers
    3/9/2018 7:25:03 AM: FormClosing: Finish

     
  • brownrb

    brownrb - 2018-03-09

    Hi Johan
    All is good now? Controller is no longer disconnecting when moving home?

     
  • Johan Landman

    Johan Landman - 2018-03-09

    All is good. Thank you.

    One more, not related question, My stepper NEMA17-PG27 is connected directly to the focuser shaft with a flexible connector. From all my tests it appears that my backlash is +/- 110 steps in and out. Questions

    1. This feels excessive. Is it given that stepper rotation is 5370 steps ?
    2. If I set backlash to 110 steps in and out should my goto 1,10,100,500 be spot on or how do I test my backlash settings in order to refine it?

    Again thank you for your assistance.

     
  • brownrb

    brownrb - 2018-03-10

    PG27, normal nema17 is 200 steps per rotation, so 27*200 = 5400 steps per revolution at full steps. If half steps then = 10800 steps per one revolution of the stepper.

    1. Backlash varies depending on connection method, flexure, slippage etc. Hard to say what is normal
    2. Backlash is only ever applied if you change direction, not for every move, only when the new move is in the opposite direction from the last one. SO goto 1,10,500 means nothing except when you can direction. For example, +100 followed by -100, that is a change of direction, so backlash is applied. If +100 then +10 no backlash is applied.
    3. Whatever you do, never try to determine backlash visually. That is a sure fire recipe for going insane. You need to mount a caliper and measure the actual movement of the focuser. This is described in the pdf.
     

    Last edit: brownrb 2018-03-10
  • Johan Landman

    Johan Landman - 2018-03-10

    Thank you. I am using a digital dial indicator. Let me play around more with forward and backward steppings. I am sure I am missing something here?

    The actual Gear Ratio is 26.85:1 from the website.(https://www.omc-stepperonline.com/geared-stepper-motor/nema-17-stepper-motor-bipolar-l48mm-w-gear-raio-271-planetary-gearbox-17hs19-1684s-pg27.html)

    This is how I got 5370 steps. Am I wrong here?

     
  • brownrb

    brownrb - 2018-03-10

    Hi Johna

    If it says 26.85 then 5370 is right.
    You will probably get more measured backlash if using microstepping. With a PG27 I assume you are using full steps so you should get less backlash than if you microstepped. I think mine is around 55 steps for my PG27 from memory. But it varies from stepper motors and setups. My PG5 is around 20.

    What is your coil power setting? On or Off? This can also affect backlash (off = more)

    Regards
    Robert

     
  • Johan Landman

    Johan Landman - 2018-03-10

    Hi Robert,

    Coil is off. I am using full steps. Hence the reason why my coil is off. There is a slight hissing noise coming from the stepper if I leave the coil on. I have double checked my current limit setting.

     
  • Johan Landman

    Johan Landman - 2018-03-10

    Hi Robert,

    Okay I have been doing +/- 500 steps and it appears that backlash is working very well. Managed to get the dial indicator (0.01mm) returning to same position every time. As I said before. Thank you for a wonderful design. It is truly the only way I could afford two focusers for my two scopes.

    Johan
    Cape Town, South Africa

     
  • Johan Landman

    Johan Landman - 2018-03-10

    Hi Robert,

    Sorry to be such a nuisance but the backlash option is extremely exciting and I would like to get it perfect (almost). Changing the settings in the ASCOM extra setup does not seem to save the changes. All just stay on 50?

    MAXBACKLASHSTEPS=200

     
  • brownrb

    brownrb - 2018-03-10

    I will need ascom driver version.
    When you say changing settings in the ASCOM extra settings does not seem to save, please explain step by step what you are doing.

    I can open up extra settings in v251, I can set IN to 90, then close it. When I open extra settings again IN still says 90. Can you be a little more specific as I am not sure I understand.

    Snapshot pics are helpful.

    Please send me the ascom log file generated when you connect to the focuser. Enable trace logging, connect to the focuser, find the ascom log file and send it to me (or post here)

     

    Last edit: brownrb 2018-03-10
  • Johan Landman

    Johan Landman - 2018-03-10

    Hi Robert,

    Ascom driver is version 250. If I go into settings and change In/Out/Max backlash steps and click on close and then go back into settings the values revert back to 50.

    Please see attached files

    1 is before changing
    2 is after changing
    3 is after close and re-open

     
  • Johan Landman

    Johan Landman - 2018-03-10

    Just to add to this. It saves all the changes to tickboxes/checkboxes. It is just the three text inputs that revert to 50. I do not see 251 to download and try

     
  • brownrb

    brownrb - 2018-03-11

    I have uploaded 251. From memory 251 fixed this issue

     
  • Johan Landman

    Johan Landman - 2018-03-11

    Hi Robert,

    All working now. Thank you very much. I have read your recommendation not to use Ascom settings to update the controller and rather used the stored settings, set from the myFoccuserPro app, in the controller and for now will stick to that. At least the issue has been addressed.

    One last request and forgive me if this has been asked for and discussed before. You have an option to save controller settings to a file. Is it possible to use this to save controller settings to different profiles? As mentioned before this is my second build and my first one is on a Newtonian and this one is on a refractor. I have complete sets (controller + stepper motor) for each one but it will be nice to easily interchange controllers if the need arises. The settings are very diffirent. Max Steps, Step Size, Reverse direction etc.

     
  • brownrb

    brownrb - 2018-03-11

    The name of the file determines the settings. So just rename the settings file.

    In theory yes you can.

    The only catcha is for example restoring a controller (based on drv8825) to a controller based on l298n for example - stepmode of say 1/8th on drv8825 is not supported on l298n. This would be the only thing from memory which would not transfer, but all else should.

    I have multiple focusers based on drv8825. I can swap focuser controllers over and yes, I can restore different settings to any of the focusers.

     
  • Johan Landman

    Johan Landman - 2018-03-12

    Thank you so much for all the help. All good

     
  • brownrb

    brownrb - 2018-03-12

    Hi Johan
    I think I have discovered a bug in the backlash maximum settings.
    A simple test is to try the windows app and set baklash max to say 230 and then in to 220
    Enable send backlash settings to controller on connect
    Then connect
    Then once connected, use menu option to get the backlash in value. If not 230 then there is bug.

    Can you please let me know if this is the case with you. Please let me know firmware name.
    If this is happening I have some new firmware and windows app to test.

    regards
    Robert

     
  • Johan Landman

    Johan Landman - 2018-03-12

    Hi Robert,

    I tried the above and there were definitely strange behaviour. When setting In to 220. The above example with me return 200 on fetching In steps via Menu. It also appears that changing the settings does not always take immediate affect if you go into extra settings, out and immediately back in. I am not 100% sure of the previous finding. I could not duplicate it.

    Windows App is 2.3.9.4

    Firmware version Focuserv265_DRV8825_HW203_OLED.ino

    My question - why should in = max?.

     
  • brownrb

    brownrb - 2018-03-12

    Because of a bug.
    I am updating some code now. Should be able to have something for you to try later today.
    Regards
    Robert

    PS: It can take 10s for the new value to take effect after it has been sent to the controller. This delay prevents the EEPROM from being written to excessively.

     
  • brownrb

    brownrb - 2018-03-13

    ASCOM driver 252

     
  • Johan Landman

    Johan Landman - 2018-03-13

    Hi Robert,

    I have done a few quick tests.

    MyFocusserApp
    It appears to be working well. Could not duplicate the issues with changes to settings. Everything was spot on every time.

    Setting MAXBACKLASHSTEPS is no longer an option in the firmware. Manual still refers to it.

    May gut feeling is that your tab order is wrong around backlash settings.

    Can you please explain what Max Backlashsteps is used for. You only apply backlash once evertytime direction changes. So backlash should never be more than the respective value of In or Out given the direction. Am I missing something obvious here?

    Ascom

    One more bug. Ascom Properties -> Focusser Settings -> Extra Settings

    Chaning Initial and Max Steps are not saved.

     
  • brownrb

    brownrb - 2018-03-13

    Hi Johan
    Setting MAXBACKLASHSTEPS is no longer an option in the firmware. Manual still refers to it.

    Yes, no longer required. Assumption made that this will be set by Windows or ASCOM driver. Maximum value for this has been removed (so one could set it to 10000 - not recommended).
    If one never uses backlash then no issue: If one wants to use backlash they should determine the values then set the values according, and use "Send backlash settings on connect" all the time. Its prossible that we will just drop maxsteps in the next release as its not really required.

    Manual PDF still needs a bit more work. Few more changes need to be documented.

    ASCOM: Yes they are saved. BUT - if you connect to a controller and "Send backlash settings on connect" is OFF, then the backlash settings of the controller are read and update the backlash settings in the ascom driver - so next time you see that they have changed, Again pdf is lacking in detail as we work through this. It is to ensure that the ascom driver is reflecting the controller when you opt not to send new values to the controller when connecting. That way you alsways know what the controller settings will be. Well that is the general idea I think.

    ASCOM: If you open extra settings and then change maxsteps to 500 and insteps to 79 and then close the form, and exit. Then reopen ascomapp and reselect driver, select extrasettings and maxsteps will be 500 and insteps 79: So this shows its being saved.

     
1 2 3 > >> (Page 1 of 3)

Log in to post a comment.