How to control 4 tmc2209 with esp32 via uart

Hello everyone. I have been reading many threads on this and other forums and nowhere can I find how to do what I mention in the title.

I would like to know if it is possible and how to do it, since I need to control 4 of these motors for my project to control a telescope and the zoom and focus of a camera.

I would also like if someone can explain the issue of the connections between the esp32 and the tmc2209 to control the microsteps via uart and how ms1 and ms2 influence them.

I have read a lot on the subject but the information is not detailed and is very scattered, so I have more questions than answers.

A simple scheme and code would be very helpful to me.

Thank you.

The datasheet of the tmc2209 tells how those pins can be used.

That's obvious, but it doesn't say how to use 4 drivers per uart with esp32.

Yes, it does! The pins ms1 and ms2 settings allow 4 different devices on the same RS-285 data line. the possible addresses are 00, 01, 10 and 11.

Well, it's true, if it says so. But in my defense I will say that the version of the datasheet that I downloaded a long time ago does not include it. Apparently it is a simplified version of the pdf.

One last question. For the 12 volt power supply of the driver, does it matter if I use electrolytic capacitors or SMD ones? Of course, if it is of the correct value.

I see people always use these capacitors:

but I want to use these:

Maybe it's a stupid question but I'm a newbie to all this and I don't want to make mistakes when manufacturing the pcb.

Thank you!

No difference.

Thank you.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.