Hi gang,
I am using one BIGTREETECH TMC2208 ALREADY in UART mode from the factory together with my CNC shield v3 and arduino uno. I am running into problems getting my motor to run at all. I have plugged the UART pin of the bigtretch into digital pin 12 on the cnc shield. My Voltmeter reads out 1.4 V on the TMC but the motor is not doing anything.
Sorry I know this isnt ideal but its a fairly simple setup. Let me know if there are any unclarities.
Here is the code I am using. I have copied it from the simple example from here.
#include <TMCStepper.h>
#define EN_PIN 8 // Enable pin (D8 on the CNC shield)
#define DIR_PIN 5 // Direction pin (D5 on the CNC shield)
#define STEP_PIN 2 // Step pin (D2 on the CNC shield)
#define SW_RX 13 // TMC2208/TMC2224 SoftwareSerial receive pin
#define SW_TX 12 // TMC2208/TMC2224 SoftwareSerial transmit pin
#define R_SENSE 0.11f // Sense resistor value
// Initialize TMC2208Stepper using SoftwareSerial (replace this with correct pin mappings for your setup)
TMC2208Stepper driver(SW_RX, SW_TX, R_SENSE); // Software serial
void setup() {
pinMode(EN_PIN, OUTPUT);
pinMode(STEP_PIN, OUTPUT);
pinMode(DIR_PIN, OUTPUT);
digitalWrite(EN_PIN, LOW); // LOW enables the driver
// Initialize serial communication
driver.beginSerial(115200); // Start communication with the driver
// Enable the motor driver
// Initialize TMC2208 settings
driver.begin(); // Initialize the driver
driver.toff(5); // Enable the driver in software
driver.rms_current(600); // Set motor RMS current to 600 mA
driver.microsteps(16); // Set microstepping to 1/16
driver.en_spreadCycle(false); // Disable SpreadCycle (StealthChop mode enabled)
driver.pwm_autoscale(true); // Needed for StealthChop operation
}
bool shaft = false;
void loop() {
// Run 5000 steps in one direction and then switch direction
for (uint16_t i = 5000; i > 0; i--) {
digitalWrite(STEP_PIN, HIGH);
delayMicroseconds(160); // Adjust this delay to control the speed
digitalWrite(STEP_PIN, LOW);
delayMicroseconds(160);
}
// Switch motor direction
shaft = !shaft;
driver.shaft(shaft); // Change direction using the TMC2208 driver
}
Also I apologize for any idiocy I am an absolut beginner and would appreciate any help:)

