Einsy rambo motor current

Hello. I'm trying to install the Repetier firmware on the Einsy Rambo board. I have solved the problem with the LCD. Now I'm trying to set up a current of motors that is controlled digitally. There is a very low current flowing into the motors. I set the current value via SPI. When I set 1800mA, the current in the motor is 210mA. I used the example code for the TMC2130 drivers to check the pins. In the example, the current in the motor was good. Can you please advise how to solve the problem?

This is my TMC2130 configuration.h:


#define DRV_TMC2130

// M914 X<sg_value> Y<sg_value> Z<sg_value> Stall detection sensitivity for Trinamic stepper drivers.
// M915 X<0/1> Y<0/1> Z<0/1> Turn StealthChop mode ON or OFF on Trinamic stepper drivers.

// Uncomment if you use the stall guard for homing. Only for cartesian printers and xy direction

// The drivers with set CS pin will be used, all others are normal step/dir/enable drivers
#define TMC2130_X_CS_PIN 41     
#define TMC2130_Y_CS_PIN 39     
#define TMC2130_Z_CS_PIN 67     
#define TMC2130_EXT0_CS_PIN 66

#define TMC2130_EXT1_CS_PIN -1
#define TMC2130_EXT2_CS_PIN -1

// Per-axis current setting in mA { X, Y, Z, E0, E1, E2}
#define MOTOR_CURRENT { 1800,1800,1000,1000,1000,1000 }

