How to wire Laser Driver and MKS sbase 1.3 with grbl

In my opinion P1.23 is 3V and a Levelshifter is needed, right @cprezzi ?

I have a new little Problem, but i think thats from the Laser Driver. After a while the Laser is running,
he looses Power. If a new line starts, he start burn an getting lower to off. With next new line he starts
again for a few seconds. If i power all off, wait a few minutes and start lasering again, all works as expected for a while, then this behaviour starts again. I cooled the Driver active with a fan, but nothing changes.
I think this cheap Driver is garbage, or any other ideas?

Yes, P1.23 is 3.3V but TTL high is defined as >=2.4V so it should work as long a the driver is really TTL and not analog.

About the power loss: Did you adjust the maximum current of the driver to the spec of your laser diode? If the diode gets too much current, it will overheat and degrade or get destroyed.

Thanks Claudio.
The problem are, I don’t know the specs of this diode, because I get she out of a old laser device. I only know that she have a max of 3 Watt. I’ll lower the amps and have a try again.

I assume P1.23 comes directly from the processor. Its my view that a safe practice is to buffer any outputs from the processor that need to leave the board. I would even use an optocoupler. Overkill perhaps…

Hey Guys, I found this thread after trying to get a chinese 15W PWM diode laser working on a Mks-sbase with grbl-lpc.
I want to share my solution to the inverted behaviour and logic level differences.

The Problem:
This laser has a pull up resistor on its control board. So the Laser’s disconnected PWM line measures 5v. This also means the laser is at 100% power, when disconnected - Dangerous.
When it’s connected to the Sbase, its also firing, unless it’s set to PWM 100% (M3 S1000).

The solution.
5k resistor, spare wire, side cutter.

  • remove mosfet heatsink (wont need this, since PWM is low current unlike hot ends and heat beds)
  • Desolder R30 resistor (or the respective mosfet’s resistor in line with its respective LED)
  • Clip the Ground pin on the mosfet and desolder the excess leg. Its the pin on the Mosfet nearest to the big Capacitors side of the board.
  • Solder a resistor of 2kOhm - 6kOhm or between the clipped Mosfet leg and the ground pad it used to be connected to.
  • Also solder the PWM wire (or connector) to the clipped Mosfet pin.
  • Connect the Mosfet output (e.g. Hot bed -) to 5V (unused endstop V pin, set to 5V with J4 jumper)

How it works:
Typically the Mosfets complete a 12V circuit, by connecting the load(laser pwm line) to ground. PWM @ 100% = 0V.
What these steps do is pull the Load(laser pwm line) to ground with a resistor by default. PWM @ 0% = 0V.
When PWM @100%, the Mosfet “switches on”, and pulls up the PWM signal to 5V.

Might sound complex but it worked- we’re effectively swopping the side of the mosfet that we’re working with. This inverted behaviour works perfectly for my laser now.

Another thing I had to learn was that the PWM would not fire (e.g. M3 S1000), unless the machine was homed and jogged. This was frustrating to learn.

What you did is basically change the mosfet from a “pull down switch” to a “pull up switch”. This might work, but I would rather change the (cheaper) laser driver than the expensive controller board!

If you replace the pullup resistor on the laser driver input with a pulldown resistor, the laser will be off when the input is disconnected. Then add an optocuppler to the 3.3V pin P1.23 configured as a pull up switch for the laser driver.

For a laser, you should use M4 instead of M3. M4 only fires on G1-3 with power adapted to feed (accelleration/decelleration).

Exactly, a pull up switch.

I agree with you that I did some severe hacking to the control board, but it was my preference above modifying the laser! In my case I scrapped the Sbase for some reason before from a 3d printer build- so I was lucky to have it work when I tried it with the laser.
Despite this, do you think this fix could hold up?

Thanks for the advice about M4 and M3- its just a easy command I use when test firing the laser. M4 should be used when doing jobs!

Yes, I think it should hold up.
And yes, M3 for test, M4 for jobs :wink:

Hi @cprezzi
i installed and configured grbl-lpc on mks sbase 1.3. Everything works fine except the endstops (never trigger).

Grbl configuration:

$0=10
$1=255
$2=0
$3=2
$4=0
$5=1
$6=0
$10=0
$11=0.010
$12=0.002
$13=0
$20=0
$21=1
$22=1
$23=1
$24=50.000
$25=6000.000
$26=250
$27=2.000
$30=1000
$31=0
$32=1
$33=5000.000
$34=0.000
$35=1.000
$36=100.000
$100=160.000
$101=160.000
$102=160.000
$103=160.000
$110=5000.000
$111=5000.000
$112=24000.000
$113=24000.000
$120=1500.000
$121=500.000
$122=2500.000
$123=2500.000
$130=900.000
$131=300.000
$132=50.000
$133=100.000
$140=1.000
$141=1.000
$142=0.000
$143=0.000

@Sergio_C Could you please open a new topic for your issue.

@Sergio_C I would, as a moderator, have just moved your comment to a new post, but it also is asking about endstops yet has zero information about how you have wired them, so it can’t possibly have enough information to help. Photos that clearly show the full wiring routes would be a good first step; diagrams if anything isn’t clear from the photos.