 I had a PI brought to you by DigiKey, and I need for it, thank you DigiKey. This week is Amelon Devices, Lady Aida, what is the new exciting thing coming out of Amelon Devices this week? Okay, this week from ADI, which bought Max and which bought Trinamic, is the new Trinamic 50, TMC 5240. This is yet another in the family of Trinamic stepper motor drivers, kind of famous for their silent steppers that use very high quality motor control to enable very fast and but very quiet motor control. This one is kind of neat because it does even more. In fact, I was looking at this and I was like, wow, this actually kind of replaces almost all the stepper motor control code I've ever had to write or have used in my life. So it's up to 36, it's like five to 36 volts, up to two amp per leg as bipolar stepper motor controller, but it also has a lot of built-in capabilities such as motion control, of course it can do stepper control, it has encoder reading capability, it's got motion planning, you can have UART or SPI control rather than most of the stepper drivers before you've used GPIO, this one uses SPI or UART, up to 256 microsteps per step, a reconfigurable stepper, microstepping, sine wave table if you want to change it from being default sine, I'm trying to think what else is in there and well, we'll go through it all, but very powerful kind of does it all step motor controller. So this is the kind of thing it's going to step, it's going to control chunky stepper motors that can go up to two amps, 36 volts, this happens to be like, I think, 200 milliamps 12 volts, this is a smaller stepper motor, but basically any motion control that has an XY gantry, normally you would use, you could use like a full H-bridge like we do on our, here is our motor feather wing and what we do with the motor feather wing is we actually PWM the individual ABCD pins, all four pins, to create smooth motion. So you can do single stepping where you can go like one step at a time, chunk, chunk, chunk, that's definitely the easiest, it's the fastest to implement, but you don't get really good resolution and it's kind of loud because the stepper motor doesn't move smoothly between each step, it kind of like, you know, rockets to the step and then kind of oscillates a little bit, it's if you want smooth control, you want like slowly microstep up and down from the two points that you want to travel between. A lot of people who are in the maker community or even engineers, they'll have, you know, a 3D printer and 3D printers are really popular home example of something that has an XY gantry. So there's going to be a stepper motor that controls the head and that goes back and forth is just, you know, a random 3D printer that we've sold, the XY goes back and forth and you want to move smooth, you want it to move quickly, but also smoothly because you don't want a loud and jittery print and you also want a fast print and the faster you can move the head, the faster your 3D print will complete. Okay, so like I said, you know, when you this is from ADI's tutorials on stepping and microstepping, you can, you know, most stepper motors are about 200 steps per rotation and you could just step one per, you know, you you toggle the A and B and C and D pins and with a motor controller and you can just step one, two, three, four, five, 200 times per rotation, but you're not going to get very good resolution, of course, going to be very loud. So the best thing to do is to use microstepping where you slowly PWM the motor driver to smoothly move between the steps rather than just going like chonk, chonk, chonk between each step. The bad news is anyone who's ever used microstepping knows is that the frequency microstepping is going to resonate through the motor and through the coils and you're going to get like a really annoying squeaking, squealing sound. And what Trinamic is kind of famous for is they have learned how to adapt the stepper PWM and like the frequency and I don't know, it's like the magic called silence, you know, step silent or whatever that basically makes it like super quiet, but you still get all of that power and smooth motion. So if you do want to have a finished product that has stepper motor control, but you don't want it to be squeaky, you're probably using a Trinamic stepper motor controller already. This is kind of the overall block diagram for it. So the microstep sequencer is again something that they've had in previous motor controllers. The thing that's new here I think is the motion controller with wamping. So when you're not only having to microstep between each step, but you also want to slowly speed up the motor and then move very quickly and then slowly slow it down or you decelerate because you want to go between two points accurately. So you don't want to like go over the distance you want. You can't go backwards. You want to like slowly speed up so you don't jerk the motor, which will cause noise and vibration. And then when you're getting close to where you're about to end up, you want to put the brakes down and slowly end up exactly at the spot you want to end at. And normally you would have to do that with a very complicated motion controller that would be programmed in your microcontroller or microcomputer. And especially if you have more than one stepper, this becomes very complicated to program because you're having to like constantly track multiple linear algorithms and you know the X and Y and Z are not initially going to the same speed and the same distance. It's a lot of work. So what's nice about this motor is it does that all for you. You tell it how many steps you want to go to and you set up the ramp up, you know, attack, decay, release, whatever, and it will do that whole for the whole motion for you and let you know when it's done. You can communicate it with your SPI and we'll go through it. So you get multiple motors. There's also encoder unit I mentioned, interrupts, and there's also some neat stall detection as well. A lot of, yes, I'm sorry, this is the stuff I was talking about with the eight point motion controller. So stealth chop is what makes it quiet. Spread cycle I think is just kind of what makes it reduce current and be precise as it goes from the beginning of the step to the end of the step. Stall guard is what lets it detect the back EMF so you know when it's installed, which is really valuable because you might have end switches on your XY gantry, but for stuff those can fail, or maybe you want to have some, you know, there could be something in the way of your motors that's stopping it from moving. You haven't forbid it bumps into a person or bumps into something it's machining. You can detect that and immediately stop it. And then cool step keeps your motors nice and cool because it's not overheat. Okay, so this is the diagram. It only does one motor, of course, but you can connect multiple motors. There's two pin configurations, the TSOP and the QFN. QFN is smaller, but if you go to the next page, the TSOP has better thermal resistance. And of course it's going to be a little bit bigger. You know, you'd want to have the TSOP, which you're through a four layer board, maybe have two ounce copper, and then behind it or above it, you're going to have a heat sink that might be necessary. SPI, so I think the previous step on motor drivers that I've seen from them, they had UART or individual pin control. These now have SPI interface, which is kind of nice because it means you can control pretty much any number of motors you want. And each one will just have a unique chip select. And of course SPI is very, very fast. So you can write and read from the register map. There's a huge number of registers you can access. I won't go through all of them. There's also UART single wire, which is kind of interesting. I guess this is for back compatibility. With this, you would have all the motors share a single UART, but you can set the node address. And the node address is set, I think if you go to the next page, you can set the node address with a couple different pins or three pins that you can configure. And then you have node zero through seven. And then if you need more, apparently there's a way to configure it so you can use up to 255 motors. But this way they all, I guess they chain one wire and they share one wire. So I guess if you want to use UART, maybe some existing motor controllers that are set up to do UART mode for back compatibility. Honestly, I would use SPI. It's going to be a lot faster, but you do need more wires. What Trinamic is known for, again, silent stealth chopping. So they say absolutely no noise whatsoever with these motors. The only motor, the only noise you're going to hear is from the ball bearings. And the ramp generator, again, I think this is kind of the most interesting thing because instead of you having to manually deal with the new case, slowly speed up the motor through the A1 phase and then interrupt goes off. Remember to change the controllers to drive the stepper motor in faster. Next interrupt, go to Amax. Next interrupt, it handles everything for you. It will automatically decelerate if you're using too much current or it will track the number of steps so you will get to the final location even if you have power dips or if you don't have power dips at all. There is support for reference switches, so mechanical stops built in so it will automatically stop when it hits a mechanical stop. You will end up like bashing the motor into the side of the gantry. Also, again, in addition to having mechanical stops, you want to detect a motor stall to emergency stop or to reduce the amount of current you're using, it can detect a motor stall. There's a couple of configurations I noticed on how to do this, but using the A1 phase, it will say, hey, we're not actually moving, we're getting a lot of back EMF while I'm trying to step. It will let you know and it can automatically deactivate the motor. Encoder support as well, so if you're using a stepper motor, home to a reference switch, a stop switch on the left and right side is very common, but if you're doing precision servo-like motion control, you might want to have an encoder as well. There is encoder support. It will keep track of the encoder count for you and use that when you're telling it in the motion planner like, hey, I want you to go to this location. It will use the encoder instead of trusting what it thinks is the steps, and so if you end up slipping, the encoder will detect that and you'll automatically make up any lost steps. It's available as a breakout board. This is a tiny breakout board, which is not the same size as many stepper motor driver shields. They use kind of like a Pololu pinout, maybe I don't know who invented it first. This is similar, but it's not exactly. But remember, you can't use the GPIO control for this. This is SPI or UART only. So it's not back compatible with those like step-forward direction, enable, microstep, GPIO control. You have to send the commands over SPI, so it's a little bit more advanced. You would need to redesign your PCB if you wanted to like upgrade your 3D printer design with this. They are in stock and there's also, I do have, they're in stock. They just got in. So I think like the one that's missing, like I bought it from 250 and then on the overhead, I did pick up also one of their eval boards, although I didn't realize when I first picked this up that it didn't have GPIO control and I haven't finished writing any driver code for it. But this is, you know, a nice eval board. I like is it's open hardware so you can get the design files. These are the control pins, motor output, motor power, some nice capacitors and then this just shows you, hey, this is the size of the motor driver on a four layer board. So a nice eval board if you want to get started with this. I think if you're making a very nice stepper motor controlled robotic gantry system, this is going to definitely save you a lot of time with motion planning because it does it all for you. All right, we got a one minute video, we're going to play it. Hi, my name is Thomas Ernst. I'm who is dynamic since almost 10 years now and now we are part of the big analog devices family. And I've got our all time classic demo with me and it showcases our benefits, the benefits of our stepper drivers really well. For example, we can detect the loads of the motor shaft from the information the motor gives us. And if we increase the load, the load angle opens up and we can use this information to reduce the current that we drive into the motor. And this keeps the motor cool and saves up to 75% energy. Our drivers are optimized for high resolution micro stepping. And this enables a really reliable and smooth motor run. And on top of that, we have our stealth shop shopper which makes the stepper motor absolutely silent.