Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Trinamic drivers #14

Open
udidnazime opened this issue Apr 22, 2018 · 34 comments
Open

Feature request: Trinamic drivers #14

udidnazime opened this issue Apr 22, 2018 · 34 comments

Comments

@udidnazime
Copy link

Any word of advice on interfacing trinamic drivers on board instead of the a4954 stepper drivers? This so stepper operation can be quieter.

@julidau
Copy link

julidau commented Jul 23, 2018

could you elaborate further on that thought? Are there any trinamic products specifically that you could suggest ?

@np22-jpg
Copy link

I really like the look of the TMC4362A-LA, and they also happen to be cheaper at Digi-key than the TMC4330A-LA, and its information can be found here: https://www.trinamic.com/products/integrated-circuits/details/tmc4361a-la/ as well as the pinout.

@julidau
Copy link

julidau commented Jul 24, 2018

These are nice motion controllers. They can talk to the AMS5047 directly and implement closed loop stepper control using the encoder feedback.

But they do not contain a driver stage or a stepper driver (current controller). So while they are a nice replacement for the M0+ core (the Atmel SAMD21) on the Mechaduino, they cannot replace the A4954.

I feel that i should also mention the PanDrive stepper controllers from Trinamic that are using a similar chip to implement something close to the Mechaduino. While the linked one is quite pricey i think they are a better option then changing the mechaduino hardware.

@np22-jpg
Copy link

In that case, what about using a TMC5160-TA? I wasn’t able to find it beforehand on the other comment, however it includes the features of the TMC2660 with an input for an encoder, along with the features of the TMC4362A-LA. along with that, it is chainable via UART on the datasheet. Along with that, you can add extrernal mosfets, making this closed loop stepper sytem seem more attractive to cnc applications. e. g. one large stepper board chained to multiple smaller, cheaper ones. This IC is also cheapper than the TMC262 and TMC4362-LA at digikey.

@julidau
Copy link

julidau commented Jul 25, 2018

well that chip sure looks great. I really wish i would have known about it before making a driver based on the TMC2660 :)

That chip only has a few drawback though:

  • The Encoder interface accepts quadrature encoders only. It makes sense (most stepper motors come with quadrature encoders either build in or added) but is different from the TMC4362-LA, which also accepts absolute position encoder feedback. Not that one would need that anyway, quadrature should be fine for most applications. A replacement for the AMS5047 would be the AMS5601 with a quadrature interface.
  • The external mosfets are not optional, they are required. The chip only contains mosfet drivers. This is not that big of a deal as low power mosfets can be had for a buck each, but one will need 8 of them.

I am quite confident that, using the TMC5160-TA, a drop-in replacement for the mechaduino can be made. I'm not sure about doing it on two layers, but it might be possible. I unfortunately lack the time to do so :(

@np22-jpg
Copy link

Huh. So to get a better, cheaper motion controller/ driver, you have to sacrifice some precision? Not like over 10 thousand positions would affect something that only steps to 400. When will the TMC 2660 variant of this driver be available? Will it still maintain the SAMD21G18A-AUT? No Rush.

@julidau
Copy link

julidau commented Jul 25, 2018

just in case it seemed that way: i am not affiliated with the mechaduino project 😉. I just happen to own one...

As it seems this project died over a year ago, i don't think there will be any version using a trinamic driver. I was working on a different driver style using the TMC2660 (one in a format similar to this one).

Regarding the encoder and the loss of precision: The AMS5047 is currently hard to come by (mouser has a few left i think) and the one i proposed was the "next best thing". Whether that would be the optimal choice i cannot say for certain. AMS might have 14bit encoders with a quadrature interface in their lineup. I was not looking super hard to be honest…

Cheers :)

@np22-jpg
Copy link

Wow. Now I feel stupid. So um, thanks for your help. It seemed like you were putting an awful lot of effort into your replies, and I thank you for that. It seems that a lot of things 3D-Printing as far as electronics go have died in the past year. The Smoothie-V2 seems to be dead, as well as many other awesome boards. With duet being at the, top they really have no reason to innovate and the revolve board will be way too expensive for a standard user. This makes me curious of someones gonna end up making a REALLY successful kick-starter that includes 3D printing electronics. Anyways, thanks again, and one last thing: Are you gonna make that motor driver design public on easyEDA? I think they guys over at reprap would have a field day over that.

@julidau
Copy link

julidau commented Jul 26, 2018

No worries! I just wanted to lower the expectations a bit :)

Yes, i was planning on making the design publicly available after fully testing it out. And who knows? Maybe i will come around to making a driver board thats screws to the back of the stepper like mechaduino does. I too am curious what the future holds...

