Backlash

Advert

Backlash

Home Forums Beginners questions Backlash

Viewing 25 posts - 1 through 25 (of 27 total)
  • Author
    Posts
  • #405799
    Charles Shearer 1
    Participant
      @charlesshearer1

      I'd really appreciate some help with my ageing brain – what I thought was simple is causing me a lot of confusion!

      I'm designing a microcontroller for an extreme macro platform using a linear rail driven by a stepper motor. I have the rail finished and the code for the microcontroller is virtually complete.

      However, during early testing I found that the linear rail did not always come back to the exact same spot (I'm working in fractions of a millimetre).

      The answer was obvious – backlash on the leadscrew – which I measured with a DTI as 0.065 mm. In 'full' steps ( I can microstep to 1/16th of this) the backlash is measured as 13 steps.

      To describe a typical situation.

      I start with all backlash taken up and move in the Forward direction.

      As an example let us say 500 steps Forward.

      I've overshot so I step back 10 steps in Reverse.

      Still not right so I move 20 steps Forward.

      Finally, I move 5 steps back.

      Please ignore the obvious fact that the linear hasn't physically moved if less than 13 steps – the figures are for calculations only.

      My question is how many 'real' steps Forward have I taken and do I have to cater for any 'unused' backlash at the end of my travels?

      Many thanks in advance

      Charles

      Advert
      #9628
      Charles Shearer 1
      Participant
        @charlesshearer1

        Sanity check

        #405806
        Bazyle
        Participant
          @bazyle

          You have moved 510 steps forward. Neither of your reverses did anything.

          I suggest spring loading the device in one direction sufficiently that every step in reverse does move because the spring pulls the carriage back against the screw.

          #405808
          Martin Connelly
          Participant
            @martinconnelly55370

            Typical method for CNC is to set up a dial indicator. Move towards the indicator until it moves a suitable amount to be sure it is off its stop and set it to read zero. This is the zero position. Reverse away from the indicator and back to zero to check zero is correctly set on the indicator, repeat as necessary.

            Move forward another mm or other suitable distance to ensure the indicator moves away from zero then back to the zero position. The difference on the indicator from zero is the backlash value. If you can't enter this value into your program then calculate the number of steps to move this distance and add them to the reverse move.

            Repeat the above with the backlash compensation and check the indicator returns to zero when the reverse move is made.

            It is probably a good idea to reverse the direction and check backlash from the other way as well.

            Martin C

            #405812
            SillyOldDuffer
            Moderator
              @sillyoldduffer

              Not sure if it will hold accuracy well enough for your purpose, but if you know backlash to be equivalent to 13 microsteps, then change the code to add 13 extra steps each time direction is reversed.

              After making sure backlash is taken up at start, say the platform is moved forward by turning the screw 500 steps. No problem with backlash. Also, if the platform is advanced in the same direction by another 20 steps, there's no need to compensate for backlash because the screw is still engaged properly.

              But when the direction is reversed backlash kicks in and the screw has to be turned 13 steps in the new direction to re-engage the screw; after that the normal move should work.

              if ( directionChanged )
              correctBacklash()
              movePlatform()

              Adding a correction on each reversal might be 'good enough' but because the computer can't guarantee its exact position over time the platform may drift sufficiently away from it's calculated location to mess with the focus. If that happens either:

              1. Always step accurately in one direction so backlash can't intrude. When a reverse is required, return the platform to its start position, take up backlash, and move forward again, or,
              2. Add a DRO so the computer knows where the platform is and can stop at any position; this method doesn't need to count steps or know how big the backlash is.

              Assuming a digital camera such that you can see the platform is out of position because of backlash, it would be possible to combine the compensate on reverse method with a manual rewind to start as in 1, at any point the operator decides a reset is necessary.

              Dave

              #405820
              Anonymous

                Oh dear, the cart seems to be in fromt of the horse. smile

                Ideally one would have specified an acceptable backlash before building hardware and writing software; then one can select the hardware to achieve that accuracy, or at least get close to it. What positional accuracy do you want to achieve?

                If we assume you need to move from point X to point Y and then back to point X with a given accuracy then the question arises; can you overshoot position X on the way back and then move forward to it? If so then all you need to do is step past point X by more steps than the backlash and then move forwards again to point X. It's a standard technique when machining for taking into account backlash in items like a lathe cross slide.

                Andrew

                #405827
                Michael Gilligan
                Participant
                  @michaelgilligan61133
                  Posted by Andrew Johnston on 20/04/2019 19:38:01:

                  Oh dear, the cart seems to be in fromt of the horse. smile

                  Ideally one would have specified an acceptable backlash before building hardware and writing software; then one can select the hardware to achieve that accuracy, or at least get close to it. What positional accuracy do you want to achieve?

                  .

                  I'm struggling a little to understand what Charles is trying to achieve

                  The usual reason for using such a rail is to do stacked images, so it will be stepped through increments where each puts a plane in focus: For 'macro' work, the steps might be between 10 and 100 microns, and on the microscope [say] 0.5 to 5 microns. … Obviously, the preferred approach is to start at one extreme and step to the other, in a constant direction.

                  … But perhaps Charles only wants to focus on a particular plane, and will need to 'hunt' for that point.

                  MichaelG.

                  .

                  For the unitiated: http://zerenesystems.com

                  Edited By Michael Gilligan on 20/04/2019 20:01:18

                  #405828
                  John Haine
                  Participant
                    @johnhaine32865

                    If the forces involved are not great (i.e. not machining), I'd suggest making a new zero backlash nut, either using a ballscrew or a plastic nut, possibly melted to a close fit on the thread.

                    Also don't rely on microstepping to save you by getting more resolution, it doesn't necessarily behave as expected.

                    #405840
                    Howard Lewis
                    Participant
                      @howardlewis46836

                      Not into CNC, but if you know that there is backlash equal to 13 steps, then you must reverse the overshoot plus more than 13 steps so that when you move forward again, the first 13 steps will be taking out the backlash (just as you would if you were turning the dials on a manual machine. .Say the overshoot is 0.005:and you know that you have 0.020" backlash – reverse by 0.030 – move forward 0.020 to take out the backlash, then you are then 0.005 before where you want to be, so advance 0.005 to the required position.

                      Howard

                      #405846
                      Ian P
                      Participant
                        @ianp

                        Another factor that can affect repeatability is 'wind-up' or other flexibility in the drive train, or lack of rigidity in the structure. The inertia and weight of the moving carriage (plus sticktion) and the fact that stepper motors move in jerks rather than smoothly means you need very high reduction ratios

                        If you want to return to a specific position several times and always be sure it the same as last time then apart from always approaching from the same direction, you need to approach at the same speed and or decelerate identically each time.

                        As others have said it depends on what sort of accuracy/resolution you require. In general the mechanics of the system needs to have a higher specification than it would first appear.

                        Ian P

                        #405847
                        Michael Gilligan
                        Participant
                          @michaelgilligan61133

                          For info. … Here is the StackShot rail: **LINK**

                          https://www.cognisys-inc.com/products/stackshot/stackshot.php

                          MichaelG.

                          #405850
                          Charles Shearer 1
                          Participant
                            @charlesshearer1

                            Good Evening to all – and thanks for the responses. I had no idea the forum was so active!

                            To clarify – I am very aware of the commercial offerings for macro rails – the problem with them is the controllers are pathetic in the functionality they offer in that they expect you to do all of the Depth of Field calculations, efStops, magnification factors, CoC etc etc etc and then input the distance to travel.

                            I've written the code that allows you to input numerous variables via a 3.5" touchscreen tft panel – such as size of sensor, leadscrew pitch, stepper angle, microstepping, fstop used, acceleration, deceleration, flash recharge times. The microcontroller now does all the calculations such as steps between shutter actuations, effective fStop etc etc and controls the stepper movements, fires the flashes, lights etc.

                            I'm delighted with the accuracy of the movements, particularly when microstepping – no 'jitter' and amazing accuracy and repeatability.

                            To set up a 'run' I need to find the exact IN spot for the start of a run and the exact OUT point for the end of the run. This usually involves some forward / backwards movements while I study the target images and adjust the points. It is here that I'm coding in precise measurements for backlash so that when I set the aforementioned points the precise and actual microsteps for the IN and IN to OUT is calculated – even 'unused' backlash not taken up is a factor.

                            A straight run in one direction is achieved after the run set-up and all I need to worry about is the backlash when returning to IN if I want a repeat run.

                            In any event – Silly Old Duffer confirmed my over-thinking! Shame you adopted that nickname – it'd suit me nicely!

                            Best to all.

                            Charles

                            #405854
                            Michael Gilligan
                            Participant
                              @michaelgilligan61133

                              Thanks for the clarification, Charles

                              … I should perhaps explain that my link to the StackShot rail was by way of background information for those who might be familiar with CNC but not with image-stacking.

                              MichaelG.

                              .

                              P.S. personally, I'm not entirely convinced that you need to find exact IN and OUT points … I generally err on the side of caution and take a few too many shots; then just use the ones that show useful detail in some area.

                              … Your way of working may, of course, be different.

                              Edited By Michael Gilligan on 20/04/2019 22:49:03

                              #405857
                              Charles Shearer 1
                              Participant
                                @charlesshearer1

                                Michael,

                                Understood.

                                You are of course correct that there is no absolute necessity to find the exact IN and OUT points – but when at 20x magnification even being slightly out can result in many wasted shutter actuations – and wasted images!

                                With some runs in the hundreds of images for stacking and a touch of OCD I'm just seeking to make things as accurate and as automated as I can within the mechanical limitations of the linear rails / stepper.

                                Thanks again

                                Charles

                                #405860
                                Michael Gilligan
                                Participant
                                  @michaelgilligan61133

                                  Nothing wrong with a touch of OCD, Charles

                                  … I wish you well-earned success !!

                                  MichaelG.

                                  .

                                  If you haven't seen it … have a look at this little beauty, from Zeiss:

                                  https://www.zeiss.com/microscopy/int/products/imaging-systems/smartzoom-5.html

                                   

                                  Edited By Michael Gilligan on 20/04/2019 23:09:16

                                  #405863
                                  Charles Shearer 1
                                  Participant
                                    @charlesshearer1

                                    Michael

                                    Don't suppose you've got a spare one going cheap!!!!!

                                    Chas

                                    #405883
                                    AdrianR
                                    Participant
                                      @adrianr18614

                                      Just a couple of thoughts.

                                      Micro stepping is a nifty feature but is not usually guaranteed for positional accuracy. The higher the micro stepping ration the greater the error. So if you are using 32 micro steps, 5 steps could be quite normal error.

                                      How fast are you driving this? if it is too fast you could be missing steps. Just because you tell the motor to move does not mean it does. Especially when accelerating. Are you using ramped acceleration/de-acceleration?

                                       

                                      Edited By AdrianR on 21/04/2019 10:53:42

                                      #405886
                                      Charles Shearer 1
                                      Participant
                                        @charlesshearer1

                                        Hi,

                                        Understood – but from initial testing I appear to be very lucky.

                                        That being said – because of the nature of the work I am putting it to the distances travelled are very small. A total run of 10mm is a long run. Vibration at high magnification is a serious problem – so the speed of travel i.e. the speed between steps is set by variable and during the run is currently 200 milliseconds between steps with a 2 second delay before any shutter actuation to ensure any vibrations have subsided. This combined with flash recharge delays makes for a lengthy run time given there'll be 200-300 images each run. The rare microstep loss shouldn't be an issue – at a stepsize of 0.0003125mm I don't even have the hardware to measure it.

                                        During resets, returns to 'home' or 'in points I ramp the speed up.

                                        I've finally finished the code and I'm testing with temporarily attached DTI's – will know soon enough if things are indeed reliable.

                                        Best

                                        Charles

                                        #405892
                                        john carruthers
                                        Participant
                                          @johncarruthers46255

                                          The usual solution for this, when using astro telescopes, is to incorporate an absolute encoder to see actual movement rather than rely on step counting.
                                          The cheapo diy version uses an old mouse encoder wheel.

                                          #405895
                                          Charles Shearer 1
                                          Participant
                                            @charlesshearer1

                                            Hi John,

                                            Oh no! I feel project creep kicking in here. If I understand you correctly I need to physically add said encoder to the linear rail?

                                            Much as I'd like to declare version 1.0 – this intrigues me, I'll have to look into this.

                                            Can they actually have the resolution to detect the microstep sizes I'm using?

                                            Any further detail appreciated.

                                            Thanks

                                            Charles

                                            #405897
                                            SillyOldDuffer
                                            Moderator
                                              @sillyoldduffer
                                              Posted by Charles Shearer 1 on 21/04/2019 11:11:33:

                                              Hi,

                                              Understood – but from initial testing I appear to be very lucky.

                                              will know soon enough if things are indeed reliable.

                                              Adrian is right to suspect the accuracy of micro-stepping, but my experience with a rotary table suggests it's much more reliable than 5 steps in 30! Provided the motor is lightly loaded and not driven too fast with an adequate driver, it should work well. I'll be surprised if Charles doesn't get good results – unless his stepper motor is tiny.

                                              Any chance of sharing some pictures when it's working Charles? It's an interesting project. Macro-photography and frame stacking go together like bacon and eggs!

                                              Dave

                                              #405905
                                              SillyOldDuffer
                                              Moderator
                                                @sillyoldduffer
                                                Posted by Charles Shearer 1 on 21/04/2019 11:53:55:

                                                Hi John,

                                                Oh no! I feel project creep kicking in here. If I understand you correctly I need to physically add said encoder to the linear rail?

                                                Much as I'd like to declare version 1.0 – this intrigues me, I'll have to look into this.

                                                Can they actually have the resolution to detect the microstep sizes I'm using?

                                                Any further detail appreciated.

                                                Thanks

                                                Charles

                                                Charles probably doesn't need to worry about absolute position. He's frame stacking on focus to increase depth of field rather than to improve signal-to-noise as the astronomers do.

                                                Given an object like the head of a wasp, I guess Charles would start by focussing a highly magnifying camera lens on the very front of the insects head. As the camera is only in focus in that particular plane, most of the head will be more-or-less blurred, not a good photo. Moving the camera to focus on the middle part produces another image, again mostly blurred but now with the central plane in sharp focus. Repeating after moving the camera to focus on the rear of the head, and you get 3 mostly blurred photos, each of which is good at one point. Focus stacking creates a new picture by combining the in-focus parts of the three duds, essentially by ignoring anything in each image that's blurred.

                                                Charles hasn't said what his lens is, but no doubt it's far more tightly focussed than would allow a good photo to be captured from only 3 images, hence he proposes to take 2 or 3 hundred. Provided he has a reasonably spaced sequence of images it should work without any need for CNC-level precision or accuracy. I don't think focus stacking needs to know how far the camera is moved, nor is it critical to move the camera exactly the same distance each time. A few missed steps resulting in duplicate images are unlikely to make much difference. The software cares little what the distance between frames actually is; whatever image it gets, blur is suppressed and focus retained.

                                                What might cause trouble is moving the camera backwards and forwards during a run. As moving the camera along the rail alters the apparent size of the subject the focus stacking software likely compensates by resizing frames on the assumption camera movement is linear. Either forwards or backwards, but never a mixture.

                                                The number of steps needed to get a good composite is related to the depth of focus of the lens. Too few steps and the composite will be inferior to the best possible, too many steps wastes time because adjacent photos don't differ enough in focus to matter, and they increase the risk of unwanted artefacts appearing due to computer processing.

                                                Dave

                                                #405908
                                                Michael Gilligan
                                                Participant
                                                  @michaelgilligan61133
                                                  Posted by SillyOldDuffer on 21/04/2019 13:18:08:
                                                  .
                                                  I don't think focus stacking needs to know how far the camera is moved … The software cares little what the distance between frames actually is …

                                                  .

                                                  I can confirm that, Dave "from the horse's mouth"

                                                  Rik Littlefield [the author of Zerene Stacker] told me it was so.

                                                  MichaelG.

                                                  .

                                                  [quote]

                                                  On 14 Jul 2018, at 01:45, support@zerenesystems.com wrote:
                                                   

                                                  Michael,

                                                  I do not anticipate any special problems from either the unequal spacing or the small number of frames.  Unless you're doing synthetic stereo (probably not practical with only 3 images), Zerene Stacker does not make any assumptions about equal spacing.  And while 3 frames is definitely on the short end of things, I have seen even 2-image stacks processed to good effect.

                                                  [/quote]

                                                  Edited By Michael Gilligan on 21/04/2019 14:02:22

                                                  #405909
                                                  Charles Shearer 1
                                                  Participant
                                                    @charlesshearer1

                                                    Hi,

                                                    It's being tested as we speak after some final tweaks to the code (until v 1.1). From a couple of runs so far – bearing in mind my DTI's have divisions of 0.01 mm (which I believe is pretty cheap and cheerful) – I can see slight errors now.

                                                    The microcontroller is still unboxed (3dPrint project next) so it looks untidy) – but photos will be nevertheless be forthcoming asap.

                                                    Best

                                                    Charles

                                                    Round 2 testing:

                                                    1) Full steps i.e. 0.005mm out 2000 steps DTI 10.00 mm Back 2000 steps DTI 0.00

                                                    2) Half steps i.e. 0.0025mm out 4000 steps DTI 10.015mm Back 4000 steps DTI 0.015 mm

                                                    3) Quarter steps i.e. 0.00125mm out 8000 steps DTI 10.015 mm Back 8000 steps DTI 0.015 mm

                                                    4) Eighth steps i.e. 0.000625mm out 16000 steps DTI 10.015mm Back 8000 steps DTI 0.045mm ???? Re-test

                                                    5) Sixteenth steps i.e. 0.0003125 out 32000 steps DTI 10.015mm Back 32000 steps DTI 0.05 ?? Re-test

                                                    As you say the processing software doesn't care about where the the plane of focus was – just extracts the sharpest detail from each image in the stack – but, the important point is that if you miss a plane of focus you spoil the overall image by having even a tiny element out of focus. As an example, at a modest magnification i.e. 5:1 the depth of field i.e. the depth of the plane of focus at, f2,8 on a full frame sensor, is a mere 0.0030mm deep (reduced by 20% to allow for image overlap). So it is important that there are steps between shutters of no more than that amount .

                                                    Update – I know why the 1/8th and 1/16 are out – mathematical precision of the microcontroller – fixing it!

                                                    Charles

                                                    #405911
                                                    Neil Wyatt
                                                    Moderator
                                                      @neilwyatt
                                                      Posted by Charles Shearer 1 on 20/04/2019 22:59:01:

                                                      Michael,

                                                      Understood.

                                                      You are of course correct that there is no absolute necessity to find the exact IN and OUT points – but when at 20x magnification even being slightly out can result in many wasted shutter actuations – and wasted images!

                                                      With some runs in the hundreds of images for stacking and a touch of OCD I'm just seeking to make things as accurate and as automated as I can within the mechanical limitations of the linear rails / stepper.

                                                      Thanks again

                                                      Charles

                                                      The simple answer is always finish every move by taking up the backlash in the same direction, so set a minimum additional move for reversals of Y= backlash plus a safety margin.

                                                      Set the 'base position' by moving forards Y steps.

                                                      Now if you move forward X, just move X steps.

                                                      If you move backwards X steps, move X + Y, move forwards Y.

                                                      This is how GOTO telescopes compensate for backlash, although they tend to use rather pessemistic (large) values for 'Y'

                                                      Neil

                                                    Viewing 25 posts - 1 through 25 (of 27 total)
                                                    • Please log in to reply to this topic. Registering is free and easy using the links on the menu at the top of this page.

                                                    Advert

                                                    Latest Replies

                                                    Home Forums Beginners questions Topics

                                                    Viewing 25 topics - 1 through 25 (of 25 total)
                                                    Viewing 25 topics - 1 through 25 (of 25 total)

                                                    View full reply list.

                                                    Advert

                                                    Newsletter Sign-up