Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: guynamedbathgate on July 25, 2011, 03:49:47 PM

Title: Gaining steps...maybe? with Servo Drive
Post by: guynamedbathgate on July 25, 2011, 03:49:47 PM
I am scratching my head on this one so I thought I would consult the Hive Mind. I am having an issue where my Z axis on my Mill is gaining steps. If I move the z head down 1" I get exact motion. If I move the z axis up, I get between 1.008" and 1.015" of movement (not lost steps, but gained steps). I do not think it is slop in the system because the error is cumulative and based on the feed rate. the slower I move the Z the greater the error. If I do a test program that moves the head +1" then -1" and runs the cycle 50 times. at 40 IPM I get a total accumulated error of about .015" if I run the same program at 5 IPM I get a total accumulated error of .05"-.075" or more!!

I am using Gecko Servo Drives and the servo's are from Industrial Hobbies. I am using Bob Campbell s break out board as well.

If anyone has any test suggestions I am open.
So far I have tried
- re tuning the servo drive with no effect.
- check the ball screw and bearing to make sure it was not moving in and out.
- Backlash on my Ball nut is approximately .003" (its a heavy mill head so preloaded nuts dont really work so good)
- adjusted the motor acceleration way down to be sure I wasnt loosing steps that way.

I have had this machine for 5 years and it generally has run well, this is a new development I cant seem to sort. anyone got any ideas.

Chris
Title: Re: Gaining steps...maybe? with Servo Drive
Post by: Hood on July 25, 2011, 03:54:57 PM
Have you added anything electrical recently that could be producing noise on the encoder lines?

Dont know much about the Geckos but is there any way in software to monitor the encoder counts?
Hood
Title: Re: Gaining steps...maybe? with Servo Drive
Post by: guynamedbathgate on July 25, 2011, 04:02:41 PM
hmmm,
I think I am getting some noise for sure. I have been getting a number of unexplained E stops lately, as well. Dont really know how to account for it though.
I will also say this. My house was struck by lightning a few weeks ago as well, which fried another controller I had in my shop (left the computer on, but not the controller and fried a Bob Board), but not this one. Luckily this one was off and seemed to be OK. I dont know what kind of a current spike or damage could occur when the power supply was off and the computer turned off as well, but I suppose its entirely possible that did something to it. Again, wouldnt know what to test to be sure without just replacing each component and seeing if that fixes the problem. That seems like an expensive way to check things though.

Chris

Title: Re: Gaining steps...maybe? with Servo Drive
Post by: Hood on July 25, 2011, 05:09:02 PM
I would try swapping components around rather than replacing them, for example swap X and Z drive and see if it follows or not. Swap wires around on BOB etc etc.
Hood
Title: Re: Gaining steps...maybe? with Servo Drive
Post by: Hood on July 25, 2011, 05:13:00 PM
Also meant to ask, is the cutter always lower with the error? Could be losing steps on the way up due to extra weight with gravity and possibly a slightly binding axis. Moving faster may give it more momentum to get through the sticky patch where moving slower doesnt.

What amount would the largest amount you have seen it out of position be in encoder counts?
Hood
Title: Re: Gaining steps...maybe? with Servo Drive
Post by: guynamedbathgate on July 25, 2011, 05:34:06 PM
No, the cutter is higher. Thats why I am so baffled. I swapped out the Gecko driver with a brand new one I had sitting around and it made no difference. Like I wrote before. On the way down, the motion is accurate, exactly 1" down every time. On the way up though, I get an accumulative overshot so that I end up with the cutter moving higher and higher out of alignment. very strange. I dont see why the encoder would only error in one direction.

CB
Title: Re: Gaining steps...maybe? with Servo Drive
Post by: guynamedbathgate on July 25, 2011, 05:51:53 PM
its a 1000 line encoder. and the machine runs at 20,000 steps per inch. so I'd so over 2,000 lines off at least. I just kept running it and running it to see how much of an error would accumulate. there seems to be no end to it.

