Check out the new MoBeam posts! To find K40 conversion information use the "INDEX", "SEARCH" or "LABELS" sections in the sidebar.

Monday, February 26, 2018

Understanding the K40 Digital Control Panel???

K40 PowerLED Control Panel

Newer versions of the K40 sometimes ship with a digital control panel. This panel retains the main power switch but the Calibrate (potentiometer), Laser Switch, and Laser test buttons are replaced by push buttons and a controller PCB.

Warning: this vintage K40 control panel does not ship with a laser current meter. Therefore it is not possible to know the actual operating power the laser is running at a particular digital setting. It is important to monitor the actual running power of the tube during operation to maximize the tube's life.
All tubes will eventually fail and are generally considered consumable but their life can be optimized. Tube life is proportional to the running current* so setting the machine to run at the minimum current required for the job and staying under the tube's rating will optimize its life.

Some users have made the argument that although running the laser at higher currents may shorten the life of the tube it also shortens job time, so it's worth it.

Add a Laser Current Meter

I recommend adding a current meter to your machine if you do not have one. The meter will assist you in running your laser at a current that is consistent with optimizing its life consistent with your expectations.

Add an analog meter to your K40

Most manufactures specify their tubes reliability @ 1500-2000 operating hrs running a working current of 20-22 ma. Check your tube's specifications, especially if you have replaced the stock tube.

The longest life I have seen specified is:

* There are other factors such as shelf life and operating temperature that cause a laser tube to fail. 


Please consider donating (button to the right of this post).
Your donations help fund additional research, tools, and parts that I will return to the community as information.
For other information on the K40-S build use the  K40-S BUILD INDEX with schematics

Thanks to +Chris Hawkins for donating a panel for this exploration


A donated K40 PowerLED V3.0 was bench tested using a simple tester made from a USB adapter a few resistors, a voltmeter, and connectors. This tester provides 5V through a USB brick and listens to the IN and P pins of the panel.
This tester was connected to the panel and various tests were performed as described below.


The schematic of the panel and the test board as it develops is here:

Interconnection with the Laser Power Supply (LPS)

You will note that this control panel connects both the P + & P- of the panel to the K+ signal on the LPS rather than the P signals on the LPS. Wow, now that's not confusing :(.

Also, note that nothing is connected to K- on the LPS and P+ & P- on the control panel are shorted together.

A LPS wired to a K40PowerLED Panel note the 4 white wires (from panel) and the black wires (from water sensor)


The PowerLED [as best I can tell so far] utilizes an embedded processor to provide the functions of the panel. The main functions of the panel are to set the power level of the LPS, enable the laser to fire, and test fire the laser. The indicators and controls include:
  • Laser power display
  • Laser Switch
  • Laser Test Switch
  • Light Instruction
  • 3X +/-Digit Controls: 10, 1,.1

Laser Power Display

Indicates the % of the power the LPS is set to. This display indicates the % of the LPS max power it is set to via the IN signals voltage on the interface. This display is operational as long as the Laser Switch is enabled.
The LPS power is controlled via an analog value of 0-5V on the IN pin of the LPS.

Laser Switch

This alternate action PB enables and disables voltage to the IN signal and the Laser Power Display. When this switch is OFF the display is off (except for decimal points). When the display is off the IN pin to the LPS is reduced to zero volts. When this switch is ON the IN signal will be a voltage proportional to the % displayed on the Laser Power Display.

Laser Test Switch

When this PB is pushed the +P/-P signal is grounded for as long as the PB is held. The Laser Test Switch grounds the +P/-P irrespective of the state of the Laser Switch. When this PB is pushed the "Light Instruction" LED illuminates.

Digit Controls

