Welcome! Log In Create A New Profile

Advanced

Strange behavior with X loosing steps

Posted by barsam 
Strange behavior with X loosing steps
December 01, 2013 08:15AM
Hi All,

I am new in the 3D printing world, but I have a very good know how of CNC machines, as I have build my own router. So I have a good knowledge of electronics and mechanics.
I just finished building my 3D printer, which is custom designed and made. Everything looks to work perfectly, except an issue that is bothering me and I can not find the source of the problem, so any help/ideas will be much appreciated.

So here are the setup facts:

Mechanical Setup:
- 4 SY42STH47-1684A Stepper motors + the Extruder which is a 5:1 planetary Nema 11
- X and Y are driven with lead screws from Triniti Labs 10 start 25mm per revolution. Z is driven by 2 trapezoidal 2mm per revolution screws.

Electronics:
- Rumba Controller (Powered from power supply and not from USB )
- 4 8825 Pololu drivers (X, Y, Dual Z) and 1 8824 Pololu driver for the extruder as it is a low current Nema 11 motor. X & Y are setup at 16 micro steps, Z at full step, and E at 1/4 micro steps
- 13A 24V Power supply for all the electronics (The heat bed is controlled by a Solid State Relay as it is 240V heater) so the 13A power supply is more that enough I guess.
- Full graphics LCD screen

Software:
- Marlin Firmware
- Repetier host, or OctoPrint

Setup:
- Steps Per: X128 Y128 Z100 E115.8
- Feed Rate: X350 Y350 Z35 E70
- Acceleration: X3000 Y3000 Z100 E10000

So I don't think that anything else is relevant to describe my problem.

The Problem:

So I have X lossing steps after a strange (hammering noise) during print. It happens almost every time. I only managed to finish one print without having the issue.
But I also have a test scenario that can reproduce the problem every single time. And this is the strange part of the behavior.

So I execute the following code for both X and Y without any problem at all

G01 X320 F21000
G01 X0 F21000

As many times as I run it, no problem at all... for both axis.
But when I execute the code for both of them together

G01 X320 Y320 F21000
G01 X0 Y0 F21000

Couple of mm before 0 X losses steps with the same hammering noise.

At first I though that it is a mechanical issue, but I loosen the coupling of X so that it was free running, and the problem was exactly the same. So I suppose mechanics is out of the equation.

The problem does not occur if I execute the code with F18000.

So I have concluded that the problem is either Hardware or Software.
The issue is that I have no idea where to start from and what to look for.
I am thinking that maybe 350mm/sec for each axis is too much pulses for the software or hardware to handle, but as I read around, these speeds are normal.
The pololus are calibrated using a multimeter and the reference pin, so no mistake there I hope.

The printings of course are not at the max speed, I am using the default values of Slic3r. First layer which is 30% lower speed, there is no issue. After the first layer, at some point X hammers and the print is messed up.

Sorry for the long post, but I have to give all the facts.

Edited 2 time(s). Last edit at 12/01/2013 08:16AM by barsam.
Re: Strange behavior with X loosing steps
December 02, 2013 04:15AM
Maybe try adjusting the acceleration times of your X axis so that it take a bit longer to accelerate? or perhaps when both the X and Y axis motors are drawing current, they cause the motor to skip.

I'd try adjusting the acceleration first thoughthumbs up my printer had a similar problem, the axes would 'bang' to a stop, so I smoothed it out by slowing down the acceleration smiling smiley
Re: Strange behavior with X loosing steps
December 02, 2013 05:08PM
Actually I realised that it is probably an issue with the USB communication of the rumba board. I tried to update the firmware of the 16u2 chip, but I fried it, so no USB communication any more eye popping smiley
I managed to print something from the SD card that is was giving me problems when it was printing through USB, and it printed with no issue at all. I even cranked the speed to 120% for the last couple of layers, and it came out without a single glitch.
So now I will have to get a separate USB to Serial interface and connect it to the Rumba board to do more tests.
Re: Strange behavior with X loosing steps
December 03, 2013 01:41PM
- Steps Per: X128 Y128 Z100 E115.8

- Feed Rate: X350 Y350 Z35 E70

128 steps per mm

350 mm/s

That's 44,800 steps/sec

Can the Arduino handle 44.8 kHZ output?

I think you are attempting to make it go too fast.
Re: Strange behavior with X loosing steps
December 04, 2013 03:03AM
I did some more tests.
It appears that the problem is not just X. It's both X and Y. And the problem is always at the backward move and just (I suspect) when the deceleration is starting.
So what ever move I do at maximum speed, then at the backward move when both axis are moving exactly the same time and the same amount of move, just at the deceleration, they stall.
So fo instance...
G01 X200 Y200 F21000 (No Problem) X and Y are at position 200 now
G01 X100 Y100 F21000 (Problem) X and Y stop couple of mm before 100

