

The driver only has one UART input/output, even if it has two pins for it. Serial << potVal << " " << stepperSpeed << endl SpeedChangeDelay = 100 // Delay between speed changesįor (long i = 0 i =0 i = i - accel)else // Create a "dead zone" between CW and CCW MaxSpeed = 50000 // Maximum speed to be reached = Loop =Īccel = 10000 // Speed increase/decrease amount m_autoscale(true) // Needed for stealthChop TMCdriver.microsteps(256) // Set microsteps TMCdriver.rms_current(500) // Set motor RMS current TMCdriver.toff(5) // Enables driver in software TMCdriver.begin() // UART: Init SW UART (if selected) with default 115200 baudrate TMCdriver.beginSerial(11520) // Initialize UARTĭigitalWrite(EN_PIN, LOW) // Enable TMC2209 board

SoftSerial.begin(11520) // initialize software serial for UART motor control Serial.begin(11520) // initialize hardware serial for debugging TMC2209Stepper TMCdriver(&SoftSerial, R_SENSE, DRIVER_ADDRESS) // Create TMC driver SoftwareSerial SoftSerial(SW_RX, SW_TX) // Be sure to connect RX to TX and TX to RX between both devices #define R_SENSE 0.11f // SilentStepStick series use 0.11. #define DRIVER_ADDRESS 0b00 // TMC2209 Driver address according to MS1 and MS2 #define SW_RX 7 // SoftwareSerial transmit pin - YELLOW #define SW_TX 6 // SoftwareSerial receive pin - BROWN #define SW_SCK 5 // Software Slave Clock (SCK) - BLUE #include // For serial debugging output. #include // Software serial for the UART to TMC2209. Let's say a summary of what I've learned. This is not so much a post with a question but a post with a working result. And AnshumanFauzdar, I'm really looking forward to the documentation you've been talking about. Special thanks to adouglas88, your code was an awesome help.

This topic was a great help: Using a TMC2209 silent stepper motor driver with an arduino This weekend I've been busy with my new stepper motor, an Arduino, a fysetc TMC2209 and the TCMstepper library, it worked out just fine
