Re: Need to up grade power

Robert Benward

George, Mike, Robert,
I've said this before, and I wish someone could confirm my findings. 

When I was running my set up and trying to get my Losmandy conversion to run faster, what I found was that the settings for iRUN & iGOTO are TARGETS, not limits.  What is the difference?  A limit, you set the current and the motor current will go no higher, but a target, you set the current and the drivers tries to force that current in the winding every cycle/step.  Why do I have this impression?  I had SPI status turned on on my TMC5160.  As I tried to run faster, I would get an "OPEN LOAD" status and the drive would shut down.  The higher I turned up the current, or the faster I went, that "open" status would show up.  What fixed it was setting the current lower, and raising the voltage.  If the current fails to meet the target, the driver gets the impression that the load is open, why else would the current not go higher?  So, a motor stall can be because you don't have enough current/torque, or because you didn't get to the current setpoint and you got a driver fault.  If you fault, everything just stops.  If you run out of torque, the motor just sits there and whines.

So, the windings are inductors.  The current rise is a function of the inductance, winding resistance, and applied voltage.  With inductance and resistance fixed, the only variable left to increase/improve current rise time is voltage.  The time constant is L/R and that means the current will reach 63% of the final current value, V/R in one (1) time constant.   Wtih a fixed time constant, the only way to increase current is to increase the voltage.    At slow guide rates or slews, we have time for the current to rise to the set point.  As we increase the slew rate, there is less time for the current to rise before the next cycle begins, hence the cycle is terminated and the status for current during that cycle is determined.  If the current didn't get there, the driver concludes the load was open.  I BELIEVE this is how the TMC5160 works.

So the easiest thing to get it to work at faster step rates is to raise the voltage, then if more torque is needed, raise the current target higher, until you begin to stall again (or completely shut down)  at higher speeds, then drop back. If you are at your maximum voltage, and you increased current and you are still stalling at higher step rates, I suggest maybe you have reached your maximum speed with your hardware configuration.  Look at your SPI status if at all possible.  Does the TMC5160 adjust the current target based on the step rate?  I don't know.

Below is a simulation of simple stepper driver and winding.  The winding is  4mH, 1.45 ohm from a NEMA23 motor.  The three current plots are from three different drivers (simple "H" bridge) simulated at the same time.  The only difference is one is running at 12V, the next at 24V, and the last at 36V.  At a slow slew in the beginning, note how the higher voltage brings the current up to a higher level before the end of the cycle.  Also note at the higher and higher slew rates (we sweep from 50Hz to 2000Hz and back to 50Hz), the current gets lower and lower.  Regardless of current setting, the current will only reach a certain point before time (end of step) runs out.  You can wish all you want (in the settings), but simple physics prevails.  This is a simple simulation, obviously there is no current trip here, the current keeps going up until the cycle ends or you reach the system current limit, V/R.  What is clear, as you go up in frequency/step rate, the current can only go so high, and we know current = torque.

So, I think we need to look differently at the those settings.  We can set a higher limit for holding, and a lower current for slewing, but in our application it makes little difference.  A lower setting to reduce battery current during guiding and a higher (but not too high) for slewing.  The second plot just has the vertical scale expanded.  You can see at the higher frequencies/step rates, it's hard to reach 500mA with 12V.  This, keep in mind, is for full steps, I don't think microsteps changes the interpretation.  It's still the applied voltage across the winding during a certain period of time.

The last plot goes from 50Hz to 1000Hz, note how at the upper end, 12V will not get you much higher than 700mA.

If you give me your motor model, I can run a sim for your particular motor.

This is my simple understanding.  I hope to resurrect another Onstep controller and I will be able to test more of these theories.  I also hope to make this simulation a little more sophisticated with current targets.

Hope this helps a bit.

Join to automatically receive all group messages.