Hello Guest it is July 12, 2020, 10:22:57 PM

Author Topic: Gaining .0001 steps  (Read 8839 times)

0 Members and 1 Guest are viewing this topic.

Offline RICH

  • *
  •  7,411 7,411
    • View Profile
Re: Gaining .0001 steps
« Reply #10 on: May 02, 2013, 07:58:15 AM »
Ian, don't recall and would need to do a search, but, Lewis can do that.

So you want to hold a 0.001" on the Sherline.
I replaced the screws, the nuts, added the anti backlash device, fooled with adjustment of the axes on my Sherline. Frankly it would not hold
0.001". The antibacklash adjustments could only maintain around .002" as the setting would wear in after a lot of X movements.
Only talking about movement as one can always adjust how they are working to get close tolerances.

The point being made is that one needs to know what is causing the backlash / non-movement and minimise it the best they can.
The backlash  can be due to a number of things and when you start getting around that 0.001" and below it is  hard to define the
what part each component contributes to the backlash.
- the mechanical tolerance of each component
- adjustment of each component
- the components themselves software, electrical and mechanical
To do the above one needs to isolate each part of the picture since the question becomes ....What did one measure?

Don't much care how you compensate for that backlash as that is a totality patch for the sum of the backlash, and when you do that
it will always be hit or miss. 

That said, I can't say what the fix is as we don't have the whole picture.


Offline stirling

  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: Gaining .0001 steps
« Reply #11 on: May 02, 2013, 12:50:54 PM »
Intrigued as to whether my memory really is going awol I did a (google) search and found quite a few similar stories.

This one shows the detail well. Interestingly quite a few of the hits I found mention Sherline Mode at some point or other. Anyway - it occurred to me that Sherline Mode is obviously a kludge to cope with slow step/dir transitions and therefore it becomes very important that you get the active state of the step pulse "correct". By using Sherline mode you're actually getting a much longer pulse than Mach would normally output - but this is ONLY effective if you trigger on the TRAILING edge of the step pulse.

So for example if you select active HIGH, the trailing edge is a falling edge. If a falling edge is what triggers your drivers your cool. If however your drivers are triggered by a rising edge then you'd need to select active LOW. Otherwise Sherline Mode will do nothing for you.

This may be nothing to do with your particular problem but it does sound similar and worth a try at least.


Offline Hood

  •  25,846 25,846
  • Carnoustie, Scotland
    • View Profile
Re: Gaining .0001 steps
« Reply #12 on: May 02, 2013, 03:39:12 PM »
This only helped until I rebooted Mach3 then it went back to missing steps when direction is changed.

Did you check to see if the active state had reverted to previous settings for some reason?

Offline RICH

  • *
  •  7,411 7,411
    • View Profile
Re: Gaining .0001 steps
« Reply #13 on: May 03, 2013, 07:35:53 AM »
Good link Ian.

Here is info on the controller from Sherline's site and assume it is being used.

Technical Specifications, P/N 8760 Stepper Motor Driver

Power Supply:
Input: 100-240 VAC, 47-63 Hz, 3A (automatically adapts to incoming voltage)
Output: 24 VDC, 4A


∙ Logic high levels should be greater than 2 volts.
∙ Logic low should be less than 1/2 volt.
∙ Step pulses are active low.
∙ Step pulses should be at least 22 microseconds long.
∙ The lines labeled as EMC inputs or outputs can be disregarded in other systems.
∙ For use with software other than EMC, make sure your software addresses the correct I/O lines for step and direction as shown below. 
  Sherline is not able to provide assistance for other programs. For help with the EMC software, see http://www.linuxcnc.org/
∙ We recommend at least an 800 MHz Pentium class computer or faster for use with the frequency mode.

In operation, the power to the motors will be reduced to half current after 3 seconds of inactivity.
This can be changed to 1/4 power with a jumper on H1.

Offline rcaffin

  •  1,029 1,029
    • View Profile
Re: Gaining .0001 steps
« Reply #14 on: May 03, 2013, 08:57:16 PM »
This only helped until I rebooted Mach3 then it went back to missing steps when direction is changed.
Not a new problem.
It sticks in my memory that the problem was happening when the DIR line changed state. If the STEP line had the wrong Active state then there appeared tto be one extra pulse happening in ONE direction. So setting the lines to Active High did solve the problem for a while - until the reboot.

