Driving a laser with an MKS DLC 2.1 with GRBL 1.1f

Amazon has deceived me and instead of IRLZ44 I have bought IRFZ44. I have looked at the datasheets and it seems valid even though I haven’t done anything electronics for years. When you say compatible with TTL voltage, do you mean Vgd (th) <= 5V? Thanks

I went looking for the relevant bits in the Vishay data sheets.

As I read it, the IRLZ44 is slower (230ns rise time, 110ns fall time) but works with 3.3V logic as well as 5V logic; IRFZ44 is faster (110 ns rise time, 45ns fall time) but needs 5V logic. I am guessing this difference is immaterial. Basically, as long as you have 5V, IRFZ44 with Vgd(th) max 4V should actually be better for you because it has faster response. For anyone who is using these instructions for a board with only 3.3V logic (many modern ARM-based boards), you’ll want an IRLZ44 due to lower max Vgd(th) of 2V.



To clarify:

The L input to the LPS is the cathode of an optocouplers input diode.
You need to provide a true GROUND to the L pin on the LPS to turn on the couplers LED.

This is usually implemented as a MOSFET in an open drain configuration. i.e. the drain is connected to the L pin on the LPS, logic control to the gate and source to ground. Note: insure the LPS and the mosfet have the same ground.

The gate control voltage needs to make sure that the mosfet is fully turned on when true which will cause the mosfet to ground the L input of the LPS.

At a glance both of those mosfet look like they will work just make sure the gate threshold voltage is compatible with your logic.

First of all, thank you mcdanlj and donkjr for your responses.

Secondly, to say that I am using Google Translator, in case you read something strange.

The board I use is MKS DLC 2.1 with GRBL 1.1f (not the best, I know, but I was already at home for another project), which is basically an Arduino UNO fused with CNC Shield 3.1. The PWM pin works in 0v - 5v, so IRFZ44 should work correctly, as it seemed to me when I saw the datasheets and as you confirm. When I have all the concepts clear, I will go to a 32bit: Cohesion3D, Smoothieboard, MKS SBase, … I will have to see which one interests me the most, depending on the use I’m going to give it (hobby), how easy it is to get them in Spain, etc.

My current installation is this:

My intention is, next weekend, to get to have this:

With the current configuration:
1.- When the machine is turned on, the laser activates itself, for a time of about 5 seconds.
2.- The change of electronics is to be able to use K40 CO2 with Lightburn. With my current mount, I have no physical “Test Fire”, and the virtual Lightburn activates the laser, but does not turn it off.

Basically what I want is to avoid problems.

For the rest, the current configuration works well, although I still have not gotten the point to the settings: Speed ​​/ Power.


Thank you for translating!

I’d like to warn that the CW-3000, which I see in your illustration, will generally not maintain cold enough temperatures to keep a laser tube in good shape. We have an article just about this:

I moved this post to its own topic that is focused on what you are actually working on. :relaxed:

I see that you plan to add an analog ammeter! Very good decision!

I didn’t want to appropriate the other post, really, but I wanted to be as precise as possible, due to the language change.

I have mounted the CW-3000 because a failure of the aquarium pump has already made me buy a tube, and in the few Spanish forums that there are they recommended it. Although it does not appear in the image, I also have a temperature sensor direct to the tube, which if it goes above 32ºC (I think I remember) cuts the job.

The Ammeter should all have it as standard. I understand that in theory 5V in IN, they should not exceed 15mA-17mA as recommended in many forums, but … if I see it better.


With the future assembly, for the use of Lightburn, I understand that by means of the potentiometer (digital or analog) it has to be left at Vmax = X => Imax <= 15-17mA, and set speed / power in the program, right?

It’s not a problem for us to move posts around. Discourse even keeps a record of it so everyone can follow the move. :tada:

