Connecting MKS DLC32 to Neje laser, common power supply

I have converted my original Burley MPCNC to a laser engraver using one of the Neje lasers. It’s running GRBL1.1 on an MKS DLC32 controller. Until now, I’ve used two separate power supplies so one of them feeds the MKS DLC32 and the other supplies the 12VDC to the Neje “adapter board” through the jack on what is referred to as “Input A”. The PWM comes from the DLC32 and connects to the Neje adapter board using the 2 wire connection, also at “Input A”. (See the image below)

This setup seems to work fine and correctly operates X, Y, Z and the laser.

However, I’m wanting to modify this setup with an exhausted enclosure, possibly a bigger laser etc. and so, to simplify things I acquired a larger, 12VDC 20A power supply with 3 outputs so that I may be able to operate the entire setup from this unit. (I also have VOC, CO2 and particulate monitors running on microcontrollers for monitoring the emissions from this setup, so a little extra power would be useful.)

But, the initial effort to do this has failed. When I replaced the DLC32 and laser 12VDC connections with two outputs from the new power supply, the laser is not responsive to the PWM signal. In fact, the PWM signal itself seems to be screwed up… Instead of the expected (and measured) 1 KHz square wave as measured at the adapter board, there does not seem to actually be any PWM signal. Instead, the laser comes on at full power and remains at full power, being completely non-responsive.

In fact, all it takes for this behavior to occur is for only the ground connection from the second input to be connected–the 12VDC can be omitted and the same behavior i observed.

I have a vague sense that I have seen some discussion about problems like this occurring using the same power source, but I’ve not been able to find anything definitive. It might have referred to needing some addition of a resistor someplace or ???

Because this may seem confusing to some, here are some images of what I’m seeing.

Neje adapter board. Normal connections made in “Input A” section. Scope monitor between GND and TTL in the “Input B” section. For the “laser pwm” measurements, the scope is connected between GND and the signal on the 4 pin laser connector.

Neje Adapter Board_B

Next is the measured PWM when things are working corrrectly.

Good PWM signal

At the laser output, the signal can also be measured, although I don’t fully understand what is occuring:

Good laser PWM

However, when the laser and controller come from the same power supply, here is the PWM signal… yes, there is no PWM signal that is apparent. The scope trace does not change when the controller sends the signal. But, the laser is on at full power.

BadPWM

And, at the laser output, there is some indication of the “spiky” part of the PWM, but no square wave.

Bad laser PWM

Finally, for fun, here is a link to a short video of the signal at the laser output as it turns on. I don’t think this adds anything except to note the transient behavior.

https://tinyurl.com/3td5fhx3

What output on the dlc board?

What version of the dlc board do you have?

I went to the GitHub and looked at the schematic. There is an output that looks like this (J7?):

This might look like a 12V pwm signal and a fixed ground. But it is actually the opposite. It is a fixed 12V and switched ground. The difference between these it flipping between 12V and ground. But the positive signal is always 12V compared to the ground on the dlc.

My guess is that previously, the laser was ok with that. Because the relative grounds could float. But now that they are tied together, the truth is showing.

You can hook up some intermediate circuit, like an opto isolator, or a level converter to take that 12V difference in J7 and convert it to 12V from the common ground.

You can also hook up the pwm to the ground on J7. But the funky part is the logic will be reversed. The laser will be full power at zero PWM. You’ll need to reverse this in the firmware. The laser might turn on when the board is booting up.

Or you can find some other output pin. I think the neje will switch are even 3.3V. So another regular pin. Even an input pin might work. Maybe the Z endstop?

What firmware are you using? This looks like a neat little board. Does FluidNC work on it?

1 Like

Going by the schematic of the V2.1_003 board -

According to the schematic, you need to plug into J18, labelled ‘TTL’, this should have a proper +5v going PWM signal,+12V and ground, this you can plug either into your adapter board at socket C and connect the 3pin laser cable into ‘NEJE Laser Module’… or directly into the laser 3 pin port without the adapter module. I suspect you are currently plugged into J7, labelled ‘spindle’, which is a pulsed ground PWM signal…no good for a laser but will happily drive a spindle all day long. The give away is the noisy trace at the GND end of your square wave.

The only thing to be wary of is there doesn’t appear to be any 24 to 12v regulator between the power in socket and the +12V labelled points on your DLC board and your laser wont thank you for stuffing 24V up it. This is not a problem providing you are only going to feed your DLC board with 12V. (which I believe is the case)

2 Likes

Thanks for your insights, Jeff. I knew someone here would understand what’s going on.

But, darn. As a fairly naive user, I need things to be simple. This is not going to be as simple as I had hoped… But, your analysis makes sense and the fact that the laser comes on at full power and is non-responsive would confirm that.

But, first, your questions. The output when using the separate power supply for the laser (as recommended by Neje), as specified by Makerbase is the “spindle” output. I’m guessing that is, indeed, the J7 connector to which you refer, although in the wiring manual, it is referred to as the “Spindle”.

As for the version, I’m not sure at the moment. It’s at least v2, but I think it’s probably 2.1. I actually deployed it back in November-ish with the separate power supplies.

For the moment, I’ve switched to the alternative connection on J18, but that is probably not a long term solution since the DLC32 board is specified as being limited to 25W @12V (although I hear of folks driving as much as 3A). However, J18 does work and allows me to proceed with my “upgrade and simplification” project using the single 20A PS while I figure out how to deploy the intermediate circuit as you suggest. I can still run the portable fume extractor and the sensors from the same PS until I get a bigger laser. (This one is only 500mW optical output, but it’s at 405nm, so it doesn’t push the DLC32.)

