# Tmc2209 with arduino

**URL:** <https://forum.arduino.cc/t/tmc2209-with-arduino/1189060>\
**Category:** 3rd Party Boards\
**Created:** [November 14, 2023, 1:25pm UTC](https://forum.arduino.cc/t/tmc2209-with-arduino/1189060 "2023-11-14T13:25:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jason\_perry](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/jason_perry/32/1013044_2.png) [@jason\_perry](https://forum.arduino.cc/u/jason_perry)\
**Post date:** [November 14, 2023, 1:25pm UTC](https://forum.arduino.cc/t/tmc2209-with-arduino/1189060/1 "2023-11-14T13:25:03Z")

</div>

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:

- [TMCstepper - Arduino - TMC2209](https://forum.arduino.cc/t/tmcstepper-arduino-tmc2209/956036)
- [Jitters and Negative Speed Not Working - AccelStepper - Arduino - TMC2209 - No UART](https://forum.arduino.cc/t/jitters-and-negative-speed-not-working-accelstepper-arduino-tmc2209-no-uart/1143044)
- [Correct pinout for TMC2209 stepper motor driver and Mega?](https://forum.arduino.cc/t/correct-pinout-for-tmc2209-stepper-motor-driver-and-mega/1181458)
- [UART in ESP32 With TMC2209 - #5 by kirito2908](https://forum.arduino.cc/t/uart-in-esp32-with-tmc2209/1179270/5)

---

<div class="post-metadata">

**Author:** ![StefanL38](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/stefanl38/32/713548_2.png) [@StefanL38](https://forum.arduino.cc/u/StefanL38)\
**Post date:** [November 14, 2023, 1:46pm UTC](https://forum.arduino.cc/t/tmc2209-with-arduino/1189060/2 "2023-11-14T13:46:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [May 12, 2024, 1:47pm UTC](https://forum.arduino.cc/t/tmc2209-with-arduino/1189060/3 "2024-05-12T13:47:10Z")

</div>

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