The next test for the TMC5161 was positional accuracy. This is where my test rig came in. I fixed the motor to one bracket and attached the 3D printed drum. A waxed cotton thread was wrapped around the drum twice for grip and then fed around the idler at the far end of the test rig. The tension was provided with some rubber bands. Finally a card was added in the middle of the rig and the cord was marked with white paint.
This time the position mode in the TMCL-IDE was used along with the position graph. The position mode has controls to set the acceleration including two modes of trapisoidal and six point. The controls also allow you to move a specific number of positions (not sure if this is steps or microsteps) and to go to a specific position. I used the clear button to zero my rig with the marked lined up with the card. I then experimented with the speed and acceleration settings. It was a little hard to control with the slow acceleration so this was increased to make the positioning a bit more snappy. The settings were reduced down so it was easier to film. I used the alternating mode to move the motor repeatedly back and forth. The "move by" setting seemed to max out at 51200 for some reason but this was sufficient for my testing.
For the traposoidal mode I did get some misalignment at higher settings. I checked with some marks on the cord/drum that this was in fact the cord slipping on the drum and not the stepper driver failing to return to the right position. Reducing the acceleration, reduced the slippage.
For the 6 point mode the driver uses two sets of acceleration parameters. It accelerates till it hits a specific speed then swaps to the next setting until it reaches maximum speed. As you can see from the graph this means that it can reach the maximum velocity quicker and also the desired position, approx 25% quicker in fact. I found that this mode also had less slippage than for the trapisoidal mode.
There was no evidence at any point that the motor was skipping steps, however the loads on this test are extremely small.
One important thing to remember is that the acceleration, speed and position control is being handled by the driver chip not the development board so if you wanted you could control this kind of motion with something as simple as an 8 bit micro-controller with a UART connection. Multiple devices could be connected to the same cabling as the chips can be configured with a unique address. A quick search showed a simple library for controlling these chips from Arduino written by https://github.com/teemuatlut/TMCStepper
The other key point demonstrated by my test is that positional accuracy is a function of all the components in the system; the motor, the driver and all the mechanical components.
Top Comments