TMC2208 not working after replacing the A4988 with it

Hi there,

I recently got myself a set of TMC2208 stepper drivers to replace my A4988 driver for a project. I wanted my motors to be quieter. I checked online and found that it has the same pin layout as the A4988 and can be swapped with it. After replacing the A4988 with TMC2208 and setting the reference voltage to it's correct value (which for my 0.8A Nema17 should be 1.13) I found out that I cannot make it to drive my motor. I swapped it with the previously installed A4988 and it works fine. Am I missing something? Shouldn't I be able to use it in the legacy mode without changing anything? Can someone please enlighten me on this issue?

Thanks a bunch!

Please Google both with the word "pinout"

If you compare the two the pinouts are completely different to each other. You will have to use different pins to use the TMC2208... just follow the pins from the diagram and change to the corresponding ones.

further reading reveals... you have to use the TMC2208 in "legacy mode" to use the same pins are A4988. There are videos which explain this...

wolframore:
Please Google both with the word "pinout"

If you compare the two the pinouts are completely different to each other. You will have to use different pins to use the TMC2208... just follow the pins from the diagram and change to the corresponding ones.

further reading reveals... you have to use the TMC2208 in "legacy mode" to use the same pins are A4988. There are videos which explain this...

Hi,

Thanks for the post. I already combed the web for information on that. But most if not all of them talks about 3d printers and not diy arduino projects. Also none of them change anything to enable the legacy mode. Can you point me to the right direction please?

I'm using the FYSTEC's TMC2208 v1.2. Any idea how to use it in legacy mode?

Thank you.

I just watched a video, wow what a difference in sound.

You should pay attention to the instructions for using on 3D printers. Many of them are run using Arudino Mega.

Did you change the library to TCM2208?

tmc2208-stepper

Yes that's true, but check this out: How to replace an A4988 with the TMC2208 - YouTube

this guy just swaps the a4988 with tmc2208 and it works. this is what I want but not happening. On top of that I'm using the AccelStepper lib for my project and it's deeply integrated. Changing the lib to control this driver is going to be problematic. Is there a way to configure the driver and still use the accelstepper lib?

You need to compare the pins for your FYSTEC board with other compatible boards. I'm looking at a picture and some of the pins look different.

(FYI all this was found online with Google)

JUST BECAUSE THE CHIP IS DROP IN REPLACEMENT DOESN'T MEAN THE BOARDS ARE ALL THE SAME!

My guess is that video is using their same Branded Boards which were designed to be pin compatible with each other.

WIKI

this is directly from that WIKI: (for images check the link)

"Pin Configuration
Since many different electronic boards available such as RAMPS, RADDS, RUMBA, etc, the wiring of config pins (CFG1, CFG2 and CFG3) is solved differently, so it's recommended not to connect config pins. This prevents that change of the electronics implies adjusting the driver. Be joined, that the "spreadCycle" mode also needs the pin CFG1 connected to GND. This can be realized by a small wire bridge (see photo).

Some Chinese boards have been seen in the wild that have CFG1-3 printed out of order on the bottom of the PCB. So CFG3 is connected to MS1 and is actually CFG1 (see photo). Because the configuration pins ship open, you must close them by bridging with solder as shown in the photo in addition to connecting MS1 to GND.

The pins and DIAG1 DIAG2 have no function and may also be omitted.

Various operating modes to provide a through connection of the 3 config pins that green highlighted lines are the recommended operation modes:"

Look at the FYSTEC pinouts:

their link: FYSTEC wiki

YET ANOTHER VERSION:

And another: This one is by LERDGE

Thank wolframore for your input.

I've checked out those information. My problem was I was being to stubborn to make it work as a drop-in for A4988. But upon rewiring and using the TMC2208 library I was able to make the driver work. But now I'm faced with new problems. I am unable to make the driver choose microstepping using code. With the two MS1 and MS2 pins, I can only make it have only 8 microstepping, where I want at least 16-32 microstepping. I cant seem to figure it out.

Here is a code that I'm trying out right now. Although I'm defining to use the MSTEP register using the mstep_reg_select function, the driver seems to be using a default microstepping.

Can you, or anyone point me to a good source where I can get some examples of how to configure the driver properly?

CODE:
// Running on Nano v3

#define EN_PIN 10 // LOW: Driver enabled. HIGH: Driver disabled
#define STEP_PIN 7 // Step on rising edge
#define MS1 11
#define MS2 12
#define DIR_PIN 6

#include <TMC2208Stepper.h>
TMC2208Stepper driver = TMC2208Stepper(&Serial);

#include <AccelStepper.h>
AccelStepper stepper(1, STEP_PIN, DIR_PIN);

void setup() {
//Serial.begin(115200); // Init used serial port
//while(!Serial); // Wait for port to be ready

// Prepare pins
pinMode(EN_PIN, OUTPUT);
pinMode(STEP_PIN, OUTPUT);
digitalWrite(EN_PIN, HIGH); // Disable driver in hardware

//pinMode(DIR_PIN, OUTPUT);

// Prepare pins
//pinMode(MS1, OUTPUT); //setting the MS1 and MS2 this way works up to 8 mictrosteps
//pinMode(MS2, OUTPUT);

//digitalWrite(MS1, HIGH);
//digitalWrite(MS2, HIGH);

driver.pdn_disable(1); // Use PDN/UART pin for communication

driver.mstep_reg_select(1); // TRYING TO SET THE MICROSTEPS LIKE THIS, BUT TO NO AVAIL!!
driver.microsteps(0);

driver.I_scale_analog(0); // Adjust current from the registers
driver.rms_current(500); // Set driver current 500mA
driver.toff(0x2); // Enable driver

digitalWrite(EN_PIN, LOW); // Enable driver

stepper.setMaxSpeed(1000);
stepper.setAcceleration(1000);
stepper.moveTo((200 * 16) * 1); //200 for the stepper's original steps/revolution, 16 is the microsteps and 1 is the number of turns

}

void loop() {
// If at the end of travel go to the other end
if (stepper.distanceToGo() == 0)
stepper.moveTo(-stepper.currentPosition());

stepper.run();
}