Laser Cutter

From ThinkHausWiki
Jump to: navigation, search

See the talk page for notes on permitted material and feed rate and laser power for various materials.

Contents

Safety Information

This section could be more complete, but in the meantime here is some important safety considerations:

  • Refer to the talk page for permitted materials. Do not simply guess at feed / speed rates.
  • Do not laser unknown materials. If you can't identify exactly what the material is, don't laser it!
  • The safety switch prevents the laser from firing when the lid is open. Do not defeat the safety switch.
  • The test fire button works even when the lid is open, so _always_ turn off the laser power (red switch) before opening the lid
  • The laser beam will reflect off shiny surfaces, so do not laser anything shiny.
  • The laser bed you are using may be shiny metal. If so, be careful not to use more power than is necessary to cut your material. A strong beam will penetrate the material, reflect off the bed and back at the underside of your material. Best case this will give a bad cut, worst case it will dump excess heat into your material and potentially ignite it.

Here is some documentation:

Characteristics of the work area

The laser bed has 0,0 at the upper left corner, with the X axis as the "up-down" axis and the Y axis as the "left-right" axis. X travel is 9 inches, and Y travel is 13 inches.

This is rotated 90° clockwise from the conventional cartesian plane as used in math and by CAD programs. To set up a work area in your program the right size and orientation, make sure that the X dimension (horizontal in CAD, vertical on the laser) is 9 inches long and the Y dimension (vertical in CAD, horizontal on the laser) is 13 inches long.

The laser has a kerf, or the width of the cut, of approximately 0.1mm, or about 0.004 in, when using 3/16 plywood underlay material.

How to generate G-code for our laser

Since this is a laser and not a mill, there is no z-axis - z up/down is more or less equivalent to laser on/off. Spindle CW output from EMC is connected to the laser. Anything that can be a path in inkscape can now be converted to G-code. Does etching of filled shapes work? Don't know yet.

Need free, functional G-code viewers for Windows, Linux, OSX so that people can see what the conversion tools have done to their files.

There is a simple G-code simulator written in Python, currently under development.

An interesting site that has a number different scripts to generate G-Code for specialized functions is available at http://wiki.linuxcnc.org/emcinfo.pl?Simple_EMC_G-Code_Generators and should provide blocks of code for use within a larger G-Code script.

DraftSight + dxf2gcode

Another source for generating G-code is to use a program called DraftSight, available downloads for Windows, Mac, and Linux from http://www.3ds.com/products/draftsight/download-draftsight/ which is a full 2D CAD Program and creates a .dxf file, and then to run the .dxf file through a converter to generate the actual G-code. DraftSight program is available for free for individual downloads.

DraftSight has a lot of options available but I have found that the most important option is to save the final results should be saved as a "R2010 ASCII Drawing (*.dxf)", or any other ASCII .dxf format.

Once the drawing has been saved use a Python script called dxf2gcode, available from http://code.google.com/p/dxf2gcode/ for free, that can take the .dxf file generated from DraftSight and convert it into G-code. This program can only take ASCII .dxf files and cannot use Binary .dxf files or any .dwf files also available from DraftSight. dxf2gcode is licensed under the GPL v3.

When using dxf2gcode there are several considerations. The first is that it does consider itself as a 3D code generator that, therefore, has a z-axis. It is intended to be used with 3-axis CNC mills. This z-axis is set, by default to need two steps to reach its depth. This results in the g-code having two passes through the piece. Some of the defaults I change are that the "Tool Diameter" and "Start Radius" both get set to 0.1mm and the "Z Mill Depth" is set to 1mm, which means that only one pass gets generated for each part,and I change the "G1 feed XY Direction (mm/min)" to 200.

dxf2gcode uses this to generate a tool path and the needed G-code that is useful to our laser. But the file that dxf2gcode generated has a number of things that need to be edited. The laser uses M3 to turn the laser beam on and M5 to turn it off. None of theses exist within the file that dxf2gcode created and so must be added. The z-axis is also used whenever the laser wants to move to a different place and these references can easily be removed for extra readability. It is easiest to replace the movements for the z-axis with the turning on or off of the laser; when the g-code calls for the z-axis to be lowered then the laser is turned ON, using M3, and when the z-axis is raised the the laser is turned OFF, using M5.

