Nieuw project Hulp nodig?
ElektorLabs

TMC2160 Motor Driver Board [190255]

Status: Afgerond
159
7
stemmen
22 juli 2019
190255-tmc2160-avatar.jpg

Stepstick drivers

If you are into hobby projects involving stepper motors or if you are building 3D printers, you are probably familiar with stepstick drivers. These consist of a small PCB with a stepper motor driver IC and pin header connectors which allow the module to be plugged into a larger board.

Stepsticks come in many flavours allowing you to choose between a range of driver ICs from several semiconductor companies. Some of the better stepsticks are the so-called SilentStepSticks which are built around Trinamic stepper driver ICs of which the TMC2100 and TMC2130 are the most popular ones.

These SilentStepSticks are a very good choice for 3D printing applications, especially during long print jobs. Otherwise, when using less advanced drivers, the noise of the stepper motors may become very annoying. SilentStepSticks not only allow the printer to run silently but also help to achieve better, smoother and more consistent print results.

Besides the standard Enable, Step and Dir signals which are used to control the motor position, speed and direction, the TMC2130 and TMC5160 based stepsticks also have an SPI interface which allows tuning and configuring several driver parameters. Modern 3D printing software like Marlin supports these drivers and can even autotune the motor drivers via the SPI interface during printing for best results.

While stepsticks are small and easily swappable, they also have a number of disadvantages. Due to their very small size, most of them use driver ICs with integrated MOSFET bridges which tend to overheat on such a small board with almost no copper planes, even with a heat sink mounted on top. This is mainly a problem in more demanding applications like CNC.

Furthermore, stepsticks don’t offer any galvanic isolation between the motor power supply and the control signals making them less suitable for complex motion control systems.

Industrial stepper motor drivers

Industrial drivers are very commonly used for a broad range of applications and come mostly in an enclosure with terminal blocks for connecting power, the motor leads and control signals. Often, the enclosure doubles as a heat sink for the electronics inside. Some driver enclosures are even suited for direct mounting on the back of a stepper motor. The configuration of the main driver parameters like microstepping and motor current is usually done using DIP switches. More advanced drivers also provide a serial port or a USB interface for configuring and tuning the motor parameters.

Industrial drivers tend to have optocoupler inputs, providing galvanic isolation for the control signals (Enable, Step, and Dir signals). Some drivers use ModBus (or even CAN bus) instead to control motor position, speed and direction.

Mainly two driver types are available: open loop and closed loop. The latter use rotary encoders for motor shaft position feedback to the driver. This results in a higher accuracy and compensation if the motor skips steps under certain load conditions.

If you need to drive multiple stepper motors, multiple axis motor drivers are also an option.

The Trinamic TMC2160 driver IC

The Elektor 'Wolverine' CNC gantry robot (Part 1) [here is Part 2] is based on a CNC310 controller board from Eding CNC. As the CNC310 board needs external stepper motor drivers, we considered using drivers based on Trinamic ICs. These would allow the CNC gantry robot to run silently, which is especially important when the machine is used as a pick & place machine for SMT components.

At first, we did some quick tests with TMC2100 and TMC2130 SilentStepSticks but these were not up for the task and overheated quickly. Instead we looked at the brand new TMC2160 which uses external MOSFETs and was designed for more power-hungry applications. A TMC2160 breakout board was available but, unfortunately, configuration of the motor driver parameters was only possible via SPI, something the CNC310 board doesn’t support. Also, galvanic isolation between the control signals and the motor power supply was non-existent.

In the end we designed our own TMC2160-based driver with the IC running in standalone mode, and with optocoupler inputs for the control signals. This allows the motor driver parameters to be set using DIP switches.

Most modern stepper motor drivers like the TMC2160 are so-called chopper drivers, which rapidly switch on and off a relatively high voltage (typical eight times the rated motor voltage for best results) to the motor windings. This technique allows controlling the average current per phase. Most chopper drivers use a chopping frequency in the range of 20–50 kHz. Since the chopping frequency is above the audible range, noise levels are kept low. With a constant fixed chopping frequency, the average output current is controlled by varying the pulse width of the output pulses, a technique known as pulse-width modulation (PWM).