32°C is way too hot. We recommend 18-20°C as the target. The only place a CW-3000 is appropriate for a CO2 laser is if your ambient temperature is in the 15-20°C range. Your new laser tube will again die young if your coolant is too warm. This will show up as a loss of effective power, and likely a higher TEM (search this site for “tem01” to see pictures). If you can reprogram the alarm for 22°C that might work, if you can keep it cold enough.

It is frustrating that the CW-3000 continues to be marketed as appropriate for lasers. I’m sorry that you have received bad advice.

That’s right. Use the potentiometer to set the maximum cutting power you want for the whole job, not to exceed the max continuous rating of your tube (typically 17-18mA), and then you get the maximum range of PWM values to use in engraving.


With the current configuration:
1.- When the machine is turned on, the laser activates itself, for a time of about 5 seconds.

Could be there is a power-on reset problem that causes the L signal on the LPS to come on during that time?

You can check where this is coming from by unplugging the L on the LPS and see if at power-up it still behaves the same.
If the L signal is not creating the problem unplug the other control inputs on the LPS one at a time power up to see where the on signal is coming from. I should likely be either and or the L or IN signal

2.- The change of electronics is to be able to use K40 CO2 with Lightburn. With my current mount, I have no physical “Test Fire”, and the virtual Lightburn activates the laser, but does not turn it off.
[/quote] Add a test fire button to the panel you don’t have to use the digital panel just to get this control?

I see that you have the digital panel and a voltmeter [I assume the “232” meter is a voltmeter] connected to control and read the IN of the LPS. Keep in mind that the IN control from the digital panel is not a static DC value. Rather it is a PWM signal so your voltmeter will read the average of that signal.
The digital panel really adds no value over a pot and the digital voltmeter. In my view, it has some downsides.

You can simply clone a typical K40 panel with Test Fire & Laser Enable buttons along with a pot for controlling the IN.

>In regards to cooling controls. You can add a temp sensor/display and a flow meter to your water system [bucket] and wire that in series with the WP interlock.

I don’t know if your sensor is on the surface of the tube or in the coolant. A sensor on the surface of the tube will probably not shut down the laser soon enough as it takes time for the glass jacket to heat up. What is most important is the temp of the coolant. I have a sensor in the bucket that is interlocked in the WP and a sensor on the tube that I just watch.

>In regard to safety. You should add top and back cover interlock switches into the WP circuit to help make your machine safe.

@cprezzi I think this inverter circuit came from another thread. Is an inverter still necessary using this MKS DLC board. Looks to me like the output of the MOSFET on J18 would work directly? Is the PWM signal [MOS_LC] driving Q2 inverted in a GRBL configuration?


I said 32ºC in the head, but I am not sure that it is so. Today I will check it and if I have an incorrect configuration I will heed your advice 22ºC. Currently we do not reach this temperature, but it is true that in summer it is far exceeded.

As I say, I think that right now the CW-3000 can do the job for me, what’s more, it should do it because of the initial investment, to the investment that I have already made, I have to recover a little before continuing to invest. But I know that before summer, I have to be prepared. The article you recommended to me I will have to read more carefully, because it is quite extensive, and with the change of language, I did not find out much yesterday either.

For variable jobs I have (or I think I have) clear how it works. For example:

Sin título-1

Power MAX = 100 and Power MIN = 10, Power range from: 10% to 100%

Sin título-2

“Constant Power Mode = OFF”

Sin título-3

100% power scale, to indicate that this shape goes to the maximum 100%. But in the case of having more shapes, I can give each one a different value within the 10-100 scale. Correct?

But if I want all the shapes to be done at 50%, I don’t know if I indicate it correctly

Sin título-4

By giving the same value as MAX and MIN, I understand that with that it should be valid, however, I do not know if it should also be indicated in the following window (Constant Power Mode: ON):

Sin título-5

And if the properties window of the shape, in this case, is useful for something?

(I can´t upload more pictures in the post, sorry)

Or on the contrary, the first method must always be used:

1.- MAX = 100, MIN = 0
2.- Constant Power Mode = OFF
3.- In Power Scale indicate the power really desired for de shape or shapes.


