Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Things on February 17, 2011, 06:18:55 AM

Title: Steppers out of sync and skipped steps?
Post by: Things on February 17, 2011, 06:18:55 AM
Hi, I've finished the X axis on my DIY laser cutter (I keep calling it Y in the video!)

http://www.youtube.com/watch?v=lepq-4LaV4g

I explain it in the video, sorry about the video being so dark, didn't realize until after I had filmed it.

Basically, I have 2 belts to move the X axis, with 2 steppers on each belt (4 steppers in total)

2 of these steppers are wired onto channel A on my controller board, and slaved.

Now for some reason, my steppers occasionally seem to loose steps, and the right side of the X axis seems to loose significantly more, and eventually they get so out of sync the carriage comes off the track!

The steppers have plenty of torque, and don't make any kind of noises to suggest they are skipping steps, they are set to 1/8 microstepping and 200 steps per in Mach3.

I have tried increasing the dir and step pulse durations with no success. One theory I have is that the computer is occasionally provided with a background task, which causes the parallel port to loose priority and miss steps, while Mach3 is still counting.

Anyone else have this problem?

Cheers,
Dan
Title: Re: Steppers out of sync and skipped steps?
Post by: Tweakie.CNC on February 17, 2011, 07:22:27 AM
Hi Dan,

You are not alone, many peoples have had similar problems.
Knowing just where to start looking is difficult because everybody will have their own ideas but I would suggest that electrical noise could be the cause. Shielded cable for your steppers (grounded at the controller end only) and a grounded metal box for the controller may be a good starting point. Check that you have not created any 'ground loops' in your wiring and that all interconnected electrical equipment is grounded (preferably to one single point).

Just my thoughts so far.

Tweakie.
Title: Re: Steppers out of sync and skipped steps?
Post by: stirling on February 17, 2011, 08:21:50 AM
Another idea for the mix.

Basically, I have 2 belts to move the X axis, with 2 steppers on each belt (4 steppers in total)

2 of these steppers are wired onto channel A on my controller board, and slaved.
and presumably the other two are wired onto channel X on the controller board?

In both cases, driving two steppers from one channel CAN work but it doesn't allways turn out that way. IMHO, the likelyhood of this working is further exacerbated by the way you have them physically coupled, i.e. via a belt.

Ian
Title: Re: Steppers out of sync and skipped steps?
Post by: Things on February 17, 2011, 09:49:18 AM
The 2 steppers on each belt are wired together, with 1 wired in reverse obviously so it spins the other way. They are in parallel, not series, so I think they should be fine running like that.

What would the belt do to drop steps? Too tight/too lose? I didn't do the belts up extremely tight, but they aren't loose either.

I think all of the axes actually loose steps, which would point to more of a software problem (Maybe the parallel port priority idea?), although the 2 sides not running together is a bit odd. The way the steppers are wires, each of them should do the exact opposite of each other.

I didn't consider interference on the controller board, might try covering it in some foil and grounding it.

Cheers,
Dan
Title: Re: Steppers out of sync and skipped steps?
Post by: Tweakie.CNC on February 17, 2011, 11:01:04 AM
Hi Dan,

May be an idea to change your design at this stage so you only have two steppers on that axis and a rod joining two pulleys at the other end of the belts. Wiring two steppers in parallel and then slaving them with another pair of steppers wired in parallel will never work well. (The reason relates to the accuracy of microsteps and the difference in the size of each microstep between one motor and the next).
Incidentally, that particular axis is the Y axis and the one with only two steppers is the X axis (this becomes important later on when you may want to use your machine to raster engrave and the axis with the least mass needs to move the fastest).
Good luck with the foil idea, I suppose stranger things have happened.  ;D

Tweakie.
Title: Re: Steppers out of sync and skipped steps?
Post by: stirling on February 17, 2011, 12:11:24 PM
Dan

What would the belt do to drop steps? Too tight/too lose? I didn't do the belts up extremely tight, but they aren't loose either.

As I've said, it is likely to exacerbate the possible problems of driving two motors from one driver. These problems include but are not limited to: microstep mismatch (as Tweakie has said), resonance problems - two motors can really screw with a driver's anti-resonance circuitry - and messing with the drive's current limiting circuitry. Part of the reason for these problems is that when two motors are mechanically coupled as yours are, then each motor is alternately driving/being driven whilst the other is being driven/driving. A driven motor is a generator: result: chaos.

However, even if the two motors had their own driver, mechanically coupling two motors together is likely to produce a combined torque value that is actually less than a single motor would produce. This is because they will more than likely be continually fighting each other mechanically.

