Welcome! Log In Create A New Profile

Advanced

Marlin TMC 2130 setup

Posted by deltajegga 
Marlin TMC 2130 setup
July 08, 2018 05:22AM
I bought a prusa einsy board and have to set up marlin from scratch, setting aside my 500c thermistor issues, im havng trouble setting up the TMC 2130 drivers. i have installed the IDE librarie for the tmc drivers and enabled them in config adv, but it wants to know the SPI pins but i dont know where to find them or where to input them. avr gives an error saying
Multiple libraries were found for "U8glib.h"
Used: C:\Users\Nic\Documents\Arduino\libraries\U8glib
Not used: C:\Users\Nic\AppData\Local\Arduino15\packages\rambo\hardware\avr\1.0.1\libraries\U8glib
C:\Users\Nic\AppData\Local\Temp\arduino_build_672302\sketch\stepper_indirection.cpp:135:104: note: in definition of macro '_TMC2130_DEFINE'

#define _TMC2130_DEFINE(ST) TMC2130Stepper stepper##ST(ST##_ENABLE_PIN, ST##_DIR_PIN, ST##_STEP_PIN, ST##_CS_PIN)
Attachments:
open | download - stepper_indirection.cpp (14.3 KB)
open | download - pins_RAMBO.h (5.7 KB)
open | download - tmc_macros.h (1.9 KB)
Re: Marlin TMC 2130 setup
July 08, 2018 05:30AM
This error is unrelated to TMC2130

Multiple libraries were found for "U8glib.h"
Used: C:\Users\Nic\Documents\Arduino\libraries\U8glib
Not used: C:\Users\Nic\AppData\Local\Arduino15\packages\rambo\hardware\avr\1.0.1\libraries\U8glib

you have two different versionsof the U8glib (graphics LCD library) installed
one is at C:\Users\Nic\Documents\Arduino\libraries\U8glib
the other is at C:\Users\Nic\AppData\Local\Arduino15\packages\rambo\hardware\avr\1.0.1\libraries\U8glib

I would remove the second one as it bound to be old and out of date.
Re: Marlin TMC 2130 setup
July 08, 2018 05:46AM
ok i removed and the avr error is

stepper_indirection.cpp:139: error: 'X_CS_PIN' was not declared in this scope

_TMC2130_DEFINE(X);

^

C:\Users\Nic\AppData\Local\Temp\arduino_build_357996\sketch\stepper_indirection.cpp:135:104: note: in definition of macro '_TMC2130_DEFINE'

#define _TMC2130_DEFINE(ST) TMC2130Stepper stepper##ST(ST##_ENABLE_PIN, ST##_DIR_PIN, ST##_STEP_PIN, ST##_CS_PIN)

^

stepper_indirection.cpp:145: error: 'Y_CS_PIN' was not declared in this scope

_TMC2130_DEFINE(Y);

^

C:\Users\Nic\AppData\Local\Temp\arduino_build_357996\sketch\stepper_indirection.cpp:135:104: note: in definition of macro '_TMC2130_DEFINE'

#define _TMC2130_DEFINE(ST) TMC2130Stepper stepper##ST(ST##_ENABLE_PIN, ST##_DIR_PIN, ST##_STEP_PIN, ST##_CS_PIN)

^

stepper_indirection.cpp:151: error: 'Z_CS_PIN' was not declared in this scope

_TMC2130_DEFINE(Z);

^

C:\Users\Nic\AppData\Local\Temp\arduino_build_357996\sketch\stepper_indirection.cpp:135:104: note: in definition of macro '_TMC2130_DEFINE'

#define _TMC2130_DEFINE(ST) TMC2130Stepper stepper##ST(ST##_ENABLE_PIN, ST##_DIR_PIN, ST##_STEP_PIN, ST##_CS_PIN)

^

stepper_indirection.cpp:154: error: 'Z2_CS_PIN' was not declared in this scope

_TMC2130_DEFINE(Z2);

^

C:\Users\Nic\AppData\Local\Temp\arduino_build_357996\sketch\stepper_indirection.cpp:135:104: note: in definition of macro '_TMC2130_DEFINE'