Firmware is grbl 1.1. I have not tried FluidNC. I currently am using the TFT display for this board, TS35. From comments elsewhere in these forums, it appears that the DLC32 may run FluidNC but then the TFT is apparently lost.

And, yes, it is pretty neat. I can confirm the wifi seems to actually work and connects easily. The functionality of the app is limited–it does not move the z-axis, for example, so that still requires a tethered PC. So far, virtualizing the wifi connection as a port in Lightburn or Lasergrble has not been successful, but, in my case, for now, that’s not critical. And, the board can be very cheap–less than $10.

1 Like

Mike,
Thanks for your comments. However, as shown below, the DLC32 is limited to 25W @ 12V, so the J18 connector may not be a long term solution if I deploy a larger laser.

In fact, in the DLC32 wiring manual, the use of the “spindle” output for the PWM signal is explicitly supported since the Neje laser can accept the 12V PWM signal, and, I can confirm that it works if the laser module is separately powered using an independent PS.

(And, yes, I’m using 12VDC for both the laser and DLC32).

But, having said that, for now, I have, as you suggested, switched over to the J18 connector which still gets rid of one of the power supplies while I decide how to proceed. This connection does work and is sufficient at the moment.
Thanks again for your support.

The power through J18 isn’t a concern. The power comes from the 12V. The pwm is just a control signal and it will use a few mA maximum.

My understanding is a little different, based on the documentation: if the J18 3-pin connector is used, then both the laser power (~amps) and the PWM signal are provided from that 3 pin connector. Thus, the 25 W limit applies. In fact, that’s the way that I now have this laser connected. And, this is the ONLY connection until I get the other issue sorted out.

This image shows the J18 connection, whereas the previous one showed the J7 connection.

If instead the two pin connector, J7, is used for the PWM, then the current draw is minimal, as you say, since the laser is powered separately and independently from the DLC32, but that’s the when incompatible level kicks in, as you explained.

But, your comment has stimulated another idea, which could, of course, be nonsense:

What about using only the TTL and GND from the J18 connector (instead of using the J7 modulation) and then supplying 12V needed for the laser separately (but from the same PS). Since the PWM/TTL signal on J18 is 5V, isn’t it therefore independent of the “fixed 12V and switched ground” issue that’s found on J7? I don’t have the expertise to be sure, but, it looks to me like using the 5V TTL from J18 would make the PWM independent of the 12V that is supplied to the laser. Does this make sense?

2 Likes

This is right. I assumed that is what you were going to do.

I’m not sure I follow the logic after that quote. But this will work. The gnd and pwm are just to control the laser. The power (V and Gnd) should come straight from the PSU.

OK. I’ll try this tomorrow. And then back to the original upgrade plan…

2 Likes

As Jeff says,this is the solution you can take if you feel the current feed to the laser will compromise the DLC board, it just means you will have to make up a wiring harness.

Not sure how you come by this but seeing as the power in barrel connector directly feeds all +12V lines via the fuse F1. There are three factors determining the max current that should be pushed through this board, the fuse, (not sure on the rating as I can’t find it in the specs), and the size/composition of the pcb tracks between the power in barrel connector and the J18 socket. (again, not able to determine that from the specs supplied by DLC), and the last, and probably the most limiting, is the DC barrel jack, some DC-007b examples have a rating as low as 1 Amp and some as high as 5 Amps…it depends on the quality of the connector.

[edit]… Ah… I see where you get the 25 watts from… DLC do seem quite intent on limiting the current to 2 amps (25W@12V or 50W@24V)… this is most probably down to the barrel jack connector rating… you could always remove it off the board and directly solder your 12V onto the board…

Thanks for your observation. It makes perfect sense, especially given that this board typically costs less than $10 or $15.

For me, the simplest thing to do will be to make a new cable that connects the TTL pins, 2 and 3, on J18 to the TTL connector at Input A of the Neje adapter board and bring the laser power directly from the power supply to the barrel jack on the adapter board. Some of these diode lasers apparently need 5 or 6 A, so, if this works, it will allow that flexibility without exceeding the DLC32 limits.

Just popping in here with my $.02. I have my DLC32 and NEJE “30w” directly connected to the j18 connector. I’ve completely removed the intermediate board that comes with the laser head. The wiring goes straight from j18 to the head. I’m using a 12v 7A p/s connected to the barrel connector on the DLC. This has been working fine for me since upgrading to the DLC32 from a different controller.

Tim,
Good to know that you were able to eliminate the Neje adapter board using the 30W Neje laser and the DLC32.

I presume that you just left the green wire (temperature) unconnected at the laser module itself since the DLC32 doesn’t use it?

While I have not tried removing the adapter board, I have tried running using just J18 connecting to the adapter board, and it works as expected using the 12VDC, 20A p/s connected to the barrel connector on the DLC32. I have also tried using a separate 12VDC connection to the Neje adapter board barrel connector and pulling only the PWM signal from J18 using the 12VDC, 20A p/s for both. That also works perfectly, as Jeff and Mike indicate above.

But, my current laser draws a very limited amount of current–it’s only 500mW optical output at 405nm–and the Neje 30W lasers are also only spec’d at about 3A, so I’m not too surprised that the DLC32 can source that. Even the Neje 10W (optical) probably pulls less than 4A, so it might work too, despite the DLC32 specified limits. Other 10W units such as the Sculpfun S9 or the FoxAlien 10W (optical) are within the same range. However, Atomstack has announced a 20W (optical) output laser with 4 diodes. I didn’t find a current specification, but, I suppose it will be significantly more than 3A. In that case, having an independent source for the laser power will be necessary.

My use case is still evolving, which is why I’m looking at these options. However, it’s definitely good to consider removing the Neje adapter board. That will simplify things.

1 Like

Exactly yes.