Ian
Title: Re: Steppers out of sync and skipped steps?
Post by: larryc on February 17, 2011, 04:46:47 PM
Hi things I built a machine 3 yaers ago and I used one stepper for the x axis and one stepper for the y axis. the stepper for the x is 660 oz inch the other is 445. The gantry is aprox 100 pounds. I have a 7 to1 belt reduction. 3 to1 from motor to a jack shaft then 4 to1 on the second stage or from jack shaft to drive gear. It is rack and pinion drive. that gives 7 to 1 eduction for every 3.17 inches traveled. My machine has never missed a step. with the two motors as you have on each side you are lucky that the gantry doesnt twist it self apart. if each motor had its own driver then you would have no problem but with 2 motors an one driver or motor controer You are getting feed back lucky you dont blow the controller.  Better check to see if the magic smoke hasnt left the controller. When the smoke escapes it will not work again.....
Title: Re: Steppers out of sync and skipped steps?
Post by: Things on February 18, 2011, 07:13:28 AM
No, I made sure that all the stepper driver chip ratings were not exceeded. These are only small steppers, they dont have to move anything close to the 100 pounds you mention.

One thing that crossed my mind was, the holes in the pulleys are a few mm too big for my stepper shafts. Could off centre pulleys tightening and loosening the belt cause the steppers to miss steps? My thoughts say yes, although I'm not sure what the correct method for properly fitting them on the shafts are.

Somehting else just came to mind. At the moment, between the stepper shaft and the pulley, there is a bit of silicone tubing that helps keep the pulleys centred. it could even be a case of the pulleys slipping on the shaft.

How are you supposed to deal with shafts being too small for the pulley?

Cheers,
Dan
Title: Re: Steppers out of sync and skipped steps?
Post by: Tweakie.CNC on February 18, 2011, 07:34:56 AM
Sorry Dan, I don't wish to cause offense, but it sounds like your build quality may be letting you down.
Unless you get the mechanics perfect (and I mean perfect) then you will not get the machine accuracy you are trying to achieve.

Tweakie.
Title: Re: Steppers out of sync and skipped steps?
Post by: Things on February 18, 2011, 07:36:16 AM
Nah I know it's not going to be the best machine ever, however I've come this far, not going to let some off centre pulleys stop me :P
Title: Re: Steppers out of sync and skipped steps?
Post by: Tweakie.CNC on February 18, 2011, 08:31:23 AM
That's the spirit.
You will succeed and have the finest machine in the end.  ;)

Tweakie.
Title: Re: Steppers out of sync and skipped steps?
Post by: larryc on February 18, 2011, 08:47:22 AM
hi  dan like tweekie said you have to have the pulleys tight on the shaft. the shafts have to line up.you cant have to much friction .Dont forget you are talking motors with oz. inch of torque not horse power.  If you dont get the machine right you will through up your arms and give up saying cnc is no good for you. And that would be a lye. If you get the machine working right you will be proud of it and will be boasting all over the place about how well you machine works. That is the reason there are so many people on these forums . WE ARE ALL PROUD OF OUR MACHINES AND THE WORK WE CAN DO.. It doesnt matter if you use wood or metal for the build as long as the electronics and mechanicals are the best you can do. So be paitient and take your time with the build in the end you WILL have a good machine. Check with a company called SDP/SI at www.sdp-sl.com they have catalougs with pullys belts etc. good place Oh and by the way hope you are using timing pulleys and belts other wise you will never time your machine...
Title: Re: Steppers out of sync and skipped steps?
Post by: Things on February 18, 2011, 09:01:33 AM
Yeah, timing pulleys and belts of course.

I think my main issue is the bodgy way I have mounted the pulleys onto the steppers. Making some sleeves that fit over the shafts and also perfectly in the pulleys would be the best way, however I do not have access to a lathe, so it's not an easy option.

I am using these pulleys: http://ausxmods.com.au/t5-pulleys/15t5-27-6.35mm-bore-timing-belt-pulley

The stepper shafts are 5mm I believe, however they don't have 5mm pulleys, and I didn't consider the pulleys being off centre.

I suppose worst case I could send a stepper and a pulley off to a friend with access to such machinery, though I don't like relying on everyone else to do everything for me.

My skills in mechanical construction are pitiful, I'm surprised I've managed to make it this far without screwing the whole thing up. Quite proud of how its turned out considering. My electronics knowledge is a whole lot better, luckily.

Here is a picture of my machine as it is now:
 (http://dl.dropbox.com/u/203420/DSCF2162.jpg)

Ideally I would have loved to use guide rails instead of bearings for the linear system, though as I'm a student, I don't have a particularly huge budget. I do have all the parts required to finish this machine now, but I need to work out the little bugs first. Not even going to think about putting the laser in until it can run without loosing steps.

Cheers,
Dan
Title: Re: Steppers out of sync and skipped steps?
Post by: larryc on February 18, 2011, 09:18:33 AM
dont feel bad Three years ago I was in the same vote as you .No lathe never built a cnc machine etc. 6 month later I designed and built a machine that would rival the 100,000 dollar machines . And let someone tell me different. Go to a sight call mechmate.com You will be suprised at what they are making. And I mean people from all over the world. they have a forum they sell plans that are one of the best . A couple of years ago the plans were free. now I think they might be 100 dollars. All my motor shafts are 1/4 ingh so are the pully holes. The jack shaft that I use is 1/2 inch it is the same size as the bearings Then I bored out the bigger pullys to fit . On that site I told you about it tells you how to grind rails how to bore pullys without a lathe only a drill press and grinder etc. check it out.
Title: Re: Steppers out of sync and skipped steps?
Post by: Tweakie.CNC on February 18, 2011, 10:17:33 AM
Just a suggestion but some pieces of shim formed around a 5mm drill may make the necessary sleeves to fit between your motor shafts and the pulleys.

Tweakie.
Title: Re: Steppers out of sync and skipped steps?
Post by: Things on February 18, 2011, 10:19:32 AM
Hmm I didn't actually think about that. I have a fair bit of sheet aluminium left over from the table of the cutter (So the laser doesn't burn right through it), so I'll try that tomorrow.