Question: did you save the config before rebooting? If not, you may have wiped out the change in the config (the XML file) to Active-High.

Re: Gaining .0001 steps
« Reply #15 on: May 04, 2013, 01:53:36 AM »
Wednesday I wrote a sub that adjusted the zero as it changed which kept my zero accurate to .005 on the dial. Before turning it loose in my other subs I decided to keep trying to get my setting right even though over the past few weeks I had all but given up.

I figured out that my stepper motors act differently when cold and warm. So I did all of my testing with them warm.
I also discovered that jog inc .01 alternating directions at F6 will not keep zero enough to be used for motor tuning. Job inc .1 alternating directions at F6 works fine.
Next I made a chart of settings including bios(epp1.9, ECP), Ports and pins(step active low, dir active low, Motor tuning( step pulse, dir pulse) and using the below code for testing
  Dim a
  For a = 1 To 30
    Code "G1 Z" & 0.1 + ZOffSet & " F6"
    Code "G1 X" & 0.1 + XOffSet & " F6"
    Code "G1 Z" & 0 + ZOffSet & " F6"
    Code "G1 X" & 0 + XOffSet & " F6"

I finally got it to keep its home zero's within .0000 - .0005 on the dial. A huge difference from the .002 - .003 on the dial that I was getting before.
I ended up with Bios(EPP1.9), Ports and pins(dir active low checked, step active low unchecked), Motor tuning(steps 1600, velocity 35, acc 1, step pulse 1, dir pulse 2)
Restarted mach and it is still good. restarted computer and it is still good.
Backed up my xml.

I can finally start making chips without resetting my zero's constantly.

Thank you everyone for your help
Re: Gaining .0001 steps
« Reply #16 on: May 23, 2013, 12:48:18 PM »
Hi guys,

Just joined the forums after finding this thread, after several years of good operation the exact same problem as described by Lewis has popped up with my Sherline mill and lathe, both setup using the Sherline box.  All attempts at changing Mach software settings were fruitless, so I got out the oscilloscope and starting probing around.  The Mach output signals from the parallel port seems good, with ~40usec separation between the direction and step pulses and nice sharp transitions, but the direction signal at the microcontroller pin inside the Sherline box gets smoothed out on the downward edge only, making it likely that the step pulse immediately after this change in direction is counted for the opposing direction.  The net result is that one direction change is OK but the reverse direction change misses a step.  Accounting for this step error in how the Gcode is written does fix the problem, but of course the coordinates shown in Mach3 no longer represent reality.
I have two of the Sherline boxes and will probe all x-y-z-a channels to see if this problem occurs on all of them.  In the meantime, is it possible in Mach3 to adjust the separation time between a change in direction pulse and the next step pulse?  Otherwise I need to try to sharpen up the direction pulse in hardware somehow.

Really appreciate this thread and everyone's contribution to it!


Offline Chaoticone

  • *
  •  5,629 5,629
  • Precision Chaos
    • View Profile
Re: Gaining .0001 steps
« Reply #17 on: May 23, 2013, 01:41:20 PM »
Thank you Freddy.........  while you have the scope out could you test something for me?  I would like to know the difference in the signals if you go to Config, ports and pins, port setup and enable sherline 1/2 pulse mode.  You will need to shut down Mach and restart each time you change this option.  I would love to see what it actually does to the step and direction signals and if it affects both the same.

;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!
Re: Gaining .0001 steps
« Reply #18 on: May 23, 2013, 06:07:53 PM »
Macchi did you run a older version of mach when your mill and lathe worked correctly? If a older version works better I would be happy to use it. My current settings in mach allow me to make what I want, but I still have to program in pauses to reset my x,z zero. Sometimes the zero is dead on and sometimes it is out .001". It is like it catches the step most of the time now but not always. I was starting to think this is just how steppers are. Hopefully you will find a solution to the problem.
Re: Gaining .0001 steps
« Reply #19 on: May 24, 2013, 12:02:16 PM »
Hi guys!

First off, Brett I have attached scope screenshots turning the 1/2 Sherline mode on and off.  Direction signal is green and pulse signal is yellow.  It appears to me that there is no difference in the direction signal and that the pulse signal is widened to ~40usec in Sherline mode whereas it is however wide you set it in the motor tuning window in the non Sherline mode (in this case 10usec set by me).  Note also that my scope doesn't pick up the narrow non-Sherline pulses at the 5ms timebase resolution, but they are obviously there.