Klipper3d / klipper

Klipper is a 3d-printer firmware
GNU General Public License v3.0
9.25k stars 5.27k forks source link

TMC2130 support #101

Closed Richardgriff closed 6 years ago

Richardgriff commented 6 years ago

Hi,

With the release of the prusa mk3 which now has new controlboard which has the option of an on board raspberry pi.

I think it would be nice if slipper could support the mk3

dragonnn commented 6 years ago

It is mostly compatible, since the board is on a AVR and is RAMPS like. I think only we are missing TMC2130 support.

hg42 commented 6 years ago

cruwaller already has a branch with tmc2130 (and a smoothie compatible, or both), I already compiled it and will probably test it at the weekend

Richardgriff commented 6 years ago

Would like to try. Please let me know if you get this working

Diederikvanderpant commented 6 years ago

Hi, i am also interested in testing this somewhere in the next month. Just installed tmc2130 on my megatronics 2 board. Where could i find this cruwaller branch?

simonlee commented 6 years ago

Would be amazing if this worked with prusa mk3 + octoprint. The prusa firmware has a bunch of features which I assume would not have equivalences in klipper such as the auto leveling stuff and filament detection/crash detection...

simonlee commented 6 years ago

actually cruwaller does not have a tmc2130 branch anymore. I think he deleted it.

whats the level of effort for getting klipper to utilize stallguard2 via spi

hg42 commented 6 years ago

on 2017-12-26 he merged tmc2130 branch into lpc176x, where he is testing it now, see for example klippy/drivers/tmc2130.py

Also, his latest commit in lpc176x branch has the comment "TMC2130 debugging continues. Works with AVR now, Due to go..."

hg42 commented 6 years ago

unfortunately he did not answer my questions on his github mail address or in any of my issue comments (explicitly asking @cruwaller).

He has a bunch of changes that would be useful, e.g. things like allowing any order of ^! for pin definitions or suppressing some compiler warnings.

cruwaller commented 6 years ago