Cheers,
Dan
Title: Re: Steppers out of sync and skipped steps?
Post by: larryc on February 18, 2011, 11:08:08 AM
Nice machine there .the v wheels are perfect. They will keep track just about as good as 500 dollar linear bearings . That is if they are lined up. But if you took one otor of the end of each axiz and put a idler pully on the end it would save a lot of work. also your machine would be more stable. I would put a shaft all the way across the x axiz or long axiz from one side of the machine to the other put it in pillow block bearings this could be either motor end or idler end that way you could move you machine with one motor insted of 4 motors. much easyer and would look a thousand times better. You machine from what I can see is like the mechmate design. Check there site out you would be suprized by what you see. and they can give you so much information. If you put the shaft on the lmotor end you could gear the motor down . to give more ower . and make it cut smother.also with one motor it will save you hundred of dollars on motors couplings .drivers etc.  nice machine though.
Title: Re: Steppers out of sync and skipped steps?
Post by: Things on February 18, 2011, 10:44:37 PM
It seems you were right larryc.

Today I woke up, and made some little spacers out of .5mm sheet aluminium. The pulleys still aren't EXACT, but much better.

While playing around with it, I noticed that sometimes the belt would actually skip teeth over the pulley!

I cut the wires to 3 motors, leaving only 1 motor for Y, and 2 for X, and it doesn't seem to have any problems now. I am just going to leave the motors in place instead of swapping them with idler pulleys, as they are cheap and saves me having to come up with something else.

Why they wouldn't run in sync in parallel is very confusing, I don't see how they could actually run out of sync. But apparently they can.

My next dilemma is whether to put a bit of weight on the carriages, or whether to add something like runner bearings underneath. The V groove bearings stay on track better if they have a little bit of force pushing them down onto the tracks.

Torque doesn't seem to be a problem as I first thought, which is why I used 2 steppers. You can still stop it with your hand, but that is good in the case of a softlimits or limit switch failure so it doesn't rip itself apart.

Cheers,
Dan
Title: Re: Steppers out of sync and skipped steps?
Post by: Things on February 18, 2011, 11:26:16 PM
Well, I'm happy again now :)

Just did my first engraving, using a much smaller laser I just sat ontop, so no blanking yet, but it works :D

(http://dl.dropbox.com/u/203420/DSCF2179.jpg)
Title: Re: Steppers out of sync and skipped steps?
Post by: Things on February 19, 2011, 12:05:05 AM
Sorry for the triple post, but I have a question. Is there any way you can mirror the output in Mach 3 without having to edit the gcode?

I just wrote my name .. backwards >.<

(http://dl.dropbox.com/u/203420/DSCF2180.jpg)

This is soo much fun :D

Cheers,
Dan
Title: Re: Steppers out of sync and skipped steps?
Post by: stirling on February 19, 2011, 06:05:00 AM
Why they wouldn't run in sync in parallel is very confusing, I don't see how they could actually run out of sync. But apparently they can.
See post #5 and others.
Title: Re: Steppers out of sync and skipped steps?
Post by: larryc on February 19, 2011, 09:05:29 AM
Sure you dont havr the motor set back wards I had the same problem when I first turned my machine on. All you need to do is switch around two of the wires so the motors run the other way. Like i said the motors hooked up in pareal will not work. dont ask as I dont know why. Probly a big forumla. If you leave the motor in it will work for now. But it will give problems later on. Just be prepared to remove them later. nice work.
Title: Re: Steppers out of sync and skipped steps?
Post by: Things on February 19, 2011, 07:33:23 PM
I would think it's because I am using bipolar steppers. As they only have 1 coil, maybe the current in the coil that is turned on, is somehow being transferred to the off coil in the other motor, creating drag.
Title: Re: Steppers out of sync and skipped steps?
Post by: larryc on February 20, 2011, 06:44:57 PM
No it doesnt matter what stepper motors you use. they do not  use one coil the all use 4 wire basic some have a center tap and so on.  but they all have 2 coils reverse 2 wires and the motor run the other way check on the internet for stepper motor basics  also see it you can find the spec sheets on your motor. It will tell you the power amp and voltage  It will also tell the tourque at different sppeds. Tchnicaly they have more than two coils but run on the principle of two coils The stepper motor basics site will also explain why you canthook 2 motors in series or parrel. To much math for me ...
Title: Re: Steppers out of sync and skipped steps?
Post by: larryc on February 20, 2011, 10:28:30 PM
Hi did you get a chance to check out the gecko drive on the internet they have a motor controler that is called g540 type that in then go the the g540 control box check out stepper motor basics good reading and you will get a lot of answers about you stepper problems. It also gives wiring and power supply information.