Tmc2209 with arduino

Hi,

I've been trying to use a stepper motor with a tmc2209 with either an Arduino uno or mega. I can't find anything about this combination. I've read a lot of forum discussions (which I will link below) and tried about everything I could find there. However, nothing has worked yet. Could anybody show me (where to find) how to connect the wires and what libraries/code to use? Any help would be greatly appreciated.

  • Jason Perry

4 Links (Because I am a new user) of some of the things that I've tried:

Hi @jason_perry,

welcome to the arduino-forum.
Most of these stepper-motordrivers including the TMC2208 / TMC2209 have a direction-input and a step-input.

The direction-input defines the rotation-direction as the name says.
0.0 V clockwise / 5.V counterclockwise

The step-input makes the stepper-motor rotate a single step / microstep for each pulse created.
a short voltage-level-change 0.0V 5V 0.0V makes the motor rotate one step.

that's all. So any code that does
digitalWrite(stepin,LOW);
digitalWrite(stepin,HIGH);
delaymicros(10);
digitalWrite(stepin,LOW);

as direct function-calls or inside any kind of stepper-motor-library will work
if you have configured the IO-pins correct.
There is nothing more.

The inputs have electrical specifications which must be met. You can read this in the datasheet of the stepper-motor-driver. In most cases this should just fit directly.
In most cases it will be 5V voltage current 10 mA. Each IO-pin of an Arduino Uno and Arduino Mega can deliver that.

very important!

Only connect/disconnect the cables to the motor coils when the power supply is switched off.

Also due to the inductance, a high voltage peak occurs when the contact is broken. This voltage spike would destroy the stepper motor driver .

Also when connecting. It is very likely that when you connect, you close the contact and interrupt it again for a hundredth of a second and then bssst
Stepper motor driver broken.

Therefore, always connect (disconnect) the motor cable of the stepper motor with the power supply switched off
and
Ensure absolutely wobble-free contact.
Loose contact bssst stepper motor driver broken.

best regards Stefan

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