Besides the classic constant off-time chopper, the TMC2160 also features two sophisticated SpreadCycle and StealthChop2 chopper modes, which ensure noiseless operation combined with maximum efficiency and best motor torque.

StealthChop2 is a voltage chopper-based principle. It especially guarantees that the motor is quiet in standstill and in slow motion, except for noise generated by ball bearings. Unlike other voltage-mode choppers, stealthChop2 does not require any configuration. It automatically learns the best settings during the first motion after power up and further optimizes the settings in subsequent movements. An initial homing sequence is enough for learning. StealthChop2 allows high motor dynamics, by reacting at once to a change of motor velocity.

SpreadCycle is an advanced cycle-by-cycle chopper mode. It offers smooth operation and good resonance damping over a wide range of speed and load. The SpreadCycle chopper scheme automatically integrates and tunes fast decay cycles to guarantee smooth zero crossing performance and allows for high dynamics and highest peak velocity at low vibration.

Other advances of the TMC2160 include MicroPlyer step interpolation, resonance damping for mid-range resonances, dcStep load-dependent speed control, StallGuard high-precision sensor-less motor load detection and CoolStep current control for energy savings up to 75%. For more information, please refer to the TMC2160 product page and data sheet.

About the circuit diagram

Our TMC2160 stepper motor driver board is largely based on the Trinamic TMC2160 breakout board. While most of the connections to the TMC2160 are identical, and we used the same parts to build the H-bridges, there are quite some differences.

To allow the TMC2160 to operate in standalone mode, we tied pin◦22 (SPI Mode) to ground. As a result, pins 13–16 and 23–25 now become configuration inputs CFG0-CFG6 which we connected to a 6-pole DIP switch S1. As CFG4 and CFG5 have internal pull-down resistors, we decided to connect external pull-down resistors to the other configuration pins CFG0-CFG3 as well. CFG5 and CFG6 are both connected to S1.6 since driving them to a different level would result in CFG6 drawing a significant current of 20◦mA, causing the internal linear voltage regulators of the TMC2160 to generate excessive heat.

High-speed TLP2745 optocouplers with digital outputs (OK1-OK3) provide galvanic isolation between the control inputs (Enable, Step and Dir) and the TMC2160 driver IC. The inputs are optimized for 5-volt levels. Higher voltages can also be used if extra resistors are connected in series with the control inputs. Please note that we changed the name of the ‘Step’ signal to ‘Pul’ (pulse) to better match the signal names printed on the enclosures of common industrial stepper motor drivers.

An additional 6-pole box header connector K3 allows for easy connections using flat cables to our CNC310 breakout board.

We designed a four-layer PCB with large copper planes for better cooling performance and used a form factor similar to common industrial stepper motor drivers including Phoenix Contact "pluggable" terminal blocks, a piano-style DIP switch block and a power indicator LED.

Finally, an SMBJ36A TVS diode was added to protect the circuit from voltage spikes on the power supply rails. When the driver is connected to a supply via long leads, the parasitic induction of the leads may otherwise cause voltage spikes in combination with the MLCC capacitors C18 and C19 on power up. Please note that the circuit is not reverse polarity protected, so be careful when connecting the power supply leads.

We did some tests with a thermal camera during various load conditions. With a 24 V power supply, the temperature of the TMC2160 and the MOSFET transistors reached 50°C and 41°C respectively, while driving a NEMA 17 stepper motor at various speeds. The motor current was set to 1.6 A RMS using the SpreadCycle chopper.

The stepper motor was then replaced with a NEMA 34 motor and we cranked the supply voltage up to 32 V. The current was set to 3.1 A RMS and the motor was pulling a 12 kg kettle bell. Now the temperature of the TMC2160 and MOSFETS rose to 80°C and 78°C respectively.

When driving larger stepper motors like NEMA 23 and NEMA 34 motors, we recommend sticking a heat sink to the bottom of the PCB or to use a small fan for forced air cooling.

Lees het volledige stuk
Toon minder
Afbeeldingen
Idle 32V
NEMA 17, 24V, 1.6A
NEMA 3, 32V, 3.2A
PWM waveform
Overige

Reacties worden ingeladen...