====== LaserCutter ======
{{template>:project:infobox|
name=LaserCutter|
image=100_1775.jpg?200|
sw=|
hw=|
founder=[[user:tomsuch]] \\ [[user:aym]] \\ [[user:biiter]] \\ [[user:ruza]] \\ [[user:jenda]] \\ [[user:pasky]]\\ [[user:harvie]]|
interested=[[user:nephirus]]|
status=on hold
}}
~~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.
**[[http://jenda.hrach.eu/brm/lasic/photos/|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:
{{youtube>KPGBouy8N-Q?medium}}
==== 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.
{{:project:100_1775.jpg?400|}}
{{:project:100_1778.jpg?400|}}
{{:project:lasic-gershwin.jpg?400|}}
==== Possible upgrades ====
* Laser
* Fiber Coupled Laser Diode
* approx 0.5 - 8W of power
* cheap (1W IR Laser Diode for 99 USD)
* requires single lens to colimate (well as every other laser does)
* eg.: http://www.ebay.com/itm/1-Watt-Fiber-Coupled-IR-Laser-Diode-Burns-made-by-SDL-/390062848432
==== Documentation - hardware ====
TBD (photos?)
==== Documentation - software ====
=== Current Software Home ===
Current firmware and software is now maintained in git:
https://github.com/brmlab/lasic
=== 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
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
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:
* pause and resume of engraving
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
{{ :project:lasic:foto002.jpg?200 |}}
=== 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
* http://jenda.hrach.eu/brm/lasic/inkscape-svg-preparation.mkv
* ./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 ===
In progress.
==== 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
* http://robotika.cz/articles/steppers/cs
* https://bitbucket.org/hudson/boxer/src/tip/boxer - cute box generator
==== LASIK@home, LASIK@brm ====
* http://lasikathome.com/ :-D
* http://aktualne.centrum.cz/veda/clanek.phtml?id=725537 another usage…
*
==== Abuse :-) ====
{{ http://i.iinfo.cz/images/218/elektronicke-obcanky-3.png }}