problems with setting current for step motor
-
@dc42 Before that we measured the current consumption of the driver itself as DC, after your advice we measured the current of one phase of the motor in AC mode, and it turned out that there are about 4 amps. This means that the driver works properly and delivers the right current.
However we would like to increase duration time of ON state. We checked this with an oscilloscope and it turned out that the phase voltage is always the same and it does not increase even if the motor runs out of phase.
Is there any solution to this problem? -
@Kiryl, as I explained, you do not know what the driver output current is. You can not claim to know that you can't change the driver current unless you have valid data .... and you do not have that.
-
@Kiryl said in problems with setting current for step motor:
@dc42 Before that we measured the current consumption of the driver itself as DC, after your advice we measured the current of one phase of the motor in AC mode, and it turned out that there are about 4 amps. This means that the driver works properly and delivers the right current.
However we would like to increase duration time of ON state. We checked this with an oscilloscope and it turned out that the phase voltage is always the same and it does not increase even if the motor runs out of phase.
Is there any solution to this problem?Ahhh, now there is data you can work with ....
Next you need to understand how a stepper driver works. I myself am fuzzy on the concept but to my understanding you will never see a change in voltage. A stepper driver is a current source and not a voltage source. Current is controlled (I think) by switching the drive on a phase on and off. If you increase drive current then the 'on' time increases. I do not fully understand how the stepping algorithms work and exactly how the driver gets the motor to do a micro step but I believe it too is a function of the amount of current supplied to a given phase. In other words, the amount of current that a particular coil gets is dependant on exactly where in the micro step sequence you are. If you set up to use only full steps than what you see on the oscilloscope will likely make more sense.
Anyway, I will step back as I am not the right person to comment on this subject.
Good luck .... (it would appear to me that you are very likely getting the right amount of drive current) -
An interesting experiment would be to change the supply voltage and watch how the 'on' time changes.
I also want to point out that while the picture of the oscilloscope is 'pretty', it doesn't really tell you much until you trigger a sweep at a precise and repeatable point, look at an entire full step or similarly longer stretch of time and then use the time delay to move a magnified view along the captured sweep. You should see that the current varies with each micro step and you will be able to find the point of maximum current, presumably on a full step boundary.
You would need to attach the probe to the current feedback resistor that the driver uses to determine how much current is flowing. If you simply look at the voltage supplied to the individual coil of the stepper motor, I would expect to see the 'on' time to vary with the micro step you are looking at with the longest 'on' time happening at a full step point.To repeat myself - I haven't got a clue so take all of this with a good heaping of salt ...
-
@jens55 Thank you for your help. We will fight it further
-
Can you send M122 and M122 B# (where # is the canbus address of your expansion boards) in the gcode console in DWC and copy and paste the results here?
Have you updated the firmware yet?
-
@Phaedrux this is what I get after sending M115 B51
"Duet EXP1HCL firmware version 3.4.0beta7+8 (2022-01-25 10:33:00)"
The M112 command is an emergency stop. -
@Kiryl M122 not M112
and as i've already commented, upgrade the firmware on all of them to 3.4.4 so they're all the same. You should not be mixing and matching firmware versions -
@jay_s_uk oh yes, sorry.
M122 B51 - "Diagnostics for board 51:
Duet EXP1HCL firmware version 3.4.0beta7+8 (2022-01-25 10:33:00)
Bootloader ID: SAME5x bootloader version 2.4 (2021-12-10)
All averaging filters OK
Never used RAM 52296, free system stack 2592 words
Tasks: Move(notifyWait,0.0%,160) HEAT(notifyWait,0.0%,95) CanAsync(notifyWait,0.0%,69) CanRecv(notifyWait,0.0%,82) CanClock(notifyWait,0.0%,71) TMC(notifyWait,31.4%,360) CLSend(notifyWait,0.0%,152) MAIN(running,66.8%,400) IDLE(ready,0.0%,39) AIN(notifyWait,1.8%,265), total 100.0%
Last reset 00:22:34 ago, cause: software
Last software reset data not available
Closed loop enabled: no, pre-error threshold: 0.00, error threshold: 0.00, encoder type none
Driver 0: pos 0, 40.0 steps/mm,standstill, SG min 0, mspos 696, reads 15671, writes 19 timeouts 0, 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 -5/8, peak Rx sync delay 183, resyncs 0/0, no step interrupt scheduled
VIN voltage: min 24.1, current 24.2, max 24.2
V12 voltage: min 18.0, current 18.0, max 18.0
MCU temperature: min 31.2C, current 31.2C, max 38.1C
Last sensors broadcast 0x00000000 found 0 124 ticks ago, 0 ordering errs, loop time 0
CAN messages queued 10869, send timeouts 0, received 6690, lost 0, free buffers 37, min 37, error reg 0
dup 0, oos 0/0/0/0, bm 0, wbm 0, rxMotionDelay 0"M122 - "=== Diagnostics ===
RepRapFirmware for Duet 3 MB6HC version 3.4.1 (2022-06-01 21:09:01) running on Duet 3 MB6HC v1.01 or later (SBC mode)
Board ID: 0JD2M-999AL-D2PS0-6JTDA-3SD6J-1NJ30
Used output buffers: 1 of 40 (12 max)
=== RTOS ===
Static ram: 151000
Dynamic ram: 64632 of which 0 recycled
Never used RAM 135040, free system stack 200 words
Tasks: SBC(resourceWait:,0.5%,482) HEAT(notifyWait,0.0%,371) Move(notifyWait,0.0%,352) CanReceiv(notifyWait,0.0%,772) CanSender(notifyWait,0.0%,374) CanClock(delaying,0.0%,339) TMC(notifyWait,7.5%,92) MAIN(running,91.9%,1254) IDLE(ready,0.0%,30), total 100.0%
Owned mutexes: HTTP(MAIN)
=== Platform ===
Last reset 00:23:07 ago, cause: software
Last software reset at 2022-09-17 06:26, reason: User, GCodes spinning, available RAM 134696, slot 0
Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0044a000 BFAR 0x00000000 SP 0x00000000 Task SBC Freestk 0 n/a
Error status: 0x00
Step timer max interval 136
MCU temperature: min 37.5, current 39.2, max 39.4
Supply voltage: min 23.9, current 23.9, max 24.0, under voltage events: 0, over voltage events: 0, power good: yes
12V rail voltage: min 12.2, current 12.2, 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
Events: 0 queued, 0 completed
Driver 0: standstill, SG min 0, mspos 8, reads 53352, writes 11 timeouts 0
Driver 1: standstill, SG min 0, mspos 8, reads 53352, writes 11 timeouts 0
Driver 2: standstill, SG min 0, mspos 8, reads 53352, writes 11 timeouts 0
Driver 3: standstill, SG min 0, mspos 8, reads 53352, writes 11 timeouts 0
Driver 4: standstill, SG min 0, mspos 8, reads 53352, writes 11 timeouts 0
Driver 5: standstill, SG min 0, mspos 8, reads 53353, writes 11 timeouts 0
Date/time: 2022-09-17 06:49:26
Slowest loop: 21.28ms; 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, 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 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1, chamber heaters -1 -1 -1 -1, ordering errs 0
=== 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 6980, received 44466, lost 0, boc 0
Longest wait 3ms for reply type 6024, peak Tx sync delay 382, free buffers 50 (min 49), ts 6940/6939/0
Tx timeouts 0,0,0,0,0,0
=== SBC interface ===
Transfer state: 5, failed transfers: 0, checksum errors: 0
RX/TX seq numbers: 55494/55494
SPI underruns 0, overruns 0
State: 5, disconnects: 0, timeouts: 0 total, 0 by SBC, IAP RAM available 0x2b880
Buffer RX/TX: 0/0-0, open files: 0
=== Duet Control Server ===
Duet Control Server v3.4.1
Code buffer space: 4096
Configured SPI speed: 8000000Hz, TfrRdy pin glitches: 1
Full transfers per second: 40.03, max time between full transfers: 57.9ms, max pin wait times: 55.8ms/14.7ms
Codes per second: 0.02
Maximum length of RX/TX data transfers: 3084/728" -
@Kiryl said in problems with setting current for step motor:
firmware version 3.4.0beta7+8
there have been a number of fixes specific to the 1HCL board since the above beta release. please upgrade
-
Update your firmware with the Pi terminal.
https://docs.duet3d.com/en/User_manual/Machine_configuration/SBC_setup#h-6-update-firmware
Then check the firmware versions for the boards again afterwards to see if they have been udpated.