Measured transient accelerations of approx. 2000 mm/s^2 when the max eeprom setting is 10 mm/s^2

I have recently rebuilt an old Wire edm machine into a relatively straightforward 3 axis 3d printer.    While running with very conservative 10 mm/s^2 settings, I have measured transient accelerations in the x and y axis as high as 10 mm/s^2.  These transient accelerations severally llimit the speed at which the machine can run and I have been unable to diagnose a hardware problem either electrical or mechanical causing these issues.  I have come to suspect that their may be a software problem resulting from the slicer software at play which I am unable to diagnose.  To that end I have compiled the eeprom setting and the Slic3r setting that were used during the test where I measured the high transient accelerations I have a .cvs file with the x and  y acceleration data acceleration taken during the run.   I even went so far as to video part of the run to highlight the visual and audio signature of these transient accelerations to disprove the notion that these are somehow sensor noise.     
  I am using a ramps v1.4 mounted to a mega 2560 control board.  I am using 8820 drivers for the z axis and the extruder.  For the x and y axis I am using a Toshiba TB6600 based drivers to drive a KL34H2160_62_8A  (aprox. 1800 ozf*in stall torque and 42 V) on the x axis and an NEMA 2.3 motor on the y axis with approximately 400 ozf*in.  The hotend is mounted such that it is fixed in the x-y axis while the bed moves in both the x and y axis.  The combined table weight approximately 100-150 lbs and is driven by 4 mm/rotation ball screws which have been inspected and are working properly.   I can provide more detail as required.
   The errors are primarily occurring on the x axis and result in a missed half step such that the axis stalls skipping approximately 500 mm of travel before resuming.  I am able to achieve travel speeds through jog settings as high as 50 mm/s with 50-100 mm/s^2 acceleration settings, but am unable to run prints at more than 15-20 mm/s speeds without incurring skipped steps.  I have used the slic3r slicer for all prints.

Any suggestions or help would be greatly appreciated.   I can provide pictures of the machine, eeprom settings, slic3er settings, acceleration data from one run, the gcode from that run and video of the run as necessary.  but I'm unsure of the best way to provide them without just dumping them into the post as raw text. 