Chris
Title: Re: Gaining steps...maybe? with Servo Drive
Post by: Hood on July 25, 2011, 06:18:40 PM
Would seem it would have to be noise on the Step/Dir then or surely the Geckos would fault?
Hood
Title: Re: Gaining steps...maybe? with Servo Drive
Post by: stirling on July 26, 2011, 06:52:06 AM
but why would noise only affect one direction? If it was on the step line then surely it would affect both directions. If it was on the dir line then sure a LOW direction signal is (I think) more susceptible to noise, but it would (theoretically) momentarily reverse the intended direction and therefore look like LOST steps albeit predominantly in one direction.

Sorry - no help I'm sure - just bouncing thinks.

Ian
Title: Re: Gaining steps...maybe? with Servo Drive
Post by: Tweakie.CNC on July 26, 2011, 07:58:46 AM
Sorry to say this but if you have had a lightning strike then any of your electronic equipment could be suspect (whether it was actually switched on at the time or not). Any active components within that equipment, logic, transistors etc could have been injured and thus not performing correctly - when components are dead it is perhaps easy to identify a fault but when they are just injured well..........
Unfortunately I think you need to look toward replacing some stuff.  :'(

Tweakie.
Title: Re: Gaining steps...maybe? with Servo Drive
Post by: stirling on July 26, 2011, 08:39:09 AM
Tweakie may well be right, but as a shot to nothing I may have an idea why noise could cause extra steps in one direction only AND why it might be worse the slower the feedrate. To check it out, try leaving your axis stationary a while and see if over time, it gently creeps upwards.

Cheers

