bigtreetech / Octopus-Max-EZ

79 stars 21 forks source link

Klipper code printer.cfg for TMC5160 pro ez version #3

Closed Ipermax2000 closed 1 year ago

Ipermax2000 commented 1 year ago
The correct code to be able to make the TMC 5160 Pro drivers for Octopus EZ Max work is as follows:

########################################

TMC5160 configuration

########################################

[tmc5160 stepper_x]
cs_pin: PG14
spi_software_miso_pin: PE13
spi_software_mosi_pin: PE14
spi_software_sclk_pin: PE12
interpolate: True
diag1_pin: ^!PF0 # use the same pin that was previously the endstop_pin! 
driver_SGT: 3    # -64 is most sensitive value, 63 is least sensitive
run_current: 0.8
#hold_current: 0.2
sense_resistor: 0.075
stealthchop_threshold: 0

[tmc5160 stepper_y]
cs_pin: PG13
spi_software_miso_pin: PE13
spi_software_mosi_pin: PE14
spi_software_sclk_pin: PE12
interpolate: True
diag1_pin: ^!PF2 # use the same pin that was previously the endstop_pin! 
driver_SGT: 4   # -64 is most sensitive value, 63 is least sensitive 
run_current: 0.8
#hold_current: 0.2
sense_resistor: 0.075
stealthchop_threshold: 0

[tmc5160 stepper_z]
cs_pin: PG12
spi_software_miso_pin: PE13
spi_software_mosi_pin: PE14
spi_software_sclk_pin: PE12
interpolate: True
run_current: 0.80
#hold_current: 0.2
sense_resistor: 0.075
stealthchop_threshold: 0

[tmc5160 extruder]
cs_pin: PG10
spi_software_miso_pin: PE13
spi_software_mosi_pin: PE14
spi_software_sclk_pin: PE12
interpolate: True
run_current: 0.80
#hold_current: 0.2
sense_resistor: 0.075
stealthchop_threshold: 0
Metzlmane commented 1 year ago

I tried this and it doesn't work. TMC stepper_x failed to init: Unable to write tmc spi 'stepper_x' register GLOBALSCALER

DiDHack commented 1 year ago

Just add this line to the tmc config

spi_speed: 1500000

Metzlmane commented 1 year ago

I found out that 2 of the 8 tmc5160 were dead on arrival

Michael-Jacobsen commented 1 year ago

This config doesn't work for me. I can't get anything SPI based to work on this board and I'm seeing that lotsd of other people are having the same Unable to write tmc spi 'stepper_x' register GLOBALSCALER problems.

Metzlmane commented 1 year ago

This config doesn't work for me. I can't get anything SPI based to work on this board and I'm seeing that lotsd of other people are having the same Unable to write tmc spi 'stepper_x' register GLOBALSCALER problems.

This was the same for me. I used the following config and the confusing thing about it was: I had 4 drivers installed, but only one configured. So I tried only stepper_x, no other motors in the config. This did produce the error until I removed all other drivers and I guess one of the faulty ones ruined the SPI communication. But now everything works.

Voron 2.4 `[stepper_x] step_pin: PC13 dir_pin: !PC14 enable_pin: !PE6 microsteps: 32 rotation_distance: 40 endstop_pin: PF0 homing_speed: 20

homing_retract_dist: 5

homing_positive_dir: true full_steps_per_rotation:400

position_min: 0 position_endstop: 350 position_max: 350

[tmc5160 stepper_x] cs_pin: PG14

spi_speed: 500000

spi_software_sclk_pin: PE12 spi_software_mosi_pin: PE14 spi_software_miso_pin: PE13 sense_resistor: 0.075 interpolate: True run_current: 0.8

hold_current: 0.200

stealthchop_threshold: 0 #999999 diag1_pin: PF0 # use the same pin that was previously the endstop_pin!

driver_TBL: 1

driver_TOFF: 2

driver_HSTRT: 4

driver_FD3: 0

driver_HEND: 3

driver_CHM: 1`

please note, that a few settings are tweaked due to my strange cabling, so check direction and rotation distance/microsteps

Ipermax2000 commented 1 year ago