@hg42 sorry :( I missed your email.... I will send you a response soon.

cruwaller commented 6 years ago

Others, TMC2130 branch is merges to lpc176x (all my mods are there now). It still supports same MCU as original... TMC2130 drivers are working great now incl sensorless homing (i running my corexy setup on RADDS)...

NeelD87 commented 6 years ago

@cruwaller so TMC2130 should now work in ramps config?

simonlee commented 6 years ago

@cruwaller I see there is an ss_pin for CS/SS but what about for the diag pin?

hg42 commented 6 years ago

from what I know about TMC2130 the diag pin is not needed, because you can write/read values via SPI. The diag pin could be used to signal some condition (e.g. stall detection) to the outside world. This could allow to use a diag pin as endstop.

Which usage do you mean/want/think of?

simonlee commented 6 years ago

my printer is the prusa mk3 which i believe uses the diag pin for the endstop. ive tried setting the endstop pin to use the diag pin but no detection. there are many other issues im having and i doubt i can get this to work correctly without expert aid.

hg42 commented 6 years ago

@cruwaller how did you connect the TMC2130?

I once had a plan to program the diag pin to signal stalls and simple connect it to an endstop input. This way you could program the TMC at start and then forget it. But may be there are benefits form reading values (force etc.) while printing. Also the stall detection may differ depending on speeds (e.g. homing speed). So there are definitely more usages.

hg42 commented 6 years ago

@simonlee not that I currently use the TMC2130, but did you look at the example config files?

[driver tmc2130_x]
type:               TMC2130
#steps_per_mm:       400
steps_per_mm:       100
# SPI
ss_pin:             driverxy:ar7
spi_mode:           3
spi_speed:          2000000
# config
current:            1500.0
microsteps:         8
#microsteps:         32
mode :              spreadCycle
diag0_out:          temp_prewarn
diag1_out:          stall
diag0_active_high:  1
diag1_active_high:  1
interpolate:        0
sensor_less_homing: 1
stealth_max_speed:  40
stall_threshold:    19

so you select a function for the diag pins 0 and 1. You said that one diag pin is connected to the endstop input (you don't need to configure this, it's a cable!). You need to make sure that the diag pin that is connected to the end stop has the stall function. If it is not diag1, you have to swap the diag0 and diag1 names in the section.

For example, if you have diag0 connected to the end stop input, then it has to be

diag0_out:          stall
diag0_active_high:  1

and either you omit diag1 or you set it like this

diag1_out:          temp_prewarn
diag1_active_high:  1

if you want to assign the temperature warning to it.

simonlee commented 6 years ago

I gathered from this file that the max endstop pin is the diag pin: https://github.com/prusa3d/Prusa-Firmware/blob/MK3/Firmware/pins_Einy_0_4.h

#define X_TMC2130_CS           41
#define X_TMC2130_DIAG         64 // !!! changed from 40 (EINY03)
#define X_STEP_PIN             37
#define X_DIR_PIN              49
#define X_MIN_PIN            12
//#define X_MAX_PIN            30
//#define X_MIN_PIN              X_TMC2130_DIAG
#define X_MAX_PIN              X_TMC2130_DIAG
#define X_ENABLE_PIN           29

so my config looks like:

[driver tmc2130_x]
type:               TMC2130
steps_per_mm:       400
# SPI
ss_pin:             ^PG0
spi_mode:           3
spi_speed:          2000000
# config
current:            1000.0
microsteps:         32
mode :              spreadCycle
diag0_out:          temp_prewarn
diag1_out:          stall
diag0_active_high:  1
diag1_active_high:  1
interpolate:        1
sensor_less_homing: 1
stealth_max_speed:  40
stall_threshold:    19

...

[stepper_x]
driver: tmc2130_x
step_pin: PC0
dir_pin: !PL0
enable_pin: !PA7
step_distance: .01
endstop_pin: ^PK2

position_min:       0
position_max:       200
position_endstop:   0
homing_offset:      0
homing_speed:       40
homing_direction:   min
homing_retract_dist:5

PK2 is the x diag pin. Not sure if it needs ^ or ! though. I will try swapping the diag0 and diag1 functions.

hg42 commented 6 years ago

I would try to find out which diag pin is used, there are 3 pins. Eventually you can follow the copper traces. With diagX_active_high you can change the polarity. You can get your endstops and note them. Then you changexxxx_active high and then send RESTART and see if an endstop changed. Otherwise you programm another diag pin. I think I would only configure the one you try. Remove the other. I think it's not a pullup (no ˆ) and adding a pullup could harm.

ghost commented 6 years ago

Any progress @simonlee ? I'm stuck in the same position with TMC2130 and RAMPS. So far I think the SS is for clock select? Either way I was able to move the axis by flashing Marlin, while maintaining power then flashing klipper. Cold start wouldn't initialize which I guess it means SPI is not working on AVR? It would be wonderful of @cruwaller adds avr example section for one axis as an example. Back to repetier, cant print loud anymore. Might aswell set my tmc2130 to standalone with an external switch for klipper. Current can be set sensed by stalling/skipping the motor by hand to get the ~800ma default current via the pot. I will miss the sensorless homing though.

KevinOConnor commented 6 years ago

@TunaLatte , I'm not sure where @cruwaller is with his development, but if someone can forward me a schematic of an AVR board with the TMC2130 then I'll take a look at adding basic support for it. (I need a link to the schematics - a simple document describing which pins on the mcu connect to which pins on the TMC2130.) We already support the TMC2100 on the Replicape, so I don't think it's a big deal to add in basic TMC2130 support.

herrwusel commented 6 years ago

@KevinOConnor : Check page 10 in the datasheet. Is that what you need?

simonlee commented 6 years ago

@TunaLatte I've taken a break from this. I tried the above suggestions but no luck. The steppers do move, but I am not able to figure out how to get it to detect the endstops via the diag pins.

ghost commented 6 years ago

I see Can you please post your config? For ramps I suspect the SS pin to be different? Thanks

On Feb 12, 2018 6:53 PM, "Simon Lee" notifications@github.com wrote:

@TunaLatte https://github.com/tunalatte I've taken a break from this. I tried the above suggestions but no luck. The steppers do move, but I am not able to figure out how to get it to detect the endstops via the diag pins.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/KevinOConnor/klipper/issues/101#issuecomment-364965673, or mute the thread https://github.com/notifications/unsubscribe-auth/AiMQ8ighWReDOrCF3wyUDGtgNgCDp4bvks5tUF6GgaJpZM4RUwuL .

simonlee commented 6 years ago
[driver tmc2130_x]
type:               TMC2130
steps_per_mm:       400
# SPI
ss_pin:             ^PG0
spi_mode:           3
spi_speed:          2000000
# config
current:            1000.0
microsteps:         32
mode :              spreadCycle
diag0_out:          temp_prewarn
diag1_out:          stall
diag0_active_high:  1
diag1_active_high:  1
interpolate:        1
sensor_less_homing: 1
stealth_max_speed:  40
stall_threshold:    19

[driver tmc2130_y]
type:               TMC2130
steps_per_mm:       400
# SPI
ss_pin:             ^PG2
spi_mode:           3
spi_speed:          2000000
# config
current:            1000.0
microsteps:         32
mode :              spreadCycle
diag0_out:          temp_prewarn
diag1_out:          stall
diag0_active_high:  1
diag1_active_high:  1
interpolate:        1
sensor_less_homing: 1
stealth_max_speed:  40
stall_threshold:    19

[stepper_x]
driver: tmc2130_x
step_pin: PC0
dir_pin: !PL0
enable_pin: !PA7
step_distance: .01
endstop_pin: ^PK2

position_min:       0
position_max:       200
position_endstop:   0
homing_offset:      0
homing_speed:       40
homing_direction:   min
homing_retract_dist:5

[stepper_y]
driver: tmc2130_y
step_pin: PC1
dir_pin: !PL1
enable_pin: !PA6
step_distance: .01
endstop_pin: ^PK7

position_min:       0
position_max:       200
position_endstop:   0
homing_offset:      0
homing_speed:       40
homing_direction:   min
homing_retract_dist:5

[stepper_z]
step_pin: PC2
dir_pin: !PL2
enable_pin: !PA5
step_distance: 0.0025
endstop_pin: ^PB4

position_min:       0
position_max:       210
position_endstop:   0.15
homing_pos_x:       100
homing_pos_y:       100
homing_offset:      1.5
homing_speed:       3
homing_direction:   min
homing_retract_dist:5
homing_retract_after: true

[extruder]
step_pin: PC3
dir_pin: PL6
enable_pin: !PA4
step_distance: .003571
nozzle_diameter: 0.400
filament_diameter: 1.750
heater: heater_nozzle

[heater_nozzle]
heater_pin: PE5
min_temp: 0
max_temp: 270
control: pid
pid_Kp: 21.70
pid_Ki: 1.60
pid_Kd: 73.76
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PF0

[heater_bed]
heater_pin: PG5
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PF2
control: watermark
min_temp: 0
max_temp: 130

[heater_fan extruder_cooling_fan]
heater_temp: 50.0
pin: PH5
heater: heater_nozzle

[heater_fan nozzle_cooling_fan]
heater_temp: 100.0
pin: PH3
heater: heater_nozzle

[mcu]
serial: /dev/ttyACM0

[printer]
kinematics: cartesian
max_velocity: 500
max_accel: 1250
max_z_velocity: 12
max_z_accel: 200

I did not try to swap the diag0 diag1 as @hg42 suggested though.

ghost commented 6 years ago

Thanks Ill mess around and report asap

ghost commented 6 years ago

@KevinOConnor In a basic scheme this is how mine is exactly wired now + diag1 (upper pin from the triangular pin order in the following picture orientation.) to the S (signal) endstop pin accordingly per each axis for sensorless endstop : image Source:hackaday

ghost commented 6 years ago

Success! Well using your config with pin modification worked well except sensorless homing like you said, but after changing stall_threshold from 19 to 4 (0 also works well) its worked perfectly! I think the value is too high since if you look at cruwaller's example, his current is also too high, which works well with a value like 19. I had the same issue when converting from 12v to 35v. Time to test stealthchop skipping! Apparently, the reason why it isn't used in marlin, duet (reprapfirmware double step at 100mm/s travel moves afaik) and most firmware is that it doesn't like double or quadstepping, at least thats what Trinamic said. Klipper can save this with 8 bit mcu :) No more noise or spreadCycle.

I'll be dry running a 15 hour print now (with nozzle removed so the extruder motor/calculations are still done) and report back.

Here is my config for RAMPS1.4 with the same wiring as above including the extra (not visible) enstop pins like this from toms3d: image (the handwritten stuff are crap, its diag1 if u cant read it)

Config:

# This file contains common pin mappings for RAMPS (v1.3 and later)
# boards. RAMPS boards typically use a firmware compiled for the AVR
# atmega2560 (though other AVR chips are also possible).

# See the example.cfg file for a description of available parameters.

[driver tmc2130_x]
type:               TMC2130
steps_per_mm:       40
# SPI
ss_pin:             ^PB0
spi_mode:           3
spi_speed:          2000000
# config
current:            500.0 #800 minimum under 18v
microsteps:         8 #with interpolation enabled there is less tiny pauses leading to higher accuracy than 16+ MS. Will also offload MCU load. Who needs non repeatable <50micron accurate gt2 20t setup for molten plastic? 16 is useful for non interpolated drivers, to reduce vibrations and noise only on common 3d printers.
mode :              stealthChop
diag0_out:          temp_prewarn
diag1_out:          stall
diag0_active_high:  1
diag1_active_high:  1
interpolate:        1
sensor_less_homing: 1
stealth_max_speed:  300
stall_threshold:    2

[driver tmc2130_y]
type:               TMC2130
steps_per_mm:       40
# SPI
ss_pin:             ^PL0
spi_mode:           3
spi_speed:          2000000
# config
current:            500.0 #800 minimum under 18v
microsteps:         8 #with interpolation enabled there is less tiny pauses leading to higher accuracy than 16+ MS. Will also offload MCU load. Who needs non repeatable <50micron accurate gt2 20t setup for molten plastic? 16 is useful for non interpolated drivers, to reduce vibrations and noise only on common 3d printers.
mode :              stealthChop
diag0_out:          temp_prewarn
diag1_out:          stall
diag0_active_high:  1
diag1_active_high:  1
interpolate:        1
sensor_less_homing: 1
stealth_max_speed:  300
stall_threshold:    2

[stepper_x]
driver: tmc2130_x
step_pin: ar54
dir_pin: ar55
enable_pin: !ar38
step_distance: .025
endstop_pin: ar3
#endstop_pin: ^ar2
position_max: 284
homing_speed: 50
position_endstop:   0
homing_speed:       40
homing_direction:   min
homing_retract_dist:1 #important! else you will have endstop timeout error

[stepper_y]
driver: tmc2130_y
step_pin: ar60
dir_pin: ar61
enable_pin: !ar56
step_distance: .025
endstop_pin: ^ar14
#endstop_pin: ^ar15
position_endstop: 0
position_max: 292
homing_speed: 50
homing_retract_dist:1 #important! else you will have endstop timeout error
homing_offset: 34 #adjust when you remove your endstop, I gained around 3-5cmm area on each axis, good for nozzle cleaning pad space :D

[stepper_z]
step_pin: ar46
dir_pin: ar48
enable_pin: !ar62
step_distance: 0.04
endstop_pin: ^!ar18
position_endstop: 0.0
position_max: 310
homing_speed: 10.0

[extruder]
step_pin: ar26
dir_pin: ar28
enable_pin: !ar24
step_distance: 0.00249314385
nozzle_diameter: 0.500
filament_diameter: 1.750
pressure_advance_lookahead_time: 0.010
pressure_advance: 0.05
max_extrude_only_distance: 150
pwm_cycle_time: 0.010
heater: heater_nozzle

[heater_nozzle]
heater_pin: ar10
sensor_type: ATC Semitec 104GT-2
sensor_pin: analog13
control: pid
pid_Kp: 28.853476
pid_Ki: 1.282377
pid_Kd: 162.300802
min_temp: 0
min_extrude_temp: 160
max_temp: 257
pwm_cycle_time: 0.010 #for sensitive power supply, less voltage ripple (e.g no 5V load on ATX PSU)
#*** Thermal protection
protect_period_heat:        20
protect_hysteresis_heat:    4
protect_period:             10
protect_hysteresis_runaway: 10

[heater_bed]
heater_pin: ar8
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog14
control = pid
pid_kp = 22.2
pid_ki = 1.08
pid_kd = 114
min_temp: 0
max_temp: 170
#max_power: 0.6
pwm_cycle_time: 0.010 #for sensitive power supply, less voltage ripple (e.g no 5V load on ATX PSU)
pid_deriv_time: 10
#*** Thermal protection
protect_period_heat:        20
protect_hysteresis_heat:    4
protect_period:             10
protect_hysteresis_runaway: 10

[fan0]
pin: ar9
cycle_time: 0.1 #for non pwm friendly blowers

[mcu]
serial: /dev/ttyACM0
pin_map: arduino

[printer]
#buffer_time_high: 30 #when running on Rpi Zero or single core SBCs with Octoprint
kinematics: cartesian
max_velocity: 500
max_accel: 1500
max_z_velocity:  10
max_z_accel: 30
junction_deviation: 0.005 #large moving beds, acceleration is not enough

Edit: config was the wrong one, updated. I highly recommend rewriting the entire config, things like fan0 instead of fan or heater: can be confusing. Edit2: ~18 hour print worked well, I slept near the printer (same room), stealthChop + vslot is very silent, had to keep looking at the printer to make sure its printing even in close proximity :) Edit3: After several tests, spreadCycle is completely unnecessary, stealth_max_speed is not needed with klipper. Setting a value like 300mm/s is appropriate where skipping is likely to happen (although it still didn't with a moving bed at 3000mm/s accel!!).

NeelD87 commented 6 years ago

@TunaLatte what printer are you running and what speeds did you manage? with Marlin I have everything running including sensorless homing but the problem is skipped steps and have to run it at slow speeds.

NeelD87 commented 6 years ago

In Marlin you can override the SPI pins , will it be possible in klipper

ghost commented 6 years ago

@NeelD87 Its a custom built cartesian printer, I just ran the calibration ringing cube at 70mm/s with 130mm/s travel, very shaky but intended for layer shifting i guess and so far there are no shifts. On marlin it skips at ~30mm/s without s3d auto speed on small areas ("Adjust printing speed for layers below"). I have a semi broken Duet and it skips immediately at around 100mm/s on travel moves if I disable spreadcycle. (invert constexpr uint32_t GCONF_SPREAD_CYCLE = 1 << 2; in tmc22xx.c if you want to try).

NeelD87 commented 6 years ago

@TunaLatte thanks I am going to try it on weekend. Please keep posted on your tests

NeelD87 commented 6 years ago

@TunaLatte I am getting Recv: // Internal error on command:"G28" when homing XY Z homing works

ghost commented 6 years ago

@neeld87 can you post the full log? There are important info on startup related to SPI init, to determine wether the connection is working to the drivers.

NeelD87 commented 6 years ago

INFO printer.mcu.mcu :: Configured MCU 'mcu' (633 moves) WARNING printer.stepper.x.tmc2130 :: Reset has occurred! INFO printer.stepper.x.tmc2130 :: Stealth max speed: 55 (71) WARNING printer.stepper.x.tmc2130 :: Reset has occurred! INFO printer.stepper.x.tmc2130 :: Stand still ERROR printer.stepper.x.tmc2130 :: Phase B short to ground ERROR printer.stepper.x.tmc2130 :: Phase A short to ground WARNING printer.stepper.x.tmc2130 :: Over temperature prewarning! ERROR printer.stepper.x.tmc2130 :: Over temperature! ERROR printer.stepper.x.tmc2130 :: motor stall WARNING printer.stepper.x.tmc2130 :: driver has switched to fullstep INFO printer.stepper.x.tmc2130 :: DRV_STATUS : Current (CS) = 31, stallGuard2 result (SG) = 1023 WARNING printer.stepper.x.tmc2130 :: Reset has occurred! WARNING printer.stepper.x.tmc2130 :: Reset has occurred! WARNING printer.stepper.x.tmc2130 :: Reset has occurred! WARNING printer.stepper.x.tmc2130 :: Reset has occurred! WARNING printer.stepper.x.tmc2130 :: Reset has occurred! ERROR printer.stepper.x.tmc2130 :: GCONF Configuration error! [was 0xFFFFFFFF expected 0x00003144] ERROR printer.stepper.x.tmc2130 :: CHOPCONF Configuration error! [was 0xFFFFFFFF expected 0x15028135] ERROR printer.stepper.x.tmc2130 :: COOLCONF Configuration error! [was 0xFFFFFFFF expected 0x000A0000] ERROR printer.stepper.x.tmc2130 :: PWMCONF Configuration error! [was 0xFFFFFFFF expected 0x000505FF] ERROR printer.stepper.x.tmc2130 :: IHOLD_IRUN Configuration error! [was 0xFFFFFFFF expected 0xFFFFF9EC] INFO printer.stepper.x.tmc2130 :: init done! WARNING printer.stepper.y.tmc2130 :: Reset has occurred! INFO printer.stepper.y.tmc2130 :: Stealth max speed: 50 (79) WARNING printer.stepper.y.tmc2130 :: Reset has occurred! INFO printer.stepper.y.tmc2130 :: Stand still ERROR printer.stepper.y.tmc2130 :: Phase B short to ground ERROR printer.stepper.y.tmc2130 :: Phase A short to ground WARNING printer.stepper.y.tmc2130 :: Over temperature prewarning! ERROR printer.stepper.y.tmc2130 :: Over temperature! ERROR printer.stepper.y.tmc2130 :: motor stall WARNING printer.stepper.y.tmc2130 :: driver has switched to fullstep INFO printer.stepper.y.tmc2130 :: DRV_STATUS : Current (CS) = 31, stallGuard2 result (SG) = 1023 WARNING printer.stepper.y.tmc2130 :: Reset has occurred! WARNING printer.stepper.y.tmc2130 :: Reset has occurred! WARNING printer.stepper.y.tmc2130 :: Reset has occurred! WARNING printer.stepper.y.tmc2130 :: Reset has occurred! WARNING printer.stepper.y.tmc2130 :: Reset has occurred! ERROR printer.stepper.y.tmc2130 :: GCONF Configuration error! [was 0xFFFFFFFF expected 0x00003144] ERROR printer.stepper.y.tmc2130 :: CHOPCONF Configuration error! [was 0xFFFFFFFF expected 0x15028135] ERROR printer.stepper.y.tmc2130 :: COOLCONF Configuration error! [was 0xFFFFFFFF expected 0x000A0000] ERROR printer.stepper.y.tmc2130 :: PWMCONF Configuration error! [was 0xFFFFFFFF expected 0x000505FF] ERROR printer.stepper.y.tmc2130 :: IHOLD_IRUN Configuration error! [was 0xFFFFFFFF expected 0xFFFFF9EC] INFO printer.stepper.y.tmc2130 :: init done!

Are the drivers gone

KevinOConnor commented 6 years ago

On Mon, Feb 12, 2018 at 11:19:01AM -0800, Talal A. wrote:

@KevinOConnor In a basic scheme this is how mine is exactly wired now + diag1 (upper pin from the triangular pin order in the following picture orientation.):

Thanks. Could you test if the work-tmc2130-20180217 branch works on your hardware? This doesn't implement stealthchop or sensorless homing, but I'd like to see if basic stepper movement works. See the example-extras.cfg file for the config details.

cd ~/klipper ; git fetch ; git checkout origin/work-tmc2130-20180217 ; sudo service klipper restart

-Kevin

ghost commented 6 years ago

@KevinOConnor I didn't have time to re-setup the endstops but will do, though I just issued G28 X > Emergency stop (m112) > G28 Y > Emergency stop with a slow homing speed and it works well. Interpolation is apparently not enabled by the sound of it. I left the sense_resistor value stock as its equivalent to my waterott specs. Will test a print if required. Klippy.log attached for config. klippy.log edit: It should be noted that anyone coming from marlin or even cruwallers branch requires full power cycle to reset settings like sensorless(stallgaurd) settings. (mine home when i first tested this branch)

andrea7376 commented 6 years ago

@KevinOConnor, sorry but I can't understand why restart with a completely new branch when @cruwaller branch is working with all register configurable and also the sensorless homing function work, It's something I already ask to @cruwaller without an answer, isn't the opensource principle to share to grow up faster and better? Maybe I'm lost somewhere? Anyway this is the link of his fork: https://github.com/cruwaller/klipper/tree/lpc176x

regards

KevinOConnor commented 6 years ago

On Sun, Feb 18, 2018 at 04:40:22PM +0000, andrea7376 wrote:

@KevinOConnor, sorry but I can't understand why restart with a completely new branch when @cruwaller branch is working with all register configurable and also the sensorless homing function work, It's something I already ask to @cruwaller without an answer, isn't the opensource principle to share to grow up faster and better? Maybe I'm lost somewhere? Anyway this is the link of his fork: https://github.com/cruwaller/klipper/tree/lpc176x

I chatted briefly with cruwaller on irc a couple of days ago. He indicated that he is not planning to submit his changes to my repo. I can't easily extract his changes (and wouldn't without a signed-off-by).

