Playing with PWM

Discussions on optics for laser cutter/engravers

Playing with PWM

Postby beentheunseen » Mon Oct 08, 2012 7:00 pm

Hi All,

I have been working on a conversion of an old Universal Laser Systems machine from a dead RF tube to a 40W chinese tube. Things have been going quite well, and this weekend I was able to do some test cuts! My build progress is here: http://beentheunseen.wordpress.com/

I'm running linux CNC, and a 40W laser tube / power supply from coletech on ebay. The power supply PWM input is connected to linux CNC's Spindle PWM output, and the High Trigger input is connected to the Spindle On output. I am then turning the laser on and off by firing M3 S100 (i set up PWM to run from 0 to 255) at the start of each stroke, then M5 at the end. I am generating the code using Gcodetools in inkscape.

This seems to be working mostly ok, but when I look closely at engraving lines, this is what i see:
2012-10-07 19.48.00.jpg


It seems that at lower power the laser is pulsing on and off at regular intervals. This slightly suprised me, as I had assumed that the power supply smoothed out the PWM signal and the output of the beam was analogue rather than digital. Is this kind of opperation normal? If not have I wired something up incorrectly?

The other problem that is apparent is that while the output of the beam is constant, each line has a period of acceleration and deceleration where more engraving occurs. I have read about using M67 to modulate the laser power output with speed... Could anyone provide me with a sample g-code of how this opperates? It seems some people do not recommend this approach, prefering the M3 / M5 combination... What is the consensus on this forum?

Thanks!

Ben
beentheunseen
 
Posts: 11
Joined: Tue Sep 11, 2012 4:25 pm

Re: Playing with PWM

Postby educa » Mon Oct 08, 2012 7:13 pm

Ben,

These power supplies indeed have PWM input, BUT.... they also state that the pwm signal should have at least a 20khz frequency.
That actually means that there is some kind of filter inside the power supply which turns the pwm signal into a nice analogue voltage (like with a potentiometer), but this can only be achieved if the pwn signal is very fast.

I really doubt if linuxcnc could provide you that . Actually I'm 100% sure that it can't.

Suppose that you want 8 bits resolution (256 possible values) at 20khz, thats 20000 times 1 duty cycle and 1 cycle is 256 clock ticks.

Thats 5.12 Mhz and the most stable signals on linuxcnc are only about 20000 hz


so NO, this is not what you want.
educa
 
Posts: 239
Joined: Thu Dec 22, 2011 9:13 pm

Re: Playing with PWM

Postby beentheunseen » Mon Oct 08, 2012 7:42 pm

Oh i see, so standard practive with linuxCNC and DIY lasers would be to use a potentiometer to manually set the laser power? Or is there a way to convert a low frequency PWM signal into an analogue 0-5v signal?
beentheunseen
 
Posts: 11
Joined: Tue Sep 11, 2012 4:25 pm

Re: Playing with PWM

Postby orcinus » Mon Oct 08, 2012 7:58 pm

Calculate the necessary R and C values for the PWM frequency and add a C in parallel and R in series to your control signal.
orcinus
 
Posts: 720
Joined: Tue Feb 14, 2012 4:03 am

Re: Playing with PWM

Postby beentheunseen » Mon Oct 08, 2012 8:43 pm

Fantastic, thanks for the help. For reference, I found this awesome online calculator to figure out the resistor and capacitor values: http://sim.okawa-denshi.jp/en/PWMtool.php
beentheunseen
 
Posts: 11
Joined: Tue Sep 11, 2012 4:25 pm


Return to Optics and Lasers

Who is online

Users browsing this forum: No registered users and 8 guests

cron