/**  Global settings - these apply to all configured drivers
Per-axis values will override these
#define TMC2130_STEALTHCHOP         1  // Enable extremely quiet stepping
#define TMC2130_INTERPOLATE_256     1  // Enable internal driver microstep interpolation
#define TMC2130_STALLGUARD          0  // Sensorless homing sensitivity (between -63 and +64)

/** PWM values for chopper tuning
only change if you know what you're doing
#define TMC2130_PWM_AMPL          255
#define TMC2130_PWM_GRAD            1
#define TMC2130_PWM_AUTOSCALE       1
#define TMC2130_PWM_FREQ            2

/**  Per-axis parameters

To define different values for certain parameters on each axis,
append either _X, _Y, _Z, _EXT0, _EXT1 or _EXT2
to the name of the global parameter.

Examples for the X axis:

#define TMC2130_STEALTHCHOP_X         1
#define TMC2130_INTERPOLATE_256_X  true

/** Minimum speeds for stall detection.

These values may need to be adjusted if SENSORLESS_HOMING is enabled,
but endstops trigger prematurely or don't trigger at all.
The exact value is dependent on the duration of one microstep,
but good approximations can be determined by experimentation.
#define TMC2130_TCOOLTHRS_X 300
#define TMC2130_TCOOLTHRS_Y 300
#define TMC2130_TCOOLTHRS_Z 300

This is my pins.h:
//Einsy rambo
#if MOTHERBOARD == 310
* RAMBo Pin Assignments

#ifndef __AVR_ATmega2560__
#error Oops!  Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu.

//#define TMC2130_X_CS_PIN 41     //PG0
//#define TMC2130_Y_CS_PIN 39     //PG2
//#define TMC2130_Z_CS_PIN 67     //PK5 A13 67
//#define TMC2130_EXT0_CS_PIN 66  //PK4 A12 66


#define ORIG_X_STEP_PIN     37 
// PC0
#define ORIG_X_DIR_PIN      48 
// PL0
#define ORIG_X_MIN_PIN      12 
// 12 PB6
#define ORIG_X_MAX_PIN      24 
// 24 NC
#define ORIG_X_ENABLE_PIN   29 

#define X_MS1_PIN      -1
#define X_MS2_PIN      -1

#define ORIG_Y_STEP_PIN     36 
// PC1
#define ORIG_Y_DIR_PIN      49 
// PL1
#define ORIG_Y_MIN_PIN      11 
// 11 PB6 
#define ORIG_Y_MAX_PIN      23 
// 23 NC
#define ORIG_Y_ENABLE_PIN   28 
// PA6

#define Y_MS1_PIN      -1
#define Y_MS2_PIN      -1

#define ORIG_Z_STEP_PIN     35 
// PC2
#define ORIG_Z_DIR_PIN      47 
// PL2
#define ORIG_Z_MIN_PIN      10 
// 10 
#define ORIG_Z_MAX_PIN      30 
// 30
#define ORIG_Z_ENABLE_PIN   27 
// PA5

#define Z_MS1_PIN      -1
#define Z_MS2_PIN      -1

#define HEATER_0_PIN   3
#define TEMP_0_PIN     0

#define HEATER_1_PIN   4
// This is T2 on the board!
#define TEMP_1_PIN     2

#define HEATER_2_PIN   4
// This is T1 on the board!
#define TEMP_2_PIN     1
// T3 on board
#define TEMP_3_PIN     7

#define ORIG_E0_STEP_PIN    34 // PC3
#define ORIG_E0_DIR_PIN     43 // PL6
#define ORIG_E0_ENABLE_PIN  26 // PA4

#define E0_MS1_PIN     -1      
#define E0_MS2_PIN     -1      

#define ORIG_E1_STEP_PIN    -1
#define ORIG_E1_DIR_PIN     -1
#define ORIG_E1_ENABLE_PIN  -1

#define E1_MS1_PIN     -1
#define E1_MS2_PIN     -1

//#define DIGIPOTSS_PIN  38
//#define DIGIPOT_CHANNELS {4,5,3,0,1} // X Y Z E0 E1 digipot channels to stepper driver mapping

#define SDPOWER        -1

#define SDSS           77

#define LED_PIN        13
#define ORIG_FAN_PIN        8
#define ORIG_FAN2_PIN    6
#define ORIG_FAN3_PIN    2
#define ORIG_PS_ON_PIN      4
#define SUICIDE_PIN    -1  //PIN that has to be turned on right after start, to keep power flowing.

#define E1_PINS

#define SCK_PIN          52
#define MISO_PIN         50
#define MOSI_PIN         51

//#define MAX6675_SS       53



  • I'm not the author of the tmc2130 support, but I see it gets set here:

    void setMotorCurrent( uint8_t driver, uint16_t level ) {

        TMC2130Stepper* tmc_driver = tmcDriverByIndex(driver);

        if(tmc_driver) {




    Documentation of driver is here: 

    And I see it gets called with these defaults:
    void rms_current(uint16_t mA, float multiplier=0.5, float RS=0.11); 

    states RS should be 0.2, but having no idea what it is for I leave that open. This surely also depends on the motor type. But maybe you need to tweak these values to get more current.

    So if I understand it correctly you are setting current of a coil in mA. 

    What I saw is that 2 direction pins had wrong pin number (x and y reversed). I have now added the board definition in the current dev version on github including my corrections in pins.h.
  • I have solved the problem with the LCD.
    Please let us know how you fixed it (maybe in the other thread).

    Now I'm trying to set up a current of motors that is controlled digitally. There is a very low current flowing into the motors. I set the current value via SPI. When I set 1800mA, the current in the motor is 210mA.
    How do you know it is 210mA?
    Anyway, I don't know if the following applies to all Einsy board versions, but it applies at least to the one used in the Prusa i3-Mk3, which appears to be close to Einsy v1.1a.

    1. The TMC2130 drivers use internal current references (which is the driver's default), so you should comment out the following line in Printer.cpp:
    // tmc_driver->I_scale_analog(true);

    2. The Einsy board uses 0.22Ohm sense resistors, whereas the TMC library assumes 0.11 if not specified otherwise. Therefore, in Commands.cpp, change line
    tmc_driver->rms_current(level, 0.5, 0.22);
    (The 0.5 being the multiplier for defining the hold current).

    BTW, apparently you are not using sensorless homing yet, but if you did, you would like to reverse the DIAG logic to low-active and comment out this line (in printer.cpp):
    // tmc_driver->diag1_active_high(true);
    This is because on the Einsy board, the DIAG0 and DIAG1 are tied together for making a wired OR, and driving one of the pins actively high can put the driver in a very unhealthy state!
Sign In or Register to comment.