#define _TMC2130_DEFINE(ST) TMC2130Stepper stepper##ST(ST##_ENABLE_PIN, ST##_DIR_PIN, ST##_STEP_PIN, ST##_CS_PIN)

^

stepper_indirection.cpp:157: error: 'E0_CS_PIN' was not declared in this scope

_TMC2130_DEFINE(E0);

^

C:\Users\Nic\AppData\Local\Temp\arduino_build_357996\sketch\stepper_indirection.cpp:135:104: note: in definition of macro '_TMC2130_DEFINE'

#define _TMC2130_DEFINE(ST) TMC2130Stepper stepper##ST(ST##_ENABLE_PIN, ST##_DIR_PIN, ST##_STEP_PIN, ST##_CS_PIN)

^

Using library TMC2130Stepper at version 2.3.0 in folder: C:\Users\Nic\Documents\Arduino\libraries\TMC2130Stepper
Using library U8glib in folder: C:\Users\Nic\Documents\Arduino\libraries\U8glib (legacy)
Using library SPI at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI
Using library Wire at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire
exit status 1
'X_CS_PIN' was not declared in this scope
Re: Marlin TMC 2130 setup
July 08, 2018 05:46AM
regarding the tmc 2130 use marlin bugfix branch.

from [reprap.org]

Firmware Requirements
Just like Rambo ArduinoAddons need to be installed to make use of all the pins. Not installing ArduinoAddons can result in only partially working features. ArduinoAddons can be installed manually or by the new board manager third party url feature. Rambo_firmware#Arduino_1.6.4.2B_Board_Manager_Plugin

Install TMC2130Stepper Library:

Select the menu Sketch -> Include Library -> Manage Libraries -> Search for TMC2130Stepper -> Click Install.

MarlinFirmware
Branch: bugfix-1.1.x
[github.com]
In Configuration.h: Set MOTHERBOARD to BOARD_EINSY_RAMBO
In Configuration_adv.h: Enable and configure the TMC2130 settings. Do not set the motor current higher than the max setting 960 mAh.
#define HAVE_TMC2130

#define X_IS_TMC2130
#define Y_IS_TMC2130
#define Z_IS_TMC2130
#define Z_IS_TMC2130

#define R_SENSE 0.22

Edited 1 time(s). Last edit at 07/08/2018 06:03AM by Dust.
Re: Marlin TMC 2130 setup
July 08, 2018 04:03PM
okay, so ive used the marlin bugfix and have edited all of my things i need to for my 500c thermistor and the tmc drivers. it verifys and uploads nicely. but no movement and the hotend starts heating up by itself. both thermistors read 60c at room temp, but the hotend was actually really hot, like sizzle the sweat on my fingers hot. i dont think 60 c is that hot. does anyone know what i did wrong?
link to my firmware - [www.dropbox.com]
Re: Marlin TMC 2130 setup
July 08, 2018 09:20PM
You missed a step

In Configuration.h: Set MOTHERBOARD to BOARD_EINSY_RAMBO

Without this it gets all the pins wrong..
Re: Marlin TMC 2130 setup
July 09, 2018 01:06AM
haha, yeah. my bad, thought i had everything right. okay so now i have full jog control through usb, homing is all good. but when i try to start a print it heats up and executes some starting homing gcode and tries to make its first move but instead kinda makes a quick squeak/buzz, and then does nothing(i assume crashes) because S3D continues to send gcode but doesn't realize it dissconnected. i thought it may be something with the min temp due to my bed thermistor still not working. (reads -15c, may be a wiring issue or maybe something else i missed in my config) but i disabled it and still the same. any ideas?

my current firmware - [www.dropbox.com]
Re: Marlin TMC 2130 setup
July 09, 2018 01:49AM
you also havent set the following in configuration_adv.h

#define R_SENSE 0.22


without this is it will read the currents incorrectly and over heat.
Re: Marlin TMC 2130 setup
July 09, 2018 02:09AM
thankyou so much
Re: Marlin TMC 2130 setup
July 09, 2018 02:19AM
interesting, after setting r sense to .22 still nothing. home still works but no print.
Re: Marlin TMC 2130 setup
July 09, 2018 02:29AM
If its just sitting there after homing... apparently dumb struck,.

