[FW 3.5.2] M569.2 and microstepping lookup table
-
@dc42 thank you for having looked into that, the conversion now works.
Unfortunately, the behavior of the motors after changing the lookup table is still not the same as with the TMCL-IDE. -
@leone did you change the hysteresis values to the ones given by the TMC IDE too?
-
@dc42 yes, I set the driver parameters as in the TMCL-IDE (I copied the contend of the register 0x6C with M569.2).
I am using a custom board, I will check over the next few days if there is interference in the output of the TMC5160 distorting the signal going to the motor. -
@leone I am trying to understand what the phase modulation settings in TMCL-IDE are doing exactly but I can't see any reference to it in the user manual.
- What steps did you take to get that window in TMCL-IDE?
- Are you using a physical dev board (if so which one), or are you simulating the board with a virtual module in the IDE (again which one)?
-
@AndyE3D I am using the TMC5160 evaluation kit (https://www.mouser.de/ProductDetail/ADI-Trinamic/TMC5160-EVAL-KIT?qs=TiOZkKH1s2TJebvRqsmGsQ%3D%3D).
Once you connect the eval-kit to the pc you will find something called "sinus tool" and you can play with it. This is what in the user manual is called "microstepping look-up table"... I'm not sure if with "phase modulation" you're referring to the same thing. -
@leone Can you share the user manual you are using as "microstepping look-up table" also isn't in the one I have from the software
.I also don't have an evaluation board so I might need you to try and change the sliders and share with me what each one does if you are happy to help me with that?
-
@AndyE3D I followed the driver's datasheet and the application note 26:
https://www.analog.com/en/resources/app-notes/an-026.html
https://www.analog.com/media/en/technical-documentation/data-sheets/TMC5160A_datasheet_rev1.17.pdf
These are settings strongly dependent on the motor itself, and I have only nema24 motors. The configuration I posted is the best I found for this type of motor. -
Hi @leone, if it's not too much trouble, please can you load the IDE and post screenshots similar to the ones you posted already (showing the sliders, waveform, and register values) with the sliders set in the following positions:
- Modulation amplitude zero, sine offset zero.
- Modulation amplitude -20, sine offset zero,
- Modulation amplitude +20, sine offset zero.
- Modulation amplitude zero, sine offset maximum.
You may need to adjust the microstep amplitude in some cases to make the checks pass.
My aim is to see whether the "modulation" is just adding some third harmonic to the sine wave, or something more complicated; and to see what the sine offset does.
Thanks - David
-
@dc42 here they are. The sine offset should be "the absolute current at entry of the lookup table". It shifts up or down the sine wave, so to have it feasible I had to reduce the microstep amplitude. The maximum offset is not feasible, the higher it gets, the flatter the sinewave must be. Hope it's enough to clarify the behaviour, if you need something else, let me know.
-
@leone thanks, that's great!
The sine offset isn't what I expected, and I don't see any use for it. Does the IDE documentation or help indicate when it would be useful?
-
@dc42 unfortunately, the IDE doesn't say anything more than the datasheet/application notes.
My understanding here is that the sine wave is encoded as a list of increments/decrements to add to the START_SIN and START_SIN90 registries while increasing the microsteps. Since START_SIN and START_SIN90 represent the current of the two coils at the beginning of the electrical revolution, the value has to be greater or equal than zero.
It can be tuned for some desired behaviours or to make some weird configurations feasible (as in the picture below, where for offset less than 28 the wave is not feasible).
In general, from the examples in the datasheet and application notes, I saw the START_SIN registry always set to zero. -
@leone thanks again!
We're looking to add the facility to apply "modulation" to the sine table using just 1 or 2 parameters. What are the max and min values of "modulation" that the IDE allows you to apply? Please provide screenshots using those values.
-
@dc42 great news!
The modulation parameter goes from -27 to 39.