The problem is generated by MKS DLC 2.1. When the power reaches it, through the G pin of the TTL connector, it generates 0v and triggers L. I have it “solved” by a switch in series with the CW-3000 signal (WP). I turn on the machine with the switch off and then turn it on, and that way the trigger does not occur, but I think it is not the best way to solve it.

There is currently no digital panel, no physical trigger button, or potentiometer. It is currently as shown in montage image 1. I want to start modifying it in hours, when I leave work.

232 Metter is a voltmeter, which monitors the output of pin S of MKS DLC 2.1, the PWM signal which for that matter, is doing the same as if it were the IN signal of the digital potentiometer.

I thought that the digital potentiometer if I put a fixed voltage on IN instead of PWM, so what I will do then is put an analog potentiometer and a physical trigger button. I had already bought an analog potentiometer:

Although apparently it seems linear, from my tests I think it is exponential, but since I only need to know 2 positions: Max Power and Test Fire, it will have to be valid for now.

I already have a temperature sensor (screen) and the CW-3000 has a flow sensor, so I think this part is solved, just make an optimal adjustment as McDanlj tells me.

My temperature sensor is probing the coolant return hose, as close as possible to the connection between said hose and the CO2 tube.

I have a sensor in the top cover, but not in the back cover. My biggest fear is the infinite test fire and the fact that the laser can fire “alone” and catch me with my hands inside.

I had thought about the same thing, when I read that in smoothieboard and the like you could manage whether PWM is + or -. Looking at the GRBL firmware that MKS recommends for its DLC 2.1 board I find:

So I think uncommenting both lines should work. Surely I will try it, but if @cprezzi could confirm it or not before, it would give me more security :grinning:.


There is no need for an external inverter circuit if the board has a MOSFET on the PWM output, like on DLC Laser output (J18 pin1).

I would suggest to connect this output to the L pin of the LPS and connect a potentiometer to the IN pin for setting maximum power. This way you don’t need an additional spindle enable pin and don’t have to invert the PWM signal (not uncomment the lines).

The problem with the laser activation at bootup is caused by the arduino (floating pins until they get configured from GRBL). If the MOSFET on the board is correctly built with a pulldown resistor from gate to source, this should not cause any laser activation. This sould be ok on the DLC 2.1.

For security reason, I would additionaly leave the “Laser enable” switch off until you are ready to start the job.


It has been confirmed that with that controller you do not need the external MOSFET!
You can wire directly to the L pin from the controller.

I suggest:

  • Remove the external mosfet and connect the controller directly to the LPS.
  • Remove the digital panel
  • Add a rear cover interlock
  • Add a potentiometer
  • Add a test fire pushbutton
  • Add a Laser Enable switch

If you show us how you would like your final wiring to be we can check it again.

@mcdanlj, @donkjr & @cprezzi, infinite thanks.
My K40 is already at full power (in the absence of the lifting bed) :stuck_out_tongue_winking_eye:

I leave the final assembly scheme, in case it is useful to any user, since I have not been able to locate all the information in a single place.


Wondering why did you use the “Motor” connection (J19) rather than the laser connection (J18). Because it has a screw terminal? In any case, either should work.

I just noticed that you are powering the MKS from the LPS 24V. I do not know the current specs for that board +stepper current. The 24V on the LPS is typically marginal for other than the stock board and can cause lots of crazy problems. I suggest adding a separate 24V supply.


Hello! Does the CO2 laser work for you with that configuration?

I have the MKS DLC 2.1 board with grbl 1.1h and the laser does not activate.

Did you have to make any other modifications?

Have you verified that your LPS is working properly i.e. does it fire with the test button?

My machine has the last setup I uploaded installed, 3 (with potentiometter) if I remember correctly.

He works fabulously with Lightburn.

I seem to remember that apart from what the image illustrates, the only change was in the software because the laser is activated with 0V (GND), although it has been a while since I made the assembly

The change was not for software but for hardware. Change the connector in use of the board

What conector did you use on the board? Thanks