But if instead of the second command I do G01 X100 Y300 F21000, there is no problem at all.
Even G01 X100 Y150 F21000 is not giving a problem.

I was thinking that Arduino Mega can not handle the speed, as ShadowRam said, but why at the backward move and not all the time?
This is really puzzling. The problem disappears when I reduce the speed (reduced pulses), but then again... why at the backward move, and why when the moves are at the same direction?
Re: Strange behavior with X loosing steps
December 04, 2013 06:16AM
When both axes are moving you are going diagonally so the motors actually go slower for a given feed rate. Very odd.


[www.hydraraptor.blogspot.com]
Re: Strange behavior with X loosing steps
December 04, 2013 09:21AM
It's got to be an Arduino problem,

Something with the timing the Arduino does to update it's outputs, or a harmonic freq issue, maybe the length of wire you are using is causing problems.
I haven't seen any actual electrical specifications on the Arduino's outputs, or even what function they are using to pulse the Pololu's.


I had a problem on my setup when running it really fast,
See video @ 0:40

http://www.youtube.com/watch?v=E_mMcdNbK4M

Once in a while when running to fast, it binds, but I suspect that's a mechanical issue with the setup.

Are you having a similar issue?
Re: Strange behavior with X loosing steps
December 04, 2013 09:27AM
Perhaps it's classic mid band resonance that you get with steppers and leadscrews. I.e. it will fail at a particular step frequency and even if you run faster than that you may hit it during acceleration and deceleration.


[www.hydraraptor.blogspot.com]
Re: Strange behavior with X loosing steps
December 04, 2013 06:13PM
If the stepper stalls, the acceleration is too high. It is more likely to stall at higher speed because torque reduces as speed increases.

I have a theory, which I haven't verified, that during acceleration the stepper pulses are leading the rotor, when you switch to deceleration the stepper pulses now need to brake the rotor. I think that switch can cause a stall. It's probably worse as you have a high moving mass as well. Certainly a 4th order S curve would provide better control around these transitions, but AFAIK no RepRap firmware does that.

The best tradeoff might be to leave acceleration and reduce max speed, and make most of low speed torque.


What is Open Source?
What is Open Source Hardware?
Open Source in a nutshell: the Four Freedoms
CC BY-NC is not an Open Source license
Re: Strange behavior with X loosing steps
December 05, 2013 06:20AM
Some more tests...

I was playing around with the firmware and I added a 1us delay after setting the pulse high at each axis. So basically I extended the time of high pulse by 1us.
The result was to reproduce the problem at the forward move also. Meaning that with this delay both forward and backward moves where stalling.
Maybe it is a firmware issue after all and it has to do with the timing. I don't know, I am just brain washing.

Another "funny" thing I noticed, which is VERY strange, is that if I reduce the maximum feed rate of the axis (in my case I set them to 230mm/sec with command M203 X230 Y230), the firmware is not consistent.
And I explain. Feed rate of 230mm/sec is 1380 mm/min, so why the steppers are going faster when I give a command of G01 X100 F21000 compared to G01 X100 F14000?
How do you explain this? If the limit is 230mm/sec, both commands should have equal speed.
I think there are some bugs after all in the firmware, but then again, is it only me that I noticed?

By the way... in order to simulate the sound of F14000, so roughly the same speed even if I used F21000, I had to set the maximum feed rate to 170mm/sec.

Edited 1 time(s). Last edit at 12/05/2013 06:23AM by barsam.
Re: Strange behavior with X loosing steps
December 05, 2013 06:41AM
Are you moving both axes when comparing? I ask because 170mm/s is 10200 mm/m which is sqrt(2) less than F14000 which would be the case for a 45 diagonal move. I.e. the motion is 1.4 times faster than each axis has to move.


[www.hydraraptor.blogspot.com]
Re: Strange behavior with X loosing steps
December 05, 2013 07:29AM
Yes... I am moving diagonallyI... never crossed my mind... eye rolling smiley

This stalling thing is killing me.... moody smiley
Re: Strange behavior with X loosing steps
December 05, 2013 07:48AM
Try x8 microstepping instead of x16. If it simply the firmware can't step fast enough or a bug you should be able to go twice as fast.

Also your acceleration is quite high and may be a problem because lead screws have quite a lot of rotational inertia.

What voltage are you using as your motors will need to spin about 50% faster than a belt driven machine?

Reprap ignores mid band resonance because it doesn't seem to be an issue with belts and the speeds we use but if follow general CNC forums it is a big problem with leadscrews and steppers. You need antiresonant drives or dampers, etc to avoid it.

