Heater 3 Output when in Laser mode
-
Hi all,
Its been about 6 years since I last touched the laser function of Duet.
I have an expansion board from the early tutorial and Duet 2 Wifi made circa 2018.
I am having trouble since coming back with issues of the laser being on and firing at a high enough level where it is not safe on boot (enough to burn wood).
(Similar symptoms to this post https://forum.duet3d.com/topic/19565/laser-not-turning-off)I have upgraded 2 different boards to 3.4 and 3.5 and still seem to have the issue. I have also used two separate PWM expansion boards (74HCT02D).
As the firmware has progressed there is A LOT of jumbled mess and versioning (improvements?) to sift through for configs. I am not a fan. Before it was straight forward. I'm sure most changes have happened for logical/safety reasons but definitely not making the journey easy.
So the question: In laser mode: M452 C"exp.8" R255 S0 F200; (Also tried with exp.heater3 pin defined)
(Feeding the 12v from fan: always on, with jumper to 12v fans)
Should the PWM voltage from pin 8, always be ~5v (reading in the high 4s normally)This occurs with laser enabled, or disabled (code commented out), S255 or S0, and on both boards.
Any insights as to what I am not doing correctly here?
-
@WingedDonkey said in Heater 3 Output when in Laser mode:
I have an expansion board from the early tutorial and Duet 2 Wifi made circa 2018.
Which expansion board do you have, and how have you connected the laser control input to the expansion board or the Duet?
See the Duet 2 tab at https://docs.duet3d.com/en/User_manual/Machine_configuration/Configuration_laser#connecting-laser for the recommended connection.
-
@dc42 @dc42 when I say expansion board I mean the 74HCT02D breakout board that mounts in the expansion slot. Not an actual Duet expansion product.
This is the board I am using https://forum.duet3d.com/topic/8705/laser-pwm-module-with-circuit-protection/4?_=1709574473662
A lot has changed, and utilizing the “Configuring RepRapFirmware for a laser engraver/cutter” isn’t helpful in the process beyond updating the config to current firmware.
The lack of M3/M5 commands has also been troublesome while troubleshooting, but I don’t think that is my issue. (I saw the recommend work around with U axis and potential future add for focusing)
What can be done to confirm that PWM is outputting effectively on the Heater 3 pin? (From what I understand simply measuring voltage isn’t enough)
-
@WingedDonkey said in Heater 3 Output when in Laser mode:
What can be done to confirm that PWM is outputting effectively
I have a 15€ logic analyzer ( 8 channel, 24MHz), which is helpful debugging all sorts of data-protocols. It works from 3.3 to 5V level and connects over USB.
It can read PWM signals and display duty cycle and base frequency.//edit There's nothing wrong with using a firmware version you are comfortable with.
IIRC, I used RRF2.04 for my last laser/penplotter experiments and it worked well. 2.05 was buggy IIRC -
@o_lampe Thanks, I'll look into it!
And the firmware rollback was definitely something I was considering doing, but didn't want to jump to initially. But I think its and excellent option to try. (Typical troubleshooting is to go "did you use the latest stable release?" so a bit of reverse logic to go that far back, but it is what I know and have had work in the past)
-
Took some time over the weekend to troubleshoot.
I dropped back to 2.04, this has helped a ton in keeping things simple and aiding troubleshooting.
(Sidebar, did the complexities in pin naming come about with the Duet 3 out of necessity?)I snagged a cheap oscilloscope to run some troubleshooting. After some baseline familiarization and effort with the oscilloscope on a PWM fan pin I finally figured out what I needed for PWM measurement.
I turned the Heater 3 pin into an I/O pin and dabbled with the settings. I'm not sure if it was human error but I had some toruble getting a good PWM waveform using S1-255, but after shifting to S0.0-1.0 I started yielding exact outputs as were set. So the TLDR is Heater3 is working properly for PWM.
So my next venture is to determine if Heater 3 PWM outputs properly in laser mode. (I assume it will)
Next step is to test the other side of the 74HCT02D with I/O pin setup.
-
@WingedDonkey said in Heater 3 Output when in Laser mode:
I had some toruble getting a good PWM waveform using S1-255, but after shifting to S0.0-1.0 I started yielding exact outputs
That's an interesting result. I'm intrigued to test it myself, since many inkscape (laser-) plugins generate 0-255 gcode.
Maybe there's a bug in the recalculation/variable conversion? -
@WingedDonkey Using pin names in RRF 3 allows for far more flexibility and customisation than in RRF 1 or 2. You’re not limited to specific pin assignments, or obscure Gcode commands to reconfigure them. Functionality of each pin is the same, as it is hardware-dependent. Also outputs aren’t unexpectedly ‘on’, as they are in RRF 1 and 2, due to the default configuration.
M3 control of lasers was removed in RRF 2.05, mainly for safety reasons. Hybrid machines with spindles and lasers were too easy to have in the wrong mode, with unexpected results. Also, using M3 to change laser intensity is slow, so engraving can’t run very fast. Using G1 S… is faster, and raster clustering (where there are multiple S parameters for each G1, introduced in RRF 3.5 beta3) is faster still.
Note that PWM ranges are 0 to 1, and >1 (eg 1.001) to 255. 0 is off for both. 1 is full power. This is noted in the Gcode dictionary.
I don’t know why you are getting a blip at power on. I don’t think the heater output goes high at startup. Possibly it is your circuit that goes high before coming under the control of the heater3 pin. Alternatively, you could bring the laser PSU under the control of the Duet, and only turn it on after config.g is run. Control it with a spare pin and an SSD.
Ian
-
@droftarts said in Heater 3 Output when in Laser mode:
I don’t know why you are getting a blip at power on. I don’t think the heater output goes high at startup. Possibly it is your circuit that goes high before coming under the control of the heater3 pin. Alternatively, you could bring the laser PSU under the control of the Duet, and only turn it on after config.g is run. Control it with a spare pin and an SSD.
Updates: Its been a minute since I figured this out and I am just now returning to troubleshoot more.
I am able to effectively control the laser via M42 commands on P3.
When it powers up, the laser is defaulted in an on state. I can send M43 P3 S0 F250 and bring it to a safe/off state.
Laser power/12V Power is being pulled from the fan jumper header (duet 2 wifi).
When I run a "print", I get a somewhat effective print now, however, the laser is not fully going to an off state between G1/G0 commands. See picture for example. The deep burn is time between power on and getting the M42 command sent.
I feel I can overcome some of the issues with effective config gcode and some tweaking of my run gcode. But I'd like to figure out the why/how to keep the laser from coming on during travels.
Note: still using Firmware version 2.04
-
@WingedDonkey when you power up, expansion header pin 8 should be at 3.3V. It should go to 0V when you command the laser to turn on. If you are using the recommended connection then the output of the 74HCT02 should be 0V at power up and 5V when you command the laser on at full PWM.
HTH David