@dc42 Thank you, and everyone. I'll put that on the To-Do after this print (took the lazy route and stuck it on an external SD via PanelDue for now).
Will mark as solved.
@dc42 Thank you, and everyone. I'll put that on the To-Do after this print (took the lazy route and stuck it on an external SD via PanelDue for now).
Will mark as solved.
@T3P3Tony Thanks for the quick reply. I was hoping to avoid doing a full diagnostic on my computer as the card's somewhat difficult to get to at the moment. Will revert in due course.
Good morning!
So this 32GB card has been sat in my machine working fine for a handful of years but now I've been trying to upload a "large" file (72MB) and it keeps failing and saying the card may be full.
That didn't sound right so ran M122 and M39.
M122 reported:
=== Storage ===
Free file entries: 10
SD card 0 detected, interface speed: 20.0MBytes/sec
SD card longest read time 3.0ms, write time 134.8ms, max retries 0
M39 reported:
SD card in slot 0: capacity 31.91Gb, free space 0.02Gb, speed 20.00MBytes/sec, cluster size 512 bytes
Obviously this is rather concerning, I've gone through all the files on the system and I'm probably using 2GB max all in all...
What could be up? I've reread the setup documentation and there's no mention of needing to expand the partition to fill the entire card as there is usually with RPi BOOT cards.
Any help would be appreciated, thanks!
@Phaedrux will do! But… I can say it does remain because my E-stop isn’t hooked up to the duet but to the mains. In an emergency I want everything to stop. Full power cycle is on my list of standard troubleshooting approaches.
I haven’t had any issues since my last post and the only thing that’s changed is that I’ve commented out the line declaring DWC needs a password.
@gloomyandy
Please excuse some of the comments in the config.g... I tweaked and tested a lot and reused code from another machine of mine so ought to go through and clean up the comments a bit...
Also, since posting and getting a backup copy of the SD (just in case) the machine's been running seemingly fine and is an hour or so into a laser job. In all honesty the unpredictable nature of the issue is more concerning as those usually have a more hidden solution.
@gloomyandy Apologies, yes, M552. Been slightly on autopilot.
config.g:
; Configuration file for RepRapFirmware on Duet 2 WiFi
; executed by the firmware on start-up
;
; generated by RepRapFirmware Configuration Tool v3.5.4 on Sun Jul 28 2024 09:13:45 GMT+0100 (British Summer Time)
; General
G90 ; absolute coordinates
M83 ; relative extruder moves
M550 P"Artemis" ; set hostname
; Network
M551 P"REDACTED" ; set machine password
M552 S1 ; configure WiFi adapter
M586 P0 S1 ; configure HTTP
; Smart Drivers
M569 P0 S1 D2 ; driver 0 goes forwards (X axis)
M569 P1 S1 D2 ; driver 1 goes forwards (Y axis)
M569 P2 S0 D2 ; driver 2 goes backwards (Z axis)
M569 P3 S1 D2 ; driver 3 goes forwards (Y axis)
; Motor Idle Current Reduction
M906 I30 ; set motor current idle factor
M84 S30 ; set motor current idle timeout
; Axes
;M584 X0 Y1:3 Z2 ; set axis mapping
M584 X0 Y1:3 Z2 U3 P3 ; set drive mapping (2x Y attached Left to E1, Right to Y). Define extra axis 'U' on Y, connected to E0 driver
M350 X4 Y4 Z4 U4 I0 ; configure microstepping without interpolation (U = Y clone)
M906 X1800 Y1800 Z1800 U1800 ; set axis driver currents (U = Y clone)
M92 X160 Y160 Z100 U160 ; configure steps per mm (U = Y clone)
M208 X0:825 Y0:1245 Z0:160 U0:1245; set minimum and maximum axis limits (U = Y clone)
M566 X900 Y900:900 Z180 U900 ; set maximum instantaneous speed changes (mm/min) (U = Y clone)
M203 X3000 Y3000 Z300 U3000 ; set maximum speeds (mm/min) (U = Y clone)
M201 X50 Y50 Z20 U50; set accelerations (mm/s^2) (U = Y clone)
; Kinematics
M669 K0 ; configure Cartesian kinematics
; Endstops
M574 X1 P"xstop" S1 ; configure X axis endstop
;M574 Y2 P"ystop+e0stop" S1 ; configure Y axis endstop
M574 Y2 P"ystop" S1 ; Y left endstop
M574 U2 P"e0stop" S1 ; Y right endstop (U = Y clone)
M574 Z1 P"!zstop" S1 ; configure Z axis endstop
; Spindles
M453 ; CNC mode
M950 R0 C"exp.heater3" Q1000 L12000 ; configure spindle pins, heater3 via 5V PWM booster
; C = PWM pin, Q = frequenc(Hz), L = max speed
M563 P0 S"Spindle" R0 ; assign spindle 0 to tool 0
M3 P0 S0 ; ensure zero power upon wake-up
; Lasers
M452 ; Laser mode
M950 P2 C"bedheat" ; Set the heated bed output as a power switch for the laser
M42 P2 S0
;M950 P1 C"exp.heater4" Q1000 ; Dummy GPIO control of laser for testing
M98 P"/sys/laserPin.g"
; Miscellaneous
M453 ; select CNC mode
; Logging
M929 P"SysLog", S1
Morning!
Or, afternoon now, losing track of time with this issue!
So, during calibration and tweaking a few days back I had to hit my emergency stop button and then was having serious issues trying to connect.
I somehow got it stable again (serial in, M552 S0 M552 S1 M997 S1 etc) and enabled logging.
I had reason to kit my emergency stop again today and have the same issues. I've spent a couple of hours trying to connect so now turning to the forums.
When booting up DWC looks like its loading then will stall on the "connecting" bar that hovers over the GUI. The green "connection established" bar in the background shows up, times out and vanishes but the blue "connecting" bar will just sit there. This loops over and over.
I also see the orange "HTTP Timeout" warning and, more interestingly, a red "HTTP: Failed to get file list" error. I remember last time getting "ISP busy" errors but haven't had any so far this time round.
Occasionally I get a clean startup, usually after connecting via serial with main power off and Initiating M115 S0 and M115 S1.
M122 reports back good connection, hovering around -32 to -34.
=== WiFi ===
Interface state: active
Module is connected to access point
Failed messages: pending 0, notrdy 0, noresp 0
Firmware version 2.1.0
MAC address 8c:aa:b5:d5:1b:1c
Module reset reason: Turned on by main processor, Vcc 3.39, flash size 4194304, free heap 46340
WiFi IP address 192.168.0.162
Signal strength -40dBm, channel 6, mode 802.11n, reconnections 0
Clock register 00002002
Socket states: 0 0 0 0 0 0 0 0
I'm running RRF 1.5.2, DWC is the latest (can't remember number from when I COULD see DWC) and pretty sure wifi server is latest too as came in the RRF 1.5.2 package.
Here's the relevant from my SysLog:
power up + 00:00:00 [info] Event logging started at level warn
power up + 00:00:01 [info] Running: Duet WiFi 1.02 or later: 3.5.2 (2024-06-11 17:13:43)
power up + 00:00:01 [warn] WiFi module started
power up + 00:00:12 [warn] WiFi module is connected to access point Home Sweet Home, IP address 192.168.0.162
power up + 00:00:00 [info] Event logging started at level warn
power up + 00:00:01 [info] Running: Duet WiFi 1.02 or later: 3.5.2 (2024-06-11 17:13:43)
power up + 00:00:01 [warn] WiFi module started
power up + 00:00:13 [warn] Error: WiFi module reported: Authentication failed
power up + 00:00:13 [warn] WiFi module is idle
power up + 00:00:18 [warn] Error: WiFi module reported: Authentication failed
power up + 00:00:18 [warn] WiFi module is idle
power up + 00:00:23 [warn] Error: WiFi module reported: Authentication failed
power up + 00:00:23 [warn] WiFi module is idle
power up + 00:00:29 [warn] Error: WiFi module reported: Authentication failed
power up + 00:00:29 [warn] WiFi module is idle
power up + 00:00:37 [warn] WiFi module is connected to access point Home Sweet Home, IP address 192.168.0.162
power up + 00:00:01 [info] Event logging started at level warn
power up + 00:00:01 [info] Running: Duet WiFi 1.02 or later: 3.5.2 (2024-06-11 17:13:43)
power up + 00:00:01 [warn] WiFi module started
power up + 00:00:16 [warn] WiFi module is connected to access point Home Sweet Home, IP address 192.168.0.162
power up + 00:00:00 [info] Event logging started at level warn
power up + 00:00:00 [info] Running: Duet WiFi 1.02 or later: 3.5.2 (2024-06-11 17:13:43)
power up + 00:00:01 [warn] WiFi module started
power up + 00:00:08 [warn] WiFi module is connected to access point Home Sweet Home, IP address 192.168.0.162
power up + 00:00:00 [info] Event logging started at level warn
power up + 00:00:00 [info] Running: Duet WiFi 1.02 or later: 3.5.2 (2024-06-11 17:13:43)
power up + 00:00:01 [warn] WiFi module started
power up + 00:00:08 [warn] WiFi module is connected to access point Home Sweet Home, IP address 192.168.0.162
power up + 00:00:42 [warn] HTTP client 192.168.0.115 attempted login with incorrect password
power up + 00:00:51 [warn] WiFi module is idle
power up + 00:01:04 [warn] WiFi module is connected to access point Home Sweet Home, IP address 192.168.0.162
power up + 00:01:16 [warn] HTTP client 192.168.0.115 login succeeded (session key 467032916)
2024-08-03 11:23:47 [warn] Date and time set at power up + 00:01:16
2024-08-03 11:24:27 [warn] HTTP client 192.168.0.115 login succeeded (session key 369489427)
2024-08-03 11:24:33 [warn] HTTP client 192.168.0.115 login succeeded (session key 1633576112)
2024-08-03 11:25:53 [warn] HTTP client 192.168.0.115 login succeeded (session key 2082771136)
2024-08-03 11:25:58 [warn] HTTP client 192.168.0.115 login succeeded (session key 1151036652)
2024-08-03 11:26:09 [warn] HTTP client 192.168.0.115 login succeeded (session key 940317988)
2024-08-03 11:26:22 [warn] HTTP client 192.168.0.115 login succeeded (session key 592266043)
2024-08-03 11:26:53 [warn] HTTP client 192.168.0.115 login succeeded (session key 628680856)
2024-08-03 11:27:12 [warn] HTTP client 192.168.0.115 login succeeded (session key 619603552)
2024-08-03 11:27:36 [warn] HTTP client 192.168.0.115 login succeeded (session key 528694161)
2024-08-03 11:27:48 [warn] HTTP client 192.168.0.115 login succeeded (session key 1622916288)
2024-08-03 11:27:51 [warn] HTTP client 192.168.0.115 login succeeded (session key 1164251869)
power up + 00:00:00 [info] Event logging started at level warn
power up + 00:00:00 [info] Running: Duet WiFi 1.02 or later: 3.5.2 (2024-06-11 17:13:43)
power up + 00:00:01 [warn] WiFi module started
power up + 00:00:08 [warn] WiFi module is connected to access point Home Sweet Home, IP address 192.168.0.162
power up + 00:01:42 [warn] WiFi module started
power up + 00:01:48 [warn] WiFi module is connected to access point Home Sweet Home, IP address 192.168.0.162
power up + 00:02:06 [warn] HTTP client 192.168.0.115 attempted login with incorrect password
power up + 00:02:15 [warn] HTTP client 192.168.0.115 login succeeded (session key 536479440)
2024-08-03 11:31:39 [warn] Date and time set at power up + 00:02:15
2024-08-03 11:38:21 [warn] HTTP client 192.168.0.115 login succeeded (session key 1473597974)
2024-08-03 11:42:02 [warn] Error: G1: target position outside machine limits
2024-08-03 11:42:07 [warn] HTTP client 192.168.0.115 login succeeded (session key 1979731814)
2024-08-03 11:43:04 [warn] HTTP client 192.168.0.115 login succeeded (session key 240971280)
2024-08-03 11:43:13 [warn] HTTP client 192.168.0.115 login succeeded (session key 1997628365)
2024-08-03 11:43:31 [warn] HTTP client 192.168.0.115 login succeeded (session key 380593357)
2024-08-03 11:43:51 [warn] HTTP client 192.168.0.115 login succeeded (session key 1426250333)
2024-08-03 11:45:31 [warn] HTTP client 192.168.0.115 login succeeded (session key 776878917)
2024-08-03 11:45:44 [warn] HTTP client 192.168.0.115 login succeeded (session key 303384259)
2024-08-03 11:45:54 [warn] HTTP client 192.168.0.115 login succeeded (session key 853063035)
power up + 00:00:01 [info] Event logging started at level warn
power up + 00:00:01 [info] Running: Duet WiFi 1.02 or later: 3.5.2 (2024-06-11 17:13:43)
power up + 00:00:01 [warn] WiFi module started
power up + 00:00:08 [warn] WiFi module is connected to access point Home Sweet Home, IP address 192.168.0.162
power up + 00:00:09 [warn] HTTP client 192.168.0.115 login succeeded (session key 1663640895)
2024-08-03 11:46:34 [warn] Date and time set at power up + 00:00:09
2024-08-03 11:50:28 [warn] HTTP client 192.168.0.115 login succeeded (session key 575438325)
2024-08-03 11:50:34 [warn] HTTP client 192.168.0.115 login succeeded (session key 1273065834)
2024-08-03 11:50:40 [warn] HTTP client 192.168.0.115 login succeeded (session key 1037896977)
2024-08-03 11:50:54 [warn] HTTP client 192.168.0.115 login succeeded (session key 2072311505)
2024-08-03 11:50:59 [warn] HTTP client 192.168.0.115 login succeeded (session key 1449677489)
2024-08-03 11:51:06 [warn] HTTP client 192.168.0.115 login succeeded (session key 1527582408)
2024-08-03 11:51:31 [warn] HTTP client 192.168.0.115 login succeeded (session key 910531371)
2024-08-03 11:51:34 [warn] HTTP client 192.168.0.115 login succeeded (session key 332283875)
2024-08-03 11:51:50 [warn] HTTP client 192.168.0.115 login succeeded (session key 1237604925)
2024-08-03 11:52:10 [warn] HTTP client 192.168.0.115 login succeeded (session key 2046853280)
2024-08-03 11:52:20 [warn] HTTP client 192.168.0.115 login succeeded (session key 922535667)
2024-08-03 11:52:26 [warn] HTTP client 192.168.0.115 login succeeded (session key 225023929)
2024-08-03 11:52:34 [warn] HTTP client 192.168.0.115 login succeeded (session key 258472336)
2024-08-03 11:52:39 [warn] HTTP client 192.168.0.115 login succeeded (session key 1932616918)
2024-08-03 11:52:45 [warn] HTTP client 192.168.0.115 login succeeded (session key 802379951)
2024-08-03 11:52:51 [warn] HTTP client 192.168.0.115 login succeeded (session key 1550016944)
2024-08-03 11:52:57 [warn] HTTP client 192.168.0.115 login succeeded (session key 10656051)
2024-08-03 11:53:08 [warn] HTTP client 192.168.0.115 login succeeded (session key 855106456)
2024-08-03 11:53:13 [warn] HTTP client 192.168.0.115 login succeeded (session key 813640268)
2024-08-03 11:53:24 [warn] HTTP client 192.168.0.115 login succeeded (session key 1823603827)
2024-08-03 11:53:29 [warn] HTTP client 192.168.0.115 login succeeded (session key 422910405)
2024-08-03 11:53:35 [warn] HTTP client 192.168.0.115 login succeeded (session key 1831788912)
2024-08-03 11:53:50 [warn] HTTP client 192.168.0.115 login succeeded (session key 550680592)
2024-08-03 11:54:04 [warn] HTTP client 192.168.0.115 login succeeded (session key 1781674821)
2024-08-03 11:54:16 [warn] HTTP client 192.168.0.115 login succeeded (session key 96742779)
2024-08-03 11:54:20 [warn] HTTP client 192.168.0.115 login succeeded (session key 310765874)
2024-08-03 11:54:30 [warn] HTTP client 192.168.0.115 login succeeded (session key 361814814)
2024-08-03 11:54:44 [warn] HTTP client 192.168.0.115 login succeeded (session key 1495374241)
2024-08-03 11:54:48 [warn] HTTP client 192.168.0.115 login succeeded (session key 753747646)
2024-08-03 11:54:54 [warn] HTTP client 192.168.0.115 login succeeded (session key 230652669)
2024-08-03 11:55:07 [warn] HTTP client 192.168.0.115 login succeeded (session key 371425048)
2024-08-03 11:55:11 [warn] HTTP client 192.168.0.115 login succeeded (session key 1953303554)
2024-08-03 11:55:39 [warn] HTTP client 192.168.0.115 login succeeded (session key 590320389)
2024-08-03 11:55:56 [warn] HTTP client 192.168.0.115 login succeeded (session key 140328783)
2024-08-03 11:56:43 [warn] HTTP client 192.168.0.115 login succeeded (session key 568811475)
2024-08-03 11:56:50 [warn] HTTP client 192.168.0.115 login succeeded (session key 1564747528)
2024-08-03 11:57:00 [warn] HTTP client 192.168.0.115 login succeeded (session key 626961934)
2024-08-03 11:57:11 [warn] HTTP client 192.168.0.115 login succeeded (session key 1794452556)
2024-08-03 11:57:20 [warn] HTTP client 192.168.0.115 login succeeded (session key 103770224)
power up + 00:00:01 [info] Event logging started at level warn
power up + 00:00:01 [info] Running: Duet WiFi 1.02 or later: 3.5.2 (2024-06-11 17:13:43)
power up + 00:00:01 [warn] WiFi module started
power up + 00:00:13 [warn] Error: WiFi module reported: Authentication failed
power up + 00:00:13 [warn] WiFi module is idle
power up + 00:00:42 [warn] WiFi module is connected to access point Home Sweet Home, IP address 192.168.0.162
Look at how many "login succeeded" messages there are for my computer's local IP. Something's up and I don't know what or what more to try, at this point I can't really use my machine.
If anyone has any advice or pointers I'd be very grateful, thanks!
@o_lampe it wasn’t, as it happens. I redid the firmware from scratch using the RRF configuration tool which gave a slightly different setup to the one I was working on when I asked the spindle question.
Ironically having fixed the issues I’m back to essentially my original spindle config.
What I’ve ended up doing to solve that original issue is break out heater3 (and 4 for the laser) and use those to PWM drive an external MOS chip that level shifts the PWM to a breakout from the fan 5V… which is then the right level and “side” of the spindle controller to control it properly!
It seemed to work when I tried it at 9:00 last night but that’s my cutoff time for trusting my brain not to do something stupid so I’ll be doing more tests and checks this afternoon.
@dc42 Sorry, got there myself with some playing around when it got more verbose and pointed me towards config.g and now sorting my config properly. That's irrelevant to this topic so I'll mark it as solved ◡̈
@dc42 Good afternoon and thanks!
I deleted out the current IAP and uploaded the one linked (thanks). M997 took longer to execute this time and upon running M115 I am happy to report she's now on RRF 3.5.2!
EDIT: I am however getting the following error:
Error in macro line 47 while starting up: exactly one of EFHJPSR must be given
I can't seem to find reference to this anywhere.
@dc42 thanks for the suggestion! I just tried that with a fresh download of Duet2CombinedFirmware.bin version 3.5.2 and uploaded to 0:/firmware.
It uploads and asks if I want to install the file, which I agree to. After reconnecting I queried with M115 and got this back:
M115
FIRMWARE_NAME: RepRapFirmware for Duet 2 WiFi/Ethernet FIRMWARE_VERSION: 3.3 ELECTRONICS: Duet WiFi 1.02 or later FIRMWARE_DATE: 2021-06-15 21:45:03
I then tried M997 and M997 S0 both times returning the same thing. I've deleted out the Duet2and3firmware directory and retried.
Interestingly it hasn't complained about the file not being valid, but hasn't actually updated by the look of things.
LogFile:
28/07/2024, 20:43:34 M115
FIRMWARE_NAME: RepRapFirmware for Duet 2 WiFi/Ethernet FIRMWARE_VERSION: 3.3 ELECTRONICS: Duet WiFi 1.02 or later FIRMWARE_DATE: 2021-06-15 21:45:03
28/07/2024, 20:43:10 Upload of Duet2CombinedFirmware.bin successful after 2s
28/07/2024, 20:42:54 Successfully deleted Duet2and3Firmware
28/07/2024, 20:42:49 Successfully deleted 17 items
28/07/2024, 20:42:25 Successfully deleted Duet2CombinedFirmware.bin
28/07/2024, 20:41:51 M115
FIRMWARE_NAME: RepRapFirmware for Duet 2 WiFi/Ethernet FIRMWARE_VERSION: 3.3 ELECTRONICS: Duet WiFi 1.02 or later FIRMWARE_DATE: 2021-06-15 21:45:03
28/07/2024, 20:41:38 M997 S0M115
28/07/2024, 20:41:22 M997 S0
28/07/2024, 20:41:05 M115
FIRMWARE_NAME: RepRapFirmware for Duet 2 WiFi/Ethernet FIRMWARE_VERSION: 3.3 ELECTRONICS: Duet WiFi 1.02 or later FIRMWARE_DATE: 2021-06-15 21:45:03
28/07/2024, 20:40:43 Upload of Duet2CombinedFirmware.bin successful after 1s
28/07/2024, 20:39:03 M115
FIRMWARE_NAME: RepRapFirmware for Duet 2 WiFi/Ethernet FIRMWARE_VERSION: 3.3 ELECTRONICS: Duet WiFi 1.02 or later FIRMWARE_DATE: 2021-06-15 21:45:03
28/07/2024, 20:38:55 Connection established
28/07/2024, 20:38:44 M997
28/07/2024, 20:38:25 M115
FIRMWARE_NAME: RepRapFirmware for Duet 2 WiFi/Ethernet FIRMWARE_VERSION: 3.3 ELECTRONICS: Duet WiFi 1.02 or later FIRMWARE_DATE: 2021-06-15 21:45:03
28/07/2024, 20:37:50 Upload of Duet2CombinedFirmware.bin successful after 2s
28/07/2024, 20:37:06 Successfully deleted Duet2CombinedFirmware.bin
Morning!
I've been struggling to update my Duet 2 WiFi from RRF 3.3 to 3.5.
I did a fresh SD using the RRF Config website but despite having selected 3.5 it defaulted to 3.1.1.
So I managed to manually get it up to 3.3 with the aim of getting to 3.5 in the next step.
M115
FIRMWARE_NAME: RepRapFirmware for Duet 2 WiFi/Ethernet FIRMWARE_VERSION: 3.3 ELECTRONICS: Duet WiFi 1.02 or later FIRMWARE_DATE: 2021-06-15 21:45:03
DWC V3.5.1
No firmware files in 0:/sys
0:/firmware contains the following:
When I run M997 S0 I get this error:
M997: Firmware binary "0:/firmware/Duet2CombinedFirmware.bin" is not valid for this electronics
Any ideas on what I can do to fix this? Thanks for all the help!
@gloomyandy morning, thanks for checking that with me. I read all the docs to do with laser control thoroughly when I was using this board for my laser cutter. At the time I’d ordered the expansion board to do it properly but the delivery guy marked it as “left in outhouse” (we don’t have an outhouse) and I never saw it again. In the end I connected it to fan0 as a 5V capable PWM and I’ve had almost perfect control over the laser prior to this setup.
The one issue I got was it powering up for a second at initialisation, I had figured that to solve that I could set bedheater as a GPIO and essentially use it as my power control for the laser. This in testing has worked fine but one of my tests today will be to decouple that and run the laser directly from the PSU like it was previously just to sanity check that setup that I know ought to work.
For the spindle I could try feeding it a 5Vref from the fan0 connector to the speed controller, good shout. Laser I don’t have that option unfortunately.
@o_lampe early Sunday mornings indeed! No, I’ve tried variations with and without the T0 line, run M3 P0 S12000 and tried setting them up as GPIO and addressing them with M42. I eventually ended up taking all the tool connections off, sticking a small 5V fan on and sanity checking the pins actually work (they do), so challenge for today is to troubleshoot what I’m doing wrong
Even better solution: I hooked up the power wires for my laser to the bed heater output and made that a GPIO that I then turn on and off via gCode.
Hi there,
Moved my machine from an old RAMPS1.4 running Marlin to a Duet2 Wifi.
On the RAMPS1.4 I just ran a PWM out from one of my GPIO pins to the speed controller (with common ground to board) and that worked absolutely fine.
The plan here is to have two ports on the Z carriage allowing me to quickly swap between my spindle and laser. I'll have a macro that tells the system it's using the spindle (M453) and another to change that to laser instead (M452). In spindle mode it just controls "!fan1" to PWM control the speed controller. For laser I'm cheating and hooking the PWM signal pin up to "!fan0" but also the power input to the heated bed output, so will be disabled on startup and avoid the power blip issue associated with controlling a laser this way.
I'm now currently trying to set up my config file to get M3 to work properly literally just for the spindle and having issues with it. I'm not seeing any example files around but have followed what I can find on the wiki. Still, I get no signal out on my spindle PWM pin (fan1).
I've removed all the laser stuff for now while I focus on getting my spindle to literally just turn on.
; CNC and Laser
M453 ; CNC mode
M950 R0 C"!fan1" Q31372 L12000 ; configure spindle pins, fan1 is 5V PWM
; C = PWM pin, Q = frequenc(Hz), L = max speed
M563 P0 S"Spindle" R0 ; assign spindle 0 to tool 0
T0 P0
I then tried selecting tool 0 and setting it to 12000RPM:
T0
M3 S12000
But no voltage change on "fan1" pin.
I had this exact board up and running my laser via fan0 previously and that was working fine, the code is minimally different, so I'm a bit lost as to what I'm doing (or not doing) wrong. Any advice really appreciated, thanks!
@dc42 right you are.
Well, the safe solution would be to put in a manual switch that requires activation before a job. Or… if you’re me… live with it. Good reminder to get your visor on before power up anyway.
@dc42 A valid concern. Two potential solutions/mitigations:
Upgrading to Duet 3 falls outside of the design intent (to use almost exclusively parts lying around my flat).
I set out to build a laser cutter out of scraps I had lying around. I ended up using a spare Duet 2 Wifi board thanks to RAMPS 1.4 being a nuisance to program (known ATmega 2560 com issues)...
Anyway, where this landed me was on the standard setup guide for lasers on Duet 2. I found the guidance around laser control a bit sparse so have documented what I did.
I met the "assumptions" as outlined on the page and this alternative setup guide assumes you do too. These are:
The guide then tells you to either use one of the breakout/expansion boards or some other hardware to match the 3V3 logic level of the Duet 2 with the 5V PWM requirement of the laser.
I had intended to test using a logic level shifter but in the meantime followed these steps and got it working:
M452 C"!fan0" F500 R255 S0 ; configure Laser port
C (pin select) - This uses the Fan0 PWM pin but inverted as it is designed to PWM from the negative line of an attached fan (hence why the other Fan0 pin reads 5V as it is Vout). As ground is all tied together this isn't floating under load
So far this has been operating very nicely and I haven't had to buy any extra hardware. If anyone has good reason not to do this I will update the post to reflect the discussion below.
@dc42 All correct insights. In my case I'm running a Voron 2.4 build so no bed plate weight, just a lighter gantry, and the gearing down of the Z motors means I'm a bit less worried about the full micro step issue as it is by ratio a smaller final Z distance The "four full steps" however is worth further consideration.
I think my PSU holds enough residual current to give it a decent boost as it's about twice as powerful as I need, hence why it manages to raise Z noticeably (looking at the cubes I test I reckon about 2.6mm). I completely agree that the power likely cuts out a bit too early to complete the full raise so I have been following another thread and ordered up some 10,000 uF capacitors to stick across the power input to try and store a bit more juice.
The root issue of not homing is still valid though. There are many people who don't have the space or ability to mount an upper Z EndStop but more importantly the documentation mentions continuing without homing as a theoretical (but not recommended) possibility. So having a way to cover that base for those who need it seems wise.
Your suggested code has worked perfectly for that so thank you!