Its often a heating/temperature issue if your slicer is setting a bed temp and your bed thermistor is DOA it wont print.... It will sit a long time trying to heat a bed.

Get that bed thermistor working or check you have heated bed disabled in your slicer.

Also check hot end is reading room temp

Edited 4 time(s). Last edit at 07/09/2018 02:35AM by Dust.
Re: Marlin TMC 2130 setup
July 09, 2018 02:46AM
yeah i have no idea whats with the bed sensor, i tried table 5 and that changes the reading to 0c. i may try just sticking a thermistor on the board to see if it works then.
Re: Marlin TMC 2130 setup
July 09, 2018 03:54AM
0c is often a broken wire somewhere between the controller and the thermistor, or its plugged into the wrong place
Re: Marlin TMC 2130 setup
July 09, 2018 04:12AM
just rewired it all with a new thermistor. and still nothing, hmm.. i switched back to table 1 and its back to -15c. what firmware setting could cause this? im surprised that my custom table that i had to make and enable in temp and thermistor .h files works but not the standard thermistor...haha wtf...
Re: Marlin TMC 2130 setup
July 09, 2018 05:02AM
No setting really... just setting the thermistor type.

thermistor is just a resistor that changes value a predictable way with temperature.
The controller measures the voltage drop over the resistor (with a voltage divider) the voltage is converted to a temp via the selected table.

the provided configuration.h says

#define TEMP_SENSOR_BED 0

I presume you have changed this?

I also see in the pins file, which looks correct according to the circuit diagram.

#define TEMP_0_PIN 0 // Analog Input
#define TEMP_1_PIN 1 // Analog Input
#define TEMP_BED_PIN 2 // Analog Input

which corresponds with plugs T0, T1 and T2

You did plug the bed thermistor into T2?
Re: Marlin TMC 2130 setup
July 09, 2018 05:06AM
mmmm no. i will do that now. on my other printer t0 is hotend and t1 is bed... so this is t2 bed. interesting

Edited 1 time(s). Last edit at 07/09/2018 05:08AM by deltajegga.
Re: Marlin TMC 2130 setup
July 09, 2018 05:14AM
okay we have temp readings!! wrong hole haha. but still no dice on the actual printing...it tries to start but then...nothing.

what you are helping me with [www.dropbox.com]

Edited 1 time(s). Last edit at 07/09/2018 05:17AM by deltajegga.
Re: Marlin TMC 2130 setup
July 09, 2018 05:19AM
Yea Ive seen the pictures...

Ikea tables... (I also have them around my printer, but my electronics arent outside the heated area like yours)
Re: Marlin TMC 2130 setup
July 09, 2018 05:21AM
Grab the gcode your feeding it

feed in each line by hand (open gcode with a txt editor and cut and paste each line into a printer control program)

It shouldn't be that many lines

find out what line breaks it... Then we can look up the gcode see what it trying to do

Edited 2 time(s). Last edit at 07/09/2018 05:23AM by Dust.
Re: Marlin TMC 2130 setup
July 09, 2018 05:34AM
well i not sure here, do i input all of this? it definitely fails before the last line. it never moves to the center of the bed.

