Menu

Backlash

R Jacob
2018-08-05
2018-08-10
  • R Jacob

    R Jacob - 2018-08-05

    Hello Robert,
    I have just finished constructing my second focuser, I am having trouble getting backlash to work, my stepper is a nema17-pg27 with 2.46um steps, using synchronus belt on a newt. I have about 50 steps of backlash,
    I complete the backlash details and tick boxes in the window app, when I check backlash on the scope with a dial indicator there is still approximately the same amount of backlash, it appears the backlash details are not being used by the controller.
    I've checked the backlash details are retained in the windows software, and the upload tick boxes are checked.
    The only option I've enabled in the firmware is backlash.
    I'm using SGPro sequencer, the focuser works fine but after it has gone thru the focus routine it will not return to the focused position and SGP throws up a caution.

    Am I missing something in the setup, I tried resetting the details 4-5 times with the same result, can you suggest where I might have gone wrong.

                                   regards Russ
    
     
  • brownrb

    brownrb - 2018-08-05

    HiRuss

    I guess that you set up the backlash using the windows app first, as onces it set there you dont need to set it up in the ascom driver

    1.What is the firmware filename
    2.What is the application version or are you using ascom?

    Please
    1. Send me the above
    2. start the windows app
    3. goto the extra settings and configure backlash
    4. enable logging
    5. connect to the controller
    6. use the menu option to save settings (under save and restore)
    7. send me the settings file as well

    Regards
    Robert

     
    • R Jacob

      R Jacob - 2018-08-05

      Ok Robert I assumed it was another setting file,...... file attached.

      I'm using the latest firmware, ascom driver and win software.

      myFP2.DRV8825HW203, 273

      2..4.0.6

      Russ

      On 5/08/2018 5:56:33 PM, brownrb brownrb@users.sourceforge.net wrote:
      HiRuss
      I guess that you set up the backlash using the windows app first, as onces it set there you dont need to set 
      1.What is the firmware filename
      2.What is the application version or are you using ascom?
      Please
      1. Send me the above
      2. start the windows app
      3. goto the extra settings and configure backlash
      4. enable logging
      5. connect to the controller
      6. use the menu option to save settings (under save and restore)
      7. send me the settings file as well
      Regards
      Robert
      Backlash [https://sourceforge.net/p/arduinoascomfocuserpro2diy/discussion/general/thread/b415703e/?limit=25#8c52]
      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/arduinoascomfocuserpro2diy/discussion/general/ [https://sourceforge.net/p/arduinoascomfocuserpro2diy/discussion/general/]
      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/ [https://sourceforge.net/auth/subscriptions/]

       
  • R Jacob

    R Jacob - 2018-08-05

    Hello Roberet, thx for ur reply, where will I find the saved settings file.

                           Russ
    
     
  • brownrb

    brownrb - 2018-08-05

    where ever you told the app to save the error log file when the app was first installed - if you have forgotten try settings - log file - reset error log file path and then enter a new folder location

     
  • brownrb

    brownrb - 2018-08-05

    make sure u are using the latest firmware 273 as there was issues with backlash till then

     
  • R Jacob

    R Jacob - 2018-08-05

    Ok Robert I assumed it was another setting file,...... file attached.

    I'm using the latest firmware, ascom driver and win software.

    myFP2.DRV8825HW203, 273

    2..4.0.6

    Russ

     
  • brownrb

    brownrb - 2018-08-06

    Ok
    I can see that the application has set backlash in enabled, backlash out enabled and backlash in steps and backlash out steps to 80

    Backlash is only applied when a change in direction takes place. So if the last move was out and the current move is out, backlash is not applied.

    To test I suggest the following - make sure you have compiled with BACKLASH defined and make sure that //#define DEBUG 1 is changed to #define DEBUG 1
    and then reporgram the controller

    Use the serial port monitor of the ide (or a terminal program like termite) and connect with the comport set to 9600bps - make sure that it is set to No line ending (bottom right of terminal window)

    type
    :00#
    and click Send, the response should be something like
    Pxxxxxx#
    where xxxxx is the focuser position
    Lets say xxxx was 5000, so lets goto 500 steps out which would be 5500 (you need to use the correct values for you)
    So, type
    :055500# and click Send

    this is a OUT direction. Now lets test backlash to see if its working in firmware. On this next command we should see a lot of messages about backlash
    So 500 steps back in is 5000 so type
    :055000# and click Send

    Now in the serial monitor, if all is working, you will see the details about backlash =

    Copy the serial window text and paste it in the reply
    Dont forget to reprogram your controller by disabling DEBUG in the firmware otherwise it will not talk to the Windows app

    Regards
    Robert

     
  • R Jacob

    R Jacob - 2018-08-06

    Hello Robert,
    the terminal data, I noticed the focuser did not move I assume this is normal.

    00#
    - replystr =
    00#- len = 3#- mycmd =
    0#- param = 0#- cmdval = 0#P2500#:2000#
    - replystr =
    2000#- len = 5#- mycmd =
    2#- param = 000#- cmdval = 2#EOK#:2500#
    - replystr =
    2500#- len = 5#- mycmd =
    2#- param = 500#- cmdval = 2#EOK#

    Regards Russ

     
  • brownrb

    brownrb - 2018-08-07

    Hi Russ
    Well that is certainly not expected at all.
    Please send me the firmware file you used to program the controller

     
  • brownrb

    brownrb - 2018-08-07

    This is what I got when I did the same test

    myfocuser.fposition = 5219
    - replystr = 00#- len = 2#- mycmd = 00#- param = #- cmdval = 0#P5219#- replystr = 055719#- len = 6#- mycmd = 05#- param = 5719#- cmdval = 5#- Current Pos=5219#- New Pos=5719#- Previous direction=0#- New Direction=1#- Applying backlash#- Backlash steps OUT=34#- 2s delay before move#- Move to position 5719#- replystr = 055219#- len = 6#- mycmd = 05#- param = 5219#- cmdval = 5#- Current Pos=5719#- New Pos=5219#- Previous direction=1#- New Direction=0#- Applying backlash#- Backlash Steps IN=12#- 2s delay before move#- Move to position 5219#

     
  • R Jacob

    R Jacob - 2018-08-07

    G'day Bob, vry different outcome, file attached

     
  • brownrb

    brownrb - 2018-08-08

    I see that degbug is not defined -
    see line 98 - it should be #define DEBUG1 and not //#define DEBUG 1
    make the change, reprogram the controller and rerun the test

     
  • R Jacob

    R Jacob - 2018-08-08

    I changed line 98 back to // b4 I sent you the file

     
  • R Jacob

    R Jacob - 2018-08-08

    But I will go and rerun the debug again

     
  • R Jacob

    R Jacob - 2018-08-08

    Something very srewy going on, I d/l the firmware again from SF and opened it for editing and I dont have a //debug line at line 98 now ???

     
  • brownrb

    brownrb - 2018-08-08

    try this version, its found at line 368

     
  • R Jacob

    R Jacob - 2018-08-08

    Hello Bob,
    I dont think the focuser is changing position, if I do a :00# after the move it returns the original position, see below, In case I have the settings wrong I've attached an image of Termites setting,

    :00#
    - replystr =
    00#- len = 3#- mycmd =
    0#- param = 0#- cmdval = 0#P2600#:3000#
    - replystr =
    3000#- len = 5#- mycmd =
    3#- param = 000#- cmdval = 3#F274#:00#
    - replystr =
    00#- len = 3#- mycmd =
    0#- param = 0#- cmdval = 0#P2600#:2400#
    - replystr =
    2400#- len = 5#- mycmd =
    2#- param = 400#- cmdval = 2#EOK#:00#
    - replystr =
    00#- len = 3#- mycmd =
    0#- param = 0#- cmdval = 0#P2600#

     
  • brownrb

    brownrb - 2018-08-09

    Hi
    Thats better. What we can see is NO backlash in the debug output - indicated backlash is not enabled in the firmware.

    So
    1. comment out the define on line 368 - it should be //#define DEBUG 1
    2. reprogram the controller
    3. run the windows program, access ethe extra settings form, enable backlash for in and out,set the steps values for in and out, enable send backlash settings on connect, enable Controller supports backlash, click Close to close the form and return to tha main windows app
    4. Click connect'
    5. Once connected, check the backlash settings by using the Settings-Backlash Compensation menu option - the Get Status IN should display Backlash IN status = 1 in the Status Message Box, then test Get Status OUT, Get Steps IN and Get Steps OUT to confirm that the settings you entered on the Extra settings form were correctly sent to the focuser.

    Now you could try a move out 500+
    Wait 5s
    Try a move 500-
    Backlash is applied immediately at the beginning of a move, then the move is actioned - you may not be able to visually see the backlash as it will look like part of the move.

    Depending on backlash steps and step mode, it may look like the focuser ends up in the same place as a normal move. Step mode such as full, high number of backlash steps (like 100+) will be more noticable.

    But as I said - when a move is received by the controller - backlash is applied first, then the move is done, all at the same speed setting - so visually it can look like just 1 move.

    See how that goes.

    At this point if after doing the above, and you are still not sure if backlash is being applied, then you should
    1. Go into the firmware and change line368 to remove the firs ttwo comments markers - the //
    2. Reprogram the controller
    3. Repeat the tests with the terminal program
    4. Backlash statements should appear in the debug output to verify that backlash is being applied.

     
  • R Jacob

    R Jacob - 2018-08-09

    Hello Robert,
    I reloaded v 274 last night and run auto focus in SGP, all appears to be working althought the V curve is a bit sloppy, but the focuser appears to be adjusting for backlash and now its not returning a focus caution.
    This morning I unremed line 368 and carried out the debug routine in termite, It doe not move the focuser position and I still have no backlash details.
    I setup the dial indicator on the focuser and it appears to be adjusting for backlash and returning to the original position after moving the focuser in and then out.

    The backlash section in "extra settings" has always been filled in as per your .jpg the only thing I found was that the temp probe was fitted to the controller and was not defined in the firmware.
    The other thing I found this morning is my focus position is at step 1778 I would like to set my max step value lower than the current position of 6000, I'm unable to change the "max steps" setting, if I change it in extra setting it remains unchanged in the win app, if I change it in the win app and disconnect it remains unchanged, not sure whats going on here.
    There seems to some inconsistancies in whats supposed to happen and whats actually happening eg: no backlash info in termite, unable to change max steps,......... but point is the autofocus is working and I'm fairly happy with it.
    We've had a lot of cloud cover lately so at the next opportunity I will give it a full imaging run.

    Thanks for your help so far it is greatly appreciated.

     
  • brownrb

    brownrb - 2018-08-10

    To change maxsteps using the windows app
    Connect to the controller
    after all values have been updated, wait 5s
    enter the new maxsteps value into maxsteps on the main form
    Click Set to the right of the maxsteps text box
    WAIT 1 MINUTE
    Disconnect

    Whenever you make an important change, the controller will wait 30s before saving the value in EEPROM. You have to wait 30s before disconnecting and reconnecting or power off. Important changes are backlash settings, focuser position, maxsteps, stepsize, lcd enable, motorspeed settings, and so on,

    If you cannot wait 30s, then use the settings menu - option is - Write focuser settings to EEPROM - this does the save immediately.

    Features like LCD display, Temperature Probe, Backlash, LEDS, Buzzer, and so on are all options. These are either enabled or disabled by the user. The idea is the user builds the hardware they want, and then configure the firmware options to match the hardware they have built. The firmware file has most options disabled. So if you built a focuser with a temperature probe you would need to enable that option in the firmware before programming the controller.

    To disable an option use // before the option
    To enable an option remove the // the option

    Options are listed at the top of the firmware file in the // DEFINABLE FEATURES section
    A typical option looks like
    // To enable temperature probe, uncomment next line
    //#define TEMPERATUREPROBE 1

    to enable the option for a temperature probe it would look like
    // To enable temperature probe, uncomment next line
    #define TEMPERATUREPROBE 1

    Same principle for the others.

    GENERAL RULE FOR OPTIONS
    Do NOT enable an option if the hardware for that option does not exist. For example, if you enable pushbuttons or home-position-switch in the firmware and the hardware has not been added to the controller - then you can expect some pretty annoying and frustrating problems to occur.

     

    Last edit: brownrb 2018-08-10

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.