Remember that you must use the EZ 5160 NO the normal ones that have the CS pin in the wrong position.With EZ 5160 everything is fine the code above works.

Michael-Jacobsen commented 1 year ago

This config doesn't work for me. I can't get anything SPI based to work on this board and I'm seeing that lotsd of other people are having the same Unable to write tmc spi 'stepper_x' register GLOBALSCALER problems.

This was the same for me. I used the following config and the confusing thing about it was: I had 4 drivers installed, but only one configured. So I tried only stepper_x, no other motors in the config. This did produce the error until I removed all other drivers and I guess one of the faulty ones ruined the SPI communication. But now everything works.

Voron 2.4 `[stepper_x] step_pin: PC13 dir_pin: !PC14 enable_pin: !PE6 microsteps: 32 rotation_distance: 40 endstop_pin: PF0 homing_speed: 20 #homing_retract_dist: 5 homing_positive_dir: true full_steps_per_rotation:400

position_min: 0 position_endstop: 350 position_max: 350

[tmc5160 stepper_x] cs_pin: PG14 #spi_speed: 500000 spi_software_sclk_pin: PE12 spi_software_mosi_pin: PE14 spi_software_miso_pin: PE13 sense_resistor: 0.075 interpolate: True run_current: 0.8 #hold_current: 0.200 stealthchop_threshold: 0 #999999 diag1_pin: PF0 # use the same pin that was previously the endstop_pin! #driver_TBL: 1 #driver_TOFF: 2 #driver_HSTRT: 4 #driver_FD3: 0 #driver_HEND: 3 #driver_CHM: 1`

please note, that a few settings are tweaked due to my strange cabling, so check direction and rotation distance/microsteps

Thanks for that. Yeah I have confirmed it works for other people too. I just have a defective board or two defective drivers.

Michael-Jacobsen commented 1 year ago

Remember that you must use the EZ 5160 NO the normal ones that have the CS pin in the wrong position.With EZ 5160 everything is fine the code above works.

Sorry, what is a EZ 5160 NO?

Ipermax2000 commented 1 year ago

https://biqu.equipment/products/ez-drive-easy-driver-ez2209-ez5160-pro-v1-0?variant=39787467178082

See the manufacturer's link, you have to use these 5160 EZ that are perfectly matched to Octopus EZ Max if you use TM 5160 old have the CS pin in a different position so they are not good

Ipermax2000 commented 1 year ago

Octopus EZ Max motherboard requires TMC 5160 EZ

Ipermax2000 commented 1 year ago

However you can also put TM EZ 2209 cost very little and are just as good

https://www.amazon.it/BIGTREETECH-EZ2209-V1-0-passo-passo-compatibile/dp/B0BS6MCLQM/ref=sr_1_26?__mk_it_IT=%C3%85M%C3%85%C5%BD%C3%95%C3%91&crid=20WT1C1UO7VBZ&keywords=bigtreetech&qid=1688634338&sprefix=bigtreetech%2Caps%2C135&sr=8-26

Michael-Jacobsen commented 1 year ago

https://biqu.equipment/products/ez-drive-easy-driver-ez2209-ez5160-pro-v1-0?variant=39787467178082

See the manufacturer's link, you have to use these 5160 EZ that are perfectly matched to Octopus EZ Max if you use TM 5160 old have the CS pin in a different position so they are not good

Oh OK, I see what you are saying. Yeah man, only the EZ5160 drivers fit in the board. I know some other boards have both EZ sockets and traditional sockets but seeing as this is the Octopus Max repo I assumed all that was obvious but thankyou anyhow.

Yeah I already have 2209's that work fine. Just trying to upgrade to 48V

Ipermax2000 commented 1 year ago

Ok. I wasn't sure if I had put the TM 5160 with adapter or TM 5160 EZ. Anyway I mount both TM 2209 EZ and 5160 EZ and both are fine on Octopus EZ Max. Be careful if you have not already provided the jumper to select the voltage and to enable Homeless Mode on the motherboard. the rest is fine with the code I put on the site should everything be fine

bthubs commented 1 year ago

I was able to get EZ5160 to work with the above config only after adding:

[static_digital_output my_output_pins] 
pins:!PB12

Just thought I'd share my experience for those who are still trying to get the drivers to work.