MKS SBase and GRBL-LPC / First steps

Dear Forum!
This is my first posting here, so hello from Paderborn/Germany! :slight_smile:

Currently, I am rebuilding a K40 CO2-Laser from scratch.
I am planning to use a MKS SBase with GRBL-LPC to control the laser.
Having searched a lot hours in the web, I still have some open questions:

1.: for my new gantry-setup I would like to use 2 Stepper Motors for Y-axis as the usable workspace has been extended to its maximum and I would not prefer using a large connecting rod. Is it possible with GRBL-LPC/MKS SBase 1.3 to “mirror” a stepper Port?

2.: I found some postings where users had problems powering the K40 Laser. Sometimes the PWM-Signal seems to be inverted and sometimes not. Is this a setting or a question which PSU is used? I also read postings where a solution was to use TTL instead. Sorry for the maybe dump question, but can someone explain the difference to me? In my (too) simple world, the PSU needs a signal which tells how much power to use for the laser. Can this signal either be TTL or PWM?

Thanks a lot & best regards!

Welcome to MakerForums!

  1. Have you considered instead wiring the Y motors in series from a single channel? They are less likely to get out of sync driven by the same driver. It reduces the voltage, but if you are running your system at 24V that’s normally OK.

  2. Can you link to the posts you found that are confusing you?

Hi Michael,

yes, but using a separate driver would be some kind of “nicer” :wink: but if that is not possible I will go wiring the Y Motors in series. Do I need to set special voltage settings in this case?

One link is this one for example:

Maybe I am mixing up TTL and PWM or it just means the same, this is confusing to me.

Thanks a lot & best regards,

Also this schematic confuses me:

For my understanding the PWM-Signal has to go to “in” terminal of PSU and not “L”?

You don’t need any special voltage settings. The controllers control current through the whole circuit, whether there is one motor or two in series. When they are hooked up in series, if something causes a missed step, it will almost always cause both motors to skip a step; if you have separate drivers and a slight momentary jam it can cause the whole gantry to be askew and more likely to jam further. When it’s possible, wiring in series for either laser cutters or 3d printers is almost always the right choice.

The only common reason that separate drivers make sense, I think, is if you have motors with too high impedance and running 12V. Then it can make you miss steps from reduced torque.

TTL is an electrical communication standard: transistor-transistor logic. PWM is varying the on and off times of signals. You can send a PWM signal over a TTL interface. They are just orthogonal ideas.

Have you seen @donkjr’s troubleshooting document? It might be useful to you also for understanding the connections as well as for troubleshooting.

The best way to connect to the LPS is the L pin on the LPS. The controller should provide a ground (true) PWM signal usually through an Open drain configured MOSFET.

The wiring shown in the diagram as @cprezzi states should work. I recommend adding in the pot on the IN signal.

Thanks a lot!
But when connecting to the Board to LPS L, will the power be adjustable via Software? When the pot is connected to IN, then the pot sets the power? I thought it was the best connecting L to fix ground (to unlock laser) and set Power via IN. when PWM on IN = 0 then Laser is off. Wrong?

Using both the potentiometer and PWM control that was is the best way to hook up your laser. Yes, the power will be adjustable by software.

That way, the potentiometer sets the maximum power, and then PWM lets you choose a range of power between zero and the maximum set by the potentiometer. This has two benefits:

  • You can set the potentiometer to the maximum amount of power you want to send through the tube, so that a configuration error, software bug, or even hardware failure on your control board does not burn out your tube.
  • It allows you to use the full range of software control over power.

The first is the most important one here; the second might matter in some circumstances.

Thanks again, I think I am beginning to understand better :slight_smile:
Lets talk about the practical situation:
When using the K40 with the MKS Sbase 1.3 with GRBL-LPC, which pin do I have to connect from the board to L? Can it be connected directly or do I need a kind of logic inverter or level shifter?

Thanks a lot & best regards :slight_smile:

A level shifter is not needed.
The controller has to ground the L pin to turn on the laser.

This is done with one of the controller output MOSFET in an “open drain” configuration.
The diagram you cited above should work. Note the L connection
Ensure that you configure the controller’s output to the correct configuration.

Here is some information on how this Open Drain config works:

1 Like

Okay, understood!
Next stupid question: when using GRBL-LPC (, how can the output be configured…?

Thanks all for the patience with me :slight_smile:

I urge you to do some web research to learn the configuration methods for that controller as this will be something you will encounter over and over.

Such as

That said I do not use that controller so I suggest you connect with @cprezzi who can point you in the right direction for that information, I’mguessing.

@cprezzi is there a PWM inversion problem with GRBL-LPC and open-drain??

1 Like

Hi Don,

I really appretciate your help. I already did a lot of research on the web and of course already found both links you posted.
Unfortunately, there is no setting referring to the PWM-Pin. Only Stepper-Pin modes can be modified.
And thats why I am asking: I did not find any valid posting on which pin to use and what to setup when using SBase 1.3 with GRBL-LPC… Sorry, maybe I have missed something.

grbl-LPC has no option to invert the PWM signal by software, but I once added a configuration that uses the digital pin 1.23 (not inverted) instead of pin 2.5 with the MOSFET (inverted).

To compile this version you only need to edit config.h for using the MKS SBASE board (comment line 35 and uncomment line 38 and 42), then compile.

If you have a CO2 LPS like in a K40, you need to connect the negative pin of the MOSFET output 2.5 to the L pin of the LPS. This way you can set the maximum power with the potentiometer on the IN pin and let the software adjust the power from 0 to that max.

The special version with PWM on digital pin 1.23 is only for diode lasers which need a non inverted PWM signal.


Hey Claudio,

thanks a lot! That was still unclear to me.
So with the combination of K40, GRBL-LPC and MKS SBase 1.3 I can the use GRBL-LPC without recompiling and connecting LPS L to output 2.5?

Best regards!

Yes, that’s how I operate my K40.


What LPS do you have? Are you only running 3 wires from the SBase to the LPS?

Not sure who this is addressed to?

The above has:
LPS-L connected to output 2
LPS- Gnd to a gnd on the controller

Yes, only 3 wires.

12-24V VCC
BED (-) L
1 Like