Configuring sensorless homing on my Wanhao Duplicator i3
-
@steve-lynch, that script you posted is not complete because it doesn't include the G1 S1 homing move. Please post your complete homing files and your config.g file.
Note, stall detection is unreliable at low speeds, so there is a configurable minimum motor full steps/sec value below which stall detection is disabled. Your homing speed must be above this.
-
Thanks so much guys!!!! ! This is where I'm at as of now... It's not all dialed in yet.... I ripped the duet off my FT-5 to use on the wanhao, as I've never been able to fix my "weird corners" problem.. I dropped an einsy rambo in the ft-5 and it's perfect!... so I'm hoping this will make a better replacement for the burnt Melzi in my wanhao...
; Configuration file for Duet WiFi (firmware version 1.21)
; executed by the firmware on start-up
;
; generated by RepRapFirmware Configuration Tool v2 on Mon Apr 29 2019 05:59:21 GMT-0400 (Eastern Daylight Time); General preferences
G90 ; Send absolute coordinates...
M83 ; ...but relative extruder moves; Network
M550 P"Wanhao Di3 Duet" ; Set machine name
M552 S1 ; Enable network
M587 S"Lynch WiFi" P"internet" ; Configure access point. You can delete this line once connected
M586 P0 S1 ; Enable HTTP
M586 P1 S0 ; Disable FTP
M586 P2 S0 ; Disable Telnet; Drives
M569 P0 S1 ; Drive 0 goes forwards
M569 P1 S1 ; Drive 1 goes forwards
M569 P2 S0 ; Drive 2 goes backwards
M569 P3 S1 ; Drive 3 goes forwards
M350 X128 Y128 Z128 E16 I0 ; Configure microstepping without interpolation
M92 X640.00 Y640.00 Z3200.00 E100.00 ; Set steps per mm
M566 X900.00 Y900.00 Z12.00 E120.00 ; Set maximum instantaneous speed changes (mm/min)
M203 X12000.00 Y12000.00 Z1200.00 E3000.00 ; Set maximum speeds (mm/min)
M201 X1000.00 Y1000.00 Z100.00 E5000.00 ; Set accelerations (mm/s^2)
M906 X855.00 Y855.00 Z855.00 E855.00 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 X200 Y200 Z180 S0 ; Set axis maxima; Endstops
M574 X1 Y1 Z1 S3 ; Set endstops controlled by motor load detection
M913 X40 Y40 Z40
M400 ; make sure everything has stopped before we reset the motor currents
M913 X100 Y100 Z100 ; motor currents back to normal
; Z-Probe
M558 P5 H5 F120 T6000 ; Set Z probe type to switch and the dive height + speeds
G31 P500 X0 Y0 Z2.5 ; Set Z probe trigger value, offset and trigger height
M557 X25:175 Y25:175 S20 ; Define mesh grid; Heaters
M305 P0 T100000 B3988 R4700 ; Set thermistor + ADC parameters for heater 0
M143 H0 S120 ; Set temperature limit for heater 0 to 120C
M305 P1 T100000 B3988 R4700 ; Set thermistor + ADC parameters for heater 1
M143 H1 S280 ; Set temperature limit for heater 1 to 280C; Fans
M106 P0 S0 I0 F500 H-1 ; Set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned off
M106 P1 S1 I0 F500 H1 T45 ; Set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned on
M106 P2 S1 I0 F500 H1 T45 ; Set fan 2 value, PWM signal inversion and frequency. Thermostatic control is turned on; Tools
M563 P0 S"Extruder" 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
; Miscellaneous
T0 ; Select first tool -
Can you offer any help on this? You know what I'm trying to do, I just do not understand all of the "lingo" when reading the documentation... It's just not in plain language. My understanding of the firmware is..... OK, but not advanced... If you can help me get the parameters set up, I can tweak it from there... I just am having a hard time figuring out what and where to enter things like the G1S1 move you speak of...
Thanks!!!
-
You've put the commands in the wrong file I'm afraid. You need to modify the homeall.g, homex, homey, homez files.
Config.g contains the commands that are run at power on to get things configured.
You should revert your endstops section to be what it was before, then post your homing files, since thats where you'll need to make modifications for sensorless homing.
-
Here's My homing files.... I chose Stall detection in the reprap configurator, but it doesn't seem to make a difference.. I just don't know what it's looking for...
Thanks for checking this out..
Home all:
; homeall.g
; called to home all axes
;
; generated by RepRapFirmware Configuration Tool v2 on Mon Apr 29 2019 05:59:22 GMT-0400 (Eastern Daylight Time)
G91 ; relative positioning
G1 Z5 F6000 S2 ; lift Z relative to current position
G1 S1 X-205 Y-205 F1800 ; move quickly to X and Y axis endstops and stop there (first pass)
G1 X5 Y5 F6000 ; go back a few mm
G1 S1 X-205 Y-205 F360 ; move slowly to X and Y axis endstops once more (second pass)
G1 S1 Z-185 F1800 ; move Z down stopping at the endstop
G90 ; absolute positioning
G92 Z0 ; set Z to axis minimum (you may want to adjust this); Uncomment the following lines to lift Z after probing
;G91 ; relative positioning
;G1 S2 Z5 F100 ; lift Z relative to current position
;G90 ; absolute positioningHome X:
; homex.g
; called to home the X axis
;
; generated by RepRapFirmware Configuration Tool v2 on Mon Apr 29 2019 05:59:22 GMT-0400 (Eastern Daylight Time)
G91 ; relative positioning
G1 Z5 F6000 S2 ; lift Z relative to current position
G1 S1 X-205 F1800 ; move quickly to X axis endstop and stop there (first pass)
G1 X5 F6000 ; go back a few mm
G1 S1 X-205 F360 ; move slowly to X axis endstop once more (second pass)
G1 Z-5 F6000 S2 ; lower Z again
G90 ; absolute positioningHome Y:
; homey.g
; called to home the Y axis
;
; generated by RepRapFirmware Configuration Tool v2 on Mon Apr 29 2019 05:59:22 GMT-0400 (Eastern Daylight Time)
G91 ; relative positioning
G1 Z5 F6000 S2 ; lift Z relative to current position
G1 S1 Y-205 F1800 ; move quickly to Y axis endstop and stop there (first pass)
G1 Y5 F6000 ; go back a few mm
G1 S1 Y-205 F360 ; move slowly to Y axis endstop once more (second pass)
G1 Z-5 F6000 S2 ; lower Z again
G90 ; absolute positioningHome Z:
; homez.g
; called to home the Z axis
;
; generated by RepRapFirmware Configuration Tool v2 on Mon Apr 29 2019 05:59:22 GMT-0400 (Eastern Daylight Time)
G91 ; relative positioning
G1 Z5 F6000 S2 ; lift Z relative to current position
G1 S1 Z-185 F1800 ; move Z down until the endstop is triggered
G92 Z0 ; set Z position to axis minimum (you may want to adjust this); Uncomment the following lines to lift Z after probing
;G91 ; relative positioning
;G1 S2 Z5 F100 ; lift Z relative to current position
;G90 ; absolute positioning -
Have you seen this?
https://duet3d.dozuki.com/Wiki/Stall_detection_and_sensorless_homing#Section_Configuring_sensorless_homingMake sure you read and understand the limitations for sensorless homing. It is a fairly advanced setup and can be tricky to get working. It's also highly dependent on motor temperature, etc. Be ready to kill the power when testing in case it doesn't trigger.
So in config.g you would change the endstops configuration to be
M574 X1 Y1 S3
you'd have to have a seperate line for the z axis, since you likely don't want to home Z using stall detection as well.Then you'll have to change your homing files to add the motor current reduction before the homing moves, and then return it to normal afterwards. That's where the M913 X40 Y40 would go to reduce it to 40% and then M913 X100 Y100 after to put it back to normal.
You'll also have to increase your homing speed to at least F2400 for it to hopefully trigger properly. So that would be the G1 S1 moves. You'll also want to remove the second slower homing pass since that won't work. Once it stalls and stops, that's it.
G1 S1 X-205 Y-205 F1800 ; move quickly to X and Y axis endstops and stop there (first pass) G1 X5 Y5 F6000 ; go back a few mm G1 S1 X-205 Y-205 F360 ; move slowly to X and Y axis endstops once more (second pass)
On another note, looking at your config.g you should probably change your microstepping from 128 to 16 with interpolation. One of the biggest benefits of the drivers on the Duet Wifi is being able to interpolate x16 to x256. There's no sense in using more than x16 for X and Y, and with interpolation to 256 it will actually be much smoother and quieter than base 128. You'll also be less likely to overload the CPU and get missed steps.
-
I have seen this, and tried some of the settings... You kind of explained it a bit though, so I'll run back and try again.. Now that I know that it has to be in the homing file, and not just config.g, I'm not completely in the dark. I have sensorless homing on 5 of my other Marlin based printers 3 of which are prusas, and they work flawlessly. I'm using Prusa MK3 firmware on them, because it just works out of the box.. I've never had to set it up... Is it a reprap limitation? It seems everyone does it on Marlin with no problems, but RepRap comes with all sorts of warnings..
-
Well it comes with warnings because you're ramming your print head into a hard stop at speed, so it warrants caution for the first setup.
Prusa also has the benefit of choosing the motors to work with the electronics and firmware and test it all ahead of time. When doing it yourself with your random kit your mileage may very.
-
Ok, So here's My New HomeAll.
I read the instructions several times, and I believe this should be correct.
I fixed the wiring orientation on my z endstop, and motor directions are now correct. Z homes perfectly... X just hits the end and rattles, and homing stops with "insufficient homing" error. It just doesn't seem to detect a stall, even at 10% current; homeall.g
; called to home all axes
;
; generated by RepRapFirmware Configuration Tool v2 on Mon Apr 29 2019 05:59:22 GMT-0400 (Eastern Daylight Time)
G91 ; relative positioning
M913 X40 Y40 ; Reduce current to 40%
G1 Z5 F6000 S2 ; lift Z relative to current position
G1 S1 X-0 Y-0 F3000 ; move quickly to X and Y axis endstops and stop there (Detects Stall)
G1 S1 Z-185 F3000 ; move Z down stopping at the endstop
M913 X100 Y100 ; Return Current to 100%
G90 ; absolute positioning
G92 Z0 ; set Z to axis minimum (you may want to adjust this)And here's My Config.G I started from scratch.
; DuetWIFI config
M111 S0 ; Debug off
M550 DuetHaoi3 ; Machine name (can be anything you like)
M551 i3 ; Machine password (currently not used)
M552 S1 ; Enable WiFi
M555 P2 ; Set output to look like Marlin
M575 P1 B57600 S1 ; Set auxiliary serial port baud rate and require checksum (for PanelDue); Movement
G21 ; Work in millimetresM569 P0 S1 ; Drive 0 goes backwards
M569 P1 S1 ; Drive 1 goes backwards
M569 P2 S0 ; Drive 2 goes forwards
M569 P3 S0 ; Drive 3 goes forwardsM906 X855 Y855 Z1080 E855 ; Set motor currents (mA)
M201 X1000 Y800 Z100 E5000 ; Accelerations (mm/s^2)
M203 X12000 Y12000 Z120 E3000 ; Maximum speeds (mm/min)
M566 X600 Y600 Z18 E20 ; Maximum jerk speeds mm/minuteM574 X1 Y1 S3 ; set sensorless homing
M574 Z1 S0 ; set Z end stop
M208 X200 Y200 Z180 ; set axis maxima and high homing switch positions (adjust to suit your machine)
M208 X-8 Y-8 Z-0.5 S1 ; set axis minima and low homing switch positions (adjust to make X=0 and Y=0 the edges of the bed)M350 X16 Y16 Z16 E16 I1 ; set 16x microstepping with interpolation
M92 X80 Y80 Z400 E98 ; set axis steps/mmG90 ; Send absolute coordinates...
M83 ; ...but relative extruder moves; Z-Probe
; M558 P1 X0 Y0 Z1 H3 F200 T5000 ; smart IR Z probe, used for homing Z axis only, dive height 3mm, probe speed 200mm/min, travel speed 5000mm/min
; G31 P500 X-45 Y45 Z0.66 ; set threshold and offsets; Heaters + Thermistors
M305 P0 T100000 B3950 R4700 H0 L0 ; Put your own H and/or L values here to set the bed thermistor ADC correction
M305 P1 T100000 B4388 R4700 H0 L0 ; Put your own H and/or L values here to set the first nozzle thermistor ADC correctionM307 H0 A193 C719.9 D8.7 B0 ; bed heater settings
M307 H1 A219 C128 D13.9 B0 ; extruder heater settingsM570 S120 ; Increase to allow extra heating time if needed
M106 P2 T55 H1 ; Run Coldend-Fan at 55°C
; T0
M563 P0 D0 H1 ; tool 0 uses extruder drive 0 and heater 1
G10 P0 S0 R0 X0 Y0 ; set tool 0 temperatures and offsets; the end
M556 S100 X0 Y0 Z0 ; Put your axis compensation here
T0 ; Select the first head -
OH!!!! I think I got it!!! Lightbulb just went off over my head! lolo
The F Speed is like the sensitivity, yes?
I know it's speed, but that is relative to the stall detection... So while X seems to trigger at 2600, Y likes a slightly lower speed than 2400, or it simply stalls the minute it tries to move. That may mean I need to do a brearing as well...
I think I'm close, the Y axis seems to not home all of the way every time... I need to dial that in!
Thanks soooo much for your help dude!
-
You may need to reduce the acceleration of the Y axis temporarily for the homing moves to reduce the chance of false detecting a stall.
-
I don't see any M915 commands in any of the files you have posted. Have you tuned the M915 stall detection threshold? https://duet3d.dozuki.com/Wiki/Stall_detection_and_sensorless_homing#Section_Configuring_sensorless_homing