Hey everyone! I have been working with my build for a few months now. I primarily built it for a laser cutter, engraver/etcher. I have a 10Watt+ Laser from Endurance Lasers. I’m also using the RAMBo 1.4 board with dual firmware and my Laser setup is as follows:
#define SPINDLE_LASER_ENABLE_INVERT false // set to “true” if the on/off function is reversed #define SPINDLE_LASER_PWM true // set to true if your controller supports setting the speed/power #define SPINDLE_LASER_PWM_INVERT false // set to “true” if the speed/power goes up when you want it to go slower #define SPINDLE_LASER_POWERUP_DELAY 5 // delay in milliseconds to allow the spindle/laser to come up to speed/power #define SPINDLE_LASER_POWERDOWN_DELAY 5 // delay in milliseconds to allow the spindle to stop #define SPINDLE_DIR_CHANGE false // set to true if your spindle controller supports changing spindle direction #define SPINDLE_INVERT_DIR false #define SPINDLE_STOP_ON_DIR_CHANGE true // set to true if Marlin should stop the spindle before changing rotation direction
/** * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT * where PWM duty cycle varies from 0 to 255 set the following for your controller (ALL MUST BE SET) */
I can cut just fine and I can etch black and white images just fine as well. However, when I try to etch a grayscale image, I notice that in the GCode, the power is properly changed with M03 SXXX commands, but my question is why does the laser pause when M03 commands are issued. Lets say I have F2000 at the top of the file, then when producing a simple line with varying power levels, the X or Y movement pauses slightly as the power level is increased or decreased. Is this something others are seeing? The problem is that when the pause happens it ends up burning an extra dark spot - and these spots end up blacking out major parts of the photo. I’m attaching an image of a grayscale photo I tried to etch.
I saw Guffy and Ryan discussing it in another thread. I wasn’t paying full attention but from what I did understand the M3 Sxxx will use code that is specific to spindles and so it will use some spindle settings.
M3 Oxxx will skip some of the Spindle settings and just use laser settings. I could be wrong. Like I said I wasn’t paying full attention. But in the end Ryan said he would update the laser page to have people use M3 O instead.
M3 O{0-255}
is almost same thing as
M42 P{pin} S{0-255}
by the way, Ken properly set SPEED_POWER_SLOPE/SPEED_POWER_MIN/SPEED_POWER_MAX to have ability set
10-100% cut power with M3 S{10-100} and set delays to just to little 5 millisec. I have no idea why he has troubles.
may be safe_delay has an issues
// Wait for spindle to come up to speed
inline void delay_for_power_up() { safe_delay(SPINDLE_LASER_POWERUP_DELAY); }
// Wait for spindle to stop turning
inline void delay_for_power_down() { safe_delay(SPINDLE_LASER_POWERDOWN_DELAY); }
M3 will not work for lasers no matter what pin, the machine stops as it adjusts, it is a side note on the Marlin page right now. You have to use M106, same thing just change the fan pin instead of the laser pin.
Thanks for that tip. When you say change to the Fan pin… Do you mean change my laser controller input to + and - of the Fan2 port of my Rambo 1.4 Board? Presently I’m using pin 45 and - of the Mx2 port.
I’m attaching a photo of a much better photo that was etched using M03 and OXX GCode along with the change to SPEED_POWER_SLOPE setting in the firmware.
I will be happy to change to the Fan pin. Is there an article on this? I have only been able to find information on the RAMBo board using that pin 45.
Well, I found it. Fan0. Endurance Lasers has a PDF showing how to hook it up to the TAZ5, which is also using the RAMBo 1.4 board. Thanks guys for your help.
Sorry Ken the new laser page I made is already out of date and has some bad info in there. I hope to spend a little time on it today. I spent most of Friday and Saturday digging through the firmware looking for the issue. I finally found it, so once we have a solution things will be easier to make instructions for.
Thanks for the help. I commented out the lines and reflashed. The output I’m seeing is FAR better than anything I have had to date. Looking forward to seeing Marlin getting a laser-specific kind of PWM output. I’m a software developer myself and thought about taking a look at it, but the content is not my forte - I wish I could contribute something.
Tester / guinea pig, is a huge contribution! I have a busy week or two coming, but a firmware revamp is a priority for any down time I have. When I update the firmware you will know, I usually bump it to the first post on the home page.