More Laser Advice - Firmware

the Oxlaser 5.5w 450nm diode laser.

The online page says TTL control switch, PWM control power. And it has a 3 wire connector (+12V, GND, PWM). So I’m guessing it takes PWM on that plug. Not sure what that TTL control switch blurb is, unless it’s talking about the on/off switch being a TTL control to the laser? Which would be silly, if it’s being sold as a gestalt. :nerd_face:

TTL just means it is 5V logic, and it’s often misused. The PWM might work with a 5V PWM signal.

So I am guessing that you are using it in the 3 wire configuration as opposed to the optional 4 wire. do you have access to an oscilloscope so you could measure the frequency and voltage on the PWM line? it looks like it wants a <15khz pwm signal (0-5v). I am not sure what is coming from the RAMBo board, but I’ll bet someone on here does. One more question, are you running one of Ryan’s Marlin firmware builds? Only reason I ask is I am using the M106 and M107 commands to control my laser, but it is also a 12v pwn and I’m using the P1 Fan pins.

my laser uses 5v PWM on a 3 wire system

here is a link to the post about my setup:

5.5w Laser Setup

this is from the documentation on the laser:

  • Size: 40*70MM(IMPORTANT: this is bigger size than 2.5W and 3.5W , please check if your machine can hold a 40mm laser!!!)
  • 2.5W 3.5W and 5.5W ARE ALL FOCUSABLE
  • if you want use it to connect 110–240V power source directly , please get yourself a 12V 5A DC Adapter, and need to cut the wires and connect wires red to red, black to black
  • please pay attention when connecting wires : RED wire=12V+ , BLACK wire=GND -, Yellow Wire= PWM!!! wrong connection of the wires may damage the driver board and the diode
  • PWM: 0-5V, frequency: <15K,This laser needs 12V 5A power supply adapter!

Just read your setup post. Still would be good to see what you are getting on the signal line. Have you tried sending gcode from the console tab of lightburn? Like M3 S8 (wouild be like 3%) then change to M3 S255 and see if you can see a diffrence in laser intensity? make sure your light burn is set to 255 steps, it defaults to 1000 and that will cause problems also.

1 Like

Here is the result of S8 (move to the right) S255 And S-Value Max is set to 255 in the device settings

I tried to do a M05 as quick as i could (coppied and pasted it as soon as i did the above M03)

Like i said the laser seems to be working fine during most other operations, just not fill or raster…its like it forgets to move back and forth. I just tried moving the x and y axis at different speeds and it worked fine. 1000mm/min, 1400mm/min, 6000mm/min – no issues

Unfortunately I dont have an o-scope; its on the bucket list though -

Is there anything in the firmware that may cause an issue - the only thing I can think of is i have the dual endstop version loaded but have yet to add the switches (I have it set to Normally Open)

I got something but it’s a bit skewed. I reloaded the latest firmware…

1 Like

That is really interesting.

Sorry for the late reply, finishing up a mount for my laser on a dust shoe for my DW660 spindle. Here is the problem if you haven’t done this yet. I had the same problem until I did the following:

in the Marlin.cpp file find this block of code.

// Limit check_axes_activity frequency to 10Hz

static millis_t next_check_axes_ms = 0;

if (ELAPSED(ms, next_check_axes_ms)) {

planner.check_axes_activity();

next_check_axes_ms = ms + 100UL;

}

To fix the problem it needs to be changed to this.

// Limit check_axes_activity frequency to 10Hz

//static millis_t next_check_axes_ms = 0;

//if (ELAPSED(ms, next_check_axes_ms)) {

planner.check_axes_activity(); //< THIS IS THE ONLY LINE OF CODE YOU LEAVE UNCOMMENTED

// next_check_axes_ms = ms + 100UL;

//}

Once this is done, recompile , upload and viola laser works as it should. This assumes you are using the latest version of Ryan’s MPCNC v2 Marlin code base.

2 Likes

BTW, I am running the dual end stop version and the above code change fixed the problem. Your laser control is working as it should since the laser intensity changed with the max value for the “S” parameter in your test above. Just make sure you are using mm/min and 255 for your max value laser power, I believe LightBurn calls it S-value max under device settings. Also if you enable laser fire button under device control you should see the fire button appear on the move tab with a power level setting. much more convenient than typing the the command on the console.

After making the changes to the firmware the text is still skewed… and I’m noticing that only one motor is moving on the x and y axis

Something is going on there…I checked the wires and connection and all look solid

How fast are you trying to go. I have found if i go north of say 2000 mm/min things get wonky.

1 Like

I got it working. I had one endstop polling as triggered! M119 saved the day :frowning:

5 Likes

Congrats! Have fun torching things!

Thanks for your help Jeff; was wondering if you had any idea how to set the min power to 0%. I did an image and could set it when in grayscale mode, however the option is grayed out and set to 10% on my line layer - Im getting travel lines.

minpower