Open Source Engraver

Post your build logs here

Open Source Engraver

Postby dirktheeng » Mon Sep 26, 2011 10:24 pm

All,

Now that I have the system up and running at least in vector mode with good ventilation, I am shifting my focus a little bit to developing a true open source laser engraver. Bart started an open source engraver a year or so ago and won some awards from XMOS for his work. I intend to continue that work as it petered out here a while ago in favor of the engravers from light object and/or FSE. While I really like the results of the engraving portion of those units, I am not really all that thrilled about the vector cutting. For arts and crafts, it is fine, but for cutting out parts that have to be dimensioned very carefully it can be a pain because there is no way to do an offset on the part. Basically, the vector cutting solution cuts everything right on the lines, so any adjustment you need to make to get parts to fit right entails going all the way back to your cad and making offsets from your original parts. If I use a cam program, I can just change my tool diameter to account for the kerf and off I go. I am also a multi-machine user so being able to generate parts in g-code is an advantage for me as I am familiar with and own the software to go from part to step signal.

That said, engraving is not really easily done through any CNC control software. Mach 3 has a plugin, but it is fairly slow and will not work with any USB plugin (such as the smooth stepper). It is really meant for impact engraving with a 3 axis mill. Lasers are much faster responding, faster moving, potentially higher resolution, and more difficult to control as we have to be concerned with duration of pulse and power intensity.

I want to be able to use a g-code based control software and be able to hand over motor/laser control to an engraver controller, allow it to do it's thing, and regain control in the vector mode. I plan to do this with modbus IO an arduino, an xmos controller, and a set of SPDT IC's from digikey.

I am in the process now of putting in an arduino to do varios modbus tasks like read the flow sensor, measure temperatures, and control the laser using the PPI technique that Epilog uses. I plan on using an extra digital out pin on that controller to tell the xmos to run an engraving program. When done, the xmos will set a pin high to let the arduino know that it's finished. The switch of control will be done with a multiplexer such as the M74HC157 from ST (pn: 497-1785-5-ND from digikey). These things work like relays, but can have as many as 16 in one little integrated circuit. Basically, you give one pin a high/low signal and it will select between 2 inputs for each output. The one I selected is a 4 bit, 2 into 1 chip that fits into a 16 pin DIP socket. I'll need 2.

So here's how I imagine this will work:

1) start a program in Mach, do something, whether move to a spot or do some cutting
2) Send the laser head to the upper left hand corner of the engraving area
3) set Mach to wait to move any axis until it gets a clear signal from the arduiono/modbus (you could also skip the modbus and use 2 pins on the parallel port/ smooth stepper if you have them free)
4) use the multiplexer to switch the input control signals from mach to the engraver. The signal will come from the arduino through the modbus
5) run the engraver program to do whatever it does and return to the exact same spot when finished
6) set the multiplexer back to mach control
7) send a signal to arduino/modbus/Mach that it is finished
7) continue whatever mach program was running before if any

Using this method, it should be possible to precisely place an engraving in a vector cut object. I will just have to plan the engraving area in my cut file before I start and make sure it is co-ordinated with whatever software I develop for the engraver controller. I imagine I will write a program in python to communicate with the xmos controller and set the engraving file up.

I think this should work well. It will also allow flexibility to be set up in just about any system and accept control from just about any source as the multiplexer will cut/splice signals b/4 it gets to the stepper driver board
dirktheeng
 
Posts: 616
Joined: Thu Sep 09, 2010 4:49 pm

Re: Open Source Engraver

Postby BenJackson » Mon Sep 26, 2011 11:33 pm

Have you followed my related work in my buildlog? I am engraving with EMC2. One line of gcode invokes a gcode subroutine (in a library file) which loops to produce the raster scan pattern while reading data from an external program. I was originally planning to use some external device to assist but with EMC2 it's not necessary.

Right now I don't have a fast enough DAC in the setup to do "grayscale" engraving but it would be easy to extend my method to use that if a DAC were available. I'm sure EMC2 has support for some existing external HW that does it.

To get "DSP" like functionality I'm working on a filter that will print PostScript. I've got a basic version going now.
BenJackson
 
Posts: 522
Joined: Fri Apr 15, 2011 6:13 pm

Re: Open Source Engraver

Postby dirktheeng » Tue Sep 27, 2011 1:48 am

Ok, I figured out how to do the switch of control between a vector program like Mach 3/ EMC2 and the engraver controller. What I need to do is put a point in my cad and assign it in the cam as a drill point. That point has to be in the upper-left corner of where I want the engraving should be. Then I write my post processor to interpret the drill command as putting in a "M150" command. Then I tell mach that M150 is a macro which will trigger an OEM button to feed hold, a pause, and then an output high to a certain pin. That pin then tells the xmos to start. The first thing that the xmos does is set the multiplexer to acceopt input from the xmos and not Mach3/EMC2. It does it's thing, moves the axis back to the start point, returns control to Mach3/emc2 and then sends a signal to an input pin. In Mach, I would assign this pin to the cycle start button which would resume any activity.

This will allow me to do all this action automatically and easily asign position to engravings directly from cad/cam.
dirktheeng
 
Posts: 616
Joined: Thu Sep 09, 2010 4:49 pm

Re: Open Source Engraver

Postby r691175002 » Tue Sep 27, 2011 4:51 am

TBH Since you can get mach3 to do the heavy lifting with the g-code I'm not sure an xmos is really necessary anymore.

The maple native has an arm cortex which powerful enough to do everything needed anyways and also packs some extra features. The built in DAC would allow you to control the laser power through both current limiting and PWM. Another advantage is the device is essentially arduino compatible which would make it much easier to code for. Its also a bit cheaper.

To be honest, even the maple mini would be enough for making a stepper move back and forth while putting out a PWM signal. You can always stick a DAC on the same board as the multiplexor.
r691175002
 
Posts: 242
Joined: Mon Dec 13, 2010 5:05 pm

Re: Open Source Engraver

Postby steves » Tue Sep 27, 2011 12:50 pm

Dirk

I remember you experimenting with grbl and an arduino earlier. Not sure if it would have any impact on your current setup but the arduino makers have announced an arm cortex arduino.

http://arduino.cc/blog/2011/09/17/arduino-launches-new-products-in-maker-faire/
steves
 
Posts: 18
Joined: Thu May 19, 2011 1:15 pm

Re: Open Source Engraver

Postby dirktheeng » Tue Sep 27, 2011 1:20 pm

Bart:

What are your thoughts? Since you are the one with the experience so far of building your own engraver controller, do you think that the ARM Cortex will stand a good chance of being effective? The only advantage of the XMOS is the muti-core aspect which means I can assign movement of the x axis to 1 core, movement of the y axis to another, laser pulsing to a third, and general overhead to a fourth, etc. I do want this thing to be easy to use and modify as well. I don't think I will have any problems programming the XMOS as I have some background in parallel programming and such, but if there is a simpler, cheaper, and easier to use solution out there, perhaps I should try for that instead. What do you think?
dirktheeng
 
Posts: 616
Joined: Thu Sep 09, 2010 4:49 pm


Return to Build Logs

Who is online

Users browsing this forum: No registered users and 40 guests

cron