Seems like my PWM pin is not working

So I have a shapeoko with a control board v2.4e that I want to use with a opt laser. I have connected the laser and the pwm signal seems to always be on. I had initially connected it to the pins showed here.

But this did not work, the laser stayed on all the time at a really low level.

So I soldered pins on to the upper 4pin spot shown in the following picture.

The result was the same laser always on at a low level.

Does anyone here have an ideal about what I might be doing wrong? I had the laser working on another grbl machine so I feel certain that the laser is good.

It might be that your $30 variable in GRBL is set wrong - just google “grbl $30 command”

If I had to guess, it’s set too low - and the PWM signal isn’t what you want it to be.

1 Like

There is a “easy” way to tell if the problem is at the controller/GRBL end or in your laser setup:

  • check your $30 value. Let’s say it’s 1000.
  • initialize the machine then go to the MDI tab and send M3S500
  • with a voltmeter, check the voltage between PWM and GND, being very careful not to create any shorts as you do so. It’s probably safer to measure it at the end of whatever cable/wires you have hooked up to the PWM and GND pins, than on the pins themselves. Anyway, you should read a value that’s somewhere between 2.4V and 2.6V
  • then send M3S1000 from the MDI, voltage should now be close to 5V.

If this is the case, then the controller side is working fine and it’s something in the laser setup.

One typical mistake is misconfiguration of the laser software. If you use Lightburn for example, there is setting for max value generated in the G-code for the PWM (called S-max value or something) and by default it is 256. If you leave it at 256 and GRBL’s $30 is at 1000, then when Lightburn thinks it is generating Gcode for full power, you would in reality get 25% power (256/1000). So you should check that whatever max value is setup in your laser software, matches your $30 setting. You could also lower your $30 setting to 256, that would work too, but I think it’s better the other way around, to leave the Shapeoko with its standard settings (they matter if e.g. you have a BitRunner)

1 Like

Thanks Julien! It was a wiring issue, one of my dupont connectors was not fitting tightly.

1 Like

This topic was automatically closed after 30 days. New replies are no longer allowed.