A number of people have been asking about the tmc2130 and it looks to be only about a days worth of work. So, it's not a big deal to implement it if I need to. :-(

-Kevin

NeelD87 commented 6 years ago

OK after playing with it further got it running, used same pin configurations which were working with marlin. Its homing now sensorless and all axis are moving. So time to do some actual printing.

andrea7376 commented 6 years ago

@KevinOConnor Ok, now the situation it's clear for all :-( Thank you.

NeelD87 commented 6 years ago

@TunaLatte just printed 20mm calibration cube and for few layers had small incremental X shift and later had big Y shift about 10mm.

NeelD87 commented 6 years ago

printer.txt

tiziano149 commented 6 years ago

Can't understand why @cruwaller wouldn't submit his changes but hey... Really looking forward to this, I am running an i3 MEGA on the trigorilla board with TMC2130 stepsticks.

NeelD87 commented 6 years ago

Running them at 30V. Going to play with current and see. Waiting for @KevinOConnor implementation to test further.

NeelD87 commented 6 years ago

Seems teemuatlut has now worked on coolstep https://github.com/teemuatlut/TMC2130Stepper

NeelD87 commented 6 years ago

Its one used in Marlin now, also someone posted that he reverted back to teemuatlut/TMC2130Stepper@58f01ad and is working fine with Marlin 1.1.8

ghost commented 6 years ago

current: 500.0 #800 minimum under 18v

printer.txt

Running them at 30V. Going to play with current and see.

But you mentioned before that you are on 12v, your current in config also shows that. Your drivers are burning hot right now, and cruwaller's branch doesn't report pre-temp or overheating yet, you also refuse to show what board you are using, and no logs after several requests, now you are going offtopic about Marlin, sounds all fishy to me from the beginning, opting out and deleting my useless comments to reduce clutter sorry.

NeelD87 commented 6 years ago

I am using 150W DC-DC 10-32V to 12-35V adjustable Step-UP Measured the voltage with multimeter. Seems few others have similar issues with Marlin firmware.

NeelD87 commented 6 years ago

Thanks for all your help it did help in getting started and debuging. I cant see what lies you seem in the config and log and what you think is fishy.

NeelD87 commented 6 years ago

I am using ramps 1.4 board . Soldered VM and GND pins and supply external 30V supply through stepup converter. Half success today , again thanks to @TunaLatte I have now reduced the current to 500. But still not clean. img_20180219_215203