Laser pulsed control (PPI)

I’m hoping to look into pulsed laser control soon and wanted to gather some opinion on this before I start. The key things I’m after is to know what people would like and how they’d like it to be controlled.

First, some background. Everything I’m talking about here applies to the most common type of glass tube CO2 laser and its associated power supply. My laser is one of the blue box DC-K40 ones from eBay but I believe other hobby-level ones are similar. This doesn’t apply to laser diodes. It probably doesn’t apply to more expensive commercial machines, but you’re probably not going to be adding a Smoothieboard to one of those anyway.

Controlling the power of a CO2 laser tends to be done in two ways.

  • You can adjust the current that flows through the laser. The Smothieboard does an excellent job of this with PWM control. It’s analagous to turning the current adjustment pot on the front of the machine. You see this reflected directly in the ammeter on the panel. PWM is managed using the S code (spindle speed) ranging from 0 to 1.
  • You can also use the TTL control on the laser to rapidly switch the laser on or off. Think of this as being able to cut a finely dotted line. The usual way to control this is to use a fixed time pulse (e.g. 3ms) and specify the number of pulses per inch or PPI. Obviously PPMM might suit the metric sensibilities of the Smoothieboard, but you’ll normally find it referred to as PPI. The number of pulses is high enough that the dots overlap and you don’t see a dotted line but apparently reduced power.

Why do this? There are good reasons for wanting pulsed control.

  • It’s needed for the low end of the power scale, whether cutting or engraving. On my laser, at anything below 4mA it doesn’t fire at all. It’s a bit all-or-nothing. Wood is definitely cut rather than just darkened. Thin mylar sheet (ideal for solder paste stencils) melts at the edges. Paper catches fire unless you’ve got good air assist. To reduce the power going into the material you have to start cranking up the speed. For solder stencils I find that I can’t cut a tiny square at 4000mm/min. It starts looking not very square -and it’s still melted.
  • Apparently you can get better cuts and effectively higher power from the laser. Not sure about this, but that’s what I’ve heard.
  • A fixed number of pulses per inch, means you have decoupled the power from the speed. 100 x 3ms pulses across the same bit of material is the same done at any speed. The existing PWM adjustment control does too, but this is another way.
  • Commercial DSPs use PPI. We can do it too.

So, that was a quite a bit of background waffle. What am I after? I’d like to know what other people want. I’m happy developing features for my own use, but I’d prefer working towards something that others would make use of it too.

I’d also like some opinions on how this should be controlled via g code. We’ve effectively got two distinct ways to vary the power. The current S (spindle speed) code is linked to current.

  • Would a new M code be best?
  • A custom S code? Something like Sxxx.yyy - e.g. S0.5,200 could represent 50% power at 200 ppmm. S0.5 could be 50% power with no pulsing. (I was tempted to say S50.200, but the current S range is fixed at 0 to 1.)
  • Is there anything we would be wise to be compatible with? I quick google showed that Lasersaur seems to use Sxxx alone to set power and M3 Syyy to set PPI.
  • It would be possible to use one S settings and mix the PWM/TTL implementation behind the scenes. Perhaps this would work on a single piece of hardware, but it sounds problematic for a broad implementation like Smoothie.
  • It could be an either/or for PWM or TTL. This doesn’t seem ideal.

Obviously any option would need to be backwards compatible with the current Smoothieware solution. I’d like to make it versatile without making it confusing.

Still here? Sorry for the long post and thanks for reading. All opinions appreciated.

Imported from wikidot

It is the right idea, to make a PPI management in smoothieware.
When the laser power more than 40W is almost impossible to work with thin materials under the control of laser power only through PWM.

Here is a good article on experimentation with homemade control PPI.
www. buildlog. net /blog/2011/12/getting-more-power-and-cutting-accuracy-out-of-your-home-built-laser-system/
(Just remove the spaces in the link that would go to the website)

I think the developers will not be very difficult to make the possibility of PPI. This will greatly increase the possibility of applying
SMOOTNYEBOARD in laser engravers.

Hey.

You definitely want an either/or for PWM or TTL. People are going to be using one or the other, not both.
So it should just be a config option ( defaulting to PWM for backward compatibility ), and all the rest stays the same.

Does that sound good ?

Cheers.

Hello.
Yes it is, both methods at once.
This gives more control cutting and engraving process.
Laser power supply at the same time PWM controls the laser power and TTL input for its fast on/off.
Problems with backward compatibility should not be.
You just need to add the option to PPI. Fred27 describes the path how to add .

There is no high frequency as the pulses PPI must be configured between 2 and 5 msec. Hence the maximum frequency is less than 1 kHz.

Thanks for the input, guys. PWM and PPI are essentially separate things and it probably makes sense to control them separately if the gcode to do so can make sense. In practice, I think that the laser starts with a brief high power surge whatever the PWM setting (from that article you linked to) so it may make little difference. I’ll test this out.

Currently I’m having some other unrelated issues with G2/G3 moves, so that’s blocking me. I’d need to get that working before doing anything further.

Hello Fred27,
It will be very cool and useful to have “A fixed number of pulses per inch”. Is it already in your edge version?
Thanks a lot!
Jason

I’ve not started work on it yet but hoping to soon. If you have any suggestions then now’s the time.

I’ve just finished some code to allow you to specify a range other than 0 to 1 for the S command - i.e. S100 or S255 represents full power for instance. I use CamBam and that only allows an integer for the S parameter so 0 to 1 doesn’t cut it! I’ve not done a pull request for this yet but will do when I’ve tested it a bit more thoroughly.

Hello Fred27
I think better to do S from 0 to 100.
Yes we lose in accuracy, but most compatible with many programs CAM. And easily edit a postprocessor.
Especially for high precision power adjustment is not usually necessary to the whole.
And it is desirable that C0 is turn off the laser, a not be output at the minimum power as now.
It is important to make the possibility of change in the pulse width config for PPI. In the range of 1 to 5 ms. Preferably with a precision of 0.1 ms.

Quarkclub - Some code to do this has just been pulled into the edge branch. Grab the latest from github and add a parameter as follows to your config. You’ll now have the range S0 to S100 controling the power of the laser.

laser_module_maximum_s_value    100

I’m not sure what you mean by C0 turning off the laser. Do you mean S0? If so, then you need to make sure that laser_module_minimum_power is set to 0. The S values set the laser power between laser_module_minimum_power and laser_module_maximum_power.

I’m not sure what lasers require a “tickle power” setting to keep running between cuts, but it seems some do. With a versatile piece of hardware like the Smoothieboard it’s essential (but sometimes tricky) to ensure you don’t remove a feature someone else wants when adding a new feature that you want.

Hi,

I’m very interested in this PPI control as well for my self built 40w laser. Have there been any progress on this?

Thanks in advance

Sorry - other things are competing for my time right now. No progress yet, but I’ll be sure to post here when there is.

Hello Fred27.
Is there any progress in the implementation of ppi control in the Smoothieware?

Sorry. No progress. I’ll check out the new laser step generation and then get back onto it.

Moving from Inkscape extension Turnkey Tyrrany over to Smoothie/LaserWEB3 and I am now missing the PPI control.
I would love to have this functionality.
It really is a function that higher end laser systems use. Very helpful for blasting thin material etc.