G-Code generated by Simplify3D(R) Version 4.0.0
; Jul 9, 2018 at 2:19:14 AM
; Settings Summary
; processName,Process1
; applyToModels,20mm cube
; profileName,M3
; profileVersion,2018-04-12 20:46:07
; baseProfile,Default
; printMaterial,PLA
; printQuality,Medium
; printExtruders,
; extruderName,Extruder 1
; extruderToolheadNumber,0
; extruderDiameter,0.35
; extruderAutoWidth,0
; extruderWidth,0.4
; extrusionMultiplier,1
; extruderUseRetract,1
; extruderRetractionDistance,1.1
; extruderExtraRestartDistance,0
; extruderRetractionZLift,0
; extruderRetractionSpeed,12000
; extruderUseCoasting,0
; extruderCoastingDistance,0.6
; extruderUseWipe,1
; extruderWipeDistance,0.4
; primaryExtruder,0
; layerHeight,0.22
; topSolidLayers,2
; bottomSolidLayers,2
; perimeterOutlines,2
; printPerimetersInsideOut,0
; startPointOption,3
; startPointOriginX,0
; startPointOriginY,300
; sequentialIslands,0
; spiralVaseMode,0
; firstLayerHeightPercentage,100
; firstLayerWidthPercentage,120
; firstLayerUnderspeed,0.8
; useRaft,0
; raftExtruder,0
; raftTopLayers,2
; raftBaseLayers,0
; raftOffset,2
; raftSeparationDistance,0.25
; raftTopInfill,100
; aboveRaftSpeedMultiplier,0.3
; useSkirt,1
; skirtExtruder,0
; skirtLayers,1
; skirtOutlines,2
; skirtOffset,1
; usePrimePillar,0
; primePillarExtruder,999
; primePillarWidth,12
; primePillarLocation,7
; primePillarSpeedMultiplier,1
; useOozeShield,0
; oozeShieldExtruder,999
; oozeShieldOffset,2
; oozeShieldOutlines,1
; oozeShieldSidewallShape,1
; oozeShieldSidewallAngle,30
; oozeShieldSpeedMultiplier,1
; infillExtruder,0
; internalInfillPattern,Rectilinear
; externalInfillPattern,Rectilinear
; infillPercentage,0
; outlineOverlapPercentage,0
; infillExtrusionWidthPercentage,100
; minInfillLength,3
; infillLayerInterval,1
; internalInfillAngles,45,-45
; overlapInternalInfillAngles,0
; externalInfillAngles,45,-45
; generateSupport,0
; supportExtruder,0
; supportInfillPercentage,30
; supportExtraInflation,1
; supportBaseLayers,0
; denseSupportExtruder,0
; denseSupportLayers,0
; denseSupportInfillPercentage,45
; supportLayerInterval,1
; supportHorizontalPartOffset,0.5
; supportUpperSeparationLayers,1
; supportLowerSeparationLayers,4
; supportType,1
; supportGridSpacing,1
; maxOverhangAngle,50
; supportAngles,45
; temperatureName,Primary Extruder
; temperatureNumber,0
; temperatureSetpointCount,1
; temperatureSetpointLayers,1
; temperatureSetpointTemperatures,220
; temperatureStabilizeAtStartup,1
; temperatureHeatedBed,0
; temperatureRelayBetweenLayers,1
; temperatureRelayBetweenLoops,0
; fanLayers,2
; fanSpeeds,0
; blipFanToFullPower,1
; adjustSpeedForCooling,1
; minSpeedLayerTime,3
; minCoolingSpeedSlowdown,50
; increaseFanForCooling,1
; minFanLayerTime,35
; maxCoolingFanSpeed,100
; increaseFanForBridging,0
; bridgingFanSpeed,100
; use5D,1
; relativeEdistances,0
; allowEaxisZeroing,1
; independentExtruderAxes,0
; includeM10123,0
; stickySupport,1
; applyToolheadOffsets,0
; gcodeXoffset,0
; gcodeYoffset,0
; gcodeZoffset,0
; overrideMachineDefinition,1
; machineTypeOverride,0
; strokeXoverride,200
; strokeYoverride,200
; strokeZoverride,180
; originOffsetXoverride,-10
; originOffsetYoverride,-20
; originOffsetZoverride,0
; homeXdirOverride,-1
; homeYdirOverride,-1
; homeZdirOverride,-1
; flipXoverride,1
; flipYoverride,-1
; flipZoverride,1
; toolheadOffsets,0,0|0,0|0,0|0,0|0,0|0,0
; overrideFirmwareConfiguration,1
; firmwareTypeOverride,RepRap (Marlin/Repetier/Sprinter)
; GPXconfigOverride,r2
; baudRateOverride,250000
; overridePrinterModels,0
; printerModelsOverride
; startingGcode,G28,,,
; layerChangeGcode,
; retractionGcode,
; toolChangeGcode,
; endingGcode,G1 X0 Y170 ,M104 S0 ; turn off extruder,M140 S0 ; turn off bed,M84 ; disable motors,M106 S0
; exportFileFormat,gcode
; celebration,0
; celebrationSong,Random Song
; postProcessing,
; defaultSpeed,2400
; outlineUnderspeed,1
; solidInfillUnderspeed,1
; supportUnderspeed,0.8
; rapidXYspeed,6000
; rapidZspeed,600
; minBridgingArea,10
; bridgingExtraInflation,2
; bridgingExtrusionMultiplier,1
; bridgingSpeedMultiplier,1
; useFixedBridgingAngle,0
; fixedBridgingAngle,0
; applyBridgingToPerimeters,0
; filamentDiameters,1.75|1.75|1.75|1.75|1.75|1.75
; filamentPricesPerKg,200|100|100|100|100|100
; filamentDensities,1.14|1.25|1.25|1.25|1.25|1.25
; useMinPrintHeight,0
; minPrintHeight,3.33
; useMaxPrintHeight,0
; maxPrintHeight,4.38
; useDiaphragm,0
; diaphragmLayerInterval,20
; robustSlicing,1
; mergeAllIntoSolid,0
; onlyRetractWhenCrossingOutline,0
; retractBetweenLayers,1
; useRetractionMinTravel,1
; retractionMinTravel,5
; retractWhileWiping,1
; onlyWipeOutlines,1
; avoidCrossingOutline,1
; maxMovementDetourFactor,10
; toolChangeRetractionDistance,12
; toolChangeExtraRestartDistance,-0.5
; toolChangeRetractionSpeed,600
; externalThinWallType,0
; internalThinWallType,1
; thinWallAllowedOverlapPercentage,25
; singleExtrusionMinLength,1
; singleExtrusionMinPrintingWidthPercentage,50
; singleExtrusionMaxPrintingWidthPercentage,200
; singleExtrusionEndpointExtension,0.2
; horizontalSizeCompensation,0
G90
M82
M104 S220 T0
M109 S220 T0
G28
G92 E0
G1 E-1.1000 F12000
G1 Z0.220 F600
; process Process1
; layer 1, Z = 0.220
M106 S255
G4 P500
M106 S15
M105
T0
; tool H0.220 W0.480
; skirt
G1 X99.246 Y108.491 F6000
Re: Marlin TMC 2130 setup
July 09, 2018 05:48AM
its right about here, after G28 then nothing