Comments

  • What is "transient accelerations" compared to normal acceleration so that you pronounce it? Never have heard about that term.

    I guess it depends much on the firmware so which one are you using? In repetier-firmware you have 2 accelerations depending if you print or not.

    Some drivers need a longer step signal or they will not be detected. Check your driver specs what they need. Normal time for mega2560 is 1-2us.

    Also make sure to power steppers correctly meaning right current to get their theoretical torque or you have less force and can not accelerate as far. From your units I assume it is a big and heavy system but I have no experience there. Only know that timing is often worse then for small stepper motors.
  • Thanks for the response and I'm Sorry for the delay in responding.  
    In previous post I'm using transient to mean "unusually large" or outside of the normal range of accelerations.  Rereading my post It should say 

        "I have measured transient accelerations in the x and y axis as high as 1 m/s^2."  

    not 10 mm/s^2.  I measured multiple accelerations in the x and y axis which measured approximately 1 m/s^2 and lined up with an audible and visual jerk in the table motion.  I'll dump the acceleration data file into my next post on this thread as I can't think of a better way to get over to you.  

    I'm using repetier-Host V1.6.2 and slic3r v1.2.9 on the computer.   On the firmware side I'm running Repetier_0.92.9 with protocol 1.0  

    On the driver signal, how would I go about adjusting the length of this signal in the firmware or in the settings?

    Regarding the output from the driver.   I don't have an ocillscope to measure the actual current output of this driver.  I can take a shot at measuring it with my multimeter but I don't think it will give me a reliable reading as its rather cheap and may not be able interpret the short time period current fluctuations produced by the driver. 

  • Here is a link to the .csv file with the acceleration data in m/s^2.  


    Let me know if you have trouble accessing this file.  If it works I'll put links to the other relevant files in another post.

    Thanks again.
  • What does the table show? I see time and accelerations but from what? How do you get these accelerations? Z acceleration of nearly 10m/s^2 can not be true. 

    In firmware config tool you can set advanced mode and then in mechanic tab you see additional delays.
  • Z acceleration is the constant acceleration of gravity.  

    The x and y accelerations are from the movement of the table itself.  The way the machine works is that the hot end is fixed in the x and y axis and the heated bed moves underneath it in the x and y axis.  Here is a picture of the machine.   This video was taken at the same time as the acceleration data was taken.  Sorry for the terrible camera work I was using a go-pro) .  Note the accelerations transients/spikes at the following times on the video 
    24-25 seconds 
    32 sec.
    41 sec.
    54 sec.
    56 sec.
    1 min. 16 sec.
    etc.
    There is also significant vibration in the table when it is tracing circular arcs during the print.  (The start of the video is not synced up with the beginning of the acceleration data.)

    I used an iphone 6 placed on the moving x-y bed to measure the x,y, annd z  accelerations.  You can see the iphone taking data at the each of the heated bed in the video.   I used an app called sensor kinetics Pro to sample the phones accelerometer at 30 hz.  The data is in m/s^2 and is plotted the acceleration using excel in this file





    I'll take a look at altering those settings in the firmware over the next several days.  Once again thank you for all your help on this. 
  • Your acceleration is never 1mm/s. You can not simply put a acceleration sensor on it.
    We are talking about move acceleration in move direction. So at segment changes where direction changes every sensor will measure a spike and increase. We have a variable jerk which has a minimum and at that point (segment change) acceleration is in theory infinite. Then you also measure vibrations after such jerk moves in accelerator.

    So everythings seems to work as expected.
  • I'm sorry I'm not following.  I have adjusted the jerk quite a bit to try to get the best/fastest performance out of the printer for a given, combination of jerk, acceleration and velocity settings.  I'm a little unclear as to what the jerk setting in repetier actually means.   In dynamics, jerk is the third derivative of position i.e. the instantaneous change in acceleration.  I read through repetier's documentation on jerk here.  If I'm understanding the the explanation correctly, which with me is always a possible source of error :), in Repetier the jerk setting refers is the allowable ratio between the velocity of the x and y axis's. To be honest this doesn't make much sense to me, but but I didn't write the path planning section of the firmware.  I don't know c language well enough go through the back out exactly how the jerk variable is being used.  Is there a better explanation of what the jerk variable means within the context of the repetier firmware?
         I'm left trying to optimize the speed and accuracy performance by more or less blind experiment with the jerk, acceleration and velocity settings, which has been frustrating to say the least.  As I describe below I have tested a wide range of combinations of velocity, acceleration and jerk settings, which has led to numerous printer stalls, jams etc.  I was expecting that the path planning software would produce g code where each move  in the x or y axis involves a section of constant acceleration from rest up to a set velocity, followed by a constant deceleration back to rest.  and then on to the next gcode line.  The sharp short jerks in the x-y movements only occur while executing a path produced by the slicer.  They are generally not present when jogging the machine with the same  low jerk, accel., and velocity, settings.  This made me suspicious that there was some type of bug in the path planning software.  I understand that there may be other explanations, however I have done my best to test and eliminate any possible mechanical and electrical sources which may be contributing to the stalling and slow speed of the machine.  Once again I really appreciate your help. 


    In an attempt to optimize the speed and accuracy of the printer I have tested various jerk, acceleration, and velocity combinations to see if they were able to run without stalling on either the x or y axis (I did not place an accelerometer on them).  Generally, I varied the jerk setting then adjusted velocity and acceleration settings until I was able to get an combination which wouldn't stall.   On the x and y axis 
    I varied the jerk setting from approximately 10 down to .6 in steps.  
    I varied the acceleration in steps from 150 mm/s^2 to as low as 10 mm/s^2.  
    I varied the velocity from 30 mm/s^2 down to 10 mm/s^2

    Setting the jerk under 1.0 led to "faceted" curves instead of smooth curves.  Holding Jerk at 1.0 I then varied the x-y accelerations and the speeds and even with a  x-axis stepper capable of 12.8 N*m stall torque 1800 ozf*in, I would get stalling or drifting in the x-axis with acceleration settings greater than 10-25 mm/s^2 and velocity greater than 20 mm/s.  


  • Jerk is not used as the the physical clean definition. In our context it is a sudden change of speed and/or direction. Without we can not print clean curves as each segment change causes accelerations from direction change and we do not want to go down to speed 0. In fact the numerical stability requires a minimum jerk or first step will compute completely wrong timings as it uses explicit integration and only a good starting speed helps to come into the area where it works sufficiently precise.

    This is all no problem with normal printers as they are much more flexible then your cnc system and such sudden changes are swallowed by the flexibility of the system. So some printers work with Jerk 40 and accelerations of 2000-3000mm/s^2 without problems.
  • Thankyou for the clarification on Jerk.  I think I understand what you're saying, but I'm not sure I'd pass a pop quiz on it. :) It may just be that this thing is big and slow.  The really strange thing to me is that the y axis of the machine uses a much smaller stepper motor rated for about 400 ozf*in than the x-axis and also carries the entire mass of the x-axis traverse mechanism.  Despite all extra mass and the stronger motor, the y-axis can tolerate higher accelerations and velocities without stalling (offhand double) than the x-axis can.  I've checked the slide bearings, checked the ball screw, cleaned, re-lubed, both of them.  I've rewired the motor with thicker wires, replaced the control wiring twice all to no avail.  In short I'm out of ideas and I'm close to taking a cutting torch to the entire thing.   
         I got a chance to adjust the STEPPER_HIGH_DELAY 0 as you suggested and it didn't really change things that much.  The printer seems to move a little more quietly but it didn't eliminate the x axis stalls with 15 mm/s^2 acceleration and 22.5 mm/s velocity.  I also briefly played with the STEP_DOUBLER_FREQUENCY  variable as some of the other forums suggest that the this needs to be pushed to 9000 to work with stepper drivers based on Toshiba chips like the ones I'm using.  I don't understand what the Step_Doubler_Frequency variable does or why it exists.  It did quiet the printer down a bit but didn't change acceleration and velocity at which stalling occurs.  Is there a good resource or documentation that explains what these settings do in firmware.  I'm not a computer scientist or an electrical engineer so I have a limited understanding of how to determine/calculate/measure the execution speed of the Mega2560.  I'm not afraid that afraid of a terminal window however.  Once again thanks for all your help.  
  • It is all about the steps per mm and speed. I guess you have spindles so you need many steps compared to belt systems. The problem is how many steps can a mega2560 handle. You have a lot ov overhead per step, so you can call stepper interrupt only 10000-15000 times per second. So what to do if you need more steps per second? Well in one interrupt we just do 2 or 4 steps then (double steps/quad steps). This of course prolongs the time per interrupt but not as much as the gain of steps. So without delays we can then have 40000 steps per second but then cpu usage is 100% and every little bit can cause unclear delays. If you add extra waits for high delay this will of course reduce max. stepper frequency. You need to select STEP_DOUBLER_FREQUENCY such that your cpu still follows the frequency at that time. If not you get a extra jerk when switching from single stepping to double stepping.
  • My apologies for the long delay, I didn't have access to the machine over Christmas, so I just had a chance to work on it today.  As you guessed I was using a really high step/mm setting for the xy axis.  The  ball screws on the x-y table are 4 mm/rotation and I had the stepper drivers set at 1/32 micro stepping.  So I had a 1600 step/mm on each axis.    Given the capability of the mega2560 I'm surprised that the machine was able to even make it to speeds of 20 mm/s without overloading the processor.   So I turned off microstepping on the drivers leaving me with 200 steps/rotation and 50 steps/mm on the x and y axis.  If I'm understand correctly the way to calculate the maximum speed that 2560 can drive without doing step doubling, then I should be able to driver each axis at about 200 mm/s individually or 100 mm/s together without reaching the limits of the processor.  I played with the STEP_DOUBLER_FREQUENCY pushing it as low as 5000 but it didn't have much affect on speed of the machine, so I eventually just turned off quad stepping in the firmware altogether as I didn't expect need to set double steps at the speeds I'd be setting.  
        I then went on to test several combinations of jerk, acceleration,  and velocities on the x and y axis.  With the microstepping turned off I was able to push the jerk back to around 10 and acceleration up to 100 mm/s2.   I could do simple travel moves at velocities as high as 60 mm/s without any stalling.  However homing each axis at a speed of 20 mm/s created heavy vibration in the machine.  Running a test print at a max speed of 25 mm/s caused stalling on the first layer.  
      I started sending simple g-code movements in through the terminal to test various feedrates and acceration settings when I noticed that I could traverse from home to coordinates to (X100 Y100) (X100, Y50) at speeds up to 70 mm/s using G1 X100 Y100 F3600. however when I sent the table back to the home position at 20 mm/s the entire table would shake and vibrate.   When I sent the table to coordinates (X100, Y20) (X100, Y10) or (X20, Y100) (X10, Y100) at 60 mm/s the machine would also vibrate hard enough to shake the spool off of its holder.  The vibration was bad enough to stall the machine when sending the table back to its home position from these coordinates at a feedrate of just 20 mm/s.  I put all the commands into a gcode script and sent them through them to the board the same as a print. 
    G1 X100, Y100 F3600
    G1 X0 Y0 F1200
    G1 X100 Y50 F3600
    G1 X0 Y0 F1200
    G1 X100 Y20 F3600
    G1 X0 Y0 F1200
    G1 X100 Y10 F3600
    G1 X0 Y0 F1200

    but the machine instead of running through them sequentially the machine moved to X100 Y100 alright but stalled immediately on the return home position.   I'm at a loss as to what is causing all the vibration but I know its responsible for causing the machine to stalls.  Its almost as if the step pulses from one axis are interfering with the other axis. 
  • Well, you can to 12000hz per stepper at same time without doubling. It is not for all steppers in sum!

    What I know is that microstepping reduces sounds on my printers making it move smoother, but they are belt systems so not that much steps needed without anyway. What I want to say is that coarser steps also increase vibrations, so going on 1/2 step might maybe reduce vibration and you should be able to move 100mm/s with 100 steps per mm if vibrarions do not occur.
Sign In or Register to comment.