K40 laser wiring diagram and pinout

Most problems with the K40 laser cutter involves the power supply in one way or another.
Here is the facts about the laser power supply installed in most K40 machines with complete pinout and wiring for the different types.


The K40 is a product made with parts to make a small and cheap laser machine.
It is not developed or manufactured like this – it´s just the cheapest parts and solutions put in to a metal box.
Now when we talk about the Laser Power Supply it is actually not made to be used as it is in the K40 laser machine at all.

The power supply

There is 5-6 types of MYJG-psu´s in the K40 machines delivered, they are mostly two types with some differences on the pin layout and connector type.
In this article i will show two types who covers 95% of all types – if you have another type it is probably very close to one of the two types shown here.

Pinout / wiring

Please note – the pins are marked as they are written on the PCB. The P+ and P- are printed wrong on the Type2 PSU board – it does not matter though but they are actually the other way around.
The connectors on PSU Type 2 are JST XH 2.54mm.


Pinout table
L- Laser tube ground
FG – Case ground
AC-N – AC neutral
AC-L – AC live
GND – Ground
P+ – Together with a GND – connect flow meter, lid switch or other protection here.
IN – Signal in for power setting, 0-5 volt
5V – 5V output for use with power potentiometer or feeding the optical end stops
24V – Output for the controller board power
L – Laser fire pin.

Common problems

The most common issue with the PSU´s has been the flyback transformer and/or the rectifier which has been of very low quality burning them and with arcing or no fire as a result.
You can prevent this a lot by making sure your machine is properly grounded (grounding your k40 article) – and make sure the rectifier are of a 4A model or more. Read the numbers on the rectifier to see what type you have installed. It needs soldering to be swapped.
Other problems involves no-fire issues – check out this article how to find the problem

Picture of the flyback transformer
k40 laser flyback transformer

Upgrades you should do

The priority upgrade you should do is adding more cooling to the power supply compartment. Make sure you push air in to prevent sucking smoke out of the machine. Add a 50-120mm fan and push in some air, or tilt your PSU to let it breathe air from the outside.
This prevents it from heating up the air inside the machine and trying to cool itself with the already heated air.

24V external power supply
The MYJG-40 has never been made to run the stepper motors from the internal 24V line, the internal 24V is for running your controller board and nothing else. With the K40 setup of controller you cannot have a external PSU for the motors so you need to add both the controller and motors to a new 24V PSU.
24V with 4A is enough for our machines. Read this article for installation instructions.

Replacement Flyback transformer

Before you buy a flyback – make sure yours are identical with the one you order.
Flyback transformer (external link to Aliexpress)

Replacement PSU´s

The standard 40W PSU (external link to Aliexpress)

Upgraded PSU´s

A PSU i personally run i every machine is the HY-T50, very stable and nice PSU without any problems. I have bought and installed at least 100 of them and what i know so far only three has been sent back for warranty claims.
HY-T50 on Aliexpress

Some links in this article are affiliate links – it helps with keeping this website alive and my fridge filled with Pepsi for my long hours writing all articles 🙂
Notify of
Inline Feedbacks
View all comments

can you please tell me the difference between the MYJG-50W PSU and the HY-T50 PSU?
I asked cloudray themselves, but the answer was “there is no difference, you can use them both” Hahaha….
I am from Germany and the reason why i am asking is, that cloudray has the MYJG-50 in a european Stock, so delivery is fast and there are no customs costs. But if the HY-T50 is the better choice i will oder that via your Link in China by Aliexpress.
Best regards


OK, thank you! 🙂


Hi, I have a MYJG-50W PSU that I would like to use to replace the stock K40 PSU with, are you able to tell me which wire goes where, there are fewer outlets than stock, and it’s not obvious, to me, where the tube negative comes from.


Thank you, that makes everything clearer, I was forgetting about the external 24v board supply, I have a Cohesion board, so that is sorted. Now to wire it in, thanks again.

fabrizio cerfvelli

I wanted to replace my k40 power supply (PSU type 1) with the cloudray 50w hy-t50 but I saw the pinout are completely different. Could you tell me how to make theconnections?


Help me I am lost! I have switched from std psu 40 watt to hyt50+ 24v psu and something is going wrong. It fires but step motors moves from xy(0,0) to opposite angle. I need wiring diagram to switch from old to new psu!


Solved! it was a bad grounding with the 24v psu! Thanks for your support 🙂

Kyle yochum

Do you know what the connector is for Type Two psu p+/g connection? I think I have identified it as jst xh 2.54mm 2pin connectors, but would like to confirm.

Thank you!

Tracy Minor

how do u how do you connect the controller to the hyt50


hi, it is not clear where is the diagram to connect an external power supply for the K40


thank you very much for your availability

Rubio Drager


I bought a laser model K40 through ebay and since it arrived a few weeks ago when I performed the function tests I could verify that it is not cutting. I tried to solve the problem in several ways like in the youtube videos that I found related to the problems, but without success. I read checked the alignment of the light path, the alignment of the lenses but still does not cut. I recently bought the Upgraded – Adjustable laser head kit with air assist – 12mm from you and I am waiting for the delivery of the items to have more resources for a more precise adjustment of the laser focus, but I am afraid that the problem is something more serious related, for example with the PSU and subsequently with the laser power.
I would like to ask for help for your knowledge and experience with the K40 model and help me to solve the problem with my machine.


Rubio Drager