SENT: G28
SENT: G92 E0
SENT: G1 E-1.1000 F12000
SENT: G1 Z0.220 F600
SENT: M106 S255
READ: ok T:220.62 /220.00 B:26.28 /0.00 @:39 B@:0
SENT: G4 P500
Re: Marlin TMC 2130 setup
July 09, 2018 05:54AM
well G28 is home all axis

What is you setup for endstops?

ie do you have real endstops or are using trying to use the endstopless feature of the TMC 2130?

regardless, move all axis away from any endstops (if you have any) and send the machine a M119 (endstop status)
What is the result?
Re: Marlin TMC 2130 setup
July 09, 2018 05:58AM
no i have standard limit switches on all min, i wanted to use then sensor less endstops but a quick google shows that it isnt hat accurate.

SENT: M119
READ: Reporting endstop status
READ: x_min: open
READ: y_min: open
READ: z_min: open
READ: ok
Re: Marlin TMC 2130 setup
July 09, 2018 06:05AM
ok press and hold X endstop and send another M119

Does the X axis change to Triggered

repeat for Y and Z
Re: Marlin TMC 2130 setup
July 09, 2018 06:09AM
interesting, i just slice the cube in slicer pe and executed with pronterface and it worked perfectly. so its in s3d then..hmmm...
Re: Marlin TMC 2130 setup
July 09, 2018 06:13AM
That is interesting... and good progress.
Re: Marlin TMC 2130 setup
July 09, 2018 06:17AM
well i think thats it for me tonight, i got it to print a cube. thanks for you're help.
Re: Marlin TMC 2130 setup
August 05, 2018 05:21AM
i just installed tmc2130 and i m trying to understand when i use sensorless homing is the section endstops in configuration.h need to be commented or not ??

my printer is a small hypercube (first build) and i m trying to understand how to setup marlin......

any help will be appreciated
Sorry, only registered users may post in this forum.

Click here to login