I have never managed to get a lead screw driven Z axis to go faster than 5mm/s with a 1.25mm lead and 12V. Scaling that with 25mm lead would mean a limit of 100mm/s, so you are already much faster than that.


[www.hydraraptor.blogspot.com]
Re: Strange behavior with X loosing steps
December 05, 2013 08:46AM
I tried the x8 and things were worse.
I am using 24V. What is really annoying, is that each axis alone can manage that speed back and forth without any issue. It's the movement of both X and Y at diagonal that is giving the problem and only at the backward move.
Re: Strange behavior with X loosing steps
December 05, 2013 09:21AM
Looks like mid band resonance then. Try moving one axis at feed rate over sqrt(2) to see if it also fails at that lower speed.


[www.hydraraptor.blogspot.com]
Re: Strange behavior with X loosing steps
December 06, 2013 01:50AM
Actually I was able to move at around 370-380mm/sec before they start to stall.
Re: Strange behavior with X loosing steps
December 06, 2013 02:27PM
ok...
I though to give Repetier firmware a try... guess what, no more stalling.
So how do you explain this?
Something is really wrong with Marlin and the setup I have.
I will try some prints to see if the step skipping during print is also gone.
Re: Strange behavior with X loosing steps
March 14, 2014 05:40AM
I have some update on this issue.

After straggling for months to find the proper speeds for me to have complete prints without lost steps, partially I did manage it, but I was not happy with the speed limits I had.
Then I was so frustrated the last couple of weeks having spent a LOT of filament on wasted prints as the Y axis this time was stalling after couple of hours of print, so I decided to give up the lead screws and modify my axis to GT2 belt motion.
So after couple of hours of design and modifications, I did manage to make it....
I was totally surprised when I found out that I could go easily up to 500mm/sec and 5000mm/sec Acceleration.
So for the first print I deliberately cranked up the speed to see the results.
Not a single lost step... What can I say...
A2
Re: Strange behavior with X loosing steps
March 14, 2014 08:16AM
Quote
barsam
X lossing steps after a strange (hammering noise) during print.

That's interesting, switching to a GT2 belt solved the problem.
Can you post before, and after pics of the printer.
Re: Strange behavior with X loosing steps
March 14, 2014 08:24AM
The reason is lead screws suffer from mid band resonance but belt drives don't.


[www.hydraraptor.blogspot.com]
Re: Strange behavior with X loosing steps
March 14, 2014 10:42AM
Quote
nophead
The reason is lead screws suffer from mid band resonance but belt drives don't.
I agree it's probably mid band resonance if you'd put vibration dampers on the stepper motors it probably would've been okay. You definitely should use shielded cables if you going to run a high pulse rate you get all sorts of EMI. Secondly if your GT2 pulley per turn is less than 25 mm then you have more of a mechanical advantage which would allow you have more power to the axis per the same motor. I use ballscrews on my printer and it produces fantastic results
Re: Strange behavior with X loosing steps
March 14, 2014 11:52AM
I have 2 photos attached. One is before I finish it, and one is after the conversion.
Unfortunately I can not take a photo of the converted Y axis, as it is under the aluminium cover. Next time I will have access to the bottom part, I will take some more pictures.
I know that many of you will think that this is an Aluminatus, actually the design is, but I made it my self with 20x60 extrusions and machined aluminium parts.

As for the comment of "cnc dick", I fully agree, but ball screws are a completely different story than lead screws. I have ball screws on my CNC machine and they are perfect, but I can not reach hight speeds. But I don't even need it on my CNC machine, I am more than happy with the speed I have. With ball screws you have much less friction than with lead screws.

Edited 1 time(s). Last edit at 03/14/2014 12:01PM by barsam.
Attachments:
open | download - photo 1.jpg (463.3 KB)
open | download - photo 2.JPG (478.2 KB)
Re: Strange behavior with X loosing steps
March 14, 2014 06:59PM
Nice-looking built but it doesn't really matter whether it's ballscrews are lead screws you can create a mid band resonance by directly connecting to the screws. There seems to be no room on the Y to put a dual shaft motor with damper on the back in to your frame. The illuminatus uses triple stack motors quite a bit of torque

Edited 2 time(s). Last edit at 03/14/2014 07:02PM by cnc dick.
Re: Strange behavior with X loosing steps
March 14, 2014 10:29PM
Actually I couldn't find triple stack steppers so I got the ones from zapp electronics. As for the space, yes there is no space at all at Y axis.
But I am really happy with the conversion now. I managed to print with 120mm/sec and 250mm/sec travel. Before I couldn't get more than 130mm/sec travel speed. Even at that speed the lost steps were very frequent.
Sorry, only registered users may post in this forum.

Click here to login