Welcome! Log In Create A New Profile

Advanced

Adjust Laser power according to effective speed in Marlin.

Posted by keedley 
Adjust Laser power according to effective speed in Marlin.
December 17, 2015 07:03AM
Hello all.
I'm experimenting with laser diode put to 2d corexy frame.

To drive laser TTL leg, i've modified Marlin firmware go fire at G1 movements and to switch laser TTL off at G0 moves. It's operational now (mostly smiling smiley.
My diode has chinese 5W power announced, and it's quite strong - i could leave deep grooves on plywood in one pass, and several pass allow me to cut 3-3.5mm plywood.

When i do engraving, i've encountered slight disadvantage - when machine is slowing down, laser cuts deeper, and has time to leave nasty burning spots on sharp path turns due to decelerations.

Could anyone knowing Marlin FW explain to me which state variable in struct of planner.cpp i could use to match the actual speed machine is driving this block?
I'm thinking to calculate some kind of speed coefficient i should multiply the TTL value to make it lower when speed is changing, but i'm lacking the ability to grock the code enough.

Am i right, that speed in accelerated movements usually changes between minplannerspeed and feedrate values?
May be one could recommend better way of achieving this?
VDX
Re: Adjust Laser power according to effective speed in Marlin.
December 17, 2015 11:23AM
... better use uniform pulses of (adjustable) 1 to 200 microseconds length (the pulse-length defines the effective averaged power) and trigger them with the pulses of the Extruder STEP pin - this pulse rates are set in firmware by "steps per mm" for the extruder motor and are even distributed along a line, regardless how fast the head is moving or accelerating winking smiley


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: Adjust Laser power according to effective speed in Marlin.
December 17, 2015 05:06PM
frankly, first i tried to avoid FW modification at all, hooking laser TTL to a DIR and STEP signals on Extruder, played with capacitors to adjust pulse length and so on. I even assembled AND and NOT gates using transistors and other low integrated components, to deal with those signals. The problem is, that it's almost impossible for me to avoid improper pulses due to different E-moves optimisations hidden in different parts of FW. When laser is weak the simplest way to make a clean engraving is to speed up travel moves to the point where G0 pulse fire don't have time to burn anything. When laser is beefy enought it pisses me off - it leaves marks everywhere.

Extruder actually start moves slightly before actual print, to return from retract, or rise plastic pressure. And in default FW G0 fully identical to G1, so it's impossible to separate them looking at g-code.

I was thinking to count step-events by e-axis, but it's a challenge for me to turn step-events from different axis into TTL adjustment.
for example, as i got it - every axis may have some events. i could add x&y steps together, but w-o direction information i could not build a proper equation to E step-events directly?
Re: Adjust Laser power according to effective speed in Marlin.
December 17, 2015 05:08PM
well, i'll try to look at this closely, thanks for idea. me personally prefer contunuous laser operation, but pulse mode has it's reasons to implement.
thanks, Viktor!
Re: Adjust Laser power according to effective speed in Marlin.
December 18, 2015 06:19AM
Hey, what diode is that?
Re: Adjust Laser power according to effective speed in Marlin.
December 18, 2015 12:14PM
When you cut plywood, do you lower the laser after each pass?
-Olaf
Re: Adjust Laser power according to effective speed in Marlin.
December 30, 2015 05:57AM
look for 'Jack's Store_' on aliexpress.
They're selling bunch of diode modules of different power specs. I've got one with 5.5W rating.
it's 12V powered, TTL signal controlled and made quite clean.
Re: Adjust Laser power according to effective speed in Marlin.
December 30, 2015 06:12AM
Olaf, i currently do not care about cutting, and my setup does not have any Z movement gear at all. All i have is focus bevel on diode's lens assembly.
Speaking of cutting something, adjusting Z is crucial to do it right, AFAIK.
On the other hand, for sheet materials slim enough, fixed Z is (mostly) ok - you will cut through anyway. But edges may have unpleasant look and other issues may occur.

As i'm trying to build a laser engraver that may be placed on top of any flat surface, controllable Z movement may be handy to catch the focus. I don't really know how it could be automated, though.

My setup is mechanically primitive - a smartcore inspired corexy plane and plywood enclosure\frame around.
All this gear is planned to be controlled by RAMPS/Marlin or NanoHeart/Teacup boards/firmware pairs.

[www.instagram.com]
[www.instagram.com]
Re: Adjust Laser power according to effective speed in Marlin.
December 30, 2015 12:19PM
I agree, Marlins or any other 3D printer firmware's extruder planning is way too "clever" for a simple laser engraver. You'd have to modify all of the functions like retraction, jerk moves etc..
Did you consider using grbl?
I'm playing with an inkscape extension, that allows to set a fixed delay time between laser ON and XY-moves to allow heating up material at the start of a trace. I'm curious to see how it works, soon.
-Olaf
VDX
Re: Adjust Laser power according to effective speed in Marlin.
December 30, 2015 04:38PM
... no, it's simple enough -- all my inkjet-paste-dispensers runs with Marlin4Due as firmware and Printrun/Pronterface as software and pretty 'normal' G-code winking smiley

For teaching and some special features regarding Gerber-import/conversion we've modified Printrun, but this would run identically with unmodified software too.

I've hooked the jet-pulses to the extruder steppermotor pulses and only modifying the "pulses per mm" values for the extruder to get the wished volume on the tracks ... would be the same for laser-pulses and energy density for engraving or cutting with a laser module ...


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Sorry, only registered users may post in this forum.

Click here to login