Duet2 wifi and PWM laser
-
Hi all,
I'm building a cnc laser with Duet2 Wifi.
All other thigs are already working but laser fights back.Laser Pwm is connected to fan2 output, and jumper is set to 5V setting, and in config.g fans section is:
M106 P2 H-1 F200.
It seems that laser is always on with full power.
While measuring fan2 output voltage with multimeter, it is between 0-5V.
Firmware is latest.Any tips how to proceed?
-
This doesn't sound like the normal way of hooking up a laser. Have you seen https://duet3d.dozuki.com/Wiki/Gcode#Section_M452_Select_Laser_Printer_Mode and https://duet3d.dozuki.com/Wiki/Laser_PWM_control ?
Which exact firmware version are you using? The most recent (2.04RC3 released yesterday) has some changes specifically for laser:
Upgrade notes:
If using this release to control a laser cutter/engraver, see the notes below on changed handling of the G1 S parameter
...
In Laser mode, if sticky laser power mode is selected, the power set by the S parameter in a G1 command is remembered across G0 moves to the next G1 moveSend
M115
to check the firmware version.Ian
-
Thanks for reply Ian!
Version what I'm running at moment is
FIRMWARE_NAME: RepRapFirmware for Duet 2 WiFi/Ethernet FIRMWARE_VERSION: 3.0beta10 ELECTRONICS: Duet WiFi 1.02 or later FIRMWARE_DATE: 2019-09-12b1I'll update to latest rc and check the Laser mode.
Report will come later. -
as you are running RRF3 you need to check your pin polarity id correst for that fan vs what you want. pins can be set to inverted using a "!" in front of them.
-
Problem solved!
NOR gate did the trick. Although I was too lazy to visit electric shop, I used arduino to flip the signal.int buttonPin1 = 2;
int Laseron = 8;
int buttonStatus1 = 0;
void setup() {
pinMode(Laseron, OUTPUT);
pinMode(buttonPin1, INPUT);
}
void loop(){
buttonStatus1 = digitalRead(buttonPin1);
if (buttonStatus1 == HIGH )
{ digitalWrite(Laseron, LOW);
} else { digitalWrite(Laseron, HIGH); }
} -
That's an inverter, not a NOR gate! A NOR gate would have two inputs (Not OR).