Ian
Title: Re: Gaining steps...maybe? with Servo Drive
Post by: Hood on July 26, 2011, 08:54:00 AM
I would do as I mentioned earlier and swap stuff around rather than replace a this time until you find the issue. You have already swapped the Gecko so that would seem to be in the clear, next I would swap the wiring on the BOB and assignment in Mach so that say X and Z are swapped.
Hood
Title: Re: Gaining steps...maybe? with Servo Drive
Post by: guynamedbathgate on July 27, 2011, 12:58:52 PM
Thanks for all the tips. I am working on this for the third day in a row, I am leaning toward a noise issue for now although a few questions remain.
I had been meaning to replace my Bob Board for a while since the speed control I was using was a little flaky (CNC4 PC patched in trough the Bob) and I had PMDX board sitting around waiting for a different project. I wanted to rule out any damage to the board so I went ahead and did the long task of swapping out the entire board. I also swapped the encoder from the Y and Z to rule out any encoder issues. I have already ruled out damage to the Gecko as stated before.
That seemed to sort it out pretty well at first. I was running tests, running the Z up and down at various speeds and it seemed to be holding tight. So I thought I would try and turn everything on, lights and Fans and the Spindle and run the test in a working environment. Then I started getting the same error again. all be it a much smaller error than I was getting before.
    So I started tying back wires and just making sure any higher voltage cables were as far from the encoder cable as possible. and continued to test. I have basically narrowed it down to the Spindle. If I run the spindle. I get errors. If I leave it off, seems fine.
    The encoder wires are shielded so I am not sure why I am having this problem all of a sudden. I have used this machine without issue for years. Is it possible for a lightning strike to cause shielding issues??? anyway, I am not really sure how I would go about shielding the encoder from the Spindle motor if that is what is generating the EMI. They are in reasonably close proximity (say 6" or so) Since the motor is on the Mill head and the encoder at the top of the Z column. But again, why all of a sudden. I am racking my brain to figure out what else is different in this picture.
Any thoughts?

 
Title: Re: Gaining steps...maybe? with Servo Drive
Post by: stirling on July 27, 2011, 01:32:46 PM
I'm no servo expert but if it was noise on the encoder wires wouldn't that throw a fault? wheras noise on the step/dir wires... well I tried that one already - any joy - did you try it?

Cheers

Ian
Title: Re: Gaining steps...maybe? with Servo Drive
Post by: guynamedbathgate on July 27, 2011, 01:45:33 PM
I am not really sure how to test for noise on the Step Direction wires. nor what else I could do to remedy it.

CB
Title: Re: Gaining steps...maybe? with Servo Drive
Post by: stirling on July 27, 2011, 03:06:34 PM
try leaving your axis stationary a while and see if over time, it gently creeps upwards.

Try the above with the spindle on for a while.

Let's find the problem first... then Hood will find the remedy  ;D

Cheers

Ian
Title: Re: Gaining steps...maybe? with Servo Drive
Post by: guynamedbathgate on July 27, 2011, 03:16:01 PM
ok, running your test now. I have been testing it all day and it seems that it does still creep up a bit even with the spindle off, But only a few thou after running it up and down over the course of about an hour. with the spindle on it creeps up much faster. If I run the spindle and move the z to -1 then back to 0 with a feed of .25 IPM it is about .01"-.015" higher at the end if the spindle is running. Is there any reason to worry that the PC itself is damaged? everything seems ok with the PC but I am really grasping at straws trying to hunt down this Gremlin in my machine.

CB
Title: Re: Gaining steps...maybe? with Servo Drive
Post by: guynamedbathgate on July 27, 2011, 04:46:59 PM
ok, well I let it sit for about an hour with the spindle running. No movement in the head as far as I can tell.
Title: Re: Gaining steps...maybe? with Servo Drive
Post by: stirling on July 28, 2011, 05:35:55 AM
ok, well I let it sit for about an hour with the spindle running. No movement in the head as far as I can tell.

OK. Check your Z step setting in ports n pins. Is it set active LOW?. If it is, set it active HIGH, just for this test, (then set it back afterwards). Re-test as you've just done with the spindle on and see if there's any drift this time.

Ian
Title: Re: Gaining steps...maybe? with Servo Drive
Post by: guynamedbathgate on July 28, 2011, 09:56:14 AM
Ok well I tried it that way too. No movement either. Is this to rule out noise on the step signal?

Just trying to look at this with fresh eyes this morning. I am using the US digital E2 series optical encoders. from talking to people I know they can be buggy and subject to noise issues. One of the first things I though was at issue is that the O ring in my Z axis encoder cover had disintegrated and left pieces of itself all over the encoder. I cleaned it off real good and put it back on which lessened the issue. So I thought maybe the encoder was still mucked up so I swapped it for my Y axis encoder which was in good working order to rule out a bad encoder. Still same problem as before plus it really doesnt explain why the error is moving only in one direction.

My question is this. I have since lost the spacer tool that you use to position the slotted disk the appropriate distance on the shaft. I still have pretty good eyes so I just eye balled it exactly in the slot of the reader head by sight. Do these things have really fickle focal lengths or something? could that be the issue if it is not absolutely perfectly aligned?

I have two new encoders coming in the mail (with alignment tool) to help rule out damaged encoders (take them off and put em back on a few times and things can get less than perfect) as the old encoder from the Z, now on the Y is still kind of buggy. Also after talking to ta couple of people I also purchased US digital's PC4 cable drivers to snap on the encoders. They are not specifically designed for noise or anything but the have a resistor on them that helps quiet down noise on the encoder (or so I have been told) anyway. Thats where I am today. machine still down and I have work to do and can not do a thing about it  :'(

Still looking for things to try

Title: Re: Gaining steps...maybe? with Servo Drive
Post by: Hood on July 28, 2011, 10:23:35 AM
Not sure wht the line drivers consist of in this case but normally when you talk about line drivers it  turns the single ended encoder signal into differential signals. In other words instead of just A and B pulse you will have A+ A- B+ B-. This makes the signal much more immune to noise and is the reason I do it for my Step/Dir signals (encoders are already differential). However did you get receivers as well as if the line drivers are like I say then you will need to convert back to single ended signals at the Geckos, as I dont think the Geckos can accept differential signals.
Hood
Title: Re: Gaining steps...maybe? with Servo Drive
Post by: guynamedbathgate on July 28, 2011, 11:19:20 AM
http://usdigital.com/products/PC4-H5#purchasing

Here is the link to the line Driver. Guess I will have to follow up on that. I am pretty sure the new G320X's can handle differential signalling, But I am using the old 320's on this machine.

Title: Re: Gaining steps...maybe? with Servo Drive
Post by: Hood on July 28, 2011, 11:24:55 AM
Yes its a differential line driver so it will put out differential signals.
Hood
Title: Re: Gaining steps...maybe? with Servo Drive
Post by: guynamedbathgate on July 28, 2011, 01:17:02 PM
Just talked to a guy who uses these line drivers and he is claiming he uses them with the older Gecko 320's to eliminate noise without any extra hardware. So I guess the proof will be in the pudding when they arrive.

CB

Title: Re: Gaining steps...maybe? with Servo Drive
Post by: Hood on July 28, 2011, 02:24:24 PM
Not really sure how they would without using a receiver just before the Gecko but you never know.
So what is he doing with the extra A and B signals? Just leaving them unconnected at the drive or line driver end?
Hood
Title: Re: Gaining steps...maybe? with Servo Drive
Post by: guynamedbathgate on July 28, 2011, 02:38:58 PM
As best as I understand from what Tommy at IHCNC is telling me. You can buy them with a ten pin out or a 5 pin out. The five pin out basically snaps right over the existing encoder pins (it has five pins) and then you plug the original  5 wire connector for the cable into it. so you basically have the same connections at the driver end as you originally had. He says he does it on all his machines.
    If you look on the Gecko site, They want you to "Solder a 1uF 25V capacitor between the +5V and GND pins on the encoder body" to use this style of encoder in the first place. This basically performs that task as well as acting as a line driver. It may be that is the only real function in this installation, but if it helps quiet things down and fixes my issue I am game to try it since his machines work and mine currently does not.
    I am afraid I am not savvy enough with electronics at the moment, so I feel a bit over my head here trying to fix this. I talked to Steve over at PMDX for a while too, He had a lot of good info for me and things I could try as well. Like putting an EMI filter on my VFD and Grounding the negative lead on my power supply to prevent a ground loop from occurring. going to tinker with all of that to see if any of it does some good.


Title: Re: Gaining steps...maybe? with Servo Drive
Post by: Hood on July 28, 2011, 03:00:43 PM
Ah ok I see now, instead of soldering a cap on he is putting a  line driver on just to use the cap that is incorporated in the line driver board. Seems a rather expensive way to get a capacitor but if it works then great :)
Hood
Title: Re: Gaining steps...maybe? with Servo Drive
Post by: stirling on July 28, 2011, 04:38:04 PM
Ok well I tried it that way too. No movement either. Is this to rule out noise on the step signal?
That was the idea but apparantly it hasn't yielded anything useful, so sorry - I'm stumped.

Ian
Title: Re: Gaining steps...maybe? with Servo Drive
Post by: jasminder on August 03, 2011, 01:04:44 PM
I am scratching my head on this one so I thought I would consult the Hive Mind. I am having an issue where my Z axis on my Mill is gaining steps. If I move the z head down 1" I get exact motion. If I move the z axis up, I get between 1.008" and 1.015" of movement (not lost steps, but gained steps). I do not think it is slop in the system because the error is cumulative and based on the feed rate. the slower I move the Z the greater the error. If I do a test program that moves the head +1" then -1" and runs the cycle 50 times. at 40 IPM I get a total accumulated error of about .015" if I run the same program at 5 IPM I get a total accumulated error of .05"-.075" or more!!

I am using Gecko Servo Drives and the servo's are from Industrial Hobbies. I am using Bob Campbell s break out board as well.

If anyone has any test suggestions I am open.
So far I have tried
- re tuning the servo drive with no effect.
- check the ball screw and bearing to make sure it was not moving in and out.
- Backlash on my Ball nut is approximately .003" (its a heavy mill head so preloaded nuts dont really work so good)
- adjusted the motor acceleration way down to be sure I wasnt loosing steps that way.

I have had this machine for 5 years and it generally has run well, this is a new development I cant seem to sort. anyone got any ideas.

Chris



friend,
I had same issue while using a stepper driver but it turned out to be a bad direction pin on my parallel port.
Title: Re: Gaining steps...maybe? with Servo Drive
Post by: guynamedbathgate on August 03, 2011, 01:23:19 PM
Well, Thank you everyone for the help. Looks like I got it sorted. A new encoder and a line driver seems to have done the trick, not sure if it was noise or just a damged encoder, but I am back up and running.

CB
Title: Re: Gaining steps...maybe? with Servo Drive
Post by: Hood on August 03, 2011, 02:16:05 PM
Good to hear :) Likely noise and the capacitor across the power terminals has cured it.
Hood