Power Control of the K40 LPS

It does seem that as a maker group, we could redirect users to change their Ruida wiring for a better long-term experience by swapping the PWM to the L signal and installing a POT on IN?

Maybe Jack is up for showing the results of such a change?

I do like having my little tiny volt meter display on my IN signal and the milli ampere meter showing that state/health of my tube.

1 Like

I think the Ruida is a commercial grade controller, meant for production equipment run by the typical employee with no technical knowledge. Having the operator manually adjust anything is usually avoided by companies. They hire technical people that set the stuff up and maintain it.

In effect the machine needs to have a PHD (Push Here Dummy) for consistent production runs.

Most of the stuff you speak about, well you are far too knowledgeable, and it seems they can’t get people smart enough to ‘flip burgers’ at $20/hr… :crazy_face:


@donkjr I essence am I not doing what you are doing.? I think, set the pwm control to it’s max tube current state. Yours is on the panel and mine is a pain in the a** to get at.?

Is this adjustment done for every job on the K40.?

No ‘hands on’ with a K40, so forgive my ignorance.


@dougl I wish you hadn’t brought up the ‘mod’ to see what happens… first thought was naw, not going to change the factory setup, but I might give it a shot…

I’ve got the breadboard on the laser now with a photo transistor. I’d like to know how fast I get ‘light’…

Take care… thanks

:smiley_cat:

No, think of it as an “intensity” control. You adjust it a bit at a time, dependent on how much and hard you use the tube. It’s also useful when you want to experiment with new jobs especially engraving.

I’m sure you’re right. I have been staring at this LPS for a long time, way back when K40s started to be popular. From the start, the LPS technical literature has been lean and wrong to misleading and has for the most part stayed that way. That is why I dove into its guts.

I think that controller manufacturers like Ruidia do not know any better and it does work so they just stay with what works. They just believe the labels on the interface. I don’t think they make the LPS.

There is no harm in interfacing to the LPS using IN but it is IMO not the optimum setup. To me, the most pressing omission is the laser current meter.

@dougl we have been preaching this LPS setup to makers for a long time.

Moving on…

1 Like

Working on a few things… will report back with the photo transistor experiment.

Probably start a new thread. I’m going to drop a note to Russ and see if he can suggest what’s going on. He knows both of these machines pretty well…

Thanks to both of you, take care.

:smiley_cat:

I’m going to see what Russ thinks about doing the IN / L swap on his Ruida’s and make a video.

Let’s not hit him with the same question at the same time…

I think I need to look at how the K40 is wired and how the pwm is used. Does the K40 produce a pwm anytime you are executing a layer?

Second, the IN input is active high and the L input is active low… so a change somewhere else needs to take place for it to work properly. I think you can invert the L-ON output…

:smiley_cat:

oh, I didn’t know you were in comms with Russ and had considered asking him about this. Ya, no need for a hit from two sides.

Yes, it’s going to set the power level via PWM per pixel during the burning process.

Good point and no doubt Ruida has a setup entry for that but I can’t say where it is because I don’t have any Ruida machines I can poke at.

The question was does the pwm run even if the machine is only moving to the next spot to lase?

On my little machine (led laser) the pwm is only active when it’s burning, not so with the Ruida.

:smiley_cat:

The standard way the K40(analog version) works is:

  1. The POT across 5V/IN/Gnd sets the max power output of the LPS with a DC voltage. That is fixed and is set when the machine turns on.
  2. The controller puts out PWM into the LPS-L signal control which set the laser on/off at defined power levels based on the PWM.

So ya, the PWM stops when the firmware is told to not lase anything. It’s a one wire control.

I don’t get why Ruida would be outputting any PWM values when the laser is not supposed to be doing anything or what PWM value they would think was valid when the laser is not supposed to be powered. The Ruida does use the L-ON signal it seems to enable and disable the laser so I would expect that signal could be used with one of the safety signals to disable the laser during moves and non-firing modes.

It uses whatever value you enter for that layer and is present for the entire layer, even if it’s only lasing in a few places. When it moves to the next layer that value is present on the pwm output.
It’s running the layer, so it may not matter if it runs all the time.

I think I get how it’s working, just can’t see what I think I should on the scope.

:smiley_cat:

I think I get what you are saying. When cutting and dithering the power level is fixed by setting for the layer and what Ruida does is spit out that PWM constantly even when it’s not putting down dots, lines, etc. It uses the L signal to turn on/off the laser in concert with the PWM pulse when time to put down marks and/or cut.

I was thinking about grayscale again and that’s when the PWM is changing all over the place based on the power level set by the gray scale.

You might want to zoom in on the L signal and see if there isn’t far more ON/OFF levels than what it looks like from the view previously posted(time domain).

I think that’s pretty much it…

When you generate a gray scale and it loads into the Ruida, you can see the vast increase in data sent to the machine…

We can’t figure out the simple part, I’m not going there yet… :crazy_face:

I was burning a line, so I would not expect the L signal to change. It does change if you look at the first photo…

Good night…

:smiley_cat:

1 Like

The above is why I suggested you try syncing on the laser current and looking at the PWM.

The L-on may be an enable at the start of the job, line, or who knows what. The start of firing may or may not be the L-on? So you may see traces where the PWM and L-on are out of sync. It depends on when the scope happens to trigger amongst a gaggle of scans.

