
TMC5160
Recommended for New Designs
The TMC5160 is a high power stepper motor controller and driver IC with serial communication interfaces. It combines a flexible ramp generator for automatic...
Datasheet
TMC5160 on Analog.com

Hi Savi,
that looks good. To work with the internal motion controller, you set SPI_MODE=1 (SPI interfacing) and SD_MODE=0 (no use of external Step signals, use internal ramps).
You find this information in the beginning of the datasheet:



Hope this helps.
Does encoder output from motor is necessary to connect to encoder pins of TMC5160 to operate using spi interface?or leave floating?
An encoder is optional. It is not required for motor operation. You can leave ENCA and ENCB unconnected. As ENCN does not have an internal resistor, optimally provide a pull up or pull down resistor.
thanks for reply.
1. Can you review the connection made for REFR_DIR ,REFL_STEP , as per screenshot attached as below,..we are operating the motor from spi interface

2. DIAG1_SWP , DIAG0_SWN require for testing while operating under SPI interface from mcu? can leave unconnected?
Reference switches also are optional. The function can be programmed via register. You can pull up or pull down the pins REFL and REFR or leave a connector for later usage.
The DIAG outputs are intended for use as a interrupt function to your CPU. If you do not have any interrupt pins, or do not want to use them, leave them unconnected.
OK. that makes sense.
Regarding DIAG outputs, our use case is like ,just we using this driver ic to control a perisitaltic pump used in medical dialysis machine(Type CF grade medical). We just to want to control rpm to control flow rate liquid through peritistaltic pump.
So this DIAG output as interrupts is relevant in our sceneario? can you bit explain about diag use case?
The use of these features is application specific.
A processor interrupt generally is used, if information shall not be polled on a regular basis, or if the reaction has to be quicker than the typical polling interval. A different use case can be to wake up a CPU from sleep mode. The event can be an undesired operation state, like a defect cause or a stall detection, or reaching a desired state, like a target position. I guess this is something your software developer can think about best. With typical polling intervals in the range of a few ms, I see not need for a rotatoric drive to use this feature.
thanks for inputs. currently we are doing layout design for the TMC5160 taking evk files as reference....other than this any other layout reference files can you suggest for guidlines of layout design?....we are designing a medical product ...
Hi Savi,
we do not have more layout examples. Please make sure that you do a low inductive and compact layout using a minimum of 4 PCB layers with one layer dedicated as GND plane. I would also suggest to add LC filters with <50MHz bandwidth close to the PCB connectors, both for the motor outputs and for the power supply.
I would like to also point you to our latest device, the TMC5262. It is similar to the TMC5160 concerning general features, but has an internal power stage for up to 4.25A RMS current. A main benefit with an integrated power stage is, that EMI conformance is easier to reach, as the internal power stage is very compact and has near zero parasitic inductance in the interconnections. The TMC5262 brings further benefits with regards to very precise load monitoring and extremely effective CoolStep for low motor power dissipation. In case you need more than 4A RMS, this IC of course will not fit.
Can u share any ref schematics other than evk?