TMC2130 with Arduino Mega 2560

Hello everybody,

I have an Arduino Mega, which I would like to connect to a TMC2130 V3.0. I followed the connection diagram from Julian Hespenheide and a simple program given in the library called "TMCStepper --> simple. Sadly, the motor isn't turning, and my power supply gives displays me a current of 10 mA. As far as I know, this is a standby current.

My question is: what did I wrong? I tried to awake my motor for several days now without success including double check my wiring again and again as well as the little program. Has anybody of you a suggestion for me please?

Thank you very much in advance!

Best Regards,
Ramon

Hi, @ramonestana
Welcome to the forum.

Can you post a link to the diagram?

Can you please post your code?

Can you please post a copy of your circuit, a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
Please include ALL hardware, power supplies, component names and pin labels.

Thanks... Tom.. :grinning: :+1: :coffee: :australia:

Dear Tom,

first receive my little test-code:

#define stepPinMotor  2
#define dirPinMotor   3
#define CS            4
#define enable        5
 
void setup() 
{
  pinMode(stepPinMotor, OUTPUT);
  pinMode(dirPinMotor, OUTPUT);
  pinMode(CS, OUTPUT);
  pinMode(enable, OUTPUT);

  digitalWrite(enable, LOW);
  digitalWrite(CS, LOW); 

  Serial.begin(9600);
}

bool dirBit = false;

void loop() 
{
  digitalWrite(dirPinMotor, dirBit);

  Serial.print("Dir-Bit: ");
  Serial.println(dirBit);

  for (int i = 0; i < 1000; i++)
  {
    digitalWrite(stepPinMotor, HIGH);
    delayMicroseconds(800);
    digitalWrite(stepPinMotor, LOW); 
    delayMicroseconds(800);
  }

  dirBit = !dirBit;
}

This is the link I've used:
https://www.julian-h.de/sketch/tmc2130-arduino-wiring/

Thank you very much in advance for your help!

Best regards,
Ramon

Here are some potential solutions to try if your motor isn't turning with the TMC2130 driver connected:

  1. Check wiring connections.
  2. Verify your power supply voltage and current is appropriate.
  3. Check motor connections - ensure polarity is correct.
  4. Verify the step driver configuration.
  5. Check your code.
  6. Check error messages in the serial monitor.

I've done all this, but nothing happend. The motor is not rotating. I am not using the SPI, because I assume that the driver will work in the stand-alone mode.

  1. The wiring connections are correct
  2. My power supply is working and delivers enough current
  3. I double-checked the motor connections, everything seems OK
  4. Step-driver configuration - how?
  5. My code is ok so far (I hope)
  6. There are no error messages in the serial monitor

Are there some special things regarding the version V3.0 of the motor driver compared with versions 1.0 and 2.0?

Thanks a lot!

If you've checked the wiring and power supply, and there are no error messages, the issue may be with the step-driver configuration. The A4988 chip used in version 3.0 of the driver has specific parameters to set microstepping mode, step pulse duration, and current limit. Make sure your configuration is set up correctly, and check the A4988 datasheet for more information.

The TO is using a TMC2130 and NOT a A4988. These chips are very different, the datasheet of the A4988 is of no use.

Do you have a link to your breakout board? standalone mode is not always the default mode.

Please find here the link to the breakout board:

[BIQU Ultra-Silence TMC2130 V3.0 SPI Schrittmotortreiber mit Kühlkörper für SKR 3 SKR 3 EZ SKR 2 SKR V1.4 Turbo SKR Pro V1.2 SKR V1.3 L Rampen 1.6/1.5 Control Board (4 Stück/Set) : Amazon.de: Gewerbe, Industrie & Wissenschaft](https://Link to TMC2130)

I am using the TMC2130 V3.0 and NOT the A4988

Hi Ramon,

Julian here :wave:
I see in your code that your pulling the CS_PIN to LOW. I just checked with my code and I have it there on HIGH. Could be a problem since you are not activating the CS / driver itself?
Additionally I am using a (the?) TMC2130 library, but I don't think it makes so much of a difference and is more of a convenience.

You can check out the library here:

Cheers
:v:

Hi,

I succeeded in working with the TMC2130 now. I want to work in the standalone-mode. Therefore, I have to put off the SPI-mode. There is a tiny jumper on the backside of the TMC-Board, which has to be closed. Normally, it is open. I soldered the jumper, so that he is closed. Now the TMC is working as expected.

Thank you very much so far!

Best, Ramon