In an original* K40 and controller, the image is dithered and therefore the beam is turned on and off with the L signal for each pixel position. There is no grey shade. [this is what I was told].

  • Stock controller with in-the-box software.

Smoothie controllers only turn on the PWM signal when needed [which is a composite of L-on and PWM] this is why an additional “enable” is not needed and the IN can be used as a power adjustment.

Keep in mind that aside from how it is used IN is really an analog input and L is expecting a solid ground. Neither circuits are actually a digital signal in the classic sense.

Oh, and BTW if in a Rudia machine the PWM and L-on are synced changing it to a pot and L may not work.

1 Like

During my ‘sleep thinking’ last night I hit upon the idea of logically ANDing the two Ruidia output controls to get a functioning output for LPS-IN control.

Hi,

I am in the process of designing a small controller based on an ESP32 board to control (via FluidNC) an old trotec laser refurbished with a chineese 40W CO2 laser + lps. (I will trash all the electonics inside the trotec, keep only the mechanical parts + switches and DC motors that I convert to “pseudo steppers”).

I wrote this post before reading the current thread : Can Grbl-LPC set the power via IN and fire via L? - #8 by freedom2000

And finally I wonder if my idea to PWM the IN signal is the right approach !

If you convince me that PWM on L is the best approach then it will be simpler for my ESP32 as I can directly input PWM at 3.3V on L pin and the opto on the D/L pin will do the level shifting to 5V for me !

BTW is the opto fast enough to handle PWM frequency ? How fast should it be to properly modulate the laser power to engrave images ?

Thanks for your help : this forum and this thread are particularly interesting !

JP

There are lots of “opinions” on this subject. As always there are tradeoffs to each of these methods.

I have run my K40 for years with PWM on L and a pot on “IN”. I have also assisted countless others with this same setup.

I think the ability to set the max power outside the driving program is a benefit since the laser’s power diminishes over time. I did not want to have to tweak the program as the laser wore out.

Yes. The L input on the LPS is also an optocoupler.

1 Like

Finally I am convinced !

I will stay to Don’s proposal : PWM on L

advantages :

  • simpler hardware (no need for level shifter
  • opto isolation (not the case on IN pin)
  • set the max power by hardware
    greater range of modulation (since only fine tuning is done by software)

drawbacks : none so far ?

I’ll keep you informed of my progress on this retrofit !
Thanks

1 Like

Hi again,

I go on with this thread as it seems to me that i am not totally off topic !

I have this LPS which is following Don’s terminology a “D” type one.


I got a schematics from @Paul_de_Groot (thanks for this if you read me !)
But the “input part” of my LPS didn’t follow this schematics.
So here is what I found when tracing my PCB.

  • in purple is the little green board which provides the PWM from IN wire
  • on the bottom right side, the 4 connectors of the LPS

What was surprising for me is how the optocoupler was wired with resistor R20 to ground… This wasn’t classical at all !
So I traced a bit more and went to the TL494CN chip.

And here is my interpretation:
R1/R20 is a voltage divider between VREF (5V) and ground
this voltage divider is applied to pin DTC (dead Time Control) of the PWM chip

  • when opto is off (L pin or K pin or D pin not grounded) then the phototransistor is not passing and the voltage divider is applying R20/(R1+R20)*5V = 4.8V to DTC pin
  • When opto is grounded then its phototransistor is passing pulling pin4 to (almost) ground. Thus the output of the voltage divider is now 0V (almost)

If we look at the datasheet we can read:
9.3.3 Dead-time Control
The dead-time control input provides control of the minimum dead time (off time). The output of the comparator inhibits switching transistors Q1 and Q2 when the voltage at the input is greater than the ramp voltage of the oscillator. An internal offset of 110 mV ensures a minimum dead time of ∼3% with the dead-time control input grounded. Applying a voltage to the dead-time control input can impose additional dead time. This provides a linear control of the dead time from its minimum of 3% to 100% as the input voltage is varied from 0 V to 3.3 V, respectively. With full-range control, the output can be controlled from external sources without disrupting the error amplifiers. The dead-time control input is a relatively high-impedance input (II < 10 μA) and should be used where additional control of the output duty cycle is required. However, for proper control, the input must be terminated. An open circuit is an undefined condition.

So that, this DTC pin is indeed used to control the output of the PWM. When K or L or D is not grounded DTC pin is at 4.8V → full dead time… power off. When K or D or L are at 0V then DTC pin is at its lowest value (110mV) → minmal dead time. The laser is totally On. The LPS is regulated by the other comparators (IN input)

So IMHO the usage of L pin to control the laser power is totally valid.
Applying a PWM signal on this pin is not a hack but follows precisely what is intended by the datasheet:

  • With full-range control, the output can be controlled from external sources without disrupting the error amplifiers.
  • The dead-time control input is a relatively high-impedance input (II < 10 μA) and should be used where additional control of the output duty cycle is required**

This L pin PWM can be “digital” or could even be “analog”. Thus we do really have 2 PWM inputs on this LPS : the IN one and the L one. (Don was right!)

Thanks @donkjr and @Paul_de_Groot for your valuable inputs on these LPS.

2 Likes

In case you have not seen the latest version.

Scheme-it-export-K40-LPS-2-2023-11-16-12-32.pdf (466.6 KB)

1 Like

Thanks Don for this schematics. It’s indeed much closer to my LPS than the older one.

I believe that I have now all the needed informations to fire my laser!
(But quite a lot of work however !)

1 Like