K40 improvements from Mini gerbl and Lightburn

@Timothy_Rothman In my opinion, these are bad insallation instructions.
The POT and test button should be left connected and the PWM signal should be fed to a different pin of the LPS. On the original K40 and most other controller boards, the PWM is fed to the L pin via a MOSFET that pulls the pin to GND to fire.

What @cprezzi said.

Can you point us to the instructions are you referring to above?
Most of us have stopped using the “IN” pin (pot control) irrespective of the instructions you will get from many including Chinese LPS manufacturers.
Alternately you should use the IN pin driven by an open drain on the controller board for the PWM.
This leaves the control pot intact and for operation there is no need to swap any wires.

I am a bit surprised with your setup as removing the pot will not disable the test button? The test button and pot are supposed to be on different circuits?

Can you provide a schematic of your LPS wiring?

You are both correct as it relates to the Original K40 controller and some other controllers, but as I stated it is in fact the setup for original Gerbil (newer Mini Gerbil may be different). Here it is from awesome.tech website and is recommended setup by Paul based on his original design and may have changed for Mini Gerbil.

Yes, it is also that way for the miniGerbil. Paul at awesome.tech has always used the IN terminal for PWM control.

Reset

From Pauls @paul website this diagram shows how Paul is recommending connection.

In this configuration I interpret that:

  • the L pin provides on-off control (enable) of the laser.
  • the IN pin controls the power via a PWM signal

Since both L and IN control the PWM characteristics of the LPS this configuration will work fine. [this statement is not exactly correct but good enough for this discussion].

So relative to @Badlaser43 's original problem:

  • This configuration should work if wired correctly
  • The test button should work with the IN and L pin connected as shown in the above.

Some clarifying background [in case I confused the discussion]
Unlike smoothie boards the mini-gerbil PWM output can drive the IN pin directly as it is 5V logic. For smoothie boards internal 3v signals cannot. This is the reason that smoothie configurations are best implemented using the L pin driven from an open drain driver. The control of the lasers on/off can be implemented using a driver mosfet & relay in the interlock circuit configured as a switch.

The only disadvantage of this IN pwm approach is that you loose the manual power control pot. However you gain simpler and auto-magic programmatic laser on/off control.

I generally do not recommend programmatic control of the lasers ON/OFF state as it is not fail proof and gives the operator a sense of safety that could be erroneous. I do not want to trust my eyes to software.


Why is a pot necessary!
The pot is a form of overall intensity control.
It has been proven [at least to my satisfaction] that you need the pot to be independent of the programmatic control of PWM because as the tube wears the set point of the LPS needs to change. This is also true for engraving from material to material.
However, if its suitable in your workflow to have to change the programs power settings each time you rerun a job or change materials then having a pot may not be an advantage.

Note: the diagram above show how to implement a remote-local switch for the pot or digital control panel.

1 Like

@donkjr, thanks for the updated diagram. As I said earlier, I know that you’re an expert on these machines, but the gerbil setup may be a little different in this area. You and @cprezzi may be recommending a better way to connect, but it’s likely @Badlaser43 is having problems with the default installation. Also what is the L pin, can you identify it in the diagram posted above???

Per the gerbil standard installation posted above I verified that anytime the gerbil PWM is connected to In on the LPS the test button on the panel does nothing. When you disconnect the gerbil from the In on the LPS, the test button on the panel test fires at around 10mA (this is with the sweep leg of the pot disconnected and nothing is connected to In of the LPS), when you connect the sweep leg of the pot to In of the LPS, the test button on the panel fires according to the setting of the pot (from 0mA to up to 18-20mA).

So I think the advice to disconnect the gerbil PWM to get the Test button working may also apply to the mini-gerbil in question.

Also the S parameters definitely must be checked (aligned as I mentioned) because Lightburn does a great job, but does not configure device settings when you select Gerbil. Paul wanted $30 to be a way to control intensity for greyscale, but it can be confusing as he sets default to 2048 and if LB is setting S max value to 256 or something typically low, then it seems like nothing is happening. For 8 bit greyscale it’s easier to just set $30 to 255 and then black (255 on a scale of 0-255 would get full power), but if you set the layer to 50% power in LB then it will give S128 in the GCode.

Sorry, the L is actually the LO pin in the diagram above.

I will go back and look at the LPS and min-gerbil schematics to see if I can explain the behavior that you verified when connecting/disconnecting the PWM to the IN pin as you suggest

Behavior #1: Perhaps when the PWM pin is connected to the IN pin it is holding it to ground until the PWM is asserted. If this were the case the TEST button would fire at 0 power and therefore look like it did nothing.

Behavior #2: When you disconnect the Gerbil PWM from IN the test panel fires at 10ma. At what level will the LPS fire if IN is left floating? Perhaps it is maxpower/2 = 10ma.

Both these behaviors is IMO further reason to use the method I outlined :)!

After rereading the thread, I agree that this may or may not be related to @Badlaser43 's problem. We should step back and collect some additional information from him to see if we can help.

When neither the pot nor PWM are connected to IN pin of the LPS and IN is left floating I get 10mA, When I connect the sweep leg of the POT to the IN pin of the LPS, the pot controls the power from 0mA up to around 20mA- I don’t run it that high… ever.

As far as connecting PWM to LO, you could be correct, but I will consult Paul just in case he’s doing something unexpected. Once he confirms I’ll wire it up that way and report back.

As you mention @Badlaser43 may have another issue.

So I think you verified behavior #2 works as I suspected, I was thinking from memory…

I will check on the PWM output …

I could not find Pauls handle on here …

Paul is @pauldg123

The IN and LO inputs are basically different in nature. IN feeds the driver IC UA491 that drives the H bridge to generate the High Voltage based on the input signal while LO enables or disables the UA491. If you drive the LO via a controller with PWM, no real conversion happens and the IN takes the required voltage from the analog signal present at IN. It’s like running an engine on high speed and using the ignition to control the running speed. Now this seems to work but my engineering back ground sees this as a no go since it is sort of uncontrolled and you have the additional start up threshold of the circuit (which can be small). Also LO is entirely controlled by the Mini Gerbils M3,M4 and M5 commands which provides additional safety. Ideally you should hook up a scope at the low voltage side (e.g. h bridge transistors, not the HT side…dangerous) and see the different patterns when using LO or IN to control the tube. Also using IN can help to extend the life of the tube by setting the minimum PWM at 2mA (below engraving output) so the tube has a lower startup threshold during engraving (it’s ‘on’ at all the times during the scanning engraving action). Hope this explanation does help.

3 Likes

This may end up to be an endless debate.

With the utmost respect I see it this way.

The laser should be made safe by the manual enable (laser switch) not a program. I do not see LO being programmatic as “safer” since it can be turned on without the operator manually initiating it.

Your engine analogy does not apply, in my view, because no matter what you switch using PWM the engine (HVT driver) is cycling fully on and off. A cars engines power in no way works that way because its power is not digitally controlled. The throttle is an analog control of power.
The ignition key is more like the Laser Switch on the panel not the LO and the IN is a REV limiter. The LO is the throttle. :slight_smile:

The engineer in me sees it the opposite as you. The IN is a power level set-point control and the LO decides if it should be on or not. The IN is like the setpoint control on your heater and the LO is what cycles it based on actual temperature. The IN sets the lasers base power level and the program decides how much and how often to use it.

When the LO is not asserted (no PWM) the laser is OFF and just as safe as any other approach.
The engineer in me does not like having programmatic control of a lasers ON-STATE that’s why I do not like enabling the laser from inside a job. I think that M commands should not be used for enable. I doubt that one could get laser safety certification this way.

Certainly different controlling methods will look different at the HVT drive but its drive is still a composite of them both and it is still on-off? I do not yet see that as a reason for a particular approach? I have for some time had it on my list to study the composite characteristics of IN + LO control.

“Also using IN can help to extend the life of the tube by setting the minimum PWM at 2mA (below engraving output) so the tube has a lower startup threshold during engraving (it’s ‘on’ at all the times during the scanning engraving action)”

Are you saying that if the IN is always on (at 2ma), like a keep-alive, that tube life is extended? What mechanism in the tubes failure mode would be noticeably improved if the tubes current is kept below ionization levels vs going from 0 through 4ma. I don’t know… but my understanding is that the tube life is mostly affected by disassociation as the result of ionization. In the pre-ionization case the tube is not ionizing?

That said I have for some time wondered if “pre-ionizing” speeds up the tubes firing time? I think the light output response time in these tubes is much longer than we think and that has an effect on high resolution marking.

There is still an important aspect of choosing a power control method that I think is overlooked. These tubes “wear” in that the optical power output vs current function changes over time. This infers that if a jobs power is set up programatically the program will need to be changed as the tube wears.
The operator really has no way to easily tell what the power vs current function is when a job is run. This means that at the running of any job the operator has to readjust the programs values to get a good result. This means generating new Gcode.
Leaving the pot in place and controlling the LO lets the program remain unchanged while allowing adjustment for tube wear. The IN as controlled by the pot adjusts the base power level.The pot now functions like an “intensity” control.
I prefer developing a jobs Gcode as independent as possible from the machines changing characteristics.

Cheers…

2 Likes

An additional problem with using IN for PWM is, that the voltage of the TTL PWM signal metters!
If your board is generating a PWM with 4.8V you get less power than if it is generating 5.0V!

Interesting …:slight_smile:

All the DSP systems I have seen use PWM on the IN terminal, with L being switched as On/Off Exactly the way Paul has the miniGerbil set up.

Likely those are all Chinese designed machines not a standard of design to my thinking.

BTW: These approaches are not WRONG just different.

1 Like

Thank you for your help. I have read all your post. Most of it above my head. I did check the wiring per your drawings. Everything looks good. I checked values for LightBurn. That’s ok. I am wondering about grounding issues ? I took grounding lug off back of case. Ground around the until I got bare metal on both sides. Have a # 10 wire going to 4 foot long 3/4 “ copper rod in ground. My home has (1960) wiring. 100 amp service. No ground system. Is my grounding wrong and how to make good ?

The best way to confirm the best operating method is by measuring it and compare the dead/threshold times. Just hook a trace scope (if you happen to have one available… smile) and measure the current/voltage across the mini current transformer (low power side) that feedback the signal to the UA494.
Also the datasheet gives some good insight in the operation of the UA494 (see http://www.ti.com/lit/an/slva001e/slva001e.pdf)
Enjoy!

You don’t have ground at the pole or where ever the power comes from the electric company to your main junction box? Usually neutral wire is connected to ground at the main junction box. If you create your own ground rod, do it near the main junction and connect ground and neutral at that point. Also you should use galvanized steel or special copper alloy intended for ground rod. Typical copper oxidizes and becomes ineffective unless you have a special copper alloy specifically used for grounding.

I reread the thread.
Boy we sure went down a rabbit hole, an interesting one nonetheless :blush:

Can you describe in more more about the problem and its symptoms?

1 Like