Alternate Trinamic Drivers
-
RRF doesn't currently have any code to drive TMC2130 drivers. So if you wanted to control them over SPI, you would need to extend the TMC2660 driver to handle TMC2130 as well. The TMC22xx driver code might be useful for this because I think the register set of the TMC22xx has some things in common with the TMC2130.
OTOH you should be able to use your TMC2130s as dumb step/dir/enable drivers connected to the expansion port of the Duet.
-
Thank you
-
David, I seem to be stuck. I had the 2130 wired up (on a strip board) but no movement (separate power supply for driver= higher voltage). Actually a slight bit of movement but other than that no response. I had it wired in to the expansion port (E2) and sent M584 X5 Y1 Z2 E3 at which point when I hit "home X" it moves towards the endstop about 5mm then thats it. The button stays blue. If I hit Emergency stop, wait for a reset then fit home again, nothing. If I send M584 X5 again it will move the 5mm again. I removed the 2130 and plugged in a 4988 and it does the same thing. Checked all conductors. Both drivers heat up about 15c above ambient just sitting there and the motor is not energized. Also sent M569 P5 R0 T2.5:2.5:5:0 which had no effect. M122 says motor 0 stalled but I thought I remapped it.
At this point I switched everything over to conn_lcd, remapped to X10 with the same effect. I now have X hooked back up to the 2660, sent M584 X0 and its working normally. Am I missing something simple. What needs to be changed in config.g? I changed the M569 drive X but didnt have any effect. FYI all this is for my test rig so I am only dealing with a single axis (X) and nothing else is hooked up to the board other than 2 thermistors.
sorry so long
I found the hornets nestEDIT
I just found some more info
"I suggest you use a multimeter to check the voltage between ENA+ and ENA- on your external drivers. It should be 0 when you start the Duet, changing to almost 3.3V when you first command the X motor to move.
Similarly, measure the voltage between DIR+ and DIR-. It should switch between 0V and 3.3V depending on which way you try to move the X motor. For example, if you send G91 first, then G1 S2 X10 will set it one way and G1 S2 X-10 will set it the other way."
I'm going to check that next
-
sooo. i can get either 3.3v at the enable pin on power up or 0v depending on whether I send M569 P10 R0 or R1. On 4988 it should be 3.3v on power up then go low when commanded to move. It does not. Driver 0 and 2 stalled below
M122
=== Diagnostics ===
Used output buffers: 3 of 32 (8 max)
=== Platform ===
RepRapFirmware for Duet Ethernet version 1.19 running on Duet Ethernet 1.0
Board ID: 08DGM-95BNL-MGPSJ-6J1F6-3SD6K-TJZ3X
Static ram used: 17684
Dynamic ram used: 95660
Recycled dynamic ram: 1344
Stack ram used: 1136 current, 4400 maximum
Never used ram: 11984
Last reset 00:00:34 ago, cause: software
Last software reset reason: User, spinning module GCodes, available RAM 11984 bytes (slot 0)
Software reset code 0x0003, HFSR 0x00000000, CFSR 0x00000000, ICSR 0x00400000, BFAR 0xe000ed38, SP 0xffffffff
Error status: 0
Free file entries: 10
SD card 0 detected, interface speed: 20.0MBytes/sec
SD card longest block write time: 0.0ms
MCU temperature: min 41.2, current 43.2, max 43.4
Supply voltage: min 23.9, current 24.1, max 24.2, under voltage events: 0, over voltage events: 0
Driver 0: stalled standstill
Driver 1: standstill
Driver 2: stalled standstill
Driver 3: standstill
Driver 4: standstill
Date/time: 2018-05-05 02:26:35
Slowest main loop (seconds): 0.003193; fastest: 0.000038
=== Move ===
MaxReps: 0, StepErrors: 0, FreeDm: 240, MinFreeDm 240, MaxWait: 0ms, Underruns: 0, 0
Scheduled moves: 0, completed moves: 0
Bed compensation in use: none
Bed probe heights: 0.000 0.000 0.000 0.000 0.000
=== Heat ===
Bed heater = -1, chamber heater = -1
=== GCodes ===
Segments left: 0
Stack records: 1 allocated, 0 in use
Movement lock held by null
http is idle in state(s) 0
telnet is idle in state(s) 0
file is idle in state(s) 0
serial is idle in state(s) 0
aux is idle in state(s) 0
daemon is idle in state(s) 0
queue is idle in state(s) 0
autopause is idle in state(s) 0
Code queue is empty.
=== Network ===
State: 5
HTTP sessions: 1 of 8
Responder states: HTTP(1) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0) -
I can't remember whether firmware 1.19 supports drivers connected to CONN_LCD. You may need to use a later firmware version.
-
@dc42 said in Alternate Trinamic Drivers:
I can't remember whether firmware 1.19 supports drivers connected to CONN_LCD. You may need to use a later firmware version.
I dont blame ya.
-
@dc42
at this point I'm kinda confused. Ive read so much (valuable learning) and tried many different things. I think I'm close.
to recap- external driver through conn_lcd. Motor is not operating correctly.-2.0RC1 FW, 4988 driver (substitute for 2130 until sorted), 36v to driver, 24v to duet
-when attempting to home X axis motor rotates abruptly for a split second then stops
-driver gets real hot, real quick when enabled. 25-60c in a few seconds (thermocouple on driver chip)
-enable and direction signals are being transmitted correctly by duet
-configured to full step at driver
-3.25v @ pin 1, channel 10
-reducing accel or jerk seemed to effect behavior
-all changes in config.g have been entered manually. I sent M584, M569, etc but it did not write to config.g (I still dont understand something here)
config.g and diagnostics below
; Configuration file for Duet Ethernet (firmware version 1.20 or newer)
; executed by the firmware on start-up
;
; generated by RepRapFirmware Configuration Tool on Sun Apr 15 2018 12:52:54 GMT-0400 (Eastern Daylight Time); General preferences
G90 ; Send absolute coordinates...
M83 ; ...but relative extruder moves; Network
M550 PMy printer ; Set machine name
M540 PBE:EF:DE:AD:FE:ED ; Set MAC address
M552 P192.168.0.69 S1 ; Enable network and set IP address
M553 P255.255.255.0 ; Set netmask
M554 P192.168.1.254 ; Set gateway
M586 P0 S1 ; Enable HTTP
M586 P1 S0 ; Disable FTP
M586 P2 S0 ; Disable Telnet; Drives
M569 P0 S0 ; Drive 0 goes backwards
M569 P1 S1 ; Drive 1 goes forwards
M569 P2 S1 ; Drive 2 goes forwards
M569 P3 S1 ; Drive 3 goes forwards
M584 X10 Y1 Z2 E3 ; Apply custom drive mapping
M569 P10 R0 S0 T2.5:2.5:5:0 ; Polarity/timing
M350 X1 Y16 Z16 E16 ; Configure microstepping with interpolation
M92 X320 Y320 Z4000 E420 ; Set steps per mm
M566 X100 Y2000 Z12 E120 ; Set maximum instantaneous speed changes (mm/min)
M203 X6000 Y6000 Z600 E12000 ; Set maximum speeds (mm/min)
M201 X500 Y2000 Z250 E250 ; Set accelerations (mm/s^2)
M906 x1000 Y1280 Z1400 E510 I30 ; Set motor currents (mA) and motor idle factor in per cent
M84 S30 ; Set idle timeout; Axis Limits
M208 X0 Y0 Z0 S1 ; Set axis minima
M208 X210 Y210 Z200 S0 ; Set axis maxima; Endstops
M574 X1 S1 ; Set active low endstops; Z-Probe
M558 P0 H5 F120 T6000 ; Disable Z probe but set dive height, probe speed and travel speed
M557 X15:103 Y15:195 S20 ; Define mesh grid; Heaters
M140 H-1 ; Disable heated bed; Fans
M106 P0 S0.3 I0 F500 H-1 ; Set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned off
M106 P1 S1 I0 F500 H T45 ; Set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned on
M106 P2 S1 I0 F500 H T45 ; Set fan 2 value, PWM signal inversion and frequency. Thermostatic control is turned on; Tools
M563 P1 D0 H ; Define tool 1
G10 P1 X0 Y0 Z0 ; Set tool 1 axis offsets
G10 P1 R0 S0 ; Set initial tool 1 active and standby temperatures to 0C; Automatic saving after power loss is not enabled
; Custom settings are not configured
M122
=== Diagnostics ===
RepRapFirmware for Duet 2 WiFi/Ethernet version 2.0(RTOS)RC1 running on Duet Ethernet 1.02 or later
Board ID: 08DGM-95BNL-MGPSJ-6J1F6-3SD6K-TJZ3X
Used output buffers: 1 of 20 (6 max)
=== RTOS ===
Static ram: 28484
Dynamic ram: 95240 of which 0 recycled
Exception stack ram used: 280
Never used ram: 7068
Task NETWORK ready, free stack 924
Task HEAT blocked, free stack 1260
Task MAIN running, free stack 3864
=== Platform ===
Last reset 00:00:11 ago, cause: software
Last software reset at 2018-05-06 19:42, reason: User, spinning module GCodes, available RAM 6980 bytes (slot 2)
Software reset code 0x0003 HFSR 0x00000000, CFSR 0x00000000, ICSR 0x0441f000, BFAR 0xe000ed38, SP 0xffffffff
Error status: 0
Free file entries: 10
SD card 0 detected, interface speed: 20.0MBytes/sec
SD card longest block write time: 0.0ms
MCU temperature: min 47.0, current 48.0, max 48.2
Supply voltage: min 24.0, current 24.1, max 24.2, under voltage events: 0, over voltage events: 0
Driver 0: standstill, SG min/max not available
Driver 1: standstill, SG min/max not available
Driver 2: standstill, SG min/max not available
Driver 3: standstill, SG min/max not available
Driver 4: standstill, SG min/max not available
Date/time: 1970-01-01 00:00:00
Slowest main loop (seconds): 0.002035; fastest: 0.000068
=== Move ===
Hiccups: 0, StepErrors: 0, LaErrors: 0, FreeDm: 240, MinFreeDm 240, MaxWait: 0ms, Underruns: 0, 0
Scheduled moves: 0, completed moves: 0
Bed compensation in use: none
Bed probe heights: 0.000 0.000 0.000 0.000 0.000
=== Heat ===
Bed heaters = -1 -1 -1 -1, chamberHeaters = -1 -1
=== GCodes ===
Segments left: 0
Stack records: 1 allocated, 0 in use
Movement lock held by null
http is idle in state(s) 0
telnet is idle in state(s) 0
file is idle in state(s) 0
serial is idle in state(s) 0
aux is idle in state(s) 0
daemon is idle in state(s) 0
queue is idle in state(s) 0
autopause is idle in state(s) 0
Code queue is empty.
=== Network ===
Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0) Telnet(0)
HTTP sessions: 1 of 8
Interface state: 5
=== Expansion === -
If the driver gets really hot but the motor moves correctly for a few seconds, it's probably overheating because you have the motor current turned up too high.
-
...read below
-
Disregard. Found the amswer
-
@3dpmicro which was what?
-
@dougal1957 said in Alternate Trinamic Drivers:
@3dpmicro which was what?
What are you referring to? The initial problem?
-
The Answer
-
@dougal1957. No solution yet. Narrowed it down though. It's either the sequence in which I am powering it up- 35v to the driver then power up Duet, Can't drive 4988 or 2130 from expansion or conn_lcd pins or something in firmware. Killed 4 drivers so far but not sure at exactly what point. Checked wiring many times. Have 3 more drivers coming to try again. Bizarre. Also plan to try a different capacitor on motor voltage side
Tried on both of the Duets I have with same result -
@dc42
Would you mind looking at my config file? I have the 2130 configured and working correctly but the endtop is not right. If I put the T0 in the M584 command it triggers an E-stop (as expected) when the axis hits the endstop after homing X so the E2 end stop pin is right. Im confused about what "T" value is needed to execute the homex. Also drive 5 is showing the switch triggering. But need drive 0 to see this?
Also if I remove the M581, put X1 back into M574 and plug in to normal X stop pins it triggers "endstop hit" for drive 0 in machine properties but still doesnt work when attempting to home.; Configuration file for Duet Ethernet (firmware version 1.20 or newer)
; executed by the firmware on start-up
;
; generated by RepRapFirmware Configuration Tool on Mon May 07 2018 21:27:03 GMT-0400 (Eastern Daylight Time); General preferences
G90 ; Send absolute coordinates...
M83 ; ...but relative extruder moves; Network
M550 PBoard 1 ; Set machine name
M552 P192.168.0.68 S1 ; Enable network and set IP address
M553 P255.255.255.0 ; Set netmask
M554 P192.168.1.254 ; Set gateway
M586 P0 S1 ; Enable HTTP
M586 P1 S1 ; Enable FTP
M586 P2 S0 ; Disable Telnet; Drives
M569 P5 R0 S1 T2.5:2.5:5 ; Drive 0 goes forwards
M569 P1 S1 ; Drive 1 goes forwards
M569 P2 S1 ; Drive 2 goes forwards
M569 P3 S1 ; Drive 3 goes forwards
M584 X5 Y1 Z2 E5 ; Apply custom drive mapping
M350 X16 ; Configure microstepping with interpolation
M350 Y16 Z16 E16 I1 ; Configure microstepping with interpolation
M92 X320 Y320 Z1600 E420 ; Set steps per mm
M566 X36000 Y36000 Z1200 E120 ; Set maximum instantaneous speed changes (mm/min)
M203 X6000 Y6000 Z3000 E1200 ; Set maximum speeds (mm/min)
M201 X2000 Y20 Z250 E250 ; Set accelerations (mm/s^2)
M906 Y800 Z800 E800 I30 ; Set motor currents (mA) and motor idle factor in per cent
M84 S30 ; Set idle timeout; Axis Limits
M208 X0 Y0 Z0 S0 ; Set axis minima
M208 X230 Y210 Z200 S1 ; Set axis maxima; Endstops
M574 Y1 S0 ; Set active LOW endstops
M581 E2 S1 C0 ;T0
; Z-Probe
M558 P0 H5 F120 T6000 ; Disable Z probe but set dive height, probe speed and travel speed
M557 X15:215 Y15:195 S20 ; Define mesh grid; Heaters
M140 H-1 ; Disable heated bed
M305 P1 T100000 B4138 C0 R4700 ; Set thermistor + ADC parameters for heater 1
M143 H1 S280 ; Set temperature limit for heater 1 to 280C; Fans
M106 P0 S0.3 I0 F500 H-1 ; Set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned off
M106 P1 S1 I0 F500 H T45 ; Set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned on
M106 P2 S1 I0 F500 H T45 ; Set fan 2 value, PWM signal inversion and frequency. Thermostatic control is turned on; Tools
M563 P0 D0 H1 ; Define tool 0
G10 P0 X0 Y0 Z0 ; Set tool 0 axis offsets
G10 P0 R0 S0 ; Set initial tool 0 active and standby temperatures to 0C; Automatic saving after power loss is not enabled
; Custom settings are not configured
-
M584 maps drives, not endstop inputs. If you map drive X to driver 5, you still need to connect the X endstop to the X endstop input on the Duet.
-
With it plugged in to the X stop under the Machine properties list drive 0 is toggling yes/no but it runs in to the end stop when homex button is pressed. This is how my config looks set up that way-
; Drives
M569 P5 R0 S0 T2.5:2.5:5 ; Drive 5 ENB low, backwards, TMG stp pls, stp intvl, DIR su time
M569 P1 S1 ; Drive 1 goes forwards
M569 P2 S1 ; Drive 2 goes forwards
M569 P3 S1 ; Drive 3 goes forwards
M584 X5 Y1 Z2 E5 ; Apply custom drive mapping
M350 X16 Y16 ; Configure microstepping TMC2130 no interp. spread cycle
M350 Z16 E16 T1 ; Configure microstepping with interpolation
M92 X320 Y320 Z1600 E420 ; Set steps per mm
M566 X2000 Y2000 Z1200 E120 ; Set maximum instantaneous speed changes (mm/min)
M203 X40000 Y40000 Z3000 E1200 ; Set maximum speeds (mm/min)
M201 X4000 Y4000 Z250 E250 ; Set accelerations (mm/s^2)
M906 Y800 Z800 E800 I30 ; Set motor currents (mA) and motor idle factor in per cent
M84 S30 ; Set idle timeout; Endstops
M574 X1 Y1 S1 ; Set active high endstops normally closedIn case for a second you might have wondered
I M564'd the end stops so I could test the TMC2130.
-10 mm lead ball screw, 100 mm stroke, 3kg load, 2.1 amp nema 17 set to 1.68 amps with the 2660 on 24v= maximum speed of 19,800 mm/m, 4000 acceleration--10 mm lead ball screw, 100 mm stroke, 3kg load, 2.1 amp nema 17 set to 1.2 amps with the 2130LA on 44v= maximum speed of 30,000 mm/m, 4000 acceleration
-
Please post your homex.g file.
-
; homex.g
; called to home the X axis
;
; generated by RepRapFirmware Configuration Tool on Mon May 07 2018 21:27:03 GMT-0400 (Eastern Daylight Time)
G91 ; relative positioning
G1 Z5 F6000 S2 ;lift Z relative to current position
G1 S1 X-235 F1800 ; move quickly to X axis endstop and stop there (first pass)
G1 X5 F6000 ; go back a few mm
G1 S1 X-235 F360 ; move slowly to X axis endstop once more (second pass)
G1 Z-5 F6000 S2 ;lower Z again
G90 ; absolute positioning -
That part of your config.g file looks OK, so does homex.g. So if the "drive 0" endstop shows the correct status in DWC Machine Properties and/or in M119, you should be able to home X by itself. That is assuming that you don't have another M574 command somewhere else that is overriding the one you published.