There are 3 sets of digit controls with a + and - control for each. These pushbuttons (PB's) allows the setting of the respective digit in the Laser Power Display.

Testing Data

The following spreadsheet contains:
  • A table of the IN voltage vs the digital % power setting taken during the test
  • The calculated error between actual and calculated power values for % settings.
  • A math model (equation) for the input-output function of the panel


VoltsOnLPSIN = 2.4562 * (%PanelSetting^2) + (7.6189 * %PanelSetting) - .2686

R^2 = 99.69% (good fit!)

Plotted Test Data & Error Calculations

5vdc Power Supply Loading

This panel draws about .2 amps from the stock K40 supply. That's about 20% of the safe 5vdc capacity. Note that some new machines have an LPS with the fan missing. I have to believe that the stock LPS is running on its limit (1 amp w/o fan) with these vintage machines.

NEW! Go figure, the IN output is a PWM signal

After being prompted to dynamically look at the IN pin of the panel by +Lukas Bachschwell who showed us a scope trace of the signal I was surprised to see that these panels acutely drive the IN pin of the LPS with a PWM signal!!! Thanks, +Lukas Bachschwell

PWM signal on IN

As you can see in my test setup the power was set to 50% and the IN voltage read 2.9. The readings here are average since the signal is actually a PWM square wave. My cheap DVM read 2.9 (which we now know is an average) 

"IN" Scope readings

Vavg: 2.98VDC. 
Duty: 58.8 [*seems like an 8.8% error from panel settings to actual?]
Freq: 24.55kHZ

*it would be useful to test and plot PWM linearity, i.e. panel settings vs actual PWM DF.

Why is the "IN" pin driven with a PWM? 

Keeping in mind that the digital panel wants 
  • Digital control of the power by switch settings
  • Power value display
Since most embedded controllers have PWM capable outputs it's rational to use PWM rather than a D/A approach. The controller can manage the display, switches, and the power this way.

Can we connect our controllers PWM output to "IN" on the LPS

Yes. An open-drain could drive the IN pin on the LPS but in my assessment, it does not gain you anything that I can fathom and has downsides.

Should we use the "IN" pin vs the "L" pin for power control?

No. Although this is an ok way to control power locally between the panel and the LPS, connecting a controller to the IN pin is a bad idea because:
  • We need manual control of the power for testing without a controller connected. 
  • We need a manual offset adjustment. This allows us to avoid having to make job setting* changes to account for laser depletion. The laser wears over time and uses so the power setting for any given job will change over time.
  • The IN pin is not optically isolated from the HV supply but the L pin is. Using the L pin is close to the same as driving the IN pin but it's optically isolated.
*the software that is sending GCODE

Using both the "IN" and "L" pins give us good local power control as well as isolated power control from an external controller. 


The display and controls worked as expected. See the graph for data on accuracy and linearity errors.
I felt the .1 digit was a bit overkill for a Laser Engraver as I think there are many variables in the process that are much larger than a .1% laser power change. I did not plot the tenths.

The % settings vs actual output voltage were pretty linear. The error increased to its largest value (10.15%) exactly at 50%  and then decreased until it reached 100%. I suspect this is related to the type of D/A that the controller employs (actually it's likely because the IN signal is actually a PWM).
From a practical perspective, the linearity error doesn't really matter. What is important is whether the panel can provide a full range of adjustable power from 0-100%. In normal use the operator adjusts the power to suit a particular job noting the best setting and as the laser "wears" that setting will change anyway.

During testing, I noticed that sometimes the % value would decrease when the + key was pressed and sometimes it did not recognize a keypress. More of a nuisance when setting the power but a safety issue if the Laser Switch behaves that way.


My biggest concern is how the laser is enabled. The embedded controller apparently reads the Laser Switch (the fact it is a momentary PB yet operates as an alternate action switch is the giveaway) and sends the set voltage to the LPS.
If the Laser Switch is alternated to the OFF position it puts 0V on the IN pin and this is the only way the laser is "turned off". Essentially the laser is enabled, just at 0 power. I guess that is not theoretically different than disabling the power with one of the other enable functions (K or P) but it just feels wrong to me. It's reducing the power NOT disabling the LPS.

Let's consider how this safety mechanism can fail:
  1. A firmware bug does not turn off the IN voltage when the Laser Switch PB is alternated. Example: a bug turns off the display but leaves a voltage on "IN".
  2. The firmware does not recognize an alternate push of the Laser Switch and does not turn off the IN voltage. The operator does not notice the display is ON and thinks the Laser Switch was pushed. I have noticed during testing that sometimes the +/- keys and the Laser Test Switch does not work. The switch seems to be intermittent or the firmware is missing the press. 
  3. There is a failure on the control panel electronics that keeps the IN pin at a voltage.
  4. Somehow a voltage gets on the "IN" pin from somewhere else in the machine's circuitry there is no secondary means of inhibiting a beam.
  5. The display being ON or OFF is a confusing way to tell the operator the state of the "laser enabled" function. In most machines, the display turns on when the power turns on and stays on during operation. A specific indication that the laser is enabled is more appropriate. 
  6. Example dangerous scenario: the laser is enabled and the operator pushes the Laser Enable button, the display turns off but the IN voltage is left at whatever value it was before. The operator thinks the panel being off means the machine is powered off. During troubleshooting inside the covers, the operator starts a job ...... the laser is now active.
I doubt that this kind of circuit strategy for making a laser safe would be considered "fail-safe" according to OSHA regulations.

  1. Under the requirements of the ANSI Z 136 Standard, for embedded Class IIIB and Class IV lasers only, the interlocks are to be "fail-safe." This usually means that dual, redundant, electrical series-connected interlocks are associated with each removable panel.

Definition of a Fail-safe Interlock
An interlock where the failure of a single mechanical or electrical component of the interlock will cause the system to go into, or remain in, a safe mode.

Editorial Comments


I am not under any illusion that the K40 is SAFE as shipped although I do wonder what the FDA symbol on the K40PowerLED panel infers???? That said, I endeavor to follow OSHA and FDA recommendations whenever possible while doing conversions. This is to enhance my own safety and the safety of those mimicking my builds. To that end my machine has interlocks. These interlocks are not in series with any firmware and consist of nothing but wire, connectors, and mechanical switches. They all fail in the disabled mode...

For those using this panel; ensure that you install interlocks on all accessible covers using the P+ loop on the LPS. Put front and rear cover interlocks in series with the water-flow switch. 

Operation Improvement

The K40PowerLED panel would at first glance present itself as a high-tech implementation of K40 control. In my assessment, it does not provide much if any, advancement in the operation of the K40. In fact, the missing laser current meter makes an important operational measurement invisible to the user. Running overcurrent is the fasted way to shorten the life of a tube. Without a substantial improvement in functionality I am not willing to take the safety risk I think this panel may present.

The Good!

  • You can see a digital display of the % of max power the laser power is set to.

The BAD!

  • The buttons do not always respond or respond correctly
  • The panel draws an additional 20% of the already loaded 5V supply
  • No laser current meter leaves the operator blind to laser tube stress
  • Less linear than a linear pot 


  • Potential safety hazard in that the laser enables indication is confusing and the circuitry is not fail-safe.

Next steps

I do not think that further exploration into this panel will reveal more than the actual design that was used.
I am noodling if a safer, and more comprehensive control panel is wanted, needed, and cost-effective to improve the operability and safety of K40 conversions. Let me know your opinion in the comments..

Comments and corrections expected;


  1. This comment has been removed by a blog administrator.

  2. looks and sounds like it copies the way GRBLlaser works with diode lasers except it does not allow software control of laser power and I do not know why as you set the power in the gcode generator.Now please do a video of how to properly use the digital control panel...step by step THANKS

    1. Hi Walter,
      Sorry but I cannot do a video of the digital panel as my machine does not use this type of panel.

  3. I know it is 2021 alread... I juste recently got a K40 with the digital panel. I've added an analog current meter and did some testing with an oscilloscope. My PWM frequency is about 10KHz at 50% duty cycle. What is found is 100% (99.9% is the closest I can get) is only 97% max duty cycle, it could be as low as 93% although that may be the cheapy scope that triggers poorly. SO the ammeter is about 14mA max. What is an eye opener, is that at 40% power setting, the duty cycle is 50%. That is 8mA power, which is correct for my laser. With a pot at full power, I get 16mA.

    Another issue I think I am getting is when I use Meerk40t to drive the laser, the power is noticeably different than with K40Whisperer, assuming that for Meerka40t I set power on the panel to 99.9% and ppi to 400, in theory that is 40% power. Of course with K40Whisperer, the panel is set to 40%, which of course is actually 50% duty cycle, so K40Whisperer cut deeper. Sight, there goes my carefully curated settings file!

    Then of course there is the issue of Meerk40t doing a raster engrave. With even 20kHz PWM frequency, and Meerk40t "modulating" the pulses (ppi) for a given job, it may be that Meerk40t sends a "fire" when the control panel is in the off cycle off the duty cycle. This no burn. You can see that unless the pulses are synchronized, there will be no burns. In theory with a full 100% on time (in stead of 97%) it should not matter, and at a real duty cycle of 97% it should be mostly fine, but if you should use the control panel to limit max current to say 50%, your day is bound to be ruined. The same can be if you have a true 97% duty cycle and want to engrave at 5% power from Meerk40t. You can only hope when your 5% comes up, that its not in the 3% off time. Meerk40t should increase its rate of fire with pixel density and head speed, so it may get worse.

    So in this case, I think a simple switch to short the PWM to full power for Meerk40t and open it to test fire at lower power or when I want to use K40Whisperer for whatever reason. I have an MCU with two true DAC convertors which I may try and hack in if anybody have a schematic for the controller. :-)

  4. Don, I'm planning on putting in a current meter for the laser, but would like to keep the 7seg LED power display. I don't/won't need the PB switches since I'll be using a pot for power control. The 0.1% display is irritating at best (at least with the PB switches) so I'm thinking on using only 2 displays. Do you have a circuit? PWM->7 segment should not be hard to do, but I like to see what others are doing before I make my own. Good article by the way