Spindle PWM is no good as Laser PWM..

More
17 Oct 2015 15:57 #63864 by cnccircuits
I have a 3axis benchtop with a laser diode used for wood burning. However I am having trouble adjusting the laser's intensity through gcode. Currently I have my laser driver's PWM input pin connected (through a transistor) to the parallel port of my Linux box and was hoping I could use the spindle PWM signal to modulate/vary the brightness of the laser emission. The issue with that is the frequency is not constant as the spindle speed changes (and can get low enough that lines become dotted if the axis was moving fast).

My laser driver accepts up to 10khz but I am hoping EMC can generate a constant frequency (at least 2-5khz) variable duty cycle waveform?

And is it possible to map that signal to the spindle speed (eg. "S1000" = 100% duty cycle) and adjust duty cycle percentage via gcode commands?

Is this something that could be configured (easily)?

Are there any alternatives I may have missed?

And thanks for your time!

Please Log in or Create an account to join the conversation.

More
19 Oct 2015 10:48 #63915 by cnccircuits
This has actually become a non-issue. turns out i was setting the PWM frequency too high in stepconf wizard which lead to weird behavior. After tuning down the the pwm freq I found something that works well for the moment. still open to suggestions about how to vary laser intensity from gcode.

Cheers..

Please Log in or Create an account to join the conversation.

More
19 Oct 2015 14:10 - 19 Oct 2015 14:35 #63920 by cncbasher
you can do it if you just class the laser as spindle speed , so varying S
i.e m3s1000 is the same M3 turns on the laser ( using spindle-on )

you need to find the range of volts required to go from 0 to 100% of the laser , and this then becomes your spindle ( laser ) scaling , so for argument
is the max volts are 3v then set spindle rpm to 3 in your ini ,

it's probable that although you have the pwm freq about right , your volts etc is way off , hence the problem .
keep the pwm low the range of acceptance of the laser diode circuit is not great , but 10Khz should work ,

although this is for a 5i20 it should work with parallel port , with reduced range
wiki.linuxcnc.org/cgi-bin/wiki.pl?M5i20_Laser
wiki.linuxcnc.org/cgi-bin/wiki.pl?Rastering_With_A_Laser
Last edit: 19 Oct 2015 14:35 by cncbasher.

Please Log in or Create an account to join the conversation.

More
19 Oct 2015 23:23 #63961 by andypugh

Are there any alternatives I may have missed?


I think you will find that M67 works better than changing the spindle speed.

M67 changes the value of (for example) the motion.analog-out-00 pin. The change in value is synchronised to the next movement, so should give better results than a change in spindle speed.
M67 will have no affect on motion blending, whereas I think that S might.

Please Log in or Create an account to join the conversation.

Time to create page: 0.067 seconds
Powered by Kunena Forum