When wanting to etch and cut within the same job is is probably easiest to do each operation separately and then combine the files together in the order that you want. Using T*M6, examples T1M6 and T2M6, for tool changes where the "*", from 1 to any number, represents different power levels. This command causes the laser to stop and request that the user start the process again, generally by hitting the "ENTER" key. The user can take this opportunity to adjust the power setting to the new level. It is also possible to add comments at this time, such as "Etch 1" to further add guidance for the user.

Overall the combination of DraftSight and dxf2gcode, and doing some editing afterwards, generates some very useful G-code that works on our laser very well. We need to create a simple script that can be run against the g-code file to remove the unneeded references to the z-axis and to replace them with the M3 and M5, to turn the laser ON and OFF, commands.

Inkscape + our plugin

Please see the THlaser Inkscape plugin page. Please see the Inkscape Tricks page for... inkscape tricks, yes.

Starting from a DXF

Lots of stuff on Thingiverse and the rest of the internets is in DXF. Open the DXF in inkscape, select the paths to export, extensions->thinkhaus laser (gcode tools), apply.

If that gives crappy results, try using Draftsight to export the DXF as an SVG and open it in Inkscape.

If that doesn't work, use another tool. Lots available on the internets. Don't know which is best. Then see #Starting from G-code

Starting from an image

The EMC capability to open image files is just built-in access to Image-to-gcode, which uses grayscale as a control for depth. At the moment we have no way to translate depth into something useful.

Paul is working on improvements to graster by Jed at Hacklab.to.

Starting from G-code

At the beginning of the file set a spindle speed (G96 S100). Manually convert z-down commands to spindle CW (M03) and z-up commands to spindle off (M05). Need a script to convert arbitrary G-code files to G-code for our laser. Based on Z-height, probably. Might require user input to tell the script what height should correspond to on.

Toolpath Optimisation

Toolpath optimisation involves making sure that the head takes the shortest path while it cuts and traverses. However, it isn't just about reducing cutting time. If the laser doesn't follow a continuous path around the cut (ie it stops, cuts another line, and then returns to the original line) then the cut won't be as nice, may not be continuous, etc.
A non-optimised toolpath. White lines are cuts, blue lines are traverses without cutting. There's lots of backtracking and traversing lines that have already been cut. Very inefficient.

When using the Inkscape G-code export extension, the key to optimisation is to make sure that cuts consist of only one path. This can be accomplished

  • by manually tracing the paths with a single path, using the Pencil or Pen/Bezier and with snap to nodes turned on.
  • by combining the existing paths:
    • select the objects
    • Path->Combine (also converts the selected objects to paths)
    • Switch to node edit mode (pointer with blue nodes)
    • Click+drag to select all the nodes
    • Click "Join selected nodes" or "Join selected endnodes with a new segment"
  • other ways?

If there are regular curves or circles that are made of many nodes, it may be a good idea to use the Simplify command on them. Watch for unacceptable distortion of the curve. Simplifying before joining the paths may give better results.

An optimised toolpath. There are only two traverses, and each piece is cut in one continuous line.

Speeds and feeds

equivalent to laser power and head speed.

Many files are going to include some lines that should be etched and other lines that should be cut. Since there is no computer control of laser power, these cannot both be done in the same pass. Two files could be generated and run, but this is a bit klugdey. G-code supports "wait for tool change" (M6) commands, so perhaps a file could be generated with the etch program and the cut program and a command to request the user to "change the tool" (ie turn up the power) in between.

"As a bonus, the software can generate a PWM signal for the laser, so I now have power control of the laser. This means you can reduce the laser power as the head slows, so you are always using the same power density." [1]

A related matter is tuning the maximum acceleration and maximum head speed. If the acceleration is too slow relative to the head speed, you'll end up with curved corners. The present default acceleration seems to work well with a head speed of 8 inches / minute (or F 8, which I think is 8 inches per minute). Adina 03:56, 15 March 2010 (UTC)

Vector vs raster

These are raster: [2] [3] [4]
These are vector: [5] [6] [7] [8]


Upgrades

  • 120V pump - 1000 l/h. Done.
  • Water flow switch/sensor. Done.
  • Air flow switch/sensor: Build one
  • Better fume extraction
  • Better fume exhaust - duct booster fan from Princess Auto. Done.
  • Non-clear window? Something tinted/smoked to reduce the glare from burning.
  • Interlock system so that laser will not turn on if there is no air and water flow.
  • The bed was changed to a grid bed that provides an open area under the work surface

Worklog

Hardware solution

Looks like replacing the board is the best way to make it functional. One possibility is to use the board from a pen plotter so that it speaks real HPGL, but that's not as straightforward as it might seem and it would lack the flexibility of a solution that uses a stepper control board under direct control of the PC interpreting G-code (as Hacklab.to did).

LinuxCNC is good for controlling the machine. It directly controls the steppers using pins on the parallel port as direction and step signals. The board in the laser needs to translate step and direction pulses into the right sequence for the stepper motors. Hacklab.to did this using a PIC16F877 and h-bridges made of FETs, but that's a lot of soldering and troubleshooting. It would be much easier to use a chip to do it all, like the UCN5804. Unfortunately, the UCN5804 is now discontinued and its replacement is only available in SMT packages.

There are literally hundreds of stepper driver chips, all capable of driving different kinds steppers at different voltages and currents. After wondering what voltage and current our steppers take, and a few attempts to measure it using a DMM, which doesn't work well since it's a pulse train, someone had the bright idea to just use exactly the same chip as is used on the original board because we know it works.

The board in the laser uses 4 ST Microelectronics PBL3717A stepper motor drivers, along with 4 1ohm 1W resistors for current sensing. A control board should be as simple as those 4 chips and resistors, a few other passives, and a DB-25.

Looks like the PBL3137A chips are not as easy to drive as I thought. Back to the drawing board: need a chip with direction and step inputs that automatically sequences the coils. Half stepping would be good, and it needs to be able to handle 24V at up to 1A (that's what the PB3137A can handle).

Options are:

  • Use a uC to interpret step+direction and provide right sequence to PBL3137As.
  • L297+L298. About $15/motor. L298 won't fit on standard 0.1" boards.
  • A3967. About $5/motor. SOIC-24 only, current +/- 750 mA.
  • A3982. About $5/motor. SOIC-24 only, current +/- 2A.

Adapters from SOIC-24 to DIP are available. A3982 is the right solution, I think.

FAQ for the A3982:

Q10: What is the best way to determine a value for Rs, so as not to exceed 0.5 V on the SENSE pin?
By using the formula:
RS = 0.5 / ITRIP(max),
where:
* RS is the sense resistor, * 0.5 is the absolute maximum allowable voltage on the SENSE pin, and * ITRIP(max) is the maximum expected current.

This will ensure that the 0.5 V limit on the SENSE pin is never exceeded.

Homing

How the Moshi-compatible board homes the carriages:

  1. Drive -Y until the Y stop is activated.
  2. Drive -X until the X stop is activated.
  3. Drive +Y until the Y stop deactivates.
  4. Drive +X until the X stop deactivates.

Stops are opto-interrupters, 0.35" spacing. The detector side has two leads. There is a 330 ohm resistor to limit current for the emitter side.

Power

The laser is designed to run on 240VAC, and it came with a 120VAC->240VAC stepup transformer inside. After a period of heavy use, this transformer melted. It was rated for 500W, but given the size it probably shouldn't have been rated at more than 50W. The replacement was a Hammond 176F 1 kW step-up transformer.

Power control

The laser power is manually controlled using a potentiometer. The laser came installed with a WXD3-13 4.7k 10-turn linear pot. It progressively became more unreliable, giving unpredictable jumps in laser current (especially if adjusted while the laser was firing). The pot was (probably) becoming dirty/oxidized inside so it was a matter of time and use before failure.

There are three wires attached to the pot. The green wire connects to plus, orange connects to negative and the yellow wire connects the pot wiper to the power control circuit. The voltage between the green and orange wires is 5V DC. (although it is worth noting that the pot circuit sits 130V above ground, so be careful with it!) Dialing the pot clockwise:

  • Increases output power
  • Moves the wiper from the orange terminal to green
  • Increases the orange to yellow terminal resistance

So it was replaced with a 2k 10-turn linear pot wired in series with a 5k trim pot to restrict the output range to 0-15mA (normally 0-30mA, though the manual states not to exceed 15mA). The trim pot is connected on the "high side" of the pot (where the green wire connects). The trim pot was adjusted so that the tenth turn would cause the laser to output at 15mA.

Cleaning

The laser needs regular maintenance like any tool. If you're using it on a semi-regular basis then please take some time to clean it properly. If you don't feel comfortable doing this on your own, ask somebody knowledgeable to give you a hand.

Laser optics

There is a box for the laser that contains lens cleaning fluid, it is for cleaning glasses, and a micro-fibre cloth. Use this to clean the lens. The lens can be removed by carefully unscrewing the bottom of the mount. Remember that the lens should be oriented in the same way as it was when replacing it. Cleaning the lens should not have to be done regularly.

Sooty smoke from laser cutting (especially wood and hardboard) tends to collect on the lens and mirrors, obscuring the beam. As the optics become more clouded, the beam loses focus and overall power, which gives you weak rough cuts. If you notice that you need a progressively higher power setting as time goes on, it's probably because the optics need cleaning.

Coolant water

The laser coolant water needs to be replaced on a monthly (or so) basis, depending on the time of year. Otherwise the water gets nasty and grows jellyfish. In the summer months, every two weeks might be in order. In the winter, maybe every month. Use your best judgment.

  1. Find a spare container to put the pump in while you clean the water
  2. Make sure the laser station is turned off, including the pump
  3. Transfer the pump and tubes to the spare container. Be careful as there may be a little water left in the system!
  4. Wash out the bucket with warm soapy water. Rinse the bucket and be sure to get out all the soap completely. We don't want soapy water pumping through the laser, or the pump for that matter.
  5. Fill the bucket about half-way, and add in a half cup of double-strength vinegar (helps to sterilize the water). Important: do not use anything other than vinegar otherwise it may damage the pump.
  6. Wipe down the pump and tubes with a cloth and water (no soap).
  7. Put the pump and tubes in the half-filled bucket. Make sure there's enough water to submerge the pump.
  8. Turn on the pump and let it run a few minutes. This will get out any left-over gunk in the system.
  9. Remove the pump and dump the water.
  10. Fill the bucket with fresh water (90% full or so) and add a cup of double-strength vinegar.
  11. Put everything back together and you're done!

Test Suites

From time to time members of Think|Haus have developed test suites for the laser. These become particularly useful after doing significant work on the laser. Files are being stored on the shared folder under "Laser". Generally these test suites are able to check that the laser is focusing and running properly.

Some links

Credits

James Arlen drove out to Scarborough to buy the laser.
Trevyn Watson designed the new controller board and installed a 120V pump to replace the 240V pump.
Jason Garr, Mike Stoner, and Trevyn Watson built the step+direction controller board and connected it to LinuxCNC.
James Arlen removed the dead crappy 120V->240V step-up and installed the new 1 kW step-up transformer.
Jason Garr, Ben Tompkins, and Trevyn Watson installed the laser upstairs and built the permanent ventilation system.
Peter Jansen modified the Inkscape Gcode tools extension to suit the characteristics of LinuxCNC + our laser.
Adina Bogert-O'Brien modified Peter's plugin to make gcode the same size as the inkscape drawing.
Richard Degelder and Trevyn Watson installed the new ventilation system at the new space.
Peter Rogers for developing the G-Code Simulator.
Peter Rogers for building a new platform for the work area inside the laser.

Personal tools