Sanity check
Charles Shearer 1 | 20/04/2019 15:28:29 |
9 forum posts 3 photos | 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 |
Bazyle | 20/04/2019 17:22:13 |
![]() 6956 forum posts 229 photos | 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. |
Martin Connelly | 20/04/2019 17:27:26 |
![]() 2549 forum posts 235 photos | 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 |
SillyOldDuffer | 20/04/2019 18:12:44 |
10668 forum posts 2415 photos | 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 ) 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:
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 |
Andrew Johnston | 20/04/2019 19:38:01 |
![]() 7061 forum posts 719 photos | Oh dear, the cart seems to be in fromt of the horse. 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 |
Michael Gilligan | 20/04/2019 19:59:19 |
![]() 23121 forum posts 1360 photos | Posted by Andrew Johnston on 20/04/2019 19:38:01:
Oh dear, the cart seems to be in fromt of the horse. 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 |
John Haine | 20/04/2019 19:59:28 |
5563 forum posts 322 photos | 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. |
Howard Lewis | 20/04/2019 21:17:37 |
7227 forum posts 21 photos | 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 |
Ian P | 20/04/2019 21:55:53 |
![]() 2747 forum posts 123 photos | 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 |
Michael Gilligan | 20/04/2019 22:04:47 |
![]() 23121 forum posts 1360 photos | For info. ... Here is the StackShot rail: **LINK** https://www.cognisys-inc.com/products/stackshot/stackshot.php MichaelG. |
Charles Shearer 1 | 20/04/2019 22:35:01 |
9 forum posts 3 photos | 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 |
Michael Gilligan | 20/04/2019 22:48:06 |
![]() 23121 forum posts 1360 photos | 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 |
Charles Shearer 1 | 20/04/2019 22:59:01 |
9 forum posts 3 photos | 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
|
Michael Gilligan | 20/04/2019 23:03:57 |
![]() 23121 forum posts 1360 photos | 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 |
Charles Shearer 1 | 20/04/2019 23:26:51 |
9 forum posts 3 photos | Michael Don't suppose you've got a spare one going cheap!!!!! Chas
|
AdrianR | 21/04/2019 10:52:56 |
613 forum posts 39 photos | 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 |
Charles Shearer 1 | 21/04/2019 11:11:33 |
9 forum posts 3 photos | 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
|
john carruthers | 21/04/2019 11:43:40 |
![]() 617 forum posts 180 photos | 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. |
Charles Shearer 1 | 21/04/2019 11:53:55 |
9 forum posts 3 photos | 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 |
SillyOldDuffer | 21/04/2019 12:08:29 |
10668 forum posts 2415 photos | 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
|
Please login to post a reply.
Want the latest issue of Model Engineer or Model Engineers' Workshop? Use our magazine locator links to find your nearest stockist!
Sign up to our newsletter and get a free digital issue.
You can unsubscribe at anytime. View our privacy policy at www.mortons.co.uk/privacy
You can contact us by phone, mail or email about the magazines including becoming a contributor, submitting reader's letters or making queries about articles. You can also get in touch about this website, advertising or other general issues.
Click THIS LINK for full contact details.
For subscription issues please see THIS LINK.