Closed loop stepper motors JSS57P2N Nema23
-
Hi everyone,
I'm making this post because I have a problem with closed loop stepper motors missing steps.
More specifically, with the JSS57P2N Nema23 stepper motors, for which you can find the manual here (with no useful information)
As you will see, I have made extensiv research on the forum but without finding a solution.I will try to be organised but not brief.
What is the point of using these stepper ?
None. They are already installed on the Creatbot D600 Pro. Making them work is the easiest and cheapest way to convert the machine to a Duet.
For that, all you need is a 1XD board for each axis.I have found at least 10 peoples which have converted this machine to Duet so this is clearly a subject of interest for a lot of people.
Number 1 is having the exact same problem as myself. He solved it by just replacing the motors, which is not really a solution...
He did look at the STEP and DIR signal with an oscilloscope to see if something was wrong.What is not working ?
The motors are missing steps. Not a lot so it can't print or we get huge layer shifts. But just a bit at every layer so that every print you try come out skewed like the tower of pisa.
Sometimes in one direction, sometimes in another, it depends on the print.Is it possible to make it work ?
YES ! That is the most frustrating thing. They are on the original setup with the crappy 8-bit board and the marlin firmware. And it works, no layer shifts, but you get 1000 other problems. They are driven by these dummy step stick that send the DIR/STEP/EN signal to the stepper driver on the motor.
What have I tried ?
I applied the protocol RTFMN (google it) and found this page on connecting external stepper and servo motor drivers..
Where I can read about the M569 command and the timing parameters :
"The value required for cc is the direction-change-to-step-pulse setup time specified in the datasheet. If you use a value that is too low for your driver then you may see small layer shifts, where the whole layer shifts by one microstep on each direction change. You may need to use a value higher than specified in the datasheet if the cable capacitance is high. Using a value that is higher than needed is less critical, because RRF will only need to insert delays when the direction changes."Great this looks like the solution. But It does not work.
I tried changing the parameters to a lot of different values :
T2.7:2.7:2.7:2.7
T5:5:10:0
T20:20:20:20
But no success...What am i doing wrong ?
This is where I need help.I don't believe an old cheapo 8-bit board is capable of driving these motor correctly and not the mighty Duet eco-system.
I will allow myself to tag a few people that already worked with these motors or did the conversion to the D600 Pro.
@Toastinator @alankilian @taylo708 @ThunderrunnaThanks in advance to anyone that could help.
-
post your config
-
@Shoki theres also a lot of information on the servos on @mrehorstdmd blog
https://drmrehorst.blogspot.com/2022/05/bank-account-protection-circuit-for.html -
@jay_s_uk Sorry I forgot.
Here it is :; Configuration file for Duet 3 MB 6HC (firmware version 3.3) ; executed by the firmware on start-up ;######################## ; General preferences ;######################## M111 S0 ; Debugging off G21 ; Work in millimetres G90 ; Send absolute coordinates... M83 ; ...but relative extruder moves M555 P2 ; Set firmware compatibility to look like Marlin M667 S0 ; Select CoreXY mode ;######################## ; Network ;######################## M550 P"Creatbot" ; Set machine name M553 P*********** ; Ethernet Settings - Mask M554 P*********** ; Ethernet Settings - Passerelle M552 P*********** ; Ethernet Settings - Adresse M552 S1 ; Enable Networking M586 P0 S1 ; Enable HTTP M586 P1 S0 ; Disable FTP M586 P2 S0 ; Disable Telnet ; Wait a moment for the CAN expansion boards to start G4 S2 ;######################## ; Drive ;######################## ;Drive directions M569 P20.0 S0 ; Drive on Toolboard (E0) M569 P40.0 R1 S0 ; Drive on 1XD (X) M569 P41.0 R1 S1 ; Drive on 1XD (Y) M569 P42.0 R1 S0 ; Drive on 1XD (Z) M569 P40.0 T2.5:2.5:2.5:2.5 M569 P41.0 T2.5:2.5:2.5:2.5 M569 P42.0 T2.5:2.5:2.5:2.5 ;here I tried a lot of values, see my previous post ;Drive mapping and control M584 X40.0 Y41.0 Z42.0 E20.0 ; Stepper motor connection points ;M350 X16 Y16 Z16 I0 ; Configure microstepping without interpolation for XYZ- needed or not ? M350 E16 I1 ; Configure microstepping with interpolation for the extruder ;M92 X5000 Y5000 Z5000 E392 ; Set steps per mm assuming x16 microstepping M92 X266.67 Y266.67 Z960.00 E392 ; Set steps per mm assuming x16 microstepping ;Drive speeds and acceleration M203 X18000 Y18000 Z600 E5000 ; Set maximum speeds (mm/min) M201 X1000.00 Y1000.00 Z100 E2500 ; Set maximum accelerations (mm/s^2) M566 X300 Y300 Z10 E400 ; Set the jerk : maximum instantaneous speed changes (mm/min) ; Motor current M906 X1000 Y1000 Z1000 I30 ; M906 E1000 I30 ; Set motor currents (mA) and motor idle factor to 30% - needed or not ? M84 S30 ; Set idle timeout ;######################## ; Endstops ;######################## ; Axis Limits M208 X-65 Y-77 Z0 S1 ; Set axis minima - need adjustments M208 X500 Y500 Z500 S0 ; Set axis maxima ; Endstops M574 X1 S1 P"!20.io1.in" ; Set endstop position (X), type (P) and connection point (P), the ! is to invert- on toolboard M574 Y1 S1 P"!41.io1.in" ; Set endstop position (Y), type (P) and connection point (P), the ! is to invert - on 1XD for Y ; Z-Probe M950 S0 C"20.io0.out" ; Create servo pin 0 for BLTouch at connection point (C) M558 P9 C"20.io0.in" H5 F300 T6000 ; Set Z probe type to bltouch (P), the connection point (C), ; the dive height (H), the dive speeds (F), travel speed between probe points (T) G31 P500 X15 Y29 Z1 ; Set Z probe trigger value (P), offset (XY) and trigger height (Z) M557 X20:390 Y20:390 S74 ; define mesh grid ;######################## ; Heaters ;######################## ;Heated bed M308 S0 P"temp0" Y"thermistor" A"Bed" T100000 B3950 ; Set thermistor number (S), connection point (P), name (A) and parameters (YTBC) M950 H0 C"out1" T0 ; Set heater number (H), connection point (C) and map it to a sensor (T) M143 H0 S105 ; Set temperature limit M140 H0 ; Set this heater as bed heater ;Tool M308 S1 P"20.temp0" Y"thermistor" T100000 B4725 C7.06e-8 ; Set thermistor number (S), connection point (P), name (A) and parameters (YTBC) M950 H1 C"20.out0" T1 ; Set heater number (H), connection point (C) and map it to a sensor (T) M143 H1 S285 ; Set temperature limit ;Heated chamber M308 S2 P"temp1" Y"thermistor" A"Chamber" T100000 B3950 ; Set thermistor number (S), connection point (P), name (A) and parameters (YTBC) M950 H2 C"out2" T2 ; Set heater number (H), connection point (C) and map it to a sensor (T) M143 H2 S80 ; Set temperature limit M141 H2 ; Set this heater as chamber heater ;######################## ; Fans ;######################## ; Fans M950 F0 C"20.out2" Q500 ; create fan 0 on pin 20.out2 and set its frequency M106 P0 S0 H1 T50 ; set fan 0 value. Thermostatic control is turned on M950 F1 C"20.out1" Q500 ; create fan 1 on pin 20.out1 and set its frequency M106 P1 S0 H-1 ; set fan 1 value. Thermostatic control is turned off M950 F2 C"out4" Q500 ; create fan 2 on pin out4 and set its frequency M106 P2 S0 H-1 ; set fan 2 value. Thermostatic control is turned off ;######################## ; Tools ;######################## ; Tools M563 P0 S"Tool" D0 H1 F1 ; 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 ;######################## ; PID tune ;######################## ; Bed PID M307 H0 R0.924 K1.185:0.000 D1.57 E1.35 S1.00 B0 ; Tool PID M307 H1 R1.858 K0.379:0.159 D7.08 E1.35 S1.00 B0 V23.7 ;######################## ; Pressure advance ;######################## ;######################## ; Others ;######################## ;####################################################### G31 Z2.00 ; Set Z probe trigger trigger height (Z) ;####################################################### T0 ; select first tool M575 P1 S1 B57600
-
@Shoki oh, and what firmware version are you using? can you post an M122 output for each board?
e.g.
M122
M122 B40 etc -
I updated everything yesterday !
M122
=== Diagnostics === RepRapFirmware for Duet 3 MB6HC version 3.4.4 (2022-10-20 16:19:01) running on Duet 3 MB6HC v1.01 (standalone mode) Board ID: 08DJM-956BA-NA3TN-6J9F0-3SN6L-1B82U Used output buffers: 3 of 40 (16 max) === RTOS === Static ram: 152824 Dynamic ram: 97356 of which 0 recycled Never used RAM 100492, free system stack 200 words Tasks: NETWORK(ready,29.6%,176) ETHERNET(notifyWait,0.1%,463) HEAT(notifyWait,0.0%,328) Move(notifyWait,0.0%,351) CanReceiv(notifyWait,0.0%,798) CanSender(notifyWait,0.0%,335) CanClock(delaying,0.0%,340) TMC(notifyWait,8.2%,91) MAIN(running,61.7%,1081) IDLE(ready,0.3%,30), total 100.0% Owned mutexes: === Platform === Last reset 00:00:47 ago, cause: software Last software reset at 2022-11-04 09:54, reason: User, GCodes spinning, available RAM 96732, slot 1 Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x00400000 BFAR 0x00000000 SP 0x00000000 Task MAIN Freestk 0 n/a Error status: 0x00 Aux0 errors 0,0,0 Step timer max interval 127 MCU temperature: min 30.0, current 30.3, max 30.6 Supply voltage: min 23.8, current 23.8, max 23.9, under voltage events: 0, over voltage events: 0, power good: yes 12V rail voltage: min 11.9, current 12.0, max 12.1, under voltage events: 0 Heap OK, handles allocated/used 0/0, heap memory allocated/used/recyclable 0/0/0, gc cycles 0 Events: 0 queued, 0 completed Driver 0: standstill, SG min 0, mspos 8, reads 64836, writes 11 timeouts 0 Driver 1: standstill, SG min 0, mspos 8, reads 64836, writes 11 timeouts 0 Driver 2: standstill, SG min 0, mspos 8, reads 64836, writes 11 timeouts 0 Driver 3: standstill, SG min 0, mspos 8, reads 64837, writes 11 timeouts 0 Driver 4: standstill, SG min 0, mspos 8, reads 64837, writes 11 timeouts 0 Driver 5: standstill, SG min 0, mspos 8, reads 64837, writes 11 timeouts 0 Date/time: 2022-11-04 08:55:27 Slowest loop: 101.00ms; fastest: 0.05ms === Storage === Free file entries: 9 SD card 0 detected, interface speed: 25.0MBytes/sec SD card longest read time 3.1ms, write time 0.0ms, max retries 0 === Move === DMs created 125, segments created 0, maxWait 0ms, bed compensation in use: none, comp offset 0.000 === MainDDARing === Scheduled moves 0, completed 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1 === AuxDDARing === Scheduled moves 0, completed 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1 === Heat === Bed heaters 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1, chamber heaters 2 -1 -1 -1, ordering errs 0 Heater 0 is on, I-accum = 0.2 Heater 1 is on, I-accum = 0.0 === GCodes === Segments left: 0 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) 24 USB is idle in state(s) 0 Aux is idle in state(s) 0 Trigger is idle in state(s) 0 Queue is idle in state(s) 0 LCD is idle in state(s) 0 SBC is idle in state(s) 0 Daemon is idle in state(s) 0 Aux2 is idle in state(s) 0 Autopause is idle in state(s) 0 Code queue is empty === CAN === Messages queued 461, received 2088, lost 0, boc 0 Longest wait 3ms for reply type 6053, peak Tx sync delay 6, free buffers 50 (min 49), ts 236/235/0 Tx timeouts 0,0,0,0,0,0 === Network === Slowest loop: 117.17ms; fastest: 0.03ms Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0) Telnet(0) HTTP sessions: 1 of 8 = Ethernet = State: active Error counts: 0 0 0 0 0 0 Socket states: 5 2 2 2 2 0 0 0 === Multicast handler === Responder is inactive, messages received 0, responses 0
M122 B40
Diagnostics for board 40: Duet EXP1XD firmware version 3.4.4 (2022-10-14 11:45:39) Bootloader ID: SAMC21 bootloader version 2.3 (2021-01-26b1) All averaging filters OK Never used RAM 5520, free system stack 88 words Tasks: Move(notifyWait,0.0%,153) HEAT(notifyWait,0.1%,115) CanAsync(notifyWait,0.0%,64) CanRecv(notifyWait,0.0%,77) CanClock(notifyWait,0.0%,64) MAIN(running,96.5%,448) IDLE(ready,0.0%,40) AIN(delaying,3.4%,142), total 100.0% Last reset 00:01:40 ago, cause: software Last software reset data not available Driver 0: pos 0, 266.7 steps/mm, steps req 0 done 0 Moves scheduled 0, completed 0, in progress 0, hiccups 0, step errors 0, maxPrep 0, maxOverdue 0, maxInc 0, mcErrs 0, gcmErrs 0 Peak sync jitter 1/5, peak Rx sync delay 203, resyncs 0/0, no step interrupt scheduled VIN voltage: min 24.3, current 24.4, max 24.4 MCU temperature: min 17.5C, current 17.7C, max 17.9C Last sensors broadcast 0x00000000 found 0 240 ticks ago, 0 ordering errs, loop time 0 CAN messages queued 824, send timeouts 0, received 1301, lost 0, free buffers 37, min 37, error reg 0 dup 0, oos 0/0/0/0, bm 0, wbm 0, rxMotionDelay 0
M122 B41
Diagnostics for board 41: Duet EXP1XD firmware version 3.4.4 (2022-10-14 11:45:39) Bootloader ID: SAMC21 bootloader version 2.3 (2021-01-26b1) All averaging filters OK Never used RAM 5488, free system stack 88 words Tasks: Move(notifyWait,0.0%,153) HEAT(notifyWait,0.1%,115) CanAsync(notifyWait,0.0%,64) CanRecv(notifyWait,0.0%,77) CanClock(notifyWait,0.0%,64) MAIN(running,96.5%,448) IDLE(ready,0.0%,40) AIN(delaying,3.4%,142), total 100.0% Last reset 00:01:55 ago, cause: software Last software reset data not available Driver 0: pos 0, 266.7 steps/mm, steps req 0 done 0 Moves scheduled 0, completed 0, in progress 0, hiccups 0, step errors 0, maxPrep 0, maxOverdue 0, maxInc 0, mcErrs 0, gcmErrs 0 Peak sync jitter 0/4, peak Rx sync delay 201, resyncs 0/0, no step interrupt scheduled VIN voltage: min 24.6, current 24.6, max 24.6 MCU temperature: min 25.2C, current 25.4C, max 25.4C Last sensors broadcast 0x00000000 found 0 192 ticks ago, 0 ordering errs, loop time 0 CAN messages queued 949, send timeouts 0, received 1503, lost 0, free buffers 37, min 37, error reg 0 dup 0, oos 0/0/0/0, bm 0, wbm 0, rxMotionDelay 0
M122 B42
Diagnostics for board 42: Duet EXP1XD firmware version 3.4.4 (2022-10-14 11:45:39) Bootloader ID: SAMC21 bootloader version 2.3 (2021-01-26b1) All averaging filters OK Never used RAM 5520, free system stack 88 words Tasks: Move(notifyWait,0.0%,153) HEAT(notifyWait,0.1%,115) CanAsync(notifyWait,0.0%,64) CanRecv(notifyWait,0.0%,77) CanClock(notifyWait,0.0%,64) MAIN(running,96.5%,448) IDLE(ready,0.0%,40) AIN(delaying,3.4%,142), total 100.0% Last reset 00:02:07 ago, cause: software Last software reset data not available Driver 0: pos 0, 960.0 steps/mm, steps req 0 done 0 Moves scheduled 0, completed 0, in progress 0, hiccups 0, step errors 0, maxPrep 0, maxOverdue 0, maxInc 0, mcErrs 0, gcmErrs 0 Peak sync jitter 1/5, peak Rx sync delay 201, resyncs 0/0, no step interrupt scheduled VIN voltage: min 24.4, current 24.4, max 24.4 MCU temperature: min 19.3C, current 19.4C, max 19.7C Last sensors broadcast 0x00000000 found 0 19 ticks ago, 0 ordering errs, loop time 0 CAN messages queued 1042, send timeouts 0, received 1653, lost 0, free buffers 37, min 37, error reg 0 dup 0, oos 0/0/0/0, bm 0, wbm 0, rxMotionDelay 0
-
@Shoki That looks really interesting. Are those machines being dumped onto the surplus market these days?
I watched their video on Youtube and saw they have a drive reducer on the Y axis motor. Are they doing that on all 3 axes? Can you tell me the reduction ratio(s) they use?The motors look similar to, but maybe simpler than, the iHSV motors in my sand table. Their signal inputs are directly directly connected to a Duet 2 expansion board using differential pairs for step, direction, and enable. See: https://drmrehorst.blogspot.com/2020/04/ihsv-servomotor-information.html and https://drmrehorst.blogspot.com/2020/04/the-spice-must-flow-gets-servo-motors.html
I didn't have to tune the driver parameters at all for the sand table. I have attempted to install them in my 3D printer twice and given up (almost?). I just couldn't get the parameters tuned for adequate resolution, even with 3:1 drive reduction. Maybe they need more reduction, or I need to learn a lot more about tuning servomotors; probably the latter.
-
@Shoki how did you connect the closed loop stepper motors to the 1XD boards?
-
Hey everyone,
I did a lot of testing and finally managed to make it work.
I did two 24 hours prints with no troubles.My solution was to use these parameter in the M569 command :
T5:5:10:100
Hope this can help someone else.I don't understand why but I have to increase the dd parameter in the M569 command crazy high...
I only have one problem now : when I turn on the part cooling fan to 100%, the temperature keeps dropping until it pauses the print. The hotend does not seem to have the juice to go back up in temperature.
I believe it's because I used 20AWG cables to power my Toolboard 1LC which does not seem to be enough for a cable nearly 3m long.
@dc42
You actually already helped me on this subject when I was having trouble to just make them move two weeks ago.
See this post for more details.
https://forum.duet3d.com/topic/30197/external-driver-not-working/8External stepper -> 1XD Board
CLK -> D0_STEP (+)
DIR -> D0_DIR (+)
EN -> D0_EN (-)
GND - > GND (on the IO0)@mrehorstdmd said in Closed loop stepper motors JSS57P2N Nema23:
@Shoki That looks really interesting. Are those machines being dumped onto the surplus market these days?
These are just the cheapest big size 3D printer you can buy. And they advertise it can print peek, which it obviously does not.
I watched their video on Youtube and saw they have a drive reducer on the Y axis motor. Are they doing that on all 3 axes? Can you tell me the reduction ratio(s) they use ?
There has been a lot of different version of their Creatbot D600 Pro. I have seen some with small motors and reduction, some with big motors, some with servo and some without.
The one I have is geared in the Y axis, not geared in the X axis. I don't know the ratios.
The Z axis is just a single motor with belts to drive the four leadscrews that move the bed up and down. -
@Shoki I'm glad you got it working! 100us for that parameter is unusually high - most servos are happy with zero.
only have one problem now : when I turn on the part cooling fan to 100%, the temperature keeps dropping until it pauses the print. The hotend does not seem to have the juice to go back up in temperature.
You could measure the voltage across the heater output terminal block on the tool board when the heater is running at full power, to see if it is significantly lower than VIN. If that's not it, maybe they used an over-powered cooling fan; in which case you can set the maximum fan PWM using the M106 command X parameter in config.g. Or you could set that fan output to run at 12V, if that still provides sufficient cooling.
-
You could measure the voltage across the heater output terminal block on the tool board when the heater is running at full power, to see if it is significantly lower than VIN. If that's not it, maybe they used an over-powered cooling fan; in which case you can set the maximum fan PWM using the M106 command X parameter in config.g. Or you could set that fan output to run at 12V, if that still provides sufficient cooling.
Yes I will try that. I tried to look at the response VIN voltage from the M122 command. I see it drop to 23.7 when the heater is full blast on. But since the toolboard has to power everyting else, maybe it's a lot more at the heater.
Regarding the fan, it's not the problem. The printer has run with this heater/fan/extruder combo before the conversion to Duet and this was not an issue in the past. Of course I was seeing the temperature drop a bit when fan was turned on, but it was always capable of going back up with time.
-
@Shoki said in Closed loop stepper motors JSS57P2N Nema23:
Regarding the fan, it's not the problem. The printer has run with this heater/fan/extruder combo before the conversion to Duet and this was not an issue in the past.
I was wondering whether the old control board provided a lower voltage to the fan, or limited the PWM. Does it sound the same as it used to?
Another possibility is that either the old firmware/control board was showing the wrong temperature, or the Duet now is (e.g. because of incorrect sensor configuration) so that in reality you are trying to heat the nozzle to a higher temperature than before.
-
@Shoki
Have you done a PID tuning for the hotend with the fan running full blast? In another thread, I read it was running at only 70% during PID tune... -
-