@np22-jpg
Copy link

I just did some reading and found out that the TMC5130 has the same features as the 5160, however it has internal MOSFETS, so you may want to check that out at a later date.

@arthurwolf
Copy link

@npgoalkeeper Smoothie v2 is most definitely not dead, both Smoothie v1 and v2 are very actively developed, it's just we are doing extremely ambitious things at the moment so there are longer development time spans than usual. I've just sent the gerber for the first proto of v2 to the board house, and we already have protos for v2-mini and v2-pro. And v2 firmware can laser cut and cnc mill at this point.

@np22-jpg
Copy link

np22-jpg commented Jul 26, 2018

Sooo its just issues with FW and getting the pcb's manufactured at this point?
Edit: Quick question: will there be a gadgeteer extension board for closed-loop stepping?

@arthurwolf
Copy link

arthurwolf commented Jul 27, 2018 via email

@np22-jpg
Copy link

np22-jpg commented Jul 28, 2018

So I found the AMS AS5311 magnetic hall effect IC, and it uses an ABI interface (looks like it can be programmed to ABN for the TMC5130) and all it requires is an SDI/SCL interface to program. I’m going to try and make something close the mechaduino, and it should in theory only need a location to get to.
Edit: this isn't good enough

@julidau
Copy link

julidau commented Aug 22, 2018

hey,
how is your project coming along ?

@np22-jpg
Copy link

np22-jpg commented Aug 23, 2018

Well, I'm going to use the TMC5130 because of its microplyer capabilities. The driver will (normally) be with 16 bit precision with interpolation. I'm probably also going to use it in S/D mode. I will also use the TMC4361a. I could just simply use the TMC5130 by itself, however the TMC4361a has true closed-loop operation, along with a 1.8v on-board regulator. Everything will use 3.3v logic. The encoder should require little coding, and thats pretty much it, other than that I'm unsure if I should use SPI or S/D mode for communication between the the TMC4361a and TMC5130 and that I'll maintain the A/B/N encoder interface. I may not use the original form factor, as I'm planning to use the maximized configuration with any and all inputs/outputs with pull-up or a pull-down resistor. Unfortunately, the system will only be able to handle up to 1.4a with 2.5a peaks, however I think that with good cooling for bigger machines, it'll be fine. After all, with a closed-loop interface, coolstep and dcstep should allow the motors to run at a lower current in normal conditions, and near-none when idle.

Please, tell me what you think :D

Edit: I've decided to use SPI mode.

Edit 2: Only a year later when this "issue" was created. only took a year for it to be finally slowly being resolved.

@np22-jpg
Copy link

np22-jpg commented Aug 24, 2018

Done with the part selection part. I need to do the PCB layout now. I'm probably going to make another version that has less components but no on-board regulator. Might make another PCB with 3 regulators for that. It has a lot of I/O pins for feedback. Over 13 pins. It could be ran by just STEP/DIR, however. Other I/O include Start, 3 input switch reference points (might just short the home one to REF1), all 4 pins required for SPI, Interrupt pins, and an external clock pins for attaching an external clock. Along with that, it has the 2 AS5311 Magnetic Motion Sensor magnet distance pins, and the 2 pins for diagnostics on the tmc5130. I'm also not sure if I should step up the input voltage to 36 volts. This is as complicated and component-heavy as it gets, but still, I couldn't code to save my life.

https://easyeda.com/npgoalkeeper/thing

Edit 2: realized the TMC4361A doesn't need a quadrature interface, so as5047d it is. Also, got rid of the pull up/down resistors on the SPI side of things, there's not enough room on the PCB. All signal traces will be .15mm thick, 0.4 for the TMC5130 output and VCC.

@julidau
Copy link

julidau commented Aug 31, 2018

I took a look and it looks great. I actually played with this a little myself but your approch looks a lot better!

I did a smaller "version" of the mechaduino using the TMC5130A and ordered a prototype, but this one does not include an encoder since it was made for a NEMA11 motor.
If someone wants to check it out it can be found here: https://aisler.net/p/QVYWBVJL

I will test that one in a month and maybe tackle a NEMA17 version if i got more familiar with the 5130A. Till then i wish you @npgoalkeeper good luck with your version!

@np22-jpg
Copy link

np22-jpg commented Sep 3, 2018

After looking at it some more, and coming up with new ideas, and seeing trinamic's new tmc2160 stepstick, i have determined there is no use in using a tmc5130. which is why im switching to the tmc5160. Also im probably going to also have a 2 header layout like the uStepper. Oh and yes, i will keep the as5047d since the tmc4361a does not require a quadrature interface. Might make a version using the tmc389 ic as well, might be fun to play with.

Edit: The reason for using a tmc5160 instead of the tmc2160 is because the tmc2160 actually isn't for sale. If it is, please link it.

@PBscoots
Copy link

PBscoots commented Sep 4, 2018

Just lurking here, but its awesome you guys are reviving this project. Excited to see the progress in this revival and some ultra silent mechaduinos. :) I would help but am worthless at board level.

@np22-jpg
Copy link

np22-jpg commented Sep 6, 2018

With the TMC5160, I need to use external mosfets. Any suggestions? They need to be N-channel. For my design, I will copy the TMC2160 silentstepsticks for now (well a variation).

@julidau
Copy link

julidau commented Sep 6, 2018

My goto method of searching for mosfets is going on digikey and filtering the mosfet category for new products. That turned up with this one:
https://www.digikey.com/product-detail/de/on-semiconductor/NVMFD5C478NLT1G/NVMFD5C478NLT1GOSTR-ND/8636571

gate charge looks ok, Ron should be fine as well. But i dont know what max. Voltage you want to go to. Maybe there are smaller packages for lower voltages...

Edit: compared to the fdmc8030 they are pretty big. Maybe going with smaller is the better approach here.

@RGD2
Copy link

RGD2 commented Sep 6, 2018 via email

@np22-jpg
Copy link

np22-jpg commented Sep 7, 2018

So basically choose Transistors with a low voltage drop and power dissipation? I don't have a fast scope, much less a scope in general, just a voltmeter. I can, however use easyeda's simulated scope to try and test them, however all digital tests are done as if the components were perfect. If worse comes to worse, I'll use a npn-pnp mosfet driver to reduce ringing further.

@RGD2
Copy link

RGD2 commented Sep 7, 2018 via email

@np22-jpg
Copy link

np22-jpg commented Sep 7, 2018

"Integrated Drive" IC's have too low of an amperage rating for CNC applications. On second thought, I will copy the TMC5160 reference design. Updates on the project will be posted here: https://github.com/npgoalkeeper/Closed-loop-stepper/blob/master/README.md
(I really need a name for it)

@np22-jpg
Copy link

Just a bit of an update, I've been talking with trinamic and they have convinced me to simply use a tmc2130, with it the tmc2160 coming out soon.

@np22-jpg
Copy link

capture
Its begun.

@np22-jpg
Copy link

np22-jpg commented Sep 17, 2018

So I did a small amount of research on the VHF ringing you spoke of, and found a thing called a snubber/zobel network. Are therea any downsides to using an RCD snubber? It seems to do the same exact thing as the resistor, however it acts as more "active" filter that completely removes the inductance that causes this phenomenon. However, it seems like more than anything my main concern should be layout as far as efficiency goes when I make the tmc2160 version.

@RGD2
Copy link

RGD2 commented Sep 18, 2018 via email

@amoose136
Copy link

Just a note on the TMC2130-LA: my printer uses an Einsy Rambo 1.1a board as the driver and even though the RMS current is rated for 1.2A, in practice if you print with Marlin setting current at 800mA, the motors will reach a steady state temp around 50C. More current does not seem like a good thing here but I could see that maybe a longer Nema 17 could handle more and use more in milling applications with no issues.

@np22-jpg
Copy link

Well I mean, this is mainly just for experinentation. Might be fun to use nema 17's in a milling machine just for wood or MDF or whatever.

@np22-jpg
Copy link

np22-jpg commented Dec 9, 2018

So here's me a couple weeks later, after some testing. A friend and I have done some research and written some software. We are going to make a motion controller that consists of A STM32F401 MCU paired with 2x TMC4361a's and 2x TMC2160's paired with 12a MOSFETs. As of right now, I do not want to share the link to access the project on EasyEDA, as it's quite a mess.

@Psylenceo
Copy link

Psylenceo commented Apr 19, 2019

I keep screwing this up. Here is 2 boards I made up to allow more user functionality, use a TMC5130 or TMC2130, and eitehr a atmega32u4 or a atmega328PB. With a 3rd board in progress to offload the driver ic and instead have the user use a break out borad like the TMC2130-BOB, TMC5130-BOB, or TMC5160-BOB.

Also not sure if the links let people have access to edit the boards or not, if it does let you access them in the editor please do not edit them.

32u4 board - https://easyeda.com/kenm/Intele-step
328PB board - https://easyeda.com/kenm/mechaduino-328pb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants