Step 4Programming the laser cutter
Don Lancaster wrote some postscript code that can take a post script file and then turn it into a simple text file that contains the numbers 0-7. The meaning:
0 - E
1 - NE
2 - N
3 - NW
4 - W
5 - SW
6 - S
7 - SE
U means move the pen up
D means move the pen down
and that's all we're going to be using
=========================
ALL FILES CAN BE FOUND AT:
http://modati.com/lasercutter/
For those who like to hear the instructions here's a video:
=========================
Update, easy way to make a Flutterfly
Some people were having trouble figuring out how to create a flut file, so Bryn helped everyone out by creating this program that does it for you, make sure to send it a file that is "fair", that is without any showpage's, or quit commands in the .ps. The program automatically spits them out, but check the ps if you hit the error page.flutterflier, this is where you turn your postscript into a flutterfly
--The old way to create a Flutterfy--
Once you saved your drawing as a postscript file. Open it up in a text editor like notepad. Also open up the file yourpostscripthere.ps in notepad. Cope the entire body of your postscript drawing and paste it in flutterafy.ps right after the line that says:
% ============= YOUR POSTSCRIPT SOURCE FILE STARTS HERE ===============
% ============= MUST NOT INCLUDE SHOWPAGE, QUIT, ETC... ===============
then you paste your stuff in here
% ============== YOUR POSTSCRIPT SOURCE FILE ENDS HERE ================
then change the paths in these two lines:
/destfilename (c://pope.txt) def
(./pope.txt) readflutfile % read selected flutfile
change these to the values you want to find your finished flut file at.
Resave yourpostscripthere.ps
and install http://pages.cs.wisc.edu/~ghost/doc/GPL/index.htm Ghostscript]: Once you have ghostscript installed you can either drag yourpostscripthere.ps to the icon, or open it up inside ghostscript, it'll create a flutfile for you in the place you told it to c://whateveryousaid (remember to use doube /'s like c://sommat// ..)
So now you'll have a flut file. here's a demo for ya:
http://modati.com/lasercutter/heylaser3.txt
(this is the stencil that i cut out, it says "hello lasers!")
next you need to open a C compiler. the old version of bloodshed DEV CPP works great! Get v 4.0, not the new one.
http://modati.com/lasercutter/flutafy.cpp
This is the flutafy.cpp file that you can edit to run your own flut file. Right now if you compile it it will create an executable that will accept any filename as a parameter. So you just drag your .txt or .flut file over to the .exe and it'll start chomping. chompchompchomp. I'm providing this code so if you want to make any improvements you can. Please share with me though.
THIS IS AN UPDATE
If you don't know much about programming. Here is the executable:Executable for a .exe that lets you drag any flut file to it and will run the stepper motors properly
And if you have XP you'll need this one:
Updated exe for XP
XP users will need this DLL to run this code:
INPOUT32.DLL
(For instructions on how to install a DLL, Lifehacker has a nice one.)
Now you can drag any file that has 0-9 for step directions (a flut file. I have some in: http://modati.com/lasercutter/) and it will start communicating with the laser cutter you just made.
If your parallel port is plugged in and everything is working okay you should be cutting in no time!
-Love
Bilal Ghalib
| « Previous Step | Download PDFView All Steps | Next Step » |












































great idea by the way.
I did the compilation on a unix machine, and generated text files with the motion commands. The resulting "turtle graphics" commands (NNNNEEEEWWWWNSSS...) are voluminous of course; so I hacked up a simple run-length-encoding scheme, eg. "NNNNNNNN" becomes "8N" that sort of thing. The RLE sped it up by ten or so.
The motion commands were acted upon by a tiny PIC (this was 1999), a Micromint Inc STAMP. Commands came serially, a 2400 bps bit-banger.
This is part of my old Story Teller system (http://wps.com/products/Story-Teller/index.html).
(I have a nice high-res high-torque XY stepper assembly I mean to one day cobble up into a metal disintegrator to write directly on metal, and will port all this code to the Arduino. Maybe now I'll do it sooner... :-)
Thanks for your excellent project. I'll forward to students here (www.ACE.uci.edu).
I spoze I should make my old code available too.
http://wps.com/products/Story-Teller/technical/machine-words/index.html
The referring page, describing the Story Teller system tek crap, is here
http://wps.com/products/Story-Teller/technical/index.html
ANd here's what it does
http://wps.com/products/Story-Teller/index.html