Giter Club home page Giter Club logo

Comments (5)

Chr157i4n avatar Chr157i4n commented on June 8, 2024 1

You need the 3 pin connection (En, Dir, Step) on the TMC2209 when you want to drive the motor a given amount of steps.
The UART connection can be used to change setting in the driver, like the motor current or the microstep resolution.

I think with the TMC5160 you can drive the Motor completly over the communication interface (in that case SPI), because the TMC5160 has an inbuilt Motion Controller. The TMC2209 does not have one.

The TMC2209 has only an inbuilt "Step Pulse Generator":
"Some applications do not require a precisely co-ordinate motion – the motor just is required to move
for a certain time and at a certain velocity. The TMC2209 comes with an internal pulse generator for
these applications: Just provide the velocity via UART interface to move the motor" [from the TMC2209 Datasheet]

from tmc2209_raspberry_pi.

sandric avatar sandric commented on June 8, 2024

Sorry, just realized that all works if I connect TX->TX and RX->RX straight, for some reason I thought it needs to be reversed. But schematics would also be very appeciated, since I also get from examples that apart from just uart it still needs 3-pin connection for movement, right?

from tmc2209_raspberry_pi.

Chr157i4n avatar Chr157i4n commented on June 8, 2024

Hey,
yes apart the uart connection, you have the 3-pin connection (En, Dir, Step). Those three pins needs to be defined when you create the TMC_2209 object:

tmc = TMC_2209(16, 20, 21)

#-----------------------------------------------------------------------
# constructor
#-----------------------------------------------------------------------
def __init__(self, pin_step, pin_dir, pin_en, baudrate=115200, serialport="/dev/serial0"):
self.tmc_uart = TMC_UART(serialport, baudrate)
self._pin_step = pin_step
self._pin_dir = pin_dir
self._pin_en = pin_en

from tmc2209_raspberry_pi.

sandric avatar sandric commented on June 8, 2024

Yes, I already tested it and its working, you are right. What I'm not quite understand is why its needing both uart and 3pin? I mean I can control stepper with just 3 pins - I tested it without uart with simple c script. I thought that uart can be used instead of 3 pins simply sending commands to tmc mcu, to remove number of connections?

from tmc2209_raspberry_pi.

sandric avatar sandric commented on June 8, 2024

@Chr157i4n Thanks a lot for explanation, clarified a lot! I'm not sure if issue should be closed though since it was originally about schematics, close it if you think its redundant.

from tmc2209_raspberry_pi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.