EYE on NPI - Analog Devices' TMC5240 Stepper Motor Controller and Driver IC episode artwork

EPISODE · Nov 30, 2023 · 14 MIN

EYE on NPI - Analog Devices' TMC5240 Stepper Motor Controller and Driver IC

from Adafruit Industries · host Adafruit Industries

This week's EYE ON NPI has us pitter-pattering on our tippy-toes, it's the newest and bestest stepper motor driver we've seen, the Analog Devices' TMC5240 Stepper Motor Controller and Driver IC (https://www.digikey.com/short/rt0zpt4v) from the Trinamic division at ADI! Trinamic is famous for their stepper motor driver chips, which we see often in 3D printers (https://www.analog.com/en/design-center/evaluation-hardware-and-software/evaluation-boards-kits/trams.html), XY gantries and other robots that need fast motion control. Stepper motors are commonly used when we need continuous rotation for linear movement through a rack and pinion. We've got huge steppers in our pick and place machine, and most makers are going to be familiar with them in CNC devices like laser cutters, 3D printers or milling machines (https://www.digikey.com/en/product-highlight/b/bantam-tools/desktop-pcb-milling-machine) - servos will be controlling the X, Y and Z axes as well as any extruder. And if you have one of these devices you know they can be loud and slow: in order to get good precision from a stepper we need to micro-step, so that instead of a standard 200 steps per rotation, we get 16*200 or 256*200 (https://www.analog.com/en/products/landing-pages/001/optimizing-stepper-motors-microstepping.html). Microstepping gets us that beautiful precision, but adds a ton of noise because now there's a PWM signal that is vibrating the motor (https://www.analog.com/en/products/landing-pages/001/secret-silent-stepper-motor-control.html). That's where Trinamic's StealthChop2 secret sauce comes in: The StealthChop chopper modulates the current based on the PWM duty cycle, resulting in a perfect current sinewave with straight crossing of the zero-current level. The constant PWM frequency minimizes current ripple and, by extension, any Eddy current that may be found in the stator, reducing power loss, and increasing efficiency. The StealthChop chopper also removes variations of the chopper frequency, or frequency jitter, so that only the commanded variations remain. Thus, at a 50% PWM duty cycle, the current is actually zero. The result of all this is silent stepper motor operation at a standstill and at low to moderate speeds. We've covered Trinamic's TMC2226 stepper driver before on EYE ON NPI (https://blog.adafruit.com/2020/06/18/eye-on-npi-tmc2226-sa-ultra-silent-stepper-motor-driver-eyeonnpi-digikey-adafruit-digikey-adafruit-trinamic_mc/) and that chip mimic'd the common configuration for stepper motor drivers: set the microsteps with GPIO and then use a DIRection and STEP pin. That makes it easy for integration with any hardware, you just need some GPIO pins, but it means that you have to do the motion control yourself. And, once you have 2 or 3 motors, motion control code can get really complicated: you have to tune and configure ramp ups from idle to fast run, and back down so there isn't any jerky motion. What's really cool is that the TMC5240 has built-in motion-control! You set some configurations and then can tell it what position or velocity to achieve, and the microstepping is done for you. It even handles encoder reading, mechanical stall detection, and end-stop switch interrupts for you so you don't slam into the side of the machine by accident. To do this, the TMC5240 has a full register and command set, that can be controlled with SPI or UART - with UART there is node addressing required, but perhaps this is easier to integrate with low-pin microcomputers. For both, commands are sent for configuring everything from stall current, to motion control, to individual steps to temperature reads. Speaking of which: the TMC5240 come in two packages: QFN and TSSOP. TSSOP has a big thermal pad at the bottom for better dissipation, QFN is smaller. With either, use plenty of vias, a 4-layer design with dedicated 2 oz copper ground planes to keep the motor driver cool: these can handle 5-36V at up to 2A per leg, so they are throwing a lot of current around. You can pick up bare TMC5240 chips (https://www.digikey.com/short/vhvtnjbw), basic breakout boards (https://www.digikey.com/en/products/detail/analog-devices-inc-maxim-integrated/TMC5240-BOB/21292888) and eval boards (https://www.digikey.com/en/products/detail/analog-devices-inc-maxim-integrated/TMC5240-EVAL/17878664). Since you have to use the SPI/UART protocol to communicate, we recommend checkout out the pyTrinamic library (https://github.com/trinamic/PyTrinamic) which has added support to the TMC5240 (https://github.com/trinamic/PyTrinamic/blob/master/pytrinamic/ic/TMC5240.py) so you can hit the ground running / stepping. Order up some of these silent stepper drivers today and you'll get them in hand by tomorrow afternoon, you'll save tons of time on your next robotic or mechatronic project thanks to the tons of built-in capabilities on the TMC5240!

This week's EYE ON NPI has us pitter-pattering on our tippy-toes, it's the newest and bestest stepper motor driver we've seen, the Analog Devices' TMC5240 Stepper Motor Controller and Driver IC (https://www.digikey.com/short/rt0zpt4v) from the Trinamic division at ADI! Trinamic is famous for their stepper motor driver chips, which we see often in 3D printers (https://www.analog.com/en/design-center/evaluation-hardware-and-software/evaluation-boards-kits/trams.html), XY gantries and other robots that need fast motion control. Stepper motors are commonly used when we need continuous rotation for linear movement through a rack and pinion. We've got huge steppers in our pick and place machine, and most makers are going to be familiar with them in CNC devices like laser cutters, 3D printers or milling machines (https://www.digikey.com/en/product-highlight/b/bantam-tools/desktop-pcb-milling-machine) - servos will be controlling the X, Y and Z axes as well as any extruder. And if you have one of these devices you know they can be loud and slow: in order to get good precision from a stepper we need to micro-step, so that instead of a standard 200 steps per rotation, we get 16*200 or 256*200 (https://www.analog.com/en/products/landing-pages/001/optimizing-stepper-motors-microstepping.html). Microstepping gets us that beautiful precision, but adds a ton of noise because now there's a PWM signal that is vibrating the motor (https://www.analog.com/en/products/landing-pages/001/secret-silent-stepper-motor-control.html). That's where Trinamic's StealthChop2 secret sauce comes in: The StealthChop chopper modulates the current based on the PWM duty cycle, resulting in a perfect current sinewave with straight crossing of the zero-current level. The constant PWM frequency minimizes current ripple and, by extension, any Eddy current that may be found in the stator, reducing power loss, and increasing efficiency. The StealthChop chopper also removes variations of the chopper frequency, or frequency jitter, so that only the commanded variations remain. Thus, at a 50% PWM duty cycle, the current is actually zero. The result of all this is silent stepper motor operation at a standstill and at low to moderate speeds. We've covered Trinamic's TMC2226 stepper driver before on EYE ON NPI (https://blog.adafruit.com/2020/06/18/eye-on-npi-tmc2226-sa-ultra-silent-stepper-motor-driver-eyeonnpi-digikey-adafruit-digikey-adafruit-trinamic_mc/) and that chip mimic'd the common configuration for stepper motor drivers: set the microsteps with GPIO and then use a DIRection and STEP pin. That makes it easy for integration with any hardware, you just need some GPIO pins, but it means that you have to do the motion control yourself. And, once you have 2 or 3 motors, motion control code can get really complicated: you have to tune and configure ramp ups from idle to fast run, and back down so there isn't any jerky motion. What's really cool is that the TMC5240 has built-in motion-control! You set some configurations and then can tell it what position or velocity to achieve, and the microstepping is done for you. It even handles encoder reading, mechanical stall detection, and end-stop switch interrupts for you so you don't slam into the side of the machine by accident. To do this, the TMC5240 has a full register and command set, that can be controlled with SPI or UART - with UART there is node addressing required, but perhaps this is easier to integrate with low-pin microcomputers. For both, commands are sent for configuring everything from stall current, to motion control, to individual steps to temperature reads. Speaking of which: the TMC5240 come in two packages: QFN and TSSOP. TSSOP has a big thermal pad at the bottom for better dissipation, QFN is smaller. With either, use plenty of vias, a 4-layer design with dedicated 2 oz copper ground planes to keep the motor driver cool: these can handle 5-36V at up to 2A per leg, so they are throwing a lot of current around. You can pick up bare TMC5240 chips (https://www.digikey.com/short/vhvtnjbw), basic breakout boards (https://www.digikey.com/en/products/detail/analog-devices-inc-maxim-integrated/TMC5240-BOB/21292888) and eval boards (https://www.digikey.com/en/products/detail/analog-devices-inc-maxim-integrated/TMC5240-EVAL/17878664). Since you have to use the SPI/UART protocol to communicate, we recommend checkout out the pyTrinamic library (https://github.com/trinamic/PyTrinamic) which has added support to the TMC5240 (https://github.com/trinamic/PyTrinamic/blob/master/pytrinamic/ic/TMC5240.py) so you can hit the ground running / stepping. Order up some of these silent stepper drivers today and you'll get them in hand by tomorrow afternoon, you'll save tons of time on your next robotic or mechatronic project thanks to the tons of built-in capabilities on the TMC5240!

NOW PLAYING

EYE on NPI - Analog Devices' TMC5240 Stepper Motor Controller and Driver IC

0:00 14:56

No transcript for this episode yet

We transcribe on demand. Request one and we'll notify you when it's ready — usually under 10 minutes.

API Intersection Stoplight Building a successful API requires more than just coding. It starts with collaborative design, focuses on creating a great developer experience, and ends with getting your company on board, maintaining consistency, and maximizing your API’s profitability.In the API Intersection, you’ll learn from experienced API practitioners who transformed their organizations, and get tangible advice to build quality APIs with collaborative API-first design.Jason Harmon brings over a decade of industry-recognized REST API experience to discuss topics around API design, governance, identity/auth versioning, and more.They’ll answer listener questions, and discuss best practices on API design (definition, modeling, grammar), Governance (multi-team design, reviewing new API’s), Platform Transformation (culture, internal education, versioning) and more.They’ll also chat with experienced API practitioners from a wide array of industries to draw out practical takeaways and insights you can use.H TV Podcast Industries Chris Jones, Derek O'Neill and John Harrison. TV Podcast Industries TV Podcast Industries is a podcast that provides discussions and reviews of various TV shows, including recent popular series like Alien Earth, The Sandman, The Last of Us, The Boys, and Daredevil Born Again. They also cover shows such as Ironheart, Star Trek: Picard, The Rings of Power, and many more, spanning both Marvel and DC universes, as well as other genres. Heart to Heart Podcast One on One / Next Level Studios In the Heart to Heart Podcast, we talk to some of our favorite & most interesting people in the entertainment industry so you can feel empowered and learn that even in the most challenging of industries, where there’s a will there’s a way.Whether you’re an actor, a writer, a casting director, a talent rep, or just someone interested in the behind the scene happenings of the entertainment industry, this podcast will have something for you. NOW, this isn’t just another How To podcast for actors. Plenty of those shows already exist. In Heart to Heart, every guest will share stories inspired by their sometimes winding path to success on their own terms. The Learning Future Podcast with Louka Parry The Learning Future The world has never been changing more rapidly, dislocating the ways we work, learn and live. On The Learning Future Podcast we discuss the knowledge, skills and dispositions we all need for our learning future, exploring insights through interviews with world-class educators, researchers, policy makers, and leaders from across industries and across the world.

Frequently Asked Questions

How long is this episode of Adafruit Industries?

This episode is 14 minutes long.

When was this Adafruit Industries episode published?

This episode was published on November 30, 2023.

What is this episode about?

This week's EYE ON NPI has us pitter-pattering on our tippy-toes, it's the newest and bestest stepper motor driver we've seen, the Analog Devices' TMC5240 Stepper Motor Controller and Driver IC (https://www.digikey.com/short/rt0zpt4v) from the...

Can I download this Adafruit Industries episode?

Yes, you can download this episode by clicking the download button on the episode player, or subscribe to the podcast in your preferred podcast app for automatic downloads.
URL copied to clipboard!