Laser Engraving plugin.

This is where you talk about Plugins. How they are made and how they work, show examples.

Laser Engraving plugin.

Postby Tweakie.CNC » Wed May 29, 2024 8:59 am

When using the laser plugin with my CO2 laser I have full ‘on the fly’ control of my laser’s actual output power (via. current control). However, when using a cheap Chinese diode laser (which does not have any external diode current control) this is not the case. As the plugin only allows my actual diode laser’s burn to be pre-set (via. Min. / Max. & Feedrate settings) at ‘runtime’ an ‘on the fly’ method of output power control was desired. To this end (using a Microchip processor) I have substituted the 3.125 kHz PWM output from the plugin with a 25 kHz PWM, which has fully adjustable ‘on the fly’ pulse width control which, in turn, is synchronised with the plugin’s PWM output.
I have essentially constructed an ‘in-line’ controller between the PWM output of the plugin and the PWM input to the diode laser. It is still ‘work in progress’ but currently I can adjust the diode laser’s output power ‘on the fly’ between 0 and 100% using a ‘pre-set’ pulse repetition rate between 5kHz and 25kHz.
So far, my PWM substitution is linear but from various test results I am thinking that there may be some advantage to having an adjustable inverse log or inverted S curve for this substitution (assuming my mathematical and programming skills are up to the task).

I would be most interested to hear what others think about this.

Tweakie.
Attachments
DSC02791.JPG
DSC02789.JPG
User avatar
Tweakie.CNC
 
Posts: 117
Joined: Wed Jul 31, 2019 7:58 am
Location: London UK

Re: Laser Engraving plugin.

Postby Tweakie.CNC » Wed Jun 05, 2024 11:11 am

Results are promising - adjusting the laser power 'on the fly' reduces the test time getting the image contrast correct for the final run.

Tweakie.
Attachments
DSC02792a.JPG
User avatar
Tweakie.CNC
 
Posts: 117
Joined: Wed Jul 31, 2019 7:58 am
Location: London UK

Re: Laser Engraving plugin.

Postby formantjim » Wed Jun 05, 2024 2:21 pm

Hi Tweakie this is very interesting.

So just to be clear here the max PWM from the Laser plugin that comes with UCCNC is 3.125KHz? Where does it say that in the documentation? I thought the max PWM frequency was 5KHz no?

And you have made a deice to convert this to operate a PWM output to a Chinese laser at 5kHz to 25KHz?

I currently run a Russian laser that has a 50KHz PWM input, can your microprocessor be modified in code to produce this?

Lots of questions but I have managed to produce good engravings on sheet brass using the above setup but obviously ran it a lot slower to achieve the results needed. Would love to up the power to speed things up a bit.
formantjim
 
Posts: 74
Joined: Fri May 31, 2019 5:28 pm

Re: Laser Engraving plugin.

Postby Tweakie.CNC » Thu Jun 06, 2024 7:57 am

Hi,

I just hooked up a scope to the plugin output and obtained a nice (PWM) square wave with a duty cycle which would vary between 0% and 100% (depending on the pixel value encountered during the image scan) and having a Pulse Repetition Frequency (PRF) of 3.125kHz. This frequency may be adjustable (within the UCCNC software) or it may not be adjustable but it is of little consequence unless perhaps a galvo scanner is being used.
To further explain what I have done…
My controller has been constructed to reduce my diode laser’s output power by producing a PWM signal between 0% and 100% of the existing PWM signal output from the plugin. It is convenient for me to output this PWM at a PRF of 25kHz as it will substitute 8 * (0 to 40uS pulses) in place of each 320uS output pulse from the plugin. As I have manual ‘on the fly’ control of the duty cycle of these 40uS pulses my laser’s output power can be adjusted to produce the desired contrast level of the image being reproduced. This reduces my set-up time considerably as I only have to make one partial trial-run for each different material being used.
This method of control is not perfect as it operates in ‘real-time’ with a maximum synchronization delay of 4 clock cycles of a microprocessor running at 20MHz but there is no noticeable degradation of a vertical line when bidirectional scanning at, in my case, an axis speed of up to 6000mm/min. Also, with this method some pixel values are truncated and ‘grayscale’ images may suffer as a result but as I am using ImageR to dither my images I am only really working with 2 pixel values.

Tweakie.
User avatar
Tweakie.CNC
 
Posts: 117
Joined: Wed Jul 31, 2019 7:58 am
Location: London UK


Return to Plugins

Who is online

Users browsing this forum: No registered users and 2 guests