LaserCutter
~~META:
status = on hold
&relation firstimage = :project:100_1775.jpg
~~
(or at least engraver, at this time…)
Project status
An XY robot from scanner and matrix printer was built and 1W laser was attached to it. It is not powerful enough to cut, but brmlab logo has been engraved into plastics (member's laptops and mobile phones) and wood. The device was dismantled after some time.
Currently, some members have their own cutters from China and some have powerful laser and plan to build a cutter, however no activity in this project has been observed recently.
PHOTOS
Aim of this project is to construct laser cutter and engraver able to cut plexiglass and wood.
Professional machines cost ~25000 EUR and their abilities are demonstrated on the video below:
KPGBouy8N-Q
Current status
[DONE] XY robot from old scanner and matrix printer
[DONE] 200mW red laser
[DONE] basic driver software
[TODO] more powerful laser (10W?)
[TODO] better software
[TODO] at least some shielding :)
Abilities
We are able to engrave bitmap image into dark plastic. Samples available in brmlab, photos coming soon!
We have engraved brmlab logo to a mobile phone backcover and to an EEE PC netbook.
Possible upgrades
Documentation - hardware
Documentation - software
Current Software Home
Pasky's Perl module
Check the Git repository, subdirectory perl/.
Use `perldoc Brm/Lasic.pm` and `perldoc Brm/Lasic/PBM.pm` for programming documentation.
You will need Perl modules Device::SerialPort and Moose:
apt-get install libmoose-perl libdevice-serialport-perl
You can use the Perl module to easily control the laser cutter:
Recalibrate and set at (0,0):
perl -I. -MBrm::Lasic -e 'my $l = Brm::Lasic->new(dev => "/dev/ttyUSB0"); $l->reset();'
Refocus (enter e.g. 50, -50 etc. on the input):
perl -I. -MBrm::Lasic -e 'my $l = Brm::Lasic->new(dev => "/dev/ttyUSB0"); while (<>) { chomp; $l->focus($_); }'
Rendering bitmap images
Convert image to PBM format; follow some of the instructions below for tips about making the image look well
Position the sample so that the laser navigation light points at the top left corner of the image area
./bitmap.pl <pbmfile>
engraves the bitmap
Rendering SVG images
Create a SVG image. It must contain only line and path objects and the line objects must not be bezier. For inkscape instructions, look below at this page.
Position the sample so that the laser navigation light points at the top left corner of the image area
./svg.pl <svgfile>
will first show a preview, then engrave the vectors
In case of small-dimension SVGs, the preview may look quite ugly due to rasterization - it will look (somewhat) better in reality; you may try tweaking self.subshift (0 to 0.5) in svg/SvgProcessor.pt
Jenda's PHP+sh script - bitmap engraving
Current version (as of 2011 Dec 27 early morning :) works \o/.
Improvements:
computes shortest laser path
supports grayscale engraving (however hardware still has problem with this)
supports normal PNG files
timing handled by MCU
TODO:
How-To:
Prepare your image.
White = laser will be off, black = laser will be on full power.
If you are engraving a photo, there should be lots of white, overexposed areas (“přepaly”) and most details should be in the lightest (RGB 220-255) parts.
Example of a well prepared photo is in the source package (foto002.png)
Edit configuration in cncduino.sh and kicker.sh (such as serial port)
You can experiment with different SPEED_* in cnc_duino.php
./cnc_duino.php myimage.png > myimage.cnc
Turn the machine on and focus laser (by moving it or sample up/down)
./cncduino.sh myimage.cnc &
./kicker.sh
http://jenda.hrach.eu/brm/lasic/php.tar.gz
btr's vector cutter
prepare SVG file
Position the object at the top left corner of the page
Inkscape: Path → Object to Path
In case of text object, Object → Ungroup
Select all nodes with “edit paths by nodes (F2)” tool; you may have to do this several times repeatedly to get to the segments themselves
“Insert new nodes into selected segments” (blue button on toolbar) to improve resolution
“Make selected segments lines” (blue button on toolbar)
Save as plain SVG
-
./showsvg.py file.svg > file.cnc
grep fuck file.cnc # are there any unsupported features left in SVG?
cat file.cnc | grep -E “^v ” | cut -d “ ” -f 3-4 > data.plot; gnuplot: plot './data.plot' # is this really what we want?
cat file.cnc | tr “ ” “\n” | sort -nu # sometimes there are ~5 points with absolutely broked coordinates → remove them with your favourite text editor
Turn the machine on and focus laser (by moving it or sample up/down)
./cncduino.sh myimage.cnc &
./kicker.sh
Oh_my_god_crappy_software_written_at_3AM
http://jenda.hrach.eu/brm/lasic/lasic.tar.gz
Open your bitmap in GIMP
Adjust contrast (Colors → Levels)
File → Export as image.PBM
Export options:
ASCII format
remove file header
(now should look like samples in tarball)
set image dimensions, USB port and filename in foo.sh
load material to the machine
power on
set laser to start point
FIRE!
TomSuch's GAMBAS project
Lessons Learned
Device::SerialPort is evil. Try to avoid at least reading from a tied filehandle, use lookfor() instead. The READLINE tied filehandle method crazily ioctl()s ICANON on and off, apparently confusing the kernel and making write()s in the application stuck on their way to the Arduino; if a newline is written to the device in another process, it gets to the device first _and_ unstucks the written data from the other process.
Usefull info about driving steppers
-
LASIK@home, LASIK@brm
Abuse :-)