No PWM Control on Laser

Here’s the chain of events:

  1. Bought this laser from Amazon.
  2. Downloaded LaserGRBL and connected to my setup. Arduino Uno + CNC shield v3 + Grbl 0.9
  3. Made the physical hookups.
    A) share CNC shield ground and power from 12V power supply with laser board. Hook up TTL pin to Z +.
  4. Discover there is no laser mode on GRBL and flashed to 1.1. Set spindle max to 255 and enables the S32 command.
  5. Turn power on at the laser board. Try to turn on through software. No love.
  6. do some reading and find something that says use spindle enable pin for pwm. Plug that in. Power on laser, bam blue light full power even on focus mode. Run a program, laser stays on the whole time. I think it stays on even if I pull the pwm wire and leave it disconnected.

Any ideas on how I can get PWN control over this thing?

I’m not familiar with that model but here are some things you can check.

That power switch, does it latch or is it momentary? If it is momentary it may switch between off, on, and pwm.

You will also need to run a ground from the laser to the CNC shield also so the pwm signal has a reference.

Hmmm… Don’t suppose you have an oscilloscope handy, huh? :slight_smile: I picked one up off Amazon for like $40 when I was troubleshooting my laser setup.

I’m using the fan ports on my board to drive the spindle/laser power. I had to modify the GRBL source code to set the right pins, though. Did you just compile 1.1, or did you edit anything?


Spindle_enable_pin is just that - a binary signal - high or low. The pwm out signal is, as you had it originally, on the Z+ limit pin on the CNCshield.
Use GRBL v1.1f… not later versions because auto homing screws up PWM.
When turning on the laser you need three or four commands before M3 (or M4) will work. Firstly it needs to be unlocked to work, it may already be unlocked but sending a $X will ensure it is unlocked anyway, after that it needs to know the speed at which to move and it needs a move command and it needs to know the intensity to switch on at- so the FIRST time you want the laser to operate send


G0 is a move instruction but without X,Y or Z co-ordinates it will not actually move
F2000 is the speed at which to move if/when you send co-ordinates
S128 is the power to lase at (half power in your case)
M3 is switch the laser on.

After that the laser should fire up, you can then just send Sxxx to control intensity and M5 will shut the laser off. If you want to fire the laser again you just need the M3 and it will fire at whatever intensity setting that was used last… even if that was S0 !

Consider buying a small Jtech oscilloscope to check your PWM signal.

some observations - The advert claims this to be a 6W NICHIA NB7775 laser diode, according to Nichias website they don’t do a NB7775 diode, the closest (and most powerful diode they currently do) would be a NDB7Y75 blue diode @5Watts. The figure TTL Output Power : 10W is pure fantasy. The switch on top is probably a focus button that will energise the laser at low power, although it is not impossible it is a manual safety on/off switch also!..

Okay, all of that was helpful. I measured with a cheapy multimeter and this what I know so far.

All the grounds are common. Power supply, black strip on shield and the negative terminal on laser board.

I am getting a varying voltage on the Z+ pin. 0.003mv at focus strength and 2.5mV at full power.

Absolutely no love from the laser though. I’ve tried with the momentary switch latched on and latched off. I sent the unlock command. I’m going to try the multi command next and then I’ll try light burn instead of lasergrbl.

EDIT: the multicommand did not work. Am going to try adding a power supply to the arduino next. I’m so frustrated I picked a laser with no documentation.

A quick edit - having tried it on a spare cncshield - send G1F2000S127M3 not a G0F2000S127M3
A multimeter wont really show you what is happening with a PWM signal, although at full power (S255) the voltage on the PWM pin should be 5v - not 2.5mV. If the G1F2000S127M3 doesn’t work can you post your GRBL config? Stay with laserGRBL until you get this sorted, LaserGRBL works fine and is less complicated than Lightburn. The arduino will work fine without a psu until you come to move the steppers, then you will need a 12V supply

In LaserGRBL confirm the status indicator in the lower right of the display says ‘Status: Idle’. If it says ‘Status: ALARM’ sent the $X and it should change to idle, then send the G1F2000S127M3

Thanks for your help Mike. I think I had an issue that no one would have caught. I had a jumper on the Z- limit strip, thereby shorting the PWM to ground. I plugged in a simple led circuit and it looks like I have control over power now with the focus button in LaserGRBL. Now, I just need to put the laser back in circuit, I had unhooked it in preparation of sending it back. I understand now why all the advice stresses the point of tracing pin 11 on the Arduino.

I believe that Laser mode in grbl turns the laser off automatically for travel (G0) moves.

Well, I got control of PWM. Never mind that it was too weak to do what I wanted, at least I know for the future. I was shorting the Z- to ground with a jumper (in an earlier version of GRBL I had to close all the limit switches with jumpers because I didn’t have end stops). For anyone that stumbles across this thread, I found my problem by pulling the CNC shield, hooking up an LED to act as a dummy laser and seeing if I could control brightness on pin 11 with GCODE.

1 Like

@ttraband Yes, thanks Tom. Of course it does… a brainfart on my part.

@wesbasinger. How ‘too weak’ are we talking about? You will be able to increase the lasers effective power on most burnable materials with the addition of air assist to blow debris away from the cut.

I needed to cut through corrugated cardboard. I was working with a 5W laser and it only could cut the top layer, at a very slow speed. I guess I should google “how to add air assist to diode laser”. My boss is buying me a 40W and my next project is to cut through vulcanized paper, which I’'m pretty sure it will do.

Your 5 Watt laser should be able to cut cardboard ok. you probably have two issues, the first is if the cardboard is thick and focused to cut the top ply the laser will be out of focus for the bottom ply , you will need to re-focus to cut the bottom, and secondly, smoke and debris from the top cut could be obscuring the laser from cutting the bottom, air assist should deal with this… There may be a third issue. Have a look at this thread when deciding on laser powers.

According to this site a true 5 Watt laser should cut 2mm plywood at 100mm/min in one pass at full power. If yours is struggling to cut cardboard I suspect you might have a 5 watt input laser, which would have an output power around 700mW. If your boss is paying less than $250 for the ‘40 Watt’ laser (which is actually about 15 Watts output power) then I doubt it would really be a 40 watt device. There is so much bull being advertised in order to con people into buying their product…quoting the input power is no real indicator of the power of the laser as it depends upon the efficiency of the regulator and the power taken by the cooling fan, even down to the gauge and length of the wires used.
/rant mode off