weird signal from duet to motor
-
hello,
at my workplace we are having a problem with motors not spinning as much as they are supposed to. we send a G1 E1000 f x000 command to our duet 3s and noted the motor spins 8.25 time under normal circumstances. however we have found that about F10000 the motor will only spin 5.7 times instead of the normal 8.25. the faster we go above F10000 the less rotations we get in the end.the most odd thing is we have a duex 5 and it does not have this problem. we compared the settings and found they are set up the exact same. we have a few tests of boards in the building, including a new out of box board we put our config into, and all duet 3s had the same issue at the same F speed
TLDR;
we have a record of our printer achieving the speed it is supposed to while still rotating the right amount of time, but now it does not. so to summarize, we have a printer that works on a duex 5, and a few printers that used to work, but do not now on a duet 3to figure out the problem we had the following theories that we have more or less disproven as the cause
- we used a faulty motor
-we used the same motor for all the tests - we had an odd microsteping setting
-we have it set to full step and the M350 command is identical to the Duex 5
3.we used different jerk settings
-the M566 command is the exact same
4.M567 is different
-the M567 command is the exact same
5.the M221 is set
- M221 is 100%
- the M92 is different
-all printers are set to 201 - the M201 is different
- both are set to 30000
8.the M203 is different - both printers are 8000 ( we use a dual extruder so each side is at .5 speed, meaning the theoretical max is 16000 per motor )
9.the M220 is set - M220 is 100%
the last thing we did is open up the board and looked at the servo pins with an oscilloscope. this is the most odd finding, and is baffling to me. I set up the scope to read both a dual phase (one wire on each phase) and single phase (both wires on the same phase). the results were odd, in the photos below you can see the reading of both the Duet 3 (includes the console) and the duex 5 ( just scope) it appears that the duet 3 has some odd interference when sent a high F command.
I think the weirdest part is that I see the same "interference" when the Duex 5 is sent a low f signal, and has a clock signal when idle but it does not move any slower or spin any less. this is completely different and I have no idea why.
F8000 dual phase
F16000 dual phase
F8000 single phase
F16000 single phase
we are at a loss at where to look next, so help would be much apricated. i still have the scope and can take more readings if necessary.
- we used a faulty motor
-
-
@payton which Duet 3 are you using? Please send M122 when you run at the lower speed and again at the higher speed and report here. We are looking to see if there are any hiccups reported
-
@t3p3tony the board is a duet 3 6hc, and I will take the m122 today. do i run m122 after or during the spin command?
-
@payton before and after please.
-
F8000----------------------------------------
before-------------------
m122
=== Diagnostics ===
RepRapFirmware for Duet 3 MB6HC version 3.3 (2021-06-15 21:45:47) running on Duet 3 MB6HC v1.01 or later (SBC mode)
Board ID: 08DJM-956BA-NA3TJ-6JKDD-3S46N-KA86S
Used output buffers: 1 of 40 (11 max)
=== RTOS ===
Static ram: 150904
Dynamic ram: 61096 of which 0 recycled
Never used RAM 142192, free system stack 219 words
Tasks: SBC(ready,5.4%,340) HEAT(notifyWait,0.0%,363) Move(notifyWait,0.0%,302) CanReceiv(notifyWait,0.0%,944) CanSender(notifyWait,0.0%,374) CanClock(delaying,0.0%,333) TMC(notifyWait,7.1%,93) MAIN(running,87.5%,1252) IDLE(ready,0.0%,29), total 100.0%
Owned mutexes: HTTP(MAIN)
=== Platform ===
Last reset 00:03:49 ago, cause: software
Last software reset at 2022-06-17 10:31, reason: User, none spinning, available RAM 142192, slot 0
Software reset code 0x0012 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0044a000 BFAR 0x00000000 SP 0x00000000 Task SBC Freestk 0 n/a
Error status: 0x00
Step timer max interval 171
MCU temperature: min 50.7, current 51.8, max 52.0
Supply voltage: min 23.6, current 23.7, max 23.8, under voltage events: 0, over voltage events: 0, power good: yes
12V rail voltage: min 12.1, current 12.1, max 12.2, under voltage events: 0
Heap OK, handles allocated/used 0/0, heap memory allocated/used/recyclable 0/0/0, gc cycles 0
Driver 0: position 0, standstill, reads 40306, writes 14 timeouts 0, SG min/max 0/0
Driver 1: position 0, standstill, reads 40306, writes 14 timeouts 0, SG min/max 0/0
Driver 2: position 0, standstill, reads 40306, writes 14 timeouts 0, SG min/max 0/0
Driver 3: position 0, standstill, reads 40306, writes 14 timeouts 0, SG min/max 0/0
Driver 4: position 0, standstill, reads 40306, writes 14 timeouts 0, SG min/max 0/0
Driver 5: position 0, standstill, reads 40307, writes 14 timeouts 0, SG min/max 0/0
Date/time: 2022-06-17 10:39:12
Slowest loop: 0.46ms; fastest: 0.03ms
=== Storage ===
Free file entries: 10
SD card 0 not detected, interface speed: 37.5MBytes/sec
SD card longest read time 0.0ms, write time 0.0ms, max retries 0
=== Move ===
DMs created 125, maxWait 0ms, bed compensation in use: none, comp offset 0.000
=== MainDDARing ===
Scheduled moves 0, completed moves 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1
=== AuxDDARing ===
Scheduled moves 0, completed moves 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1
=== Heat ===
Bed heaters = -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1, chamberHeaters = 3 -1 -1 -1
=== GCodes ===
Segments left: 0
Movement lock held by null
HTTP* is doing "M122" in state(s) 0
Telnet is idle in state(s) 0
File is idle in state(s) 0
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 2029, received 0, lost 0, longest wait 0ms for reply type 0, peak Tx sync delay 0, free buffers 49 (min 49), ts 1149/0/0
Tx timeouts 0,0,1148,0,0,879 last cancelled message type 30 dest 127=== SBC interface ===
State: 4, failed transfers: 0, checksum errors: 0
Last transfer: 1ms ago
RX/TX seq numbers: 7954/7954
SPI underruns 0, overruns 0
Disconnects: 0, timeouts: 0, IAP RAM available 0x2c83c
Buffer RX/TX: 0/0-0
=== Duet Control Server ===
Duet Control Server v3.3.0
Code buffer space: 4096
Configured SPI speed: 8000000Hz
Full transfers per second: 35.28, max wait times: 8.7ms/0.0ms
Codes per second: 0.22
Maximum length of RX/TX data transfers: 4940/440after-------------------
m122
=== Diagnostics ===
RepRapFirmware for Duet 3 MB6HC version 3.3 (2021-06-15 21:45:47) running on Duet 3 MB6HC v1.01 or later (SBC mode)
Board ID: 08DJM-956BA-NA3TJ-6JKDD-3S46N-KA86S
Used output buffers: 1 of 40 (20 max)
=== RTOS ===
Static ram: 150904
Dynamic ram: 61096 of which 0 recycled
Never used RAM 142192, free system stack 193 words
Tasks: SBC(ready,5.0%,340) HEAT(notifyWait,0.0%,363) Move(notifyWait,0.0%,284) CanReceiv(notifyWait,0.0%,944) CanSender(notifyWait,0.0%,374) CanClock(delaying,0.0%,333) TMC(notifyWait,7.2%,59) MAIN(running,87.7%,1131) IDLE(ready,0.0%,29), total 100.0%
Owned mutexes: HTTP(MAIN)
=== Platform ===
Last reset 00:05:37 ago, cause: software
Last software reset at 2022-06-17 10:31, reason: User, none spinning, available RAM 142192, slot 0
Software reset code 0x0012 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0044a000 BFAR 0x00000000 SP 0x00000000 Task SBC Freestk 0 n/a
Error status: 0x00
Step timer max interval 130
MCU temperature: min 51.4, current 51.6, max 52.0
Supply voltage: min 23.6, current 23.7, max 23.8, under voltage events: 0, over voltage events: 0, power good: yes
12V rail voltage: min 12.1, current 12.1, max 12.2, under voltage events: 0
Heap OK, handles allocated/used 0/0, heap memory allocated/used/recyclable 0/0/0, gc cycles 0
Driver 0: position 0, standstill, reads 12550, writes 0 timeouts 0, SG min/max not available
Driver 1: position 0, standstill, reads 12551, writes 0 timeouts 0, SG min/max not available
Driver 2: position 0, standstill, reads 12551, writes 0 timeouts 0, SG min/max not available
Driver 3: position 0, standstill, reads 12551, writes 0 timeouts 0, SG min/max not available
Driver 4: position 0, standstill, reads 12551, writes 0 timeouts 0, SG min/max not available
Driver 5: position 0, standstill, reads 12547, writes 3 timeouts 0, SG min/max 0/0
Date/time: 2022-06-17 10:41:00
Slowest loop: 0.46ms; fastest: 0.03ms
=== Storage ===
Free file entries: 10
SD card 0 not detected, interface speed: 37.5MBytes/sec
SD card longest read time 0.0ms, write time 0.0ms, max retries 0
=== Move ===
DMs created 125, maxWait 300176ms, bed compensation in use: none, comp offset 0.000
=== MainDDARing ===
Scheduled moves 2, completed moves 2, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 2], CDDA state -1
=== AuxDDARing ===
Scheduled moves 0, completed moves 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1
=== Heat ===
Bed heaters = -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1, chamberHeaters = 3 -1 -1 -1
=== GCodes ===
Segments left: 0
Movement lock held by null
HTTP* is doing "M122" in state(s) 0
Telnet is idle in state(s) 0
File is idle in state(s) 0
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 969, received 0, lost 0, longest wait 0ms for reply type 0, peak Tx sync delay 0, free buffers 49 (min 49), ts 538/0/0
Tx timeouts 0,0,538,0,0,431 last cancelled message type 30 dest 127=== SBC interface ===
State: 4, failed transfers: 0, checksum errors: 0
Last transfer: 1ms ago
RX/TX seq numbers: 11767/11767
SPI underruns 0, overruns 0
Disconnects: 0, timeouts: 0, IAP RAM available 0x2c83c
Buffer RX/TX: 0/0-0
=== Duet Control Server ===
Duet Control Server v3.3.0
Code buffer space: 4096
Configured SPI speed: 8000000Hz
Full transfers per second: 35.38, max wait times: 8.7ms/0.0ms
Codes per second: 0.03
Maximum length of RX/TX data transfers: 4940/440F16000-----------------------------------------------
before-----------------------
same as aboveafter -------------------------
m122
=== Diagnostics ===
RepRapFirmware for Duet 3 MB6HC version 3.3 (2021-06-15 21:45:47) running on Duet 3 MB6HC v1.01 or later (SBC mode)
Board ID: 08DJM-956BA-NA3TJ-6JKDD-3S46N-KA86S
Used output buffers: 1 of 40 (20 max)
=== RTOS ===
Static ram: 150904
Dynamic ram: 61096 of which 0 recycled
Never used RAM 142192, free system stack 193 words
Tasks: SBC(ready,5.0%,340) HEAT(notifyWait,0.0%,363) Move(notifyWait,0.0%,284) CanReceiv(notifyWait,0.0%,944) CanSender(notifyWait,0.0%,374) CanClock(delaying,0.0%,333) TMC(notifyWait,7.2%,59) MAIN(running,87.8%,1096) IDLE(ready,0.0%,29), total 100.0%
Owned mutexes: HTTP(MAIN)
=== Platform ===
Last reset 00:07:25 ago, cause: software
Last software reset at 2022-06-17 10:31, reason: User, none spinning, available RAM 142192, slot 0
Software reset code 0x0012 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0044a000 BFAR 0x00000000 SP 0x00000000 Task SBC Freestk 0 n/a
Error status: 0x00
Step timer max interval 164
MCU temperature: min 51.4, current 51.6, max 51.8
Supply voltage: min 23.6, current 23.8, max 23.8, under voltage events: 0, over voltage events: 0, power good: yes
12V rail voltage: min 12.1, current 12.1, max 12.2, under voltage events: 0
Heap OK, handles allocated/used 0/0, heap memory allocated/used/recyclable 0/0/0, gc cycles 0
Driver 0: position 0, standstill, reads 12600, writes 0 timeouts 0, SG min/max not available
Driver 1: position 0, standstill, reads 12599, writes 0 timeouts 0, SG min/max not available
Driver 2: position 0, standstill, reads 12599, writes 0 timeouts 0, SG min/max not available
Driver 3: position 0, standstill, reads 12599, writes 0 timeouts 0, SG min/max not available
Driver 4: position 0, standstill, reads 12599, writes 0 timeouts 0, SG min/max not available
Driver 5: position 0, standstill, reads 12595, writes 4 timeouts 0, SG min/max 0/63
Date/time: 2022-06-17 10:42:48
Slowest loop: 0.46ms; fastest: 0.03ms
=== Storage ===
Free file entries: 10
SD card 0 not detected, interface speed: 37.5MBytes/sec
SD card longest read time 0.0ms, write time 0.0ms, max retries 0
=== Move ===
DMs created 125, maxWait 94401ms, bed compensation in use: none, comp offset 0.000
=== MainDDARing ===
Scheduled moves 3, completed moves 3, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 1], CDDA state -1
=== AuxDDARing ===
Scheduled moves 0, completed moves 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1
=== Heat ===
Bed heaters = -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1, chamberHeaters = 3 -1 -1 -1
=== GCodes ===
Segments left: 0
Movement lock held by null
HTTP* is doing "M122" in state(s) 0
Telnet is idle in state(s) 0
File is idle in state(s) 0
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 970, received 0, lost 0, longest wait 0ms for reply type 0, peak Tx sync delay 0, free buffers 49 (min 49), ts 539/0/0
Tx timeouts 0,0,539,0,0,431 last cancelled message type 30 dest 127=== SBC interface ===
State: 4, failed transfers: 0, checksum errors: 0
Last transfer: 1ms ago
RX/TX seq numbers: 15585/15585
SPI underruns 0, overruns 0
Disconnects: 0, timeouts: 0, IAP RAM available 0x2c83c
Buffer RX/TX: 0/0-0
=== Duet Control Server ===
Duet Control Server v3.3.0
Code buffer space: 4096
Configured SPI speed: 8000000Hz
Full transfers per second: 35.46, max wait times: 8.7ms/0.0ms
Codes per second: 0.02
Maximum length of RX/TX data transfers: 4940/440 -
@payton please can you upgrade to 3.4.1 And try again. Also post your config.g.
-
-
@payton The commented out steps/mm you have for extruders will probably have been causing issues. for example 24186 steps/mm with with a feedrate of 6000mm/min would be a step rate of 24.1186Mhz The 6HC can support approx 300Khz on multiple concurrent axis.
In the current configuration for M350 you have E1:1 so full stepping. In general that's not a good way to control stepper motors Try E16:16. I commented out Lines of M350 you have 128 microstepping, this is supported however if you want to move at high step rates we advise you use 16 microstepping with interpolation.
So i would try M350 E16:16, adjust M92 as needed to get the correct steps/mm (probably 3312). that should allow feedrate up to approx 900mm/s or F54000 (it may be a bit lower than this in reality depending on what else the processor is dealing with it.
I would say that a an extruder feedrate of F10000 (as opposed to a movement feedrate) is really high. Is this for filament load and unload?
-
@t3p3tony we are using servos as i have been told, would that have the same problems of running in full step?
as to the feedrate this is a 2 in 1 out extruder, so F16000 for the extruder as a whole should be F8000 per motor.
-
@payton ahh ok, so how are you getting the step/direction signals out of the 6HC?
But yes if you are using servos then the distinction between steps and microsteps does not matter as such you just sent the servo a certain number of step pulses and it moves the amount it is configured to move.
So you have the correct pulse timing set for the connections to the servos?
-
@t3p3tony to get signals out of the 6HC we wire two of the four leads to the A2 and B1 sides of the servo pins (middle 2) on the board. then we wire the other two to power and neutral 24v. this is the same setup as the duex5 I believe.
i do not know what the pulse timing is supposed to be, but here is the M569 of the servo pin
m569 p0.5
Drive 5 runs forwards, active low enable, timing fast, mode spreadCycle, ccr 0x08053, toff 3, tblank 1, thigh 200 (1.1 mm/sec), hstart/hend/hdec 5/0/0, pos 896 -
@payton can you provide a schematic of how you are connecting the 6HC to the servo and the servo datasheet please. I have not seen this method of controlling a servo controller before.
-
@t3p3tony here is the schematic of the servo. this is servo pin 0 and a power in parallel to the board power, let me know if this is to simple.
-
@payton what's the servo part number?
-
@jay_s_uk I have been made aware that they are indeed stepper motors and not servos. and my supervisor is contacting the company we got them from to find the part number.
-
@payton that clears a lot up then.
the part number should be printed on them, but if not, that information would definitely help -
@payton that is a very odd way to drive a stepper motor. the driver on the 6HC is designed to drive a bi polar stepper motor up to 6.3A. would be interesting to understand why this connection scheme is used and not connect both coils to the drivers (assuming it is a bi polar stepper)
-
@t3p3tony
so when we asked for the motor specs it was revealed it is a servo with an internal driver that reads a stepper driver input. in the instructional video they plug it into a duet the same way, so it comes back to the weird signal from the board.looking back at the scope it doesn't look like noise per say, but more like signals combineing/ cutting out at weird times.
-
Do they also provide settings for the Duet?
-
@payton please post the data sheet.