{{Projects infobox
|image = Parametric buildlog laser 2.0.scad.png
|designers = [[User:Tim|Timothy Schmidt]]
|dates = 2008
|vitamins =
|materials = [[Woods]], [[Plastics]], [[Leathers]], [[Fabrics]], [[Metals]], [[Foams]], [[Glasses]]
|transformations = [[Laser cutting]], [[Burning]], [[Melting]], [[Scoring]]
|lifecycles =
|tools = [[Cutters]], [[Wrenches]], [[3D printers]]
|parts = [[Frames]], [[Nuts]], [[Bolts]], [[Plates]], [[Motors]], [[:Category:Controllers|Controllers]], [[Sheets]], [[Linear bearing assemblies]]
|techniques = [[Tri joints]], [[Linear bearing assemblies]], [[Bolting]]
|git =
|files =
|suppliers =
}}
[[Category:Projects]]
[[Category:Manufacturing]]
=Introduction=
Laser cutting is a technology that uses a laser to vaporize materials, resulting in a cut edge. While typically used for industrial manufacturing applications, is now used by schools, small businesses, and hobbyists. Laser cutting works by directing the output of a high-power laser most commonly through optics. The laser optics and CNC (computer numerical control) are used to direct the material or the laser beam generated. A commercial laser for cutting materials uses a motion control system to follow a CNC or G-code of the pattern to be cut onto the material. The focused laser beam is directed at the material, which then either melts, burns, vaporizes away, or is blown away by a jet of gas, leaving an edge with a high-quality surface finish.
=Challenges=
[[File:Pennwell.web.400.367.gif|thumb]]
=Approaches=
; Moves to (5, 6, 7) at speed 8, laser off G0 X5 Y6 Z7 F8 ; Moves to (5, 6, 7) at speed 8, laser pulsing 1.2 times per millimeter, for 50ms, at 60% power, with serial diagnostics messages, in Pulsed mode. G1 X5 Y6 Z7 F8 P1.2 L50000 S60 D1 B1 ; Without moving in any axis, pulse the laser for 50ms at 60% power, with serial diagnostics messages, in Continuous mode. M3 L50000 S60 D1 B0 ; Without moving in any axis, turn the laser off. M5 ; Without moving in any axis or turning the laser on or off, set the laser power to 50%, pulse length to 60ms, pulses per millimeter to 1.2, in Pulsed mode, without serial diagnostics. M649 S50.0 L60000 P1.2 B1 D0 ---------------------------- S: intensity (0.0-100.0) L: duration (microseconds) P: pulses per mm D: diagnostics (0 = off, 1 = on) B: laser firing mode (0 = continuous, 1 = pulsed, 2 = raster)In '''Continuous mode''', the laser is turned on, and remains on at the selected intensity until it's instructed to turn off. '''Pulsed mode''' fires punctuated bursts at intervals matching P: PULSES_PER_MM, each lasting for L: DURATION. That gives us all the information we need to time the laser firing and extinguishing from the inner loop of the stepper driver interrupt handler - the core of the firmware. This makes the positioning and timing of pulses in Pulsed mode much more accurate than any other method. Pulse positions are accurate to the nearest step in any axis and reliable minimum pulse times of 250 microseconds have been measured on a 16Mhz Atmega 2560 (better may be possible, but hasn't been tested). Stock Marlin's minimum pulse length is 8.2 milliseconds on the same hardware, and permits adjustments no smaller than 1 millisecond. '''Raster mode''' is a special variation of Pulsed mode which allows you to specify a unique intensity for each pulse in a variable-length horizontal line of evenly spaced pulses, with configurable 'pixel' size and aspect ratio, arbitrary line-advance, and selectable left or right blitting. This is everything required for maximally efficient arbitrarily large 2D image blitting, but allows for a number of other uses as well. An obvious improvement would be to allow for Raster blitting along an arbitrary line in 3D space - patches welcome! Because pulse timing can be done in the stepper driver interrupt handler, and the information necessary for many pulses is contained in a single command, Raster mode is very fast. Raster mode only works with the “G7” command which accepts a number of unique parameters:
G7 N0 L68 DAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAhaGBUQFRiZ0ZPVExARUU6RTpITD1GU05Q ------------------------------------------------------------------------------- N: new line: increments Y axis by LASER_RASTER_MM_PER_PULSE * LASER_RASTER_ASPECT_RATIO from Configuration.h 0 = negative movement in the X axis, 1 = positive X axis movement. L: byte length of the packed pixel set D: data, base 64 encoded 0-255/pixelIn firmware, you have two options for controlling a laser: '''Single pin:''' The LASER_FIRE pin supplies a PWM signal at at Hz specified as LASER_PWM in Configuration.h, adjusting duty cycle of the wave to control intensity, and supplies logic level LOW when off. Common for laser diode '''Two pin:''' The LASER_FIRE pin supplies a logic level signal HIGH for fire, LOW for extinguish. The LASER_INTENSITY pin supplies a PWM signal at at Hz specified as LASER_PWM in Configuration.h, adjusting duty cycle of the wave to control intensity.