Laser always on
-
Hello everyone, please help me with my problem. There is a homemade delta on DUET that works perfectly, I connected the laser "http://nejetool.com/module_20w.html" to my DUET according to the diagram from "https://duet3d.dozuki.com/Wiki/Laser_PWM_control#Section_Controlling_a_PWM_Laser_with_a_Duet_2_Board" when the DUET is turned on, the laser is constantly on and is not controlled by any G-code, does not turn off does not change the power.!
Firmware Name: RepRapFirmware for Duet 2 WiFi/Ethernet
Firmware Electronics: Duet WiFi 1.02 or later
Firmware Version: 2.02(RTOS) (2018-12-24b1)
WiFi Server Version: 1.22
Web Interface Version: 1.22.6My config.g
; Configuration file for Duet WiFi (firmware version 1.20 or newer)
; executed by the firmware on start-up
;
; generated by RepRapFirmware Configuration Tool on Thu Jul 12 2018 20:54:00 GMT-0500 (Central Daylight Time); General preferences
;G90 ; Send absolute coordinates...
;M83 ; ...but relative extruder moves;*** The homed height is deliberately set too high in the following - you will adjust it during calibration.
; After G32 auto-calibrate, copied from config-override.g
; Note: G31 Z (below) affects M665 H, and this is NOT yet calibrated.
M665 L264 R124 H240 B120.0 X-0 Y-0 Z0
M666 X-0 Y0 Z0 A0 B0; Network
M550 PAKL Plus ; Set machine name
M552 S1 ; Enable network
;*** Access point is configured manually via M587
M586 P0 S1 ; Enable HTTP
M586 P1 S0 ; Disable FTP
M586 P2 S0 ; Disable Telnet; Drives
M569 P0 S0 ; Drive 0 goes forwards
M569 P1 S0 ; Drive 1 goes forwards
M569 P2 S0 ; Drive 2 goes forwards
M569 P3 S0 ; Drive 3 goes forwards
M350 X16 Y16 Z16 E16 I1 ; Configure microstepping with interpolation
M92 X80 Y80 Z80 E400 ; Set steps per mm
M566 X300 Y300 Z300 E300 ; Set maximum instantaneous speed changes (mm/min)
M203 X12000 Y12000 Z12000 E12000 ; Set maximum speeds (mm/min)
M201 X1000 Y1000 Z1000 E1500 ; Set accelerations (mm/s^2)
M906 X1000 Y1000 Z1000 E800 I30 ; Set motor currents (mA) and motor idle factor in per cent
M84 S30 ; Set idle timeout; Axis Limits
M208 Z0 S1 ; Set minimum Z; Endstops
M574 X2 Y2 Z2 S1 ; Set active high endstops; Z-Probe
M558 P4 H6 F120 T6000 ; Set Z probe type to switch and the dive height + speeds
G31 P1000 X0 Y0 Z13.48 ; Set Z probe trigger value, offset and trigger height
M557 R105 S20 ; Define mesh grid; Heaters
M305 P0 T100000 B4138 C0 R4700 ; Set thermistor + ADC parameters for heater 0
M143 H0 S150 ; Set temperature limit for heater 0 to 120C
M305 P1 X501 R4700 ; Set thermistor + ADC parameters for heater 1
M143 H1 S350 ; Set temperature limit for heater 1 to 280C; Fans
M106 P0 S0.3 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 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 power saving
M911 S10 R11 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; Set voltage thresholds and actions to run on power loss; Custom settings are not configured
; Miscellaneous
M501 ; Load saved parameters from non-volatile memory
T0 ; Select first toolM307 H3 A-1 C-1 D-1 ; Disable Heater output on H3
M452 P3 S1 R1.00 F2000 ; Enable Laser mode, on output 3 (heater 3), with max intensity being 1.00, and a PWM frequency of 2000
M571 P3 F200 S0IMG_20200807_203959.jpgMy mail: d7a7r7@mail.ru
-
Have you connected pin 7 of the 74HCT02 chip to ground? When you click on the schematic to expand it, there is a short section of wire missing from the enlarged schematic.
-
This post is deleted! -
@dc42 да 7 булавок на земле, я делаю это в соответствии с инструкциями Вики
-
@shiga said in Laser always on:
@dc42 да 7 булавок на земле, я делаю это в соответствии с инструкциями Вики
pin heater 3 is present at 3.3 volts, switching on without sd card is also present at 3.3 volts.
-
Check your driver without duet. I made the similar adapter (same schematic) for @omni 's lazor and when I turned the duet on lazor was 100% on. I turned lazor on from the duet and it turned off :D. So I removed the whole adapter that's inverting the PWM signal (and rising it to 5V) and connected heater.3 directly to PWM pin of the laser driver and now it works ok. When I expect laser to be off it's off, when I expect it to be on, it's on. Power nicely go from 0 to 100%. The only issue is when I turn the duet on for the first time (poweron) the laser turn on and back off. The on period is very short but it is visible. It will not be a problem as the main power to the laser is manually controled via switch and normally laser will receive it's 12V after the duet is powered on :).
So check what polarity your PWM port want to turn on/off the laser, maybe you do not need to be inverting it.
-
@shiga said in Laser always on:
Firmware Version: 2.02(RTOS) (2018-12-24b1)
WiFi Server Version: 1.22
Web Interface Version: 1.22.6Update your firmware to at least 2.05.1
-
@Phaedrux updated. this solution didn't help!
-
@arhi please tell me how you did it? how did you raise it to 5 volts? And what was the piece of config.g and the circuit at least by hand, how did you connect it?
-
@shiga said in Laser always on:
@arhi please tell me how you did it? how did you raise it to 5 volts? And what was the piece of config.g and the circuit at least by hand, how did you connect it?
originally I used same circuit as you have here
so 3v to 1AB and 1Y to 2A and heater3 to 2B, this inverts the output of the heater3 and outputs it on 2Y at 5V level, and that 2Y I connected to PWM input on the laser driver (it is some aliexpress 15W laser with external driver that has a fan on itself)
and this made laser ON during idle, when I do G1X10S255 the laser goes off, if I do G1X10S125 laser goes to 50% power, G1X10S10 laser go to 90% power ..
so this driver obviously need non-inverted signal so what I did is just REMOVE the whole 74hct02 and connected HEATER3 DIRECTLY TO PWM on the laser driver, obviously this laser driver do not have a problem with 3V on the pwm so no need to get the signal up to 5V
when I power on duet laser blinks for a moment (milliseconds or less) and is off, when I do G1X10S10 it is at 10% during the move, G1X10S255 it is at 100% during the move, and it is off after the move
The only config line required:
M452 C"exp.heater3" F100 R255 S0 ; laser uses heater3 pin, PWM frequency 100Hz, 0-255 is 0-100%, not sticky use S with G1
-
@arhi I did as you said, I connected the pwm directly, the laser was controlled, but not at full power, it was very dim, and did not shoot at S255. The macro to turn on the laser mode is as follows:
M563 P0 D-1 H-1; clear tool
M563 P0 D0; create a tool - no heaters
M307 H3 A-1 C-1 D-1; Clear heater
M452 P3 R255 F20000 I0
what should I do next? -
@shiga so if you do
G1X10S0
your laser will move and will be OFF
and if you do then
G1X20S255
it will move and be ON but not 100% ?
-
@arhi said in Laser always on:
so if you do
G1X10S0your laser will move and will be OFF
and if you do then
G1X20S255it will move and be ON but not 100% ?
yes, quite right. g1x10s10 is dim, g1x10s100 is brighter, g1x10s255 is off. and if g1x10s250 also shines like on s100.
-
dunno, that makes no sense to me, maybe your driver requires 5V pwm and will not work with 3.3V pwm, so you need to use that hct02 to up the signal to 5V but you need to get that signal trough one more part to invert it .. so instead of using 2Y as output, feed 2Y to 3A and 3B and use 3Y as output (should be inverse of what 2Y was)
-
@arhi Many thanks for the help! the problem was resolved, it was a bad 74HCT02, from a batch of 5 pieces all were inoperative, replaced from another shop and it all worked!
small question: which program is the best to use for engraving with DUET? -
@shiga said in Laser always on:
bad 74HCT02
auch
small question: which program is the best to use for engraving with DUET?
no idea. I know that visicut is often mentioned on some forums for DIY machines (grbl, smoothie...) but I have never owned an engraver and the small experience I do have with it I generated the code myself using c so I doubt anyone would fund that useful ... probbly someone with engraver can give you some hints but probbly setup a specific topic for that on forum as that will give it more visibility
-
btw how do you know your laser is outputting X% at any time (not knowing what the PWM pin is doing) ? you have something to measure the ray impact or ?
-
@arhi I'm looking at the current consumption.
-
@shiga said in Laser always on:
@arhi I'm looking at the current consumption.
I look at the current consumption, and compare